Define a webhook tool
POST /v1/agents/tools, then attach its ID through config.tools. See Tools for the shared execution settings.
Request schema
api_schema.url must use HTTPS, and requests to private and internal network ranges are blocked. Supported methods are GET, POST, PUT, PATCH, and DELETE.
path_params_schemafills placeholders such as{order_id}. Each path parameter is required and may be a string, integer, or number.query_params_schemadescribes query parameters withpropertiesand an optionalrequiredlist.request_body_schemadescribes a JSON object forPOST,PUT, orPATCH. Body properties may be nested.
enum to constrain a value. Use constant_value for a value the model must not choose, such as a tenant ID or API version.
Headers and authentication
request_headers accepts literal strings and write-only secrets:
authentication adds credentials to the Authorization header at request time. bearer sends Authorization: Bearer <token>, and basic_auth sends Authorization: Basic <base64(username:password)>. Do not also set Authorization in request_headers.
Secret values are write-only and never returned. To keep an existing secret when you update a tool, send its field as { "type": "secret" } without secret_value. Omitting the field removes that credential. To remove authentication entirely, omit authentication from the api_schema you send.
Cartesia reserves transport headers that it manages itself. Header names must be unique, regardless of capitalization.
Responses and timeouts
The response body becomes the tool result. Return only the data the model needs; Cartesia truncates response bodies after 4 KiB. The request times out afterresponse_timeout_secs, which defaults to 20 seconds. Use execution_mode: "async" for requests that do not need to block the current turn.