Skip to main content
POST
/
v1
/
calls
Create Call
curl --request POST \
  --url https://api-tokyo.oneinbox.ai/v1/calls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "to_number": "<string>",
  "from_number": "<string>",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "variables": {},
  "webhook_url": "<string>",
  "overrides": {
    "llm": {
      "model": "<string>",
      "temperature": 123,
      "system_prompt": "<string>"
    },
    "transcriber": {
      "model": "<string>",
      "language": "<string>"
    },
    "tts": {
      "voice_id": "<string>",
      "model": "<string>",
      "speed": 123,
      "stability": 123
    },
    "first_message": "<string>"
  },
  "metadata": {},
  "use_shisa": false
}
'
import requests

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

payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_number": "<string>",
"from_number": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"variables": {},
"webhook_url": "<string>",
"overrides": {
"llm": {
"model": "<string>",
"temperature": 123,
"system_prompt": "<string>"
},
"transcriber": {
"model": "<string>",
"language": "<string>"
},
"tts": {
"voice_id": "<string>",
"model": "<string>",
"speed": 123,
"stability": 123
},
"first_message": "<string>"
},
"metadata": {},
"use_shisa": False
}
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({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_number: '<string>',
from_number: '<string>',
scheduled_at: '2023-11-07T05:31:56Z',
variables: {},
webhook_url: '<string>',
overrides: {
llm: {model: '<string>', temperature: 123, system_prompt: '<string>'},
transcriber: {model: '<string>', language: '<string>'},
tts: {voice_id: '<string>', model: '<string>', speed: 123, stability: 123},
first_message: '<string>'
},
metadata: {},
use_shisa: false
})
};

fetch('https://api-tokyo.oneinbox.ai/v1/calls', 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"

payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_number\": \"<string>\",\n \"from_number\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"variables\": {},\n \"webhook_url\": \"<string>\",\n \"overrides\": {\n \"llm\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"system_prompt\": \"<string>\"\n },\n \"transcriber\": {\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n },\n \"tts\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"speed\": 123,\n \"stability\": 123\n },\n \"first_message\": \"<string>\"\n },\n \"metadata\": {},\n \"use_shisa\": false\n}")

req, _ := http.NewRequest("POST", 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.

Body

application/json
agent_id
string<uuid>
required
to_number
string
required
Pattern: ^\+[1-9]\d{1,14}$
from_number
string
required
Pattern: ^\+[1-9]\d{1,14}$
scheduled_at
string<date-time> | null
variables
Variables · object
webhook_url
string | null
overrides
CallOverrides · object | null

Per-call overrides — merged on top of the agent's stored config at dispatch.

metadata
Metadata · object
use_shisa
boolean
default:false

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