Skip to Content
Calls

Inject context into a live call

Permissioncalls:inject-contextRetriesIdempotency-Key requiredAuthentication
POST
/calls/{id}/context

Encrypts and durably records one context message before scheduling delivery. On 202, wait for Retry-After and GET the Location call; match the returned message id in data_messages and poll delivery_status until published or failed.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body

Queues an encrypted system-context message for a live call. The message is committed before delivery and retried for transient message-bus or subscriber-readiness failures. content is limited to 4096 UTF-8 bytes; newlines are allowed, blank-only content and NUL are rejected.

content*string
Length1 <= length <= 4096
role?"system"
Default"system"
Value in"system"
urgency?string
Default"soon"
Value in"immediate""soon""later"

Response Body

Context was encrypted and durably queued for delivery.

application/json
  1. response
id*string
Formatuuid
call_id*string
Formatuuid
role*"system"
Value in"system"
urgency*string
Value in"immediate""soon""later"
delivery_status*"pending"
Value in"pending"
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.kejue.co/v1/calls/497f6eca-6276-4993-bfeb-53cbbbba6f08/context' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "content": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "call_id": "0d0a16ab-a508-4d58-bf24-5dc3cb248f3e",  "role": "system",  "urgency": "immediate",  "delivery_status": "pending",  "created_at": "2019-08-24T14:15:22Z"}