Push Call Context
curl --request POST \
--url https://api.agentline.cloud/v1/calls/{call_id}/context \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.agentline.cloud/v1/calls/{call_id}/context"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.agentline.cloud/v1/calls/{call_id}/context', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Calls
Push Call Context
Push context into a LIVE relay-mode call (mid-call context injection).
This is the required way for backend agents (Hermes, OpenClaw, etc.) to
answer a live caller after a ``call.utterance`` event. Do your work, then
POST a concise caller-ready response here. It is spoken verbatim and stored
as the assistant turn for later conversation context.
AUTHENTICATION (one of):
1. **Push token** (preferred — no API key): the ``push_token`` from the
``call.utterance`` payload, via ``X-Push-Token`` header, ``?token=``
query param, or ``push_token`` body field.
2. **Bearer API key**: ``Authorization: Bearer al_live_...`` for the
account that owns the call.
Body — any of these keys works (``context`` is canonical):
{"context": "the exact short response the caller should hear"}
Other accepted keys: ``summary``, ``answer``, ``response``, ``reply``,
``text``, ``result``.
Every response must include the exact ``turn_id`` from ``call.utterance``.
Late context is rejected instead of being applied to another question.
Returns:
delivered=true, status="live" — voice agent will speak it now
delivered=true, status="duplicate" — identical retry already accepted
HTTP 409 — turn is stale/cancelled
HTTP 410 — **call has ended.** STOP working
on this request and abandon any in-flight lookup. No further context
will be spoken.
POST
/
v1
/
calls
/
{call_id}
/
context
Push Call Context
curl --request POST \
--url https://api.agentline.cloud/v1/calls/{call_id}/context \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.agentline.cloud/v1/calls/{call_id}/context"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.agentline.cloud/v1/calls/{call_id}/context', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
AgentLine API key. Get one via the email OTP flow (POST /v1/auth/otp then POST /v1/auth/verify). Pass as: Authorization: Bearer sk_live_...
Headers
Path Parameters
Query Parameters
Push token (alt to X-Push-Token header / body).
Turn ID from call.utterance.
Body
application/json
The body is of type Body · object.
Response
Successful Response