{"openapi":"3.1.0","info":{"title":"Teler API Reference","summary":"Programmable voice infrastructure for AI agents.","description":"The Teler API lets you place and control programmable voice calls, stream live\naudio to AI agents, and observe everything that happens on a call in real time.\n\nAll endpoints are served over HTTPS from `https://api.frejun.ai` and speak JSON.\nAuthenticate every request with your secret API key in the `x-api-key` header:\n\n```bash\ncurl https://api.frejun.ai/api/v1/voice/calls \\\n -H \"x-api-key: $TELER_API_KEY\"\n```\n\nKeys are account-scoped and grant full access — treat them like passwords, keep\nthem server-side, and rotate them from the\n[Teler dashboard](https://platform.frejun.ai/signup) if one leaks. A missing or\ninvalid key returns `403`.\n\nGuides for resource identifiers, pagination, errors, idempotency, webhooks, and\nthe official Python and Node.js SDKs live in the\n[Teler documentation](https://frejun.com/docs/teler/).\n","contact":{"name":"Teler support","email":"support@frejun.com"},"version":"0.1.0"},"servers":[{"url":"https://api.frejun.ai","description":"Production"}],"paths":{"/api/v1/calls/initiate":{"post":{"tags":["Voice / Calls (legacy)"],"summary":"(Deprecated) Initiate a call","description":"**Deprecated.** Use `POST /api/v1/voice/calls/initiate` (Voice / Calls) instead. This path is kept only for backwards compatibility and will be removed in a future version.","operationId":"initiate_call_legacy","deprecated":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInitiateRequest"}}}},"responses":{"202":{"description":"The call was accepted and is being placed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInitiateResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"502":{"description":"Teler could not reach the call-control service.","content":{"application/json":{"example":{"success":false,"message":"The call could not be initiated. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"The call could not be initiated in time.","content":{"application/json":{"example":{"success":false,"message":"The call could not be initiated in time. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls/initiate":{"post":{"tags":["Voice / Calls"],"summary":"Initiate a call","description":"Place an outbound call. Teler dials `to_number` from `from_number`, and once the call connects it fetches your `flow_url` to drive the conversation. Status updates are delivered to `status_callback_url` for the lifetime of the call.\n\nThe call is accepted asynchronously: a `202` means Teler has queued the call, not that the callee has answered. Track progress via webhooks or by polling **Retrieve a call**.","operationId":"initiate_call","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInitiateRequest"}}}},"responses":{"202":{"description":"The call was accepted and is being placed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallInitiateResponse"}}}},"400":{"description":"The call was rejected before dialing. The `code` and `message` are propagated from the call-control service and describe the specific reason; the values shown here are illustrative.","content":{"application/json":{"example":{"success":false,"message":"The from_number is not provisioned for outbound calls.","code":"from_number_not_provisioned"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"502":{"description":"Teler could not reach the call-control service.","content":{"application/json":{"example":{"success":false,"message":"The call could not be initiated. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"The call could not be initiated in time.","content":{"application/json":{"example":{"success":false,"message":"The call could not be initiated in time. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls":{"get":{"tags":["Voice / Calls"],"summary":"List calls","description":"List your account's calls, newest first. Filter by state, numbers, or creation time, and page through results with cursors (see the Pagination section in the overview).","operationId":"list_voice_calls","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CallSessionState"},{"type":"null"}],"title":"State"}},{"name":"from_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"}},{"name":"to_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor — page toward older rows (next page).","title":"Cursor After"},"description":"Opaque cursor — page toward older rows (next page)."},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor — page toward newer rows (previous page).","title":"Cursor Before"},"description":"Opaque cursor — page toward newer rows (previous page)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_CallSessionResponse_"}}}},"400":{"description":"The pagination cursor is invalid or has expired.","content":{"application/json":{"example":{"success":false,"message":"The pagination cursor is invalid or has expired."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}":{"get":{"tags":["Voice / Calls"],"summary":"Retrieve a call","description":"Retrieve a single call by its identifier, including its legs.","operationId":"retrieve_voice_call","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallSessionResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/legs":{"get":{"tags":["Voice / Calls"],"summary":"List call legs","description":"List the individual legs that make up a call, in creation order.","operationId":"list_call_legs","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_CallLegResponse_"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/apps":{"post":{"tags":["Voice / Apps"],"summary":"Create a voice app","operationId":"create_voice_app","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"get":{"tags":["Voice / Apps"],"summary":"List voice apps","operationId":"list_voice_apps","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Status"}},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_CallAppResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/apps/{voice_app_id}":{"get":{"tags":["Voice / Apps"],"summary":"Retrieve a voice app","operationId":"retrieve_voice_app","parameters":[{"name":"voice_app_id","in":"path","required":true,"schema":{"type":"string","title":"Voice App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"patch":{"tags":["Voice / Apps"],"summary":"Update a voice app","operationId":"update_voice_app","parameters":[{"name":"voice_app_id","in":"path","required":true,"schema":{"type":"string","title":"Voice App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"delete":{"tags":["Voice / Apps"],"summary":"Delete a voice app","operationId":"delete_voice_app","parameters":[{"name":"voice_app_id","in":"path","required":true,"schema":{"type":"string","title":"Voice App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/apps/{voice_app_id}/virtual-numbers":{"get":{"tags":["Voice / Apps"],"summary":"List virtual numbers for a voice app","operationId":"list_voice_app_virtual_numbers","parameters":[{"name":"voice_app_id","in":"path","required":true,"schema":{"type":"string","title":"Voice App Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Location"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_VNListResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/hangup":{"post":{"tags":["Voice / Call Controls"],"summary":"Hang up a call","description":"End a call, or a single leg of it. Omit `leg_id` to hang up the entire call; supply it to drop just that leg.","operationId":"hangup_call","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HangupRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationAccepted"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The call is not in a state that accepts controls (e.g. it has already ended). `code` is one of `call_not_live`, `leg_not_found`, `call_not_controllable`, or `feature_not_enabled`.","content":{"application/json":{"example":{"success":false,"message":"The call is not in a state that accepts controls.","code":"call_not_live","type":"invalid_state"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"503":{"description":"The call-control service is temporarily unavailable. Safe to retry.","content":{"application/json":{"example":{"success":false,"message":"The action could not be applied. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/mute":{"post":{"tags":["Voice / Call Controls"],"summary":"Mute or unmute a call leg","description":"Mute (`on: true`) or unmute (`on: false`) a specific leg of a call.","operationId":"mute_call","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MuteRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationAccepted"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The call is not in a state that accepts controls (e.g. it has already ended). `code` is one of `call_not_live`, `leg_not_found`, `call_not_controllable`, or `feature_not_enabled`.","content":{"application/json":{"example":{"success":false,"message":"The call is not in a state that accepts controls.","code":"call_not_live","type":"invalid_state"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"503":{"description":"The call-control service is temporarily unavailable. Safe to retry.","content":{"application/json":{"example":{"success":false,"message":"The action could not be applied. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/dtmf":{"post":{"tags":["Voice / Call Controls"],"summary":"Send DTMF tones on a call leg","description":"Send DTMF (touch-tone) digits on a call leg, e.g. to navigate an IVR.","operationId":"send_dtmf","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtmfRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationAccepted"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The call is not in a state that accepts controls (e.g. it has already ended). `code` is one of `call_not_live`, `leg_not_found`, `call_not_controllable`, or `feature_not_enabled`.","content":{"application/json":{"example":{"success":false,"message":"The call is not in a state that accepts controls.","code":"call_not_live","type":"invalid_state"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"503":{"description":"The call-control service is temporarily unavailable. Safe to retry.","content":{"application/json":{"example":{"success":false,"message":"The action could not be applied. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/play":{"post":{"tags":["Voice / Call Controls"],"summary":"Play an audio file into the call","description":"Play an audio file into the call. The response includes a `playback_id` you can use to correlate playback lifecycle webhooks.","operationId":"play_audio","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationAccepted"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The call is not in a state that accepts controls (e.g. it has already ended). `code` is one of `call_not_live`, `leg_not_found`, `call_not_controllable`, or `feature_not_enabled`.","content":{"application/json":{"example":{"success":false,"message":"The call is not in a state that accepts controls.","code":"call_not_live","type":"invalid_state"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"503":{"description":"The call-control service is temporarily unavailable. Safe to retry.","content":{"application/json":{"example":{"success":false,"message":"The action could not be applied. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/voice/calls/{call_id}/transfer":{"post":{"tags":["Voice / Operations"],"summary":"Transfer a call","description":"Transfer an in-progress call to a new destination — a phone number (`pstn`) or a SIP URI (`sip`). Only `cold` transfers are currently supported. A call can have only one transfer in flight at a time.\n\nThe transfer is accepted asynchronously; a `202` means it has been started, not that the target has answered.","operationId":"transfer_call","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"}}}},"responses":{"202":{"description":"The transfer was accepted and is being placed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferAccepted"}}}},"400":{"description":"The transfer target or mode is invalid (e.g. missing `number` for a `pstn` target, or an unsupported mode).","content":{"application/json":{"example":{"success":false,"message":"target.number is required when kind='pstn'.","code":"invalid_target"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A transfer is already in progress for this call.","content":{"application/json":{"example":{"success":false,"message":"A transfer is already in progress for this call.","code":"transfer_in_progress","type":"invalid_state"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"503":{"description":"The call-control service is temporarily unavailable. Safe to retry.","content":{"application/json":{"example":{"success":false,"message":"The transfer could not be started. Please try again."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/virtual-numbers":{"get":{"tags":["Virtual Numbers"],"summary":"List virtual numbers","operationId":"list_virtual_numbers","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Location"}},{"name":"voice_app","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Voice App"}},{"name":"sip_trunk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sip Trunk"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_VNListResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/virtual-numbers/assign":{"post":{"tags":["Virtual Numbers"],"summary":"Assign virtual numbers","operationId":"assign_virtual_numbers","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Location"}},{"name":"voice_app","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Voice App"}},{"name":"sip_trunk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sip Trunk"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignVNsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/virtual-numbers/unassign":{"post":{"tags":["Virtual Numbers"],"summary":"Unassign virtual numbers","operationId":"unassign_virtual_numbers","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Location"}},{"name":"voice_app","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Voice App"}},{"name":"sip_trunk","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Sip Trunk"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnassignVNsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/virtual-numbers/{vn_id}":{"patch":{"tags":["Virtual Numbers"],"summary":"Update a virtual number","operationId":"update_virtual_number","parameters":[{"name":"vn_id","in":"path","required":true,"schema":{"type":"string","title":"Vn Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VNUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VNResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/calls":{"get":{"tags":["SIP / Calls"],"summary":"List SIP calls","description":"List calls that traversed your SIP trunks, newest first. Filter by trunk, numbers, or creation time, and page with cursors (see the Pagination section in the overview).","operationId":"list_sip_calls","parameters":[{"name":"trunk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by SIP trunk. Accepts the `st_` identifier.","title":"Trunk Id"},"description":"Filter by SIP trunk. Accepts the `st_` identifier."},{"name":"from_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number"}},{"name":"to_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SipCallResponse_"}}}},"400":{"description":"The pagination cursor is invalid or has expired.","content":{"application/json":{"example":{"success":false,"message":"The pagination cursor is invalid or has expired."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/calls/{call_id}":{"get":{"tags":["SIP / Calls"],"summary":"Retrieve a SIP call","description":"Retrieve a single SIP call by its identifier.","operationId":"retrieve_sip_call","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipCallResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No call matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested call was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/trunks":{"post":{"tags":["SIP / Trunks"],"summary":"Create a SIP trunk","operationId":"create_sip_trunk","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipTrunkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipTrunkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"get":{"tags":["SIP / Trunks"],"summary":"List SIP trunks","operationId":"list_sip_trunks","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Status"}},{"type":"null"}],"title":"Status"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SipTrunkResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/trunks/{trunk_id}":{"get":{"tags":["SIP / Trunks"],"summary":"Retrieve a SIP trunk","operationId":"retrieve_sip_trunk","parameters":[{"name":"trunk_id","in":"path","required":true,"schema":{"type":"string","title":"Trunk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipTrunkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"patch":{"tags":["SIP / Trunks"],"summary":"Update a SIP trunk","operationId":"update_sip_trunk","parameters":[{"name":"trunk_id","in":"path","required":true,"schema":{"type":"string","title":"Trunk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipTrunkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipTrunkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"delete":{"tags":["SIP / Trunks"],"summary":"Delete a SIP trunk","operationId":"delete_sip_trunk","parameters":[{"name":"trunk_id","in":"path","required":true,"schema":{"type":"string","title":"Trunk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/trunks/{trunk_id}/virtual-numbers":{"get":{"tags":["SIP / Trunks"],"summary":"List virtual numbers for a SIP trunk","operationId":"list_sip_trunk_virtual_numbers","parameters":[{"name":"trunk_id","in":"path","required":true,"schema":{"type":"string","title":"Trunk Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Location"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_VNListResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/ip-acls":{"post":{"tags":["SIP / IP Access Control Lists"],"summary":"Create an IP access control list","description":"Create a named set of source IPs or CIDR networks that SIP trunks can authorise against. Reference the returned `id` as `ip_acl_id` when creating or updating a trunk with `authentication_type: IP`.","operationId":"create_ip_acl","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAclCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAclResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another IP access control list in this account already uses that name.","content":{"application/json":{"example":{"success":false,"message":"An IP access control list with this name already exists."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"get":{"tags":["SIP / IP Access Control Lists"],"summary":"List IP access control lists","description":"List the IP access control lists in your account, newest first. Page with cursors (see the Pagination section in the overview).","operationId":"list_ip_acls","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_IpAclListResponse_"}}}},"400":{"description":"The pagination cursor is invalid or has expired.","content":{"application/json":{"example":{"success":false,"message":"The pagination cursor is invalid or has expired."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/sip/ip-acls/{ip_acl_id}":{"get":{"tags":["SIP / IP Access Control Lists"],"summary":"Retrieve an IP access control list","description":"Retrieve a single IP access control list, including its addresses.","operationId":"retrieve_ip_acl","parameters":[{"name":"ip_acl_id","in":"path","required":true,"schema":{"type":"string","description":"The IP access control list identifier.","examples":["acl_01JQ8Z9K7M3N2P4R5S6T7V8WST"],"title":"Ip Acl Id"},"description":"The IP access control list identifier."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAclResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No IP access control list matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested IP access control list was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"patch":{"tags":["SIP / IP Access Control Lists"],"summary":"Update an IP access control list","description":"Rename an ACL and/or replace its addresses. Supplying `addresses` replaces the entire set. Changes apply to every trunk using this ACL.","operationId":"update_ip_acl","parameters":[{"name":"ip_acl_id","in":"path","required":true,"schema":{"type":"string","description":"The IP access control list identifier.","examples":["acl_01JQ8Z9K7M3N2P4R5S6T7V8WST"],"title":"Ip Acl Id"},"description":"The IP access control list identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAclUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpAclResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No IP access control list matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested IP access control list was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another IP access control list in this account already uses that name.","content":{"application/json":{"example":{"success":false,"message":"An IP access control list with this name already exists."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"delete":{"tags":["SIP / IP Access Control Lists"],"summary":"Delete an IP access control list","description":"Delete an IP access control list. Refused with `409` while any SIP trunk still authorises against it, so a trunk can never be left without an auth source.","operationId":"delete_ip_acl","parameters":[{"name":"ip_acl_id","in":"path","required":true,"schema":{"type":"string","description":"The IP access control list identifier.","examples":["acl_01JQ8Z9K7M3N2P4R5S6T7V8WST"],"title":"Ip Acl Id"},"description":"The IP access control list identifier."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No IP access control list matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested IP access control list was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The IP access control list is still attached to one or more SIP trunks. Point those trunks at another IP access control list (or at individual addresses) first.","content":{"application/json":{"example":{"success":false,"message":"'carrier-egress' is attached to 2 trunk(s). Detach it from each one before deleting."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/events":{"get":{"tags":["Events"],"summary":"List webhook events","description":"List the webhook events generated for your account, newest first. Filter by call, event type, delivery status, or time, and page with cursors. Useful for auditing deliveries and reconciling missed events.","operationId":"list_webhook_events","parameters":[{"name":"call_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"occurred_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred After"}},{"name":"delivery_status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryStatus"},{"type":"null"}],"title":"Delivery Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor — page toward older rows (next page).","title":"Cursor After"},"description":"Opaque cursor — page toward older rows (next page)."},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor — page toward newer rows (previous page).","title":"Cursor Before"},"description":"Opaque cursor — page toward newer rows (previous page)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_WebhookEventResponse_"}}}},"400":{"description":"The pagination cursor is invalid or has expired.","content":{"application/json":{"example":{"success":false,"message":"The pagination cursor is invalid or has expired."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/events/{event_id}":{"get":{"tags":["Events"],"summary":"Retrieve a webhook event","description":"Retrieve a single webhook event, including its full payload and delivery history.","operationId":"retrieve_webhook_event","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No event matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested event was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/events/{event_id}/redeliver":{"post":{"tags":["Events"],"summary":"Redeliver a webhook event","description":"Queue a webhook event for redelivery to your configured endpoint. Use this to recover events your endpoint missed during downtime. Events can only be replayed within the redelivery window.","operationId":"redeliver_webhook_event","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"202":{"description":"Redelivery was scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventRedeliverResponse"}}}},"403":{"description":"The `x-api-key` header is missing or invalid.","content":{"application/json":{"example":{"success":false,"message":"Invalid API Key."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No event matches the supplied identifier for this account.","content":{"application/json":{"example":{"success":false,"message":"The requested event was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The event cannot be redelivered in its current state, or has no delivery target configured.","content":{"application/json":{"example":{"success":false,"message":"This event cannot be redelivered in its current state."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The event is older than the redelivery window and can no longer be replayed.","content":{"application/json":{"example":{"success":false,"message":"This event is older than the redelivery window and cannot be replayed."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/recordings":{"get":{"tags":["Utilities"],"summary":"Get a recording download URL","description":"Resolve a recording to a short-lived, signed download URL. The endpoint responds with a `302` redirect whose `Location` header points at the audio file; follow the redirect to download it. The signed URL expires after `expires_in` seconds (default 15 minutes).","operationId":"get_recording_download_url","parameters":[{"name":"recording_id","in":"query","required":true,"schema":{"type":"string","description":"Recording identifier (`rec_` prefix) or its canonical UUID.","title":"Recording Id"},"description":"Recording identifier (`rec_` prefix) or its canonical UUID."},{"name":"expires_in","in":"query","required":false,"schema":{"type":"integer","maximum":86400,"minimum":60,"description":"Lifetime of the signed URL in seconds (60–86400). Defaults to 900.","default":900,"title":"Expires In"},"description":"Lifetime of the signed URL in seconds (60–86400). Defaults to 900."}],"responses":{"302":{"description":"Redirect to the signed recording URL.","content":{"application/json":{"schema":{}}},"headers":{"Location":{"description":"The short-lived, signed URL of the recording audio.","schema":{"type":"string","format":"uri"}}}},"403":{"description":"The recording does not belong to your account.","content":{"application/json":{"example":{"success":false,"message":"You do not have permission to access this recording."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The recording exists but its audio is not available.","content":{"application/json":{"example":{"success":false,"message":"The requested recording was not found."},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"The request body or query parameters failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/secrets":{"post":{"tags":["Secrets"],"summary":"Create a secret","operationId":"create_secret","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"get":{"tags":["Secrets"],"summary":"List secrets","operationId":"list_secrets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"cursor_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor After"}},{"name":"cursor_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_SecretListResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}},"/api/v1/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Retrieve a secret","operationId":"retrieve_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"patch":{"tags":["Secrets"],"summary":"Update a secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete a secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}}}}},"components":{"schemas":{"AssignVNsRequest":{"properties":{"vn_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vn Ids"},"apply_to_all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply To All","default":false},"voice_app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice App Id"},"sip_trunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Trunk Id"}},"type":"object","title":"AssignVNsRequest"},"AuthenticationType":{"type":"string","enum":["credential","IP"],"title":"AuthenticationType"},"CallAppCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"flow_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Flow Url"},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url"},"fallback_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Fallback Url"},"vn_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vn Ids"},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"},"webhook_api_version":{"anyOf":[{"type":"string","enum":["2025-08-01","2026-06-01"]},{"type":"null"}],"title":"Webhook Api Version"},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit"}},"additionalProperties":false,"type":"object","required":["name","flow_url","webhook_url"],"title":"CallAppCreate"},"CallAppListResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CallAppListResponse"},"CallAppResponse":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"flow_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Flow Url"},"webhook_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Webhook Url"},"fallback_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Fallback Url"},"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit"},"vn_count":{"type":"integer","title":"Vn Count","default":0},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"},"secret_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Name"},"webhook_api_version":{"type":"string","enum":["2025-08-01","2026-06-01"],"title":"Webhook Api Version"},"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["name","flow_url","webhook_url","id","status","webhook_api_version","account_id"],"title":"CallAppResponse"},"CallAppUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"flow_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Flow Url"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url"},"fallback_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Fallback Url"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit"},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"},"webhook_api_version":{"anyOf":[{"type":"string","enum":["2025-08-01","2026-06-01"]},{"type":"null"}],"title":"Webhook Api Version"}},"additionalProperties":false,"type":"object","title":"CallAppUpdate"},"CallDirection":{"type":"string","enum":["inbound","outbound"],"title":"CallDirection"},"CallInitiateData":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the newly created call (`cs_` prefix)."},"from_number":{"type":"string","title":"From Number","description":"The number the call is placed from."},"to_number":{"type":"string","title":"To Number","description":"The number being dialed."},"status_callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Status Callback Url","description":"Where status webhooks will be delivered."},"record":{"type":"boolean","title":"Record","description":"Whether the call is being recorded."}},"type":"object","required":["id","from_number","to_number","status_callback_url","record"],"title":"CallInitiateData"},"CallInitiateRequest":{"properties":{"from_number":{"type":"string","maxLength":16,"minLength":8,"pattern":"^\\+\\d{7,15}$","title":"From Number","description":"The number to place the call from, in E.164 format. Must be a number you own."},"to_number":{"type":"string","maxLength":16,"minLength":8,"pattern":"^\\+\\d{7,15}$","title":"To Number","description":"The destination number to dial, in E.164 format."},"flow_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Flow Url","description":"HTTPS URL Teler fetches when the call connects to obtain the call flow that drives the call."},"status_callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Status Callback Url","description":"HTTPS URL that receives status webhooks for the lifetime of the call."},"record":{"type":"boolean","title":"Record","description":"Whether to record the call. Defaults to `true`.","default":true}},"type":"object","required":["from_number","to_number","flow_url","status_callback_url"],"title":"CallInitiateRequest","example":{"flow_url":"https://example.com/flows/123","from_number":"+14155552671","record":true,"status_callback_url":"https://yourapp.com/callback","to_number":"+14155559876"}},"CallInitiateResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human-readable confirmation message."},"data":{"$ref":"#/components/schemas/CallInitiateData","description":"Details of the accepted call."}},"type":"object","required":["message","data"],"title":"CallInitiateResponse","example":{"data":{"from_number":"+14155552671","id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","record":true,"status_callback_url":"https://yourapp.com/callback","to_number":"+14155559876"},"message":"Call initiated successfully"}},"CallLegResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for this leg (`cl_` prefix)."},"call_session_id":{"type":"string","title":"Call Session Id","description":"The call this leg belongs to (`cs_` prefix)."},"direction":{"$ref":"#/components/schemas/CallDirection","description":"Whether the leg dialed out or was received."},"role":{"$ref":"#/components/schemas/CallLegRole","description":"The leg's role within the call."},"state":{"$ref":"#/components/schemas/CallLegState","description":"Current lifecycle state of the leg."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Caller number in E.164 format."},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number","description":"Called number in E.164 format."},"parent_leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Leg Id","description":"The leg that spawned this one (e.g. for transfers), if any."},"recordings":{"items":{"type":"string"},"type":"array","title":"Recordings","description":"Recording identifiers (`rec_` prefix) captured on this leg."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the leg was created."},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At","description":"When the leg was answered, if it was."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the leg ended, if it has."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Machine-readable reason the leg ended."},"ended_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended By","description":"Which party ended the leg."}},"type":"object","required":["id","call_session_id","direction","role","state","created_at"],"title":"CallLegResponse","example":{"answered_at":"2026-06-01T09:15:12Z","call_session_id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","created_at":"2026-06-01T09:15:04Z","direction":"outbound","from_number":"+14155552671","id":"cl_01JQ8Z9K7M3N2P4R5S6T7V8WAB","recordings":["rec_01JQ8Z9K7M3N2P4R5S6T7V8WEF"],"role":"primary","state":"answered","to_number":"+14155559876"}},"CallLegRole":{"type":"string","enum":["primary","dial_target","transfer_target","monitor","parked"],"title":"CallLegRole"},"CallLegState":{"type":"string","enum":["created","ringing","answered","completed","failed"],"title":"CallLegState"},"CallSessionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the call (`cs_` prefix)."},"account_id":{"type":"string","title":"Account Id","description":"The account that owns the call (`acc_` prefix)."},"voice_app_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice App Id","description":"The voice app that handled the call (`va_` prefix), if any."},"state":{"$ref":"#/components/schemas/CallSessionState","description":"Current lifecycle state of the call."},"direction":{"$ref":"#/components/schemas/CallDirection","description":"Whether the call was placed outbound or received inbound."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Caller number in E.164 format."},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number","description":"Called number in E.164 format."},"properties":{"additionalProperties":true,"type":"object","title":"Properties","description":"Arbitrary metadata you attached when initiating the call."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the call was created."},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At","description":"When the call was answered, if it was."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended, if it has."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Machine-readable reason the call ended."},"legs":{"items":{"$ref":"#/components/schemas/CallLegResponse"},"type":"array","title":"Legs","description":"The individual legs that make up this call."}},"type":"object","required":["id","account_id","state","direction","created_at"],"title":"CallSessionResponse","example":{"account_id":"acc_01JQ8Z9K7M3N2P4R5S6T7V8WIJ","answered_at":"2026-06-01T09:15:12Z","created_at":"2026-06-01T09:15:04Z","direction":"outbound","from_number":"+14155552671","id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","legs":[],"properties":{},"state":"answered","to_number":"+14155559876","voice_app_id":"va_01JQ8Z9K7M3N2P4R5S6T7V8WKL"}},"CallSessionState":{"type":"string","enum":["initiated","ringing","answered","completed","failed"],"title":"CallSessionState"},"CursorPage_CallAppResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CallAppResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[CallAppResponse]"},"CursorPage_CallLegResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CallLegResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[CallLegResponse]"},"CursorPage_CallSessionResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CallSessionResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[CallSessionResponse]"},"CursorPage_IpAclListResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/IpAclListResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[IpAclListResponse]"},"CursorPage_SecretListResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SecretListResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[SecretListResponse]"},"CursorPage_SipCallResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SipCallResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[SipCallResponse]"},"CursorPage_SipTrunkResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SipTrunkResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[SipTrunkResponse]"},"CursorPage_VNListResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/VNListResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[VNListResponse]"},"CursorPage_WebhookEventResponse_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookEventResponse"},"type":"array","title":"Data","description":"The page of results, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor_after` to fetch the next (older) page. `null` on the last page."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Cursor","description":"Pass as `cursor_before` to fetch the previous (newer) page. `null` on the first page."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more results exist after this page.","default":false}},"type":"object","required":["data"],"title":"CursorPage[WebhookEventResponse]"},"DefaultResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"DefaultResponse"},"DtmfRequest":{"properties":{"leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leg Id","description":"Leg to send the tones on (`cl_` prefix). Defaults to the primary leg."},"digits":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[0-9*#A-D]+$","title":"Digits","description":"DTMF digits to send. Allowed characters: `0-9`, `*`, `#`, `A-D`."},"duration_ms":{"type":"integer","maximum":1000.0,"minimum":40.0,"title":"Duration Ms","description":"Duration of each tone in milliseconds (40–1000).","default":100}},"additionalProperties":false,"type":"object","required":["digits"],"title":"DtmfRequest","example":{"digits":"1234#","duration_ms":120}},"ErrorResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Always `false` on an error response.","default":false},"message":{"type":"string","title":"Message","description":"Human-readable description of what went wrong. Safe to show to a user."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Stable, machine-readable error code. Present on business-rule errors (e.g. `transfer_in_progress`). Branch on this, not on `message`."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Error category (e.g. `invalid_state`). Present on some conflict errors."}},"type":"object","required":["message"],"title":"ErrorResponse","description":"Standard error envelope returned for all non-validation errors.","example":{"message":"The requested call was not found.","success":false}},"HangupRequest":{"properties":{"leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leg Id","description":"Leg to hang up (`cl_` prefix). Omit to end the entire call."},"reason":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Z0-9_]+$"},{"type":"null"}],"title":"Reason","description":"Optional machine-readable reason, e.g. `AGENT_HANGUP`. Uppercase, digits, and underscores only."}},"additionalProperties":false,"type":"object","title":"HangupRequest","example":{"reason":"AGENT_HANGUP"}},"InboundRoute":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Route name"},"sip_url":{"type":"string","minLength":1,"title":"Sip Url","description":"SIP destination URL or endpoint"},"sip_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip User","description":"SIP user name"}},"type":"object","required":["name","sip_url"],"title":"InboundRoute"},"IpAclCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name","description":"Unique name for this ACL within your account."},"addresses":{"items":{"$ref":"#/components/schemas/IpAclEntryInput"},"type":"array","minItems":1,"title":"Addresses","description":"At least one address or CIDR network."}},"additionalProperties":false,"type":"object","required":["name","addresses"],"title":"IpAclCreate"},"IpAclEntryInput":{"properties":{"address":{"type":"string","title":"Address","description":"IPv4/IPv6 address or CIDR network, e.g. `203.0.113.7` or `203.0.113.0/24`. CIDR networks are stored in canonical form (host bits stripped)."},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description","description":"Optional note, e.g. the carrier or PoP."}},"additionalProperties":false,"type":"object","required":["address"],"title":"IpAclEntryInput"},"IpAclEntryResponse":{"properties":{"address":{"type":"string","title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["address"],"title":"IpAclEntryResponse"},"IpAclListResponse":{"properties":{"id":{"type":"string","title":"Id","description":"IP access control list ID, e.g. `acl_...`."},"name":{"type":"string","title":"Name"},"address_count":{"type":"integer","title":"Address Count","default":0},"trunk_count":{"type":"integer","title":"Trunk Count","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name"],"title":"IpAclListResponse"},"IpAclResponse":{"properties":{"id":{"type":"string","title":"Id","description":"IP access control list ID, e.g. `acl_...`."},"name":{"type":"string","title":"Name"},"addresses":{"items":{"$ref":"#/components/schemas/IpAclEntryResponse"},"type":"array","title":"Addresses","default":[]},"trunk_count":{"type":"integer","title":"Trunk Count","description":"How many SIP trunks currently authorise against this ACL.","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name"],"title":"IpAclResponse"},"IpAclUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"},"addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/IpAclEntryInput"},"type":"array","minItems":1},{"type":"null"}],"title":"Addresses","description":"When supplied, replaces the full set of addresses."}},"additionalProperties":false,"type":"object","title":"IpAclUpdate"},"LocationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"region_code":{"type":"string","title":"Region Code"},"country_code":{"type":"string","title":"Country Code"},"country_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Name"}},"type":"object","required":["id","name","region_code","country_code"],"title":"LocationResponse"},"MutationAccepted":{"properties":{"request_id":{"type":"string","title":"Request Id","description":"Identifier for this control request. Reuse it to correlate retries and webhooks."},"playback_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Playback Id","description":"Identifier of the started playback (`pb_` prefix). Only returned by the play action."}},"additionalProperties":false,"type":"object","required":["request_id"],"title":"MutationAccepted","example":{"request_id":"req_9f8e7d6c5b4a3f2e1d0c9b8a"}},"MuteRequest":{"properties":{"leg_id":{"type":"string","title":"Leg Id","description":"Leg to mute or unmute (`cl_` prefix)."},"on":{"type":"boolean","title":"On","description":"`true` to mute the leg, `false` to unmute it."}},"additionalProperties":false,"type":"object","required":["leg_id","on"],"title":"MuteRequest","example":{"leg_id":"cl_01JQ8Z9K7M3N2P4R5S6T7V8WAB","on":true}},"PlayRequest":{"properties":{"leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leg Id","description":"Leg to play audio into (`cl_` prefix). Defaults to the primary leg."},"media_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Media Url","description":"HTTPS URL of the audio file to play (WAV or MP3)."},"loop":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Loop","description":"How many times to play the file (1–10).","default":1},"on_dtmf":{"type":"string","enum":["stop","ignore"],"title":"On Dtmf","description":"Whether an inbound DTMF digit stops playback (`stop`) or is ignored (`ignore`).","default":"stop"}},"additionalProperties":false,"type":"object","required":["media_url"],"title":"PlayRequest","example":{"loop":1,"media_url":"https://example.com/audio/greeting.wav","on_dtmf":"stop"}},"SecretCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"SecretCreate"},"SecretListResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"SecretListResponse"},"SecretResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"secret_value":{"type":"string","title":"Secret Value"},"rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rotated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"needs_rotation":{"type":"boolean","title":"Needs Rotation","default":false},"sip_trunks":{"items":{"$ref":"#/components/schemas/SipTrunkListResponse"},"type":"array","title":"Sip Trunks","default":[]},"voice_apps":{"items":{"$ref":"#/components/schemas/CallAppListResponse"},"type":"array","title":"Voice Apps","default":[]}},"type":"object","required":["id","name","secret_value","created_at"],"title":"SecretResponse"},"SecretUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"rotate":{"type":"boolean","title":"Rotate","default":false}},"type":"object","title":"SecretUpdate"},"SipAuthAddressInput":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Authentication address name"},"address":{"type":"string","minLength":1,"title":"Address","description":"IP or hostname for SIP auth"}},"type":"object","required":["name","address"],"title":"SipAuthAddressInput"},"SipAuthCredentialInput":{"properties":{"username":{"type":"string","minLength":5,"title":"Username","description":"SIP authentication username"},"password":{"type":"string","minLength":5,"title":"Password","description":"SIP authentication password"}},"type":"object","required":["username","password"],"title":"SipAuthCredentialInput"},"SipCallResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the call (`cs_` prefix)."},"account_id":{"type":"string","title":"Account Id","description":"The account that owns the call (`acc_` prefix)."},"sip_trunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Trunk Id","description":"The SIP trunk the call traversed (`st_` prefix), if any."},"state":{"$ref":"#/components/schemas/CallSessionState","description":"Current lifecycle state of the call."},"direction":{"$ref":"#/components/schemas/CallDirection","description":"Whether the call was inbound or outbound over the trunk."},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Number","description":"Caller number in E.164 format."},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Number","description":"Called number in E.164 format."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the call was created."},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At","description":"When the call was answered, if it was."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the call ended, if it has."},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds","description":"Billable duration of the primary leg in seconds, once the call has ended."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Machine-readable reason the call ended."},"ended_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended By","description":"Which party ended the call."},"recordings":{"items":{"type":"string"},"type":"array","title":"Recordings","description":"Recording identifiers (`rec_` prefix) captured on this call."}},"type":"object","required":["id","account_id","state","direction","created_at"],"title":"SipCallResponse","example":{"account_id":"acc_01JQ8Z9K7M3N2P4R5S6T7V8WIJ","answered_at":"2026-06-01T09:15:12Z","created_at":"2026-06-01T09:15:04Z","direction":"inbound","duration_seconds":156,"ended_at":"2026-06-01T09:17:48Z","ended_by":"caller","from_number":"+14155552671","id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","reason":"completed","recordings":["rec_01JQ8Z9K7M3N2P4R5S6T7V8WEF"],"sip_trunk_id":"st_01JQ8Z9K7M3N2P4R5S6T7V8WMN","state":"completed","to_number":"+14155559876"}},"SipTransport":{"type":"string","enum":["tls","tcp","udp"],"title":"SipTransport"},"SipTrunkCreate":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"domain_name":{"type":"string","minLength":1,"title":"Domain Name"},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit","default":0},"recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording","default":false},"secure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Secure","default":false},"transport":{"anyOf":[{"$ref":"#/components/schemas/SipTransport"},{"type":"null"}],"description":"SIP transport for this trunk: `tls`, `tcp`, or `udp`. If omitted, it is derived from `secure` (`secure=true`→`tls`, else `tcp`). `udp` requires `authentication_type` = `credential`."},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"auth_credential":{"anyOf":[{"$ref":"#/components/schemas/SipAuthCredentialInput"},{"type":"null"}]},"auth_addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/SipAuthAddressInput"},"type":"array"},{"type":"null"}],"title":"Auth Addresses"},"ip_acl_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Acl Id","description":"ID of an IP access control list (`acl_...`) to authorise against, as an alternative to `auth_addresses`. Provide exactly one of the two when `authentication_type` is `IP`."},"inbound_route":{"anyOf":[{"$ref":"#/components/schemas/InboundRoute"},{"type":"null"}]},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"},"webhook_api_version":{"anyOf":[{"type":"string","enum":["2025-08-01","2026-06-01"]},{"type":"null"}],"title":"Webhook Api Version"}},"additionalProperties":false,"type":"object","required":["name","domain_name","authentication_type"],"title":"SipTrunkCreate"},"SipTrunkListResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"SipTrunkListResponse"},"SipTrunkResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"domain_name":{"type":"string","title":"Domain Name"},"account_id":{"type":"string","title":"Account Id"},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit"},"cps_limit":{"type":"integer","title":"Cps Limit"},"recording_enabled":{"type":"boolean","title":"Recording Enabled"},"secure":{"type":"boolean","title":"Secure"},"transport":{"anyOf":[{"$ref":"#/components/schemas/SipTransport"},{"type":"null"}]},"is_active":{"type":"boolean","title":"Is Active"},"authentication_type":{"anyOf":[{"$ref":"#/components/schemas/AuthenticationType"},{"type":"null"}]},"auth_ip_addresses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auth Ip Addresses","default":[]},"auth_credential_usernames":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Auth Credential Usernames","default":[]},"ip_acl_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Acl Id","description":"The IP access control list this trunk authorises against, if any."},"ip_acl_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Acl Name"},"sip_route":{"anyOf":[{"$ref":"#/components/schemas/InboundRoute"},{"type":"null"}]},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url"},"webhook_api_version":{"type":"string","enum":["2025-08-01","2026-06-01"],"title":"Webhook Api Version"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"},"secret_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Name"}},"type":"object","required":["id","name","domain_name","account_id","cps_limit","recording_enabled","secure","is_active","webhook_api_version"],"title":"SipTrunkResponse"},"SipTrunkUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"channel_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Limit"},"recording":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recording"},"secure":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Secure"},"transport":{"anyOf":[{"$ref":"#/components/schemas/SipTransport"},{"type":"null"}],"description":"SIP transport: `tls`, `tcp`, or `udp`. `udp` requires `authentication_type` = `credential`."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Url"},"webhook_api_version":{"anyOf":[{"type":"string","enum":["2025-08-01","2026-06-01"]},{"type":"null"}],"title":"Webhook Api Version"},"authentication_type":{"anyOf":[{"$ref":"#/components/schemas/AuthenticationType"},{"type":"null"}]},"auth_credential":{"anyOf":[{"$ref":"#/components/schemas/SipAuthCredentialInput"},{"type":"null"}]},"auth_addresses":{"anyOf":[{"items":{"$ref":"#/components/schemas/SipAuthAddressInput"},"type":"array"},{"type":"null"}],"title":"Auth Addresses"},"ip_acl_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Acl Id","description":"ID of an IP access control list (`acl_...`) to authorise against, as an alternative to `auth_addresses`. Supplying one switches the trunk to that mode and clears the other."},"inbound_route":{"anyOf":[{"$ref":"#/components/schemas/InboundRoute"},{"type":"null"}]},"secret_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Id"}},"additionalProperties":false,"type":"object","title":"SipTrunkUpdate"},"Status":{"type":"string","enum":["active","inactive"],"title":"Status"},"TransferAccepted":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of the transfer operation (`op_` prefix)."},"call_id":{"type":"string","title":"Call Id","description":"The call being transferred (`cs_` prefix)."},"status":{"type":"string","const":"initiated","title":"Status","description":"Always `initiated` when the transfer is accepted."},"target_leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Leg Id","description":"Identifier of the target leg once it is created, if available."},"mode":{"type":"string","enum":["cold","warm","monitor"],"title":"Mode","description":"The transfer mode that was applied."},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","description":"Identifier for this control request, for correlating retries and webhooks."}},"additionalProperties":false,"type":"object","required":["id","call_id","status","mode"],"title":"TransferAccepted","example":{"call_id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","id":"op_01JQ8Z9K7M3N2P4R5S6T7V8WOP","mode":"cold","request_id":"req_9f8e7d6c5b4a3f2e1d0c9b8a","status":"initiated"}},"TransferNestedAction":{"properties":{"action":{"type":"string","enum":["play","say","hangup"],"title":"Action"},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"loop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Loop"}},"additionalProperties":false,"type":"object","required":["action"],"title":"TransferNestedAction"},"TransferRequest":{"properties":{"target":{"$ref":"#/components/schemas/TransferTarget","description":"Where to transfer the call."},"mode":{"type":"string","enum":["cold","warm","monitor"],"title":"Mode","description":"Transfer mode. Only `cold` is currently supported.","default":"cold"},"timeout":{"type":"integer","maximum":600.0,"minimum":1.0,"title":"Timeout","description":"Seconds to wait for the target to answer before failing (1–600).","default":30},"record":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["mono","stereo","per_leg"]},{"type":"null"}],"title":"Record","description":"Override recording for the transferred call. Boolean, or a channel layout."},"ringback":{"anyOf":[{"type":"string","enum":["suppress","passthrough"]},{"type":"null"}],"title":"Ringback","description":"Whether the caller hears ringback while the target is dialed.","default":"suppress"},"dial_music":{"anyOf":[{"$ref":"#/components/schemas/TransferNestedAction"},{"type":"null"}],"description":"Audio to play to the caller while the target is being dialed."},"confirm_sound":{"anyOf":[{"$ref":"#/components/schemas/TransferNestedAction"},{"type":"null"}],"description":"Audio the target hears before the call is bridged."},"on_failure":{"anyOf":[{"$ref":"#/components/schemas/TransferNestedAction"},{"type":"null"}],"description":"Action to run on the caller if the transfer fails."}},"additionalProperties":false,"type":"object","required":["target"],"title":"TransferRequest","example":{"mode":"cold","target":{"kind":"pstn","number":"+14155559876"},"timeout":30}},"TransferTarget":{"properties":{"kind":{"type":"string","enum":["pstn","sip","leg"],"title":"Kind","description":"Destination type. `pstn` requires `number`; `sip` requires `uri`. `leg` is not yet supported."},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"Destination phone number in E.164 format. Required when `kind` is `pstn`."},"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri","description":"Destination SIP URI. Required when `kind` is `sip`."},"leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leg Id","description":"Existing leg to transfer to. Reserved for future use."},"custom_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Custom Headers","description":"Custom SIP headers to attach to the outbound leg (`sip` targets only)."}},"additionalProperties":false,"type":"object","required":["kind"],"title":"TransferTarget","example":{"kind":"pstn","number":"+14155559876"}},"UnassignVNsRequest":{"properties":{"vn_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Vn Ids"},"apply_to_all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Apply To All","default":false}},"type":"object","title":"UnassignVNsRequest"},"VNListResponse":{"properties":{"id":{"type":"string","title":"Id"},"account_id":{"type":"string","title":"Account Id"},"name":{"type":"string","title":"Name"},"number":{"type":"string","title":"Number"},"location":{"$ref":"#/components/schemas/LocationResponse"},"voice_app":{"anyOf":[{"$ref":"#/components/schemas/CallAppListResponse"},{"type":"null"}]},"sip_trunk":{"anyOf":[{"$ref":"#/components/schemas/SipTrunkListResponse"},{"type":"null"}]}},"type":"object","required":["id","account_id","name","number","location","voice_app","sip_trunk"],"title":"VNListResponse"},"VNResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"number":{"type":"string","title":"Number"},"sip_trunk":{"anyOf":[{"$ref":"#/components/schemas/SipTrunkListResponse"},{"type":"null"}]},"voice_app":{"anyOf":[{"$ref":"#/components/schemas/CallAppListResponse"},{"type":"null"}]},"location":{"$ref":"#/components/schemas/LocationResponse"}},"type":"object","required":["id","name","number","location"],"title":"VNResponse"},"VNUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"VNUpdate"},"ValidationErrorResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Always `false`.","default":false},"message":{"type":"string","title":"Message","description":"Always `\"Validation Error\"` for this response.","default":"Validation Error"},"errors":{"items":{"$ref":"#/components/schemas/ValidationFieldError"},"type":"array","title":"Errors","description":"One entry per field that failed validation."}},"type":"object","required":["errors"],"title":"ValidationErrorResponse","description":"Returned with `422` when the request fails schema validation.","example":{"errors":[{"loc":["body","to_number"],"msg":"String should match pattern '^\\+\\d{7,15}$'","type":"string_pattern_mismatch"}],"message":"Validation Error","success":false}},"ValidationFieldError":{"properties":{"loc":{"items":{},"type":"array","title":"Loc","description":"Path to the offending field, e.g. `[\"body\", \"to_number\"]`."},"msg":{"type":"string","title":"Msg","description":"Human-readable explanation of the problem."},"type":{"type":"string","title":"Type","description":"Programmatic error type, e.g. `string_pattern_mismatch`."}},"type":"object","required":["loc","msg","type"],"title":"ValidationFieldError","description":"One field-level problem within a `422` validation error."},"WebhookDeliveryStatus":{"type":"string","enum":["pending","delivered","failed_permanent","backfill_skipped"],"title":"WebhookDeliveryStatus"},"WebhookEventRedeliverResponse":{"properties":{"event_id":{"type":"string","title":"Event Id","description":"The event that was queued for redelivery (`evt_` prefix)."},"redelivered_at":{"type":"string","format":"date-time","title":"Redelivered At","description":"When the redelivery was scheduled."}},"type":"object","required":["event_id","redelivered_at"],"title":"WebhookEventRedeliverResponse","example":{"event_id":"evt_01JQ8Z9K7M3N2P4R5S6T7V8WGH","redelivered_at":"2026-06-01T10:05:00Z"}},"WebhookEventResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the event (`evt_` prefix)."},"account_id":{"type":"string","title":"Account Id","description":"The account the event belongs to (`acc_` prefix)."},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id","description":"Related call (`cs_` prefix), if the event is call-scoped."},"sip_trunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Trunk Id","description":"Related SIP trunk (`st_` prefix), if applicable."},"leg_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leg Id","description":"Related call leg (`cl_` prefix), if applicable."},"type":{"type":"string","title":"Type","description":"Event type, e.g. `call.completed`. See the webhook events reference."},"api_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Version","description":"Dated payload version this event was rendered with, e.g. `2026-06-01`."},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When the underlying event occurred."},"payload":{"additionalProperties":true,"type":"object","title":"Payload","description":"The full event payload delivered to your webhook."},"delivery_status":{"$ref":"#/components/schemas/WebhookDeliveryStatus","description":"Current delivery status of the event."},"attempt_count":{"type":"integer","title":"Attempt Count","description":"Number of delivery attempts made so far."},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At","description":"When the most recent attempt was made."},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code","description":"HTTP status returned by your endpoint on the last attempt."},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Error from the last failed attempt, if any."},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At","description":"When the event was successfully delivered, if it was."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the event record was created."}},"type":"object","required":["id","account_id","type","occurred_at","payload","delivery_status","attempt_count","created_at"],"title":"WebhookEventResponse","example":{"account_id":"acc_01JQ8Z9K7M3N2P4R5S6T7V8WIJ","api_version":"2026-06-01","attempt_count":1,"call_id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","created_at":"2026-06-01T09:17:48Z","delivered_at":"2026-06-01T09:17:49Z","delivery_status":"delivered","id":"evt_01JQ8Z9K7M3N2P4R5S6T7V8WGH","last_attempt_at":"2026-06-01T09:17:49Z","last_status_code":200,"occurred_at":"2026-06-01T09:17:48Z","payload":{"call_id":"cs_01JQ8Z9K7M3N2P4R5S6T7V8W9X","type":"call.completed"},"type":"call.completed"}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your secret account API key. Create one in the Teler dashboard."}}},"tags":[{"name":"Voice / Calls","description":"Place outbound calls and read call state. A **call** (`cs_`) is the top-level session; each party on it is a **leg** (`cl_`)."},{"name":"Voice / Call Controls","description":"Act on a live call in real time — hang up, mute, send DTMF, or play audio. These actions are accepted asynchronously and return `202` with a `request_id`."},{"name":"Voice / Operations","description":"Higher-level, multi-step operations on a live call, such as transferring it to a new destination."},{"name":"SIP / Calls","description":"Read calls that arrived or left over your SIP trunks (`st_`)."},{"name":"Events","description":"Inspect the webhook events Teler generated for your account and redeliver any that your endpoint missed."},{"name":"Utilities","description":"Fetch short-lived, signed download URLs for call recordings."},{"name":"Voice / Calls (legacy)","description":"Deprecated endpoints kept for backwards compatibility. Prefer the **Voice / Calls** endpoints for all new integrations."},{"name":"Voice / Apps","description":"Voice apps are the configuration context for calls — they define webhook URLs, flows, and channel limits. Create and manage your voice apps here."},{"name":"Virtual Numbers","description":"Phone numbers that Teler provisions for your account. List, assign to a voice app or SIP trunk, unassign, or update individual numbers."},{"name":"SIP / Trunks","description":"SIP trunks connect Teler to your upstream carrier or PBX. Create, configure, and manage your trunks, or inspect which virtual numbers are assigned to each one."},{"name":"SIP / IP Access Control Lists","description":"Named sets of source IPs or CIDR networks (`acl_`) that SIP trunks with `authentication_type: IP` authorise against. Attach one to many trunks and update it in a single place."},{"name":"Secrets","description":"Manage secret API keys used for authenticating requests. Create, rotate, and delete secrets — rotate periodically and keep them server-side."}],"security":[{"ApiKeyAuth":[]}]}