# PATCH /v1/convai/settings (ElevenLabs API)
Base URL: https://api.elevenlabs.io
Auth: xi-api-key: <ELEVENLABS_API_KEY>
Last verified: 2026-09-03

> Update Convai Settings

## 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/settings' \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"conversation_initiation_client_data_webhook":{"request_headers":{},"url":"https://example.com/webhook"},"webhooks":{"post_call_webhook_id":"string","events":[]}}'

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| conversation_initiation_client_data_webhook | body | object | No | Request body field conversation_initiation_client_data_we... |
| webhooks | body | object | No | Request body field webhooks. |
| can_use_mcp_servers | body | boolean | No | Whether the workspace can use MCP servers |
| rag_retention_period_days | body | integer | No | Request body field rag_retention_period_days. |

## Response (200 OK)
{"conversation_initiation_client_data_webhook":{"request_headers":{},"url":"https://example.com/webhook"},"webhooks":{"post_call_webhook_id":"string","events":[]}}

---
Need an API key? Get one at https://elevenlabs.io/app/sign-up