Skip to main content

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, and you can create your own custom outcome labels for your workspace. 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": [...]
}

Built-in outcome labels

OneInbox ships with a set of platform-level outcomes available to every account:
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.
  • Custom outcomes are also used. If you have created custom outcome labels (see below), the agent uses those in addition to the built-in set when classifying calls.

Reading outcomes reliably

1

Stop the call

Send a stop request to end the session. If the agent already ended the call via the end_call tool, this is a no-op.
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. A short wait ensures the data is ready.
3

Fetch the call record

Retrieve the complete call record with the outcome, summary, transcript, and recording URL.
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).

Custom outcome labels

You can create custom outcome labels specific to your workspace. The agent uses these alongside the built-in labels when classifying calls — so if you add “Hot Lead” as a custom outcome, the AI will start assigning it when a call matches that description.

List call outcomes

Returns both the built-in platform labels (always available) and any custom labels you have created for your workspace.
curl https://api.oneinbox.ai/v1/workspace/call-outcomes \
  -H "Authorization: Bearer <api_key>"
{
  "builtin": ["interested", "not_interested", "appointment_booked", "voicemail", "no_answer"],
  "items": [
    {
      "id": "co_abc123",
      "label": "Hot Lead",
      "description": "Expressed strong interest and asked specific product questions",
      "is_active": true
    }
  ],
  "total": 1
}

Create a custom outcome

Add a new outcome label to your workspace. Any casing is accepted — e.g. "Hot Lead" or "demo_scheduled". Once created, the agent starts using it automatically when classifying future calls.
curl -X POST https://api.oneinbox.ai/v1/workspace/call-outcomes \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Hot Lead",
    "description": "Qualified lead with confirmed budget and decision timeline"
  }'
{
  "id": "co_abc123",
  "label": "Hot Lead",
  "description": "Qualified lead with confirmed budget and decision timeline",
  "is_active": true
}
FieldWhat it does
labelThe outcome name. Any casing is accepted — stored and displayed as-is
descriptionOptional. Explains to the AI when this outcome applies. More detail = more accurate classification

Update a custom outcome

Rename a label or deactivate it. Deactivating (is_active: false) hides the outcome from future auto-classification but preserves it on historical call records — no data is lost.
curl -X PATCH https://api.oneinbox.ai/v1/workspace/call-outcomes/<outcome_id> \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Qualified Lead",
    "is_active": true
  }'
FieldWhat it does
labelNew label name — updates how it appears on call records going forward
is_activefalse = hides this outcome from new classification while keeping historical data intact

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 · List call outcomes · Create call outcome · Update call outcome