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
  • Get started
    • Overview
    • Quickstart
  • Configure
    • Overview
    • Voice & language
    • Knowledge base
    • Tools
    • Personalization
    • Authentication
  • Deploy
    • Overview
    • Environment variables
    • WhatsApp
    • Batch calls
  • Monitor
    • Overview
    • Users
    • Testing
    • Experiments
    • Versioning
    • Conversation Analysis
    • Analytics
    • Real-time monitoring
    • OpenTelemetry traces
    • Privacy
    • Cost optimization
    • CLI
  • Advanced
    • Events
    • Custom models
    • LLM cascading
    • Post-call webhooks
  • Resources
    • UI components
  • Guides
    • Chat Mode
    • Burst pricing
    • ElevenLabs' docs agent
    • Scaling user interviews
    • Simulate Conversations
        • WSSAgent WebSockets
          • GETList environment variables
          • POSTCreate environment variable
          • GETGet environment variable
          • PATCHUpdate environment variable
LogoLogo
Login
Login
Connect
BlogHelp CenterAPI PricingSign up
API referenceEnvironment Variables

Create environment variable

POST
/v1/convai/environment-variables
POST
/v1/convai/environment-variables
$curl -X POST https://api.elevenlabs.io/v1/convai/environment-variables \
> -H "Content-Type: application/json" \
> -d '{
> "type": "string",
> "label": "API_BASE_URL",
> "values": {}
>}'
1{
2 "label": "API_BASE_URL",
3 "created_at_unix_secs": 1710000000,
4 "updated_at_unix_secs": 1710003600,
5 "type": "string",
6 "id": "envvar_abcdef1234567890",
7 "workspace_id": "workspace_0987654321fedcba",
8 "values": {},
9 "created_by_user_id": "user_1234567890abcdef"
10}
Create a new environment variable for the workspace
Was this page helpful?
Previous

Get environment variable

Next
Built with

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
stringobjectRequired
OR
secretobjectRequired
OR
auth_connectionobjectRequired

Response

Successful Response
labelstring
created_at_unix_secsinteger
updated_at_unix_secsinteger
typeenum
Allowed values:
idstring
workspace_idstring
valuesmap from strings to strings or map from strings to objects
created_by_user_idstring

Errors

400
Environment Variables Create Request Bad Request Error
409
Environment Variables Create Request Conflict Error
422
Environment Variables Create Request Unprocessable Entity Error