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

# Bland

> Test your Bland pathways and score live calls.

Connect your Bland account to bring your pathways and knowledge bases into Bluejay, edit pathways here, and send each Bland call to Bluejay.

<video controls muted playsInline preload="metadata" src="https://mintcdn.com/bluejay/-HQHqJe_DMny1WOY/videos/bland-walkthrough.mp4?fit=max&auto=format&n=-HQHqJe_DMny1WOY&q=85&s=04ae65d800f8e4ee349dba9ed769cb36" />

## Connect

**1. Save the Bland keys**

In Bluejay, open **Settings → Integrations** and choose the **Bland** tab. Save both keys:

* **API Key**: Bluejay uses it to pull pathways and knowledge bases, place test calls, and push your edits back to Bland.
* **Webhook Secret**: copy it from the **General** tab of your Bland organization settings. Without it, Bluejay rejects every call that Bland sends.

**2. Sync the pathways**

Click **Sync Agents from Bland** to create one agent for each pathway. To pick up changes you make in Bland, run the sync again or turn on **Autosync from Bland**, which syncs about every 5 minutes.

To add one pathway by hand, create an agent with the **Bland** connection type, and pick a synced pathway or paste its pathway ID.

### What the sync pulls in

For each pathway, Bluejay pulls in:

* The working copy of the pathway, with its nodes and routing. The pathway's global prompt becomes the agent's prompt.
* The prompts and routing conditions of the Bland Persona that routes calls into the pathway, if there is one.
* The pathways that it warm-transfers into, up to 4 levels deep and 8 pathways in total. A pathway that only one other pathway transfers into, and that no Persona routes calls into, gets no agent of its own. Its calls go to that pathway's agent.
* Its connection type. A pathway with a Bland web agent gets the WebSocket path, and a pathway without one gets the phone path.

The sync also copies every Bland knowledge base into a Bluejay knowledge base, so custom metrics can check answers against the same content. Bland does not say which pathway uses which knowledge base, so attach each one to its agents yourself. A later sync updates the same knowledge base in place.

A sync never deletes an agent. If you delete a pathway in Bland, its agent stays in Bluejay.

### Edit a pathway

**1. Pull the working copy**

On the synced agent's **Workflow** tab, pull the working copy. A version you pull is read-only, so pull the working copy if you plan to push.

**2. Edit and push**

Push your edits back to the working copy. Bland cannot store routing changes in the working copy, so a push that changes routing goes out as a new version.

**3. Publish**

Publish a version to staging or production. Production gets a copy of the version with a new number. Staging keeps the number.

## Test

> [tab] WebSocket
>
> Bluejay opens a session with the pathway's Bland web agent, so no phone number is necessary. Use this path to iterate on pathway logic.
>
> If the pathway has no web agent in Bland, create one there and sync again. Bluejay then switches the agent to this path.

> [tab] Phone
>
> Bland places a real phone call from the pathway to each Digital Human. This path works only for a pathway without a Bland web agent. A sync creates every agent as Inbound, so change the agent type to **Outbound** before you run the test, and give each Digital Human a phone number.
>
> By default, Bland dials from a number in its own pool. Bluejay tags each call with `qa_vendor: bluejay`, `type: vendor-qa-dispatch`, and `environment: staging`, so you can keep test calls out of your production reports.
>
> To have Bluejay dial your Bland number instead, use an Inbound Voice agent with the [Phone connection type](https://docs.getbluejay.ai/test/simulations/create.md#connect-your-agent) and your Bland number.

> [tab] Chat
>
> Set the agent mode to **Text** and choose the **Bland** text tile. Bluejay sends text turns to the pathway through the Bland pathway chat API.
>
> A chat cannot run a transfer node, so the conversation ends when the pathway reaches one, and Bluejay scores what happened up to that point.

### Call settings and request data

To make phone tests behave like your production calls, open the agent's **Connection Settings** and paste JSON into the **Bland** tile:

* **Call settings (Optional)**: the call parameters that you send to Bland in production. Keys you leave out keep the Bland default. Bluejay rejects unknown keys, and also these keys, which it sets itself:
  * `phone_number`
  * `pathway_id`
  * `pathway_version`
  * `from`
  * `metadata`
  * `request_data`
  * `webhook`
  * `webhook_events`

For the `request_data` that your pathway expects, set [agent variables](https://docs.getbluejay.ai/test/simulations/digital-humans.md#agent-variables) on the agent's **Simulation Settings** tab. Before each call, Bluejay adds the Digital Human's traits and the **Send-call variables** from its Digital Human card on top, and writes the Digital Human's name, phone number, and email over matching keys.

Bluejay sends call settings and `request_data` only on calls that Bland places. WebSocket and chat runs do not use them.

## Monitor

Bland sends each call to Bluejay through a webhook.

**1. Set the webhook on your phone number**

In Bland, open your phone number settings. In the **Advanced** section, set the webhook URL to `https://api.getbluejay.ai/v1/integrations/bland`, and save the inbound call changes.

**2. Set the webhook on API calls**

For calls that you place through the Bland API, set `webhook` on the send-call request to the same URL.

Bluejay files each call under the agent synced from the call's pathway. If no agent has that pathway yet, Bluejay creates one on the first call. When a call warm-transfers to another pathway, Bluejay joins both legs into one conversation and records the handoff latency in its metadata. The metadata tags of the call also go into conversation `metadata`, so custom metrics can use them as [dynamic variables](https://docs.getbluejay.ai/monitor/metrics/llm-as-a-judge.md#dynamic-variables).

The pathway's own record of the call also goes into `metadata`, for live calls and for phone tests that Bland places:

* `pathway_tags`: a list of the names of the tags that the call reached, such as `["Confirm_Identity", "Voicemail_Listening"]`.
* `pathway_logs`: Bland's step-by-step log of the call, as Bland returns it. On a call that a person answered, Bluejay stores Bland's newer event log instead, and each entry has an `event_type`.

A dynamic variable puts the whole list into the prompt as text. To check that a call reached a tag, write a prompt such as "Do these pathway tags include Confirm\_Identity: `{{pathway_tags}}`?".

For an [uptime monitor](https://docs.getbluejay.ai/monitor/uptime/overview.md) on an Outbound agent whose pathway has no Bland web agent, Bluejay tells Bland to place each check call. You do not need an outbound trigger webhook.

<video controls muted playsInline preload="metadata" src="https://mintcdn.com/bluejay/-HQHqJe_DMny1WOY/videos/add-link-bland.mov?fit=max&auto=format&n=-HQHqJe_DMny1WOY&q=85&s=e8eb0d4073a868e71069790e0ade06a4" />

## Troubleshooting

| What you see | What to do |
| - | - |
| **No Connection** with SIP\_DIAL\_FAILED | Save a Bland API key, set a pathway on the agent, and give each Digital Human a phone number. If all are set, Bland rejected the call. Check your Bland call logs. |
| Phone test on a synced agent fails | The agent is still Inbound and has no phone number, so nobody places the call. Set the type to **Outbound**. |
| WebSocket test fails to connect | The pathway has no Bland web agent. Create one in Bland and sync again. |
| Live calls do not show | Save the right **Webhook Secret**. Without it, Bluejay rejects the webhook. |
| A knowledge base is missing | Its text is larger than 1 MB, or Bland returned no text for it. |

## Related

* [Agents API](https://docs.getbluejay.ai/api-reference/endpoint/add-agent.md)
* [Bland MCP tools](https://docs.getbluejay.ai/mcp/workspace-tools.md#voice-platforms)
* [Agents](https://docs.getbluejay.ai/test/simulations/create.md#connect-your-agent)
* [Knowledge Bases](https://docs.getbluejay.ai/test/simulations/reference.md#knowledge-bases)
* [Logs](https://docs.getbluejay.ai/monitor/logs.md)


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