MobiariDocs
Storefront APIEngagement

Start a chat

POST
/widget/{key}/conversations

Opens a conversation on the store's chat channel and returns the token that proves ownership. At most 10 per minute per client address.

Path Parameters

key*string

The chat channel's public key (data-key of the embed script)

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/widget/string/conversations" \  -H "Content-Type: application/json" \  -d '{}'
{
  "conversation": {
    "assigned": true,
    "bot_active": true,
    "contact_email": "string",
    "contact_name": "string",
    "contact_phone": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "csat_score": 0,
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "status": "open",
    "unread_for_visitor": 0
  },
  "message": null,
  "token": "string"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}