AgentConnect
Agents

Mint a webchat token

Mints a short-lived token the browser presents to the relay pool to start or resume a playground webchat session with this agent. A resume is allowed for the conversation owner, and for any non-viewer member who may continue every session it currently stands on (org-visible sessions; private ones stay owner-only). A resume answers 409 once an agent’s next turn would reach a machine that does not hold its session. An API key whose permission is agent:chat may call this route for the agents in its selection; the token it mints carries that permission and is accepted by the relay’s agent chat API only.

POST
/v1/orgs/{orgId}/agents/{agentId}/webchat/token

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orgId*string
agentId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/webchat/token" \  -H "Content-Type: application/json" \  -d '{}'
{  "token": "string",  "relayUrl": "string",  "conversationId": "string",  "expiresAt": "2019-08-24T14:15:22Z"}