apicheats.dev elevenlabs/llms.txt Raw .md
PATCH

/v1/service-accounts/{service_account_user_id}/api-keys/{api_key_id}

ElevenLabs API

Edit Service Account Api Key

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 207 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X PATCH 'https://api.elevenlabs.io/v1/service-accounts/service-account-user-id/api-keys/api-key-id' \  -H "xi-api-key: $ELEVENLABS_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "is_enabled": "no_update",  "name": "string",  "permissions": "no_update",  "character_limit": "no_update",  "allowed_ips": "no_update",  "third_party_disable_allowed": "no_update"}'
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
service_account_user_id path string Yes path parameter service_account_user_id.
api_key_id path string Yes path parameter api_key_id.
is_enabled body boolean No Whether to enable or disable the API key.
name body string No The name of the XI API key to use (used for identification purposes only).
permissions body string[] No The permissions of the XI API.
character_limit body integer No 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 body string[] No 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 body boolean No 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.

Response 200 OK

{}