Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oneinbox.ai/llms.txt

Use this file to discover all available pages before exploring further.

Call Outcomes

After every call, OneInbox automatically classifies what happened so you can filter, report on, and act on results without reading every transcript.

What is an outcome?

An outcome is a label assigned to a completed call that summarises its result. It lives inside the analysis object on the call record, set automatically after the call ends. You can also set or override it manually. Where to find it:
curl https://api.oneinbox.ai/v1/calls/<call_id> \
  -H "Authorization: Bearer <api_key>"
{
  "id": "call_abc123",
  "status": "completed",
  "duration_seconds": 94,
  "analysis": {
    "outcome": "Appointment Booked",
    "summary": "The caller agreed to a product demo on Thursday at 2pm."
  },
  "messages": [...]
}

Outcome reference

Outcome (as stored)What it meansTypical trigger
Appointment BookedA meeting or demo was scheduledCaller agreed to a specific time
Not InterestedCaller explicitly declined”Not interested”, “take me off your list”
Not ConnectedNo conversation happenedUnanswered, busy, immediate hang-up
VoicemailVoicemail greeting detectedVoicemail detection enabled and triggered
InterestedCaller engaged but did not commitPositive conversation, no booking
nullNo outcome classifiedCall too short or ambiguous

How auto-classification works

After every call ends, OneInbox reads the transcript and assigns an outcome automatically. No configuration needed. A few things to know:
  • Classification happens post-call. analysis.outcome is null during an active call. Fetch the record after the call ends.
  • analysis.summary explains the reasoning. If an outcome looks wrong, read the summary to understand what the model saw in the conversation.
  • “Interested” is a signal, not a qualification. It means the caller engaged positively but did not commit. What “qualified” means varies per business — for anything more nuanced, read the transcript and classify manually.

Setting or overriding an outcome manually

curl -X PATCH https://api.oneinbox.ai/v1/calls/<call_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{ "outcome": "appointment_booked" }'
Format mismatch: auto-classification stores outcomes in Title Case ("Appointment Booked") but PATCH requires lowercase with underscores ("appointment_booked"). Sending Title Case returns 400 INVALID_OUTCOME.Valid PATCH values: appointment_booked · not_interested · not_connected · voicemail · interested

Filtering calls by outcome

# All calls where a meeting was booked
curl "https://api.oneinbox.ai/v1/calls?outcome=appointment_booked" \
  -H "Authorization: Bearer <api_key>"

# All calls that went to voicemail
curl "https://api.oneinbox.ai/v1/calls?outcome=voicemail" \
  -H "Authorization: Bearer <api_key>"

Reading outcomes reliably

1

Stop the call

curl -X POST https://api.oneinbox.ai/v1/calls/<call_id>/stop \
  -H "Authorization: Bearer <api_key>"
2

Wait 2–3 seconds

The transcript and analysis are written asynchronously after the call session closes.
3

Fetch the call record

curl https://api.oneinbox.ai/v1/calls/<call_id> \
  -H "Authorization: Bearer <api_key>"
You now have analysis.outcome, analysis.summary, messages[], duration_seconds, and recording_url (if recording was enabled).

Get notified automatically with webhooks

Instead of polling, set up a webhook to receive the full call record as soon as a call ends:
curl -X POST https://api.oneinbox.ai/v1/webhooks \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Call completed",
    "url": "https://your-server.com/webhooks/oneinbox",
    "events": ["call.ended"]
  }'
Webhooks guide

API reference

Get call · Update call · List calls