> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heychocolate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customers

> Mutations for managing customers and API keys.

## createApiKey

Create a new API key for your organization.

```graphql theme={null}
mutation {
  createApiKey(input: {
    label: "Production Backend"
    permissions: ["read", "write", "calculate"]
  }) {
    apiKey
    id
    prefix
    label
    permissions
    createdAt
  }
}
```

<Warning>
  The full API key is only returned once at creation time. Store it securely.
</Warning>

**Input:**

| Field         | Type       | Required | Description                      |
| ------------- | ---------- | -------- | -------------------------------- |
| `label`       | String!    | Yes      | Descriptive label for the key    |
| `permissions` | \[String!] | No       | Permission scopes (default: all) |

## revokeApiKey

Revoke an existing API key.

```graphql theme={null}
mutation {
  revokeApiKey(id: "key_abc123") {
    success
    revokedAt
  }
}
```

## updateCustomer

Update customer profile data.

```graphql theme={null}
mutation {
  updateCustomer(input: {
    name: "Acme Sustainability BV"
    webhookUrl: "https://acme.com/webhooks/heychocolate"
  }) {
    id
    name
    webhookUrl
    updatedAt
  }
}
```

**Input:**

| Field        | Type   | Required | Description         |
| ------------ | ------ | -------- | ------------------- |
| `name`       | String | No       | Display name        |
| `webhookUrl` | String | No       | Default webhook URL |
