Skip to main content
PATCH
/
v1
/
calls
/
{call_id}
Patch Call
curl --request PATCH \
  --url https://api-tokyo.oneinbox.ai/v1/calls/{call_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "outcome": "<string>"
}
'
import requests

url = "https://api-tokyo.oneinbox.ai/v1/calls/{call_id}"

payload = { "outcome": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({outcome: '<string>'})
};

fetch('https://api-tokyo.oneinbox.ai/v1/calls/{call_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-tokyo.oneinbox.ai/v1/calls/{call_id}"

payload := strings.NewReader("{\n \"outcome\": \"<string>\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "id": "<string>",
  "agent_id": "<string>",
  "type": "<string>",
  "status": "<string>",
  "from_number": "<string>",
  "to_number": "<string>",
  "room_name": "<string>",
  "direction": "<string>",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "variables": {},
  "started_at": "2023-11-07T05:31:56Z",
  "ended_at": "2023-11-07T05:31:56Z",
  "duration_seconds": 123,
  "end_reason": "<string>",
  "transcript": "<string>",
  "messages": [
    "<unknown>"
  ],
  "recording_url": "<string>",
  "analysis": {},
  "latency": {},
  "cost_cents": 123,
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "twilio_call_sid": "<string>",
  "outcome": "<string>",
  "ai_summary": "<string>",
  "credits_used": 123,
  "kb_snapshot": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Your API key sent as a Bearer credential — Authorization: Bearer <api_key>, where <api_key> starts with oi_sk_ (create one via POST /v1/api-keys). Although the field is labelled 'token', paste your API key here. A dashboard JWT is also accepted on this header for the same endpoints.

Path Parameters

call_id
string<uuid>
required

Body

application/json

Body for PATCH /v1/calls/:id — only the outcome field is mutable by API consumers. Anything else (transcript, recording, etc.) is worker-owned and updated via the internal endpoints.

outcome
string
required

Response

Successful Response

id
string
required
agent_id
string
required
type
string
required
status
string
required
from_number
string | null
required
to_number
string | null
required
room_name
string | null
required
direction
string
required
scheduled_at
string<date-time> | null
required
variables
Variables · object
required
started_at
string<date-time> | null
required
ended_at
string<date-time> | null
required
duration_seconds
number | null
required
end_reason
string | null
required
transcript
string | null
required
messages
any[]
required
recording_url
string | null
required
analysis
Analysis · object | null
required
latency
Latency · object | null
required

Per-call latency/observability (JSONB), null until the call completes a turn. Per-component aggregates stt/llm_ttft/tts_ttfb/eou_delay = {avg_ms, p50_ms, min_ms, max_ms, samples, provider} (provider stamped per segment so the log stays accurate if the agent is reconfigured). events = turn-tagged stream [{turn, type, ms}] where type is one of stt|llm_ttft|tts_ttfb|eou_delay|kb|tool: — chains the whole response cycle per turn. connect = {setup_ms, dispatch_to_answer_ms, answer_to_active_ms, active_to_greeting_ms}.

cost_cents
integer | null
required
metadata
Metadata · object
required

Caller-supplied metadata plus the platform key concurrency_at_dispatch (count of the org's calls in flight at dispatch, for load-test correlation).

created_at
string<date-time>
required
updated_at
string<date-time>
required
twilio_call_sid
string | null
outcome
string | null
ai_summary
string | null
credits_used
number | null
kb_snapshot
Kb Snapshot · object | null