PATCH
/v1/convai/tools/{tool_id}
ElevenLabs APIUpdate Tool
- 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
→ 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/convai/tools/tool-id' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "tool_config": { "response_timeout_secs": 20, "type": "webhook" }, "response_mocks": [ { "parameter_conditions": [ { "eval": { "type": "[recursive or deeply nested schema]", "description": "[recursive or deeply nested schema]" }, "path": "string" } ], "mock_result": "string", "is_error": false } ]}'Get a free ElevenLabs API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| tool_id | path | string | Yes | ID of the requested tool. |
| tool_config | body | object | Yes | Configuration for the tool |
| response_mocks | body | object[] | No | Mock responses with optional parameter conditions. Evaluated top-to-bottom; first match wins. |
Response 200 OK
{
"id": "string",
"tool_config": {
"response_timeout_secs": 20,
"type": "webhook"
},
"access_info": {
"access_source": "creator",
"creator_email": "john.doe@example.com",
"creator_name": "John Doe",
"is_creator": true,
"role": "admin"
},
"usage_stats": {
"total_calls": 0,
"avg_latency_secs": 0
},
"response_mocks": [
{
"parameter_conditions": [
{
"eval": {
"type": "[recursive or deeply nested schema]",
"description": "[recursive or deeply nested schema]"
},
"path": "string"
}
],
"mock_result": "string",
"is_error": false
}
]
}