For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Connect
BlogHelp CenterAPI PricingSign up
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
OverviewElevenCreativeElevenAgentsElevenAPIReception AIAPI referenceChangelog
  • API reference
    • Introduction
    • Authentication
    • Streaming
  • ElevenAgents
  • ElevenAPI
  • ElevenCreative
  • Core Resources
  • Workspace
        • GETGet Workspace Auth Connections
        • POSTCreate Workspace Auth Connection
        • DELDelete Workspace Auth Connection
        • PATCHUpdate Workspace Auth Connection
  • Legacy
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
WorkspaceWorkspaceAuth Connections

Create Workspace Auth Connection

POST
/v1/workspace/auth-connections
POST
/v1/workspace/auth-connections
$curl -X POST https://api.elevenlabs.io/v1/workspace/auth-connections \
> -H "Content-Type: application/json" \
> -d '{
> "name": "string",
> "provider": "string",
> "client_id": "string",
> "token_url": "string",
> "client_secret": "string"
>}'
1{
2 "auth_type": "oauth2_client_credentials",
3 "client_id": "string",
4 "id": "string",
5 "name": "string",
6 "provider": "string",
7 "token_url": "string",
8 "basic_auth_in_header": false,
9 "custom_headers": {},
10 "extra_params": {},
11 "scopes": [
12 "string"
13 ],
14 "used_by": {
15 "tools": [
16 {
17 "type": "available",
18 "access_level": "admin",
19 "created_at_unix_secs": 1,
20 "id": "string",
21 "name": "string"
22 }
23 ],
24 "mcp_servers": [
25 {
26 "type": "available",
27 "access_level": "admin",
28 "created_at_unix_secs": 1,
29 "id": "string",
30 "name": "string"
31 }
32 ],
33 "integration_connections": [
34 {
35 "id": "string",
36 "name": "string"
37 }
38 ]
39 }
40}
Create a new OAuth2 auth connection for the workspace
Was this page helpful?
Previous

Delete Workspace Auth Connection

Next
Built with

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
CreateOAuth2ClientCredsRequestobjectRequired

Request model for creating auth connections - inherits common settings and includes sensitive fields

OR
CreateCustomHeaderAuthRequestobjectRequired
OR
CreateBasicAuthRequestobjectRequired

Request model for creating Basic Auth connections - inherits common settings and includes sensitive fields

OR
CreateBearerAuthRequestobjectRequired

Request model for creating Bearer Auth connections - inherits common settings and includes sensitive fields

OR
CreateOAuth2JWTRequestobjectRequired

Request model for creating OAuth2 JWT auth connections - inherits common settings and includes sensitive fields

OR
CreatePrivateKeyJWTRequestobjectRequired

Request model for creating Private Key JWT auth connections - inherits common settings and includes sensitive fields

OR
CreateMTLSAuthRequestobjectRequired
Request model for creating mTLS auth connections.

Response

Successful Response
oauth2_client_credentialsobject
Response model for oauth2 client creds
OR
basic_authobject
Response model for basic auth
OR
bearer_authobject
Response model for bearer auth
OR
oauth2_jwtobject
Response model for OAuth2 JWT auth connections
OR
private_key_jwtobject
Response model for Private Key JWT auth connections
OR
mtlsobject
Response model for mTLS auth connections.
OR
custom_header_authobject
Response model for Custom Header Auth auth connections
OR
api_integration_oauth2_auth_codeobject

Response model for integration-managed OAuth2 Auth Code auth connections

OR
api_integration_oauth2_custom_appobject

Response model for user-owned OAuth2 Custom App auth connections

OR
whatsapp_authobject
OR
slack_bot_authobject
Response model for the internal Slack BYO bot auth connection.
OR
url_secretobject

Errors

422
Unprocessable Entity Error