> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agnost.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bland AI

> Send finished Bland AI calls to Agnost AI

Agnost AI accepts Bland AI's post-call webhook and turns each finished call into a conversation with an event for every caller and agent exchange. Bland already provides the transcript, so Agnost AI does not run speech-to-text again. No SDK or code change is needed.

Setup takes about five minutes.

## 1. Get your organization ID

Sign in to [app.agnost.ai](https://app.agnost.ai), open **Settings**, and copy the **Organization ID** under **General**. It is a UUID.

## 2. Build your webhook URL

```text theme={null}
https://api.agnost.ai/api/voice/v1/webhooks/bland?org_id=<your-agnost-org-id>&agent_name=<display-name>
```

`agent_name` is optional and must be URL-encoded, for example `Appointment%20Agent`. Bland's call payload does not include the agent ID or name, so without `agent_name` the call's `pathway_id` becomes the agent name in Agnost AI, or `bland` when there is no pathway. Use a different `agent_name` for each agent.

## 3. Point the call webhook at Agnost AI

**Inbound calls** report to the webhook on the phone number they arrive on. In the [Bland dashboard](https://app.bland.ai):

1. Set the selector at the top of the sidebar to **All agents**.
2. Under **Dispatch**, open **Phone numbers** and select **Configure** on the number's row.
3. Open **Call configuration** and paste the URL into the webhook field.
4. Under **Review and save**, tick the confirmation and select **Save**.

**Outbound calls** report to the `webhook` you send with the call:

```bash theme={null}
curl --request POST "https://api.bland.ai/v1/calls" \
  --header "Authorization: Bearer $BLAND_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "agent_id": "<agent-id>",
    "phone_number": "+14155550100",
    "webhook": "https://api.agnost.ai/api/voice/v1/webhooks/bland?org_id=<your-agnost-org-id>&agent_name=<display-name>"
  }'
```

Bland sends each call to one webhook URL. If the call already reports to your own server, keep your server as the webhook and forward each delivery's JSON body to the Agnost AI URL unchanged.

## 4. Place a call and find it in Agnost AI

Place or receive a call with the agent. Bland sends the post-call webhook right after the call ends.

In [app.agnost.ai](https://app.agnost.ai), open **Users**. Each call is a session for the caller's number, with the full transcript in the conversation panel. The conversation's **Metadata** tab shows Bland's call details, such as status, who answered and who ended the call, duration, summary, pathway tags, dispositions, and your call `metadata`.

## 5. Add patterns

Agnost AI evaluates the full call against your patterns, including caller needs and agent behavior. Create definitions on the **Patterns** page, such as "Confirms appointment" or "Agent ends the call before confirming the time." Agnost AI classifies each call automatically about 15 minutes after it ends.

## Troubleshooting

* **Calls do not appear:** check that the URL starts with `https://api.agnost.ai`, that `org_id` is a valid UUID and matches the organization selected in Agnost AI, and that the caller spoke during the call. Calls where only the agent spoke are not captured.
* **Inbound calls are missing:** the webhook is set per phone number. Check the **Call configuration** of the number the call arrived on.
* **Outbound calls are missing:** check that the `webhook` parameter was sent with the call. Without it, the call reports to your organization's default webhook, if one is set.
* **A call failed to deliver:** Bland does not retry the post-call webhook. Send it again with [Resend Post Call Webhook](https://docs.bland.ai/api-v1/post/postcall-webhooks-resend).

## Data mapping

* `call_id` becomes the Agnost AI conversation ID.
* The other party's number becomes the user ID: `to` on outbound calls and `from` on inbound calls (`inbound: true`). If it is missing, Agnost AI uses the call ID.
* `transcripts` entries from `user` become caller turns and entries from `assistant` become agent turns. Each turn starts at its `created_at`, measured from `started_at`, and ends when the next turn starts. When an entry has no `created_at`, Agnost AI spreads the turns across the call duration in proportion to their length and marks the conversation with `transcript_timing: estimated`.
* `agent-action` entries, such as `Ended call`, are not turns. They are kept in order as `agent_actions` metadata. `robot` entries are not turns.
* `started_at` anchors the conversation start time, falling back to `created_at`.
* `price` (USD) becomes the conversation cost.
* `status`, `queue_status`, `answered_by`, `call_ended_by`, `error_message`, call direction, `corrected_duration` (or `call_length`), `summary`, `batch_id`, `external_id`, `pathway_id`, `pathway_version`, `agent_version_id`, `agent_experiment_id`, `disposition_tag`, `transferred_to`, `pathway_tags`, `agent_dispositions`, `analysis`, `warm_transfer_call`, and your call `metadata` become conversation metadata.
* A `recording_url` with an `http` or `https` scheme becomes the conversation recording.

Bland's post-call webhook does not include tool calls, so Bland conversations have no tool events.

## Delivery behavior

Bland sends the post-call webhook once when the call ends and does not retry it. Agnost AI captures the call and returns `200`.

Agnost AI returns `204` for deliveries that are not a finished call: live `webhook_events` messages (`queue`, `call`, `latency`, `tool`, and the others), follow-up `dispositions` and `evals` events, and SMS conversation webhooks. Calls where the caller never spoke, such as unanswered, busy, or failed dials, also return `204`.

The same call can arrive again: a post-processing delivery (for example with citations or a post-transfer transcript) repeats the call payload, and Resend Post Call Webhook sends it again. Agnost AI keeps the first delivery and returns `200` with `"status": "duplicate"` for the others. Captured calls are remembered in memory for 24 hours, so a redelivery after the voice service restarts is stored again. A call whose capture failed is not remembered, so a resend of it is captured.

An invalid `org_id` or a payload without `call_id` returns `400`. A missing `org_id` or data that cannot be normalized returns `422`. A transcript over 1 MiB (1,048,576 bytes) returns `413`. Downstream ingestion failures return `502`.

Bland signs webhooks with the `X-Webhook-Signature` header when you create a signing secret. Verifying it requires storing each organization's Bland signing secret, so this integration follows the same organization-routing trust model as the other voice webhook adapters and does not verify the signature. Treat the webhook URL as sensitive until per-organization signature verification is available.

## References

* [Bland post-call webhooks](https://docs.bland.ai/tutorials/post-call-webhooks)
* [Bland call details](https://docs.bland.ai/api-v1/get/calls-id)
* [Bland Send Call with an Agent](https://docs.bland.ai/api-v1/post/calls-agent)
* [Bland webhook signing](https://docs.bland.ai/tutorials/webhook-signing)

## Next steps

* [Conversations](https://docs.agnost.ai/using-conversations.md): review complete Bland calls.
* [Events](https://docs.agnost.ai/using-events.md): inspect each caller and agent exchange.
* [Patterns](https://docs.agnost.ai/using-patterns.md): understand why callers contacted the agent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.