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

/v1/workspace/resources/{resource_id}/share

ElevenLabs API

Share Workspace Resource

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
→ 216 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 POST 'https://api.elevenlabs.io/v1/workspace/resources/resource-id/share' \  -H "xi-api-key: $ELEVENLABS_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "role": "admin",  "resource_type": "voice",  "user_email": "string",  "group_id": "string",  "workspace_api_key_id": "string"}'
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
resource_id path string Yes The ID of the target resource.
role body string Yes Role to grant to the target: one of 'admin', 'editor', 'commenter', or 'viewer'.
resource_type body string Yes Resource types that can be shared in the workspace. The name always need to match the collection names
user_email body string No The email of the user or service account.
group_id body string No The ID of the target group. Use 'default' to set the resource's baseline role — every workspace member receives this role unless they hold a higher one through a direct user grant, group membership, or workspace (service account) API key.
workspace_api_key_id body string No The ID of the target workspace (service account) API key. This is not the API key string itself that you pass in the header for authentication — it is the key's ID, which workspace admins can find under Developers → Service Accounts.

Response 200 OK

{}