Chat

Send a message to the AI assistant.

Endpoint

POST https://api.getsuko.com/api/chat

Headers

Authorization: Bearer sk_live_your_key
Content-Type: application/json

Request body

{
  "message": "Do you have gluten-free options?",
  "history": [
    {
      "role": "user",
      "content": "What time do you open?"
    },
    {
      "role": "assistant",
      "content": "We open at 11am Monday to Saturday."
    }
  ],
  "session_id": "optional-uuid"
}

Response

{
  "message": "Yes! We have 8 gluten-free dishes...",
  "session_id": "uuid",
  "widget": null,
  "usage": {
    "used": 47,
    "limit": 500,
    "remaining": 453,
    "month": "2026-06"
  }
}

Widget response

When a guest asks about reservations, the API returns a widget alongside the message:

{
  "message": "I'd be happy to help with a reservation!",
  "widget": {
    "type": "reservation_form"
  },
  "usage": { "..." : "..." }
}

Widget types: reservation_form, food_card, hours_card, location_card

Error responses

StatusDescription
401Invalid or missing API key
402Subscription inactive
403Domain not registered
429Monthly message limit reached