Connect
1
Create the agent
Create a Text agent with the HTTP Webhook connection type, and enter the Webhook URL on your server where Bluejay posts each Digital Human message. Bluejay generates a signing key when you create the agent, so your server can verify each request. The key is under Webhook Signing Key in the agent’s Connection Settings.To create the agent from the API, call Add Agent with
connection_type set to HTTP_WEBHOOK and your URL in http_webhook.2
Choose how your agent replies
By default, your agent sends each reply to the Bluejay API, as described in Run a conversation. If your endpoint can return the reply in its response instead, set
http_webhook_sync_reply to true through the API. See Reply in the response body.Run a conversation
1
Queue the run
Start a run in the app, or call You get one
/v1/queue-http-text-simulation-run with simulation_id.simulation_result_id per conversation.2
Receive the first message
For an Inbound agent, Bluejay posts the Digital Human’s first message to your webhook. For an Outbound agent, Bluejay posts
"message": null to tell your agent to start. If the Outbound agent has an outbound trigger webhook, Bluejay calls that URL instead.3
Reply
Send each agent message to
/v1/send-http-text-message with the simulation_result_id.4
End the conversation
Send
"end_conversation": true to end and evaluate the conversation. The Digital Human can also end it. When a conversation ends, Bluejay posts a webhook with "end_conversation": true. A conversation that ends because no message arrived gets no last webhook.Fields
Request to/v1/send-http-text-message:
Webhook body that Bluejay sends to your URL:
2xx status. Bluejay sends Content-Type: application/json, and X-Bluejay-Signature when the agent has a signing key.
Log tool calls
To record the tools your agent runs, send one request with"type": "tool_call" for each tool. A tool call does not start a Digital Human reply.
Reply in the response body
If your endpoint can return the agent reply directly, sethttp_webhook_sync_reply to true. Bluejay then reads the reply from your webhook response, so you do not call /v1/send-http-text-message. Bluejay waits up to 60 seconds for the response.
The JSON body can be one object, a list of objects, or a string. Bluejay reads the first of these keys that it finds:
messagereplytextcontentresponse
end_turn and end_conversation, or endTurn and endConversation. Keys are not case sensitive. If Bluejay finds no message, it waits for /v1/send-http-text-message.
Verify the signature
Bluejay signs the raw body with HMAC-SHA256 and the signing key, and sends the hex digest inX-Bluejay-Signature. Compute the digest over the raw bytes before you parse the JSON, because parsing and re-serializing can change the bytes.
Limits
- Bluejay waits 10 seconds for your webhook to respond, or 60 seconds with
http_webhook_sync_reply. - By default, if no message arrives for 5 minutes, Bluejay ends the conversation.