---
title: "Create Service Account Api Key"
method: POST
path: "/v1/service-accounts/{service_account_user_id}/api-keys"
tags: ["workspace"]
---

# Create Service Account Api Key

`POST /v1/service-accounts/{service_account_user_id}/api-keys`

## Request

- Base URL: `https://api.elevenlabs.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elevenlabs.io/v1/service-accounts/{service_account_user_id}/api-keys`
- Auth: none declared

Create a new API key for a service account

## Path parameters

- `service_account_user_id` string, required

## Headers

- `xi-api-key` string, nullable: Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost
  - `name` string, required
  - `permissions` union, required: The permissions of the XI API.
    - PermissionType[]
    - 'all'
  - `character_limit` integer, nullable: The character limit of the XI API key. If provided this will limit the usage of this api key to n characters per month where n is the chosen value. Requests that incur charges will fail after reaching this monthly limit.
  - `allowed_ips` string[], nullable: List of IP addresses or CIDR ranges allowed to use this API key. Each entry may be a CIDR range (e.g. '10.0.0.0/24') or a bare IP address (normalized to /32 or /128). On create, omit or pass null to allow all IPs. On update, omit to leave the allowlist unchanged, or pass "clear" to remove it.
  - `third_party_disable_allowed` boolean, nullable: Whether the holder of this key may disable it via the self-disable endpoint. On create, omit or pass null to use the workspace's default (enabled for non-Enterprise plans, disabled for Enterprise plans). On update, omit to leave it unchanged, or pass "clear" to reset it to the workspace default. Only honored for workspaces with self-disable access enabled.
  - `tts_concurrency_limit` integer, nullable: Maximum concurrent text-to-speech/speech-to-speech requests for this API key. Only available for enterprise customers.
  - `dubbing_concurrency_limit` integer, nullable: Maximum concurrent dubbing requests for this API key. Only available for enterprise customers.
  - `music_concurrency_limit` integer, nullable: Maximum concurrent music generation requests for this API key. Only available for enterprise customers.
  - `expires_at_unix` integer, nullable: Unix timestamp (in seconds) after which this API key stops working. When set, it must be at least 15 minutes and at most 90 days in the future. On create, omit or pass null for a key that never expires. On update, omit to leave it unchanged, or pass "clear" to remove the expiry (never expires).

## Response `200`

Successful Response

- WorkspaceCreateApiKeyResponseModel
  - `xi-api-key` string, required
  - `key_id` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-26** `169936a30a2d`: 1 info
  - added the new optional request property `expires_at_unix`
- **2026-10-08** `bfa9d7a4aa2a`: 2 info
  - added the new `voice_collections_read` enum value to the request property `permissions/anyOf[subschema #1]/items/`
  - added the new `voice_collections_write` enum value to the request property `permissions/anyOf[subschema #1]/items/`
- **2026-09-23** `ee57929773bf`: 3 info
  - added the new optional request property `dubbing_concurrency_limit`
  - added the new optional request property `music_concurrency_limit`
  - added the new optional request property `tts_concurrency_limit`
- **2026-07-13** `009bd651509a`: 5 info
  - added the new optional request property `third_party_disable_allowed`
  - added the new `conversation_privacy_manage` enum value to the request property `permissions/anyOf[subschema #1]/items/`
  - added the new `flows` enum value to the request property `permissions/anyOf[subschema #1]/items/`
  - added the new `synthid_detector` enum value to the request property `permissions/anyOf[subschema #1]/items/`
  - …1 more
- **2026-06-08** `37fac3c5a2d7`: 2 info
  - added the new optional request property `allowed_ips`
  - added the new `copy_resources_cross_workspace` enum value to the request property `permissions/anyOf[subschema #1]/items/`

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/service-accounts/:service_account_user_id/api-keys/post.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/d04f5e77c40a?raw)
