API ReferenceOverview

Download Collection

Try the Dispatch API in Postman, Insomnia or Bruno with a ready-made collection of every endpoint.

Download the whole API as a collection and open it in your API client. It has every endpoint, with example bodies, and fills in the conversation and token for you as you go.

FileOpen it in
dispatch-api.postman_collection.jsonPostman, Insomnia, Bruno, Hoppscotch and most other API clients.
openapi.yamlAnything that reads OpenAPI 3.1, including code generators.

Both are built from the same description as this reference, so they always match it.

Using the collection in Postman

Import it. In Postman, click Import and drop in dispatch-api.postman_collection.json.

Set your credentials. Open the Dispatch API collection, go to Variables, and set apiKey to your API key and agent to your agent's ID. Then Save.

Start a conversation. Send Starting a conversation with an Agent. The collection saves the new conversation's conversation and the visitor's participantToken.

Send messages. Send Sending a message to an Agent and Listing a conversation's messages. They use what the first request saved, so there is nothing to copy.

Variables

VariableWhat it holdsSet by
baseUrlhttps://api.rundispatch.ai/v1The collection
apiKeyYour Dispatch API keyYou
agentThe ID of the agent to talk toYou
conversationThe conversation's idStarting or getting a conversation
participantTokenThe visitor's tokenStarting or getting a conversation

Sending a message to an Agent sends Accept: application/json, so the reply comes back as one JSON body. To watch the reply stream in as Server-Sent Events, or get it as Markdown or plain text, change its Accept header to one of the reply types.

The visitor's token lasts 90 days. From its last 7 days on, even once it has expired, send Getting a conversation to save a new one.

On this page