Binom AI Public API Documentation | Developer Guide


This page documents the BINOM AI public API: how to authenticate, create chats, exchange messages with your synthetic employee, collect feedback, and work with the knowledge base and price lists.

For a plain-language overview of what the API does and why you'd use it, see the BINOMAI.com API FAQ. This page is the full technical reference.


Overview

  • Base URL: https://prod-api.binomai.com
  • Format: JSON request/response bodies (form-encoded also accepted for the examples shown here)
  • Auth: HTTP Basic Auth, API key as username
  • Typical flow: create a chat → send a message → get the synthetic employee's reply in the same response → optionally rate the reply

Quick start

# 1. Create a chat
curl https://prod-api.binomai.com/api/public/chats \
  -u YOUR_API_KEY: \
  -d chat_id="order_12345"

# 2. Send a message - the reply comes back immediately, in this same response
curl https://prod-api.binomai.com/api/public/chats/order_12345/messages \
  -u YOUR_API_KEY: \
  -d content="Hello, could you tell me the delivery price?"

# 3. (optional) Retrieve the full conversation
curl https://prod-api.binomai.com/api/public/chats/order_12345/messages \
  -u YOUR_API_KEY:

Authentication with BINOM AI public API

All public endpoints use HTTP Basic Auth:

  • username – your API key
  • password – not used, leave empty
curl https://prod-api.binomai.com/api/public/chats -u YOUR_API_KEY:

Getting a key: Dashboard → Organization Integrations → type API. The key is shown as api_key. Revoking a key: delete the corresponding integration. Reissuing a key: create a new API-type integration; the previous key stops working once its integration is deleted.

Authentication errors

An invalid or missing key returns 401 with this body:

{ "status": "error", "message": "Authentication failed" }

All other error responses across the API use a different shape (full list of codes further down this page):

{ "error": "error text" }

or, when multiple issues apply:

{ "error": ["error one", "error two"] }

Endpoint Reference

POST /api/public/chats – Create a chat

Request body:

FieldTypeRequiredDescription
chat_idstringnoYour own external ID for this conversation (e.g. an order ID). This is the field to use – chats are the only supported mode; the legacy "threads" mode is no longer used.
curl https://prod-api.binomai.com/api/public/chats \
  -u YOUR_API_KEY: \
  -d chat_id="order_12345"

Response (201):

{
  "id": "8f14e2b1-2c3d-4e5f-9a0b-1c2d3e4f5a6b",
  "form": "api",
  "state": "unreviewed",
  "ai_state": "ai_active",
  "contacts": {},
  "data": {},
  "integration_chat_id": "order_12345",
  "created_at": "2026-08-20T10:00:00Z",
  "updated_at": "2026-08-20T10:00:00Z"
}
FieldDescription
idInternal UUID generated by BINOMAI.com. Not used in public API paths.
formChannel/source of the chat: public_chat, widget, helpcrunch, api, youtube, call, lawyer, person, tutor, realtime, interview, telegram, examination, instagram
stateReview status: unreviewed, reviewed, awaiting_operator
ai_stateai_active – the synthetic employee is responding automatically. ai_blocked – a human operator has taken over (via dashboard, widget, or a connected helpdesk); user messages are still saved, but there is no automatic reply. Cannot be toggled through the public API.
contactsObject with the interlocutor's contact details (name, phone, email), if collected during the conversation. Usually empty right after chat creation.
dataInternal chat metadata (widget labels, context, etc.). Safe to ignore for integrations.
integration_chat_idThis is the ID you use as {chat_id} in every subsequent request – it's the same value you passed as chat_id above.
created_at / updated_atTimestamps

A note on the two IDs: the field you send is called chat_id; the same value comes back in the response under the name integration_chat_id. The response also includes an unrelated internal id (a UUID) that is not used in any public API path. Always use integration_chat_id (i.e., your original chat_id) as {chat_id} in later requests.

Errors: 401


GET /api/public/chats – List chats

Query parameters:

ParamTypeDefaultMaxDescription
perinteger10500Items per page
pageinteger1Page number
curl "https://prod-api.binomai.com/api/public/chats?per=20&page=1" -u YOUR_API_KEY:

Response:

{
  "data": [ /* array of chat objects, same shape as in Create a chat */ ],
  "meta": { "total": 42, "page": 1, "per": 20, "pages": 3 }
}

Errors: 401 (also returned if the subscription is inactive)


POST /api/public/chats/{chat_id}/messages – Send a message

{chat_id} = the integration_chat_id from chat creation (your own external ID).

Request body:

FieldTypeRequiredDescription
contentstringyesMessage text. Use the literal value [AUDIO] when the message is a voice message.
integration_message_idstringnoYour own message ID, for matching against your system.
file_urlsarray of stringnoPublic URLs of files to attach – the server downloads them itself.
filesarray of stringnoIDs of files already uploaded directly (direct upload).

file_urls and files are not mutually exclusive – use either or both.

curl https://prod-api.binomai.com/api/public/chats/order_12345/messages \
  -u YOUR_API_KEY: \
  -d content="Hello, could you tell me the delivery price?" \
  -d integration_message_id="msg_001"

The synthetic employee's reply is returned immediately, in this same response – there is no separate polling step and no run_in_progress mechanism to wait on.

Response (201):

{
  "id": "a2b3c4d5-...",
  "integration_message_id": "msg_001",
  "content": "Delivery costs $8, takes 1-2 days",
  "role": "assistant",
  "files": [],
  "message_feedback": null,
  "created_at": "2026-08-20T10:00:05Z",
  "chat_id": "order_12345",
  "custom_icon_label": null
}
FieldDescription
idMessage ID
integration_message_idYour message ID, echoed back if you sent one
contentMessage text – in the response, this is the assistant's reply
roleuser, assistant, system, or operator
filesAttached files – field structure listed further down
message_feedbackPopulated if feedback has been left on this message
created_atTimestamp
chat_idYour external chat ID
custom_icon_labelWidget icon label; usually empty for API-created messages

Note: contacts is not part of the message response – it only appears on the chat object.

Attached File Fields

FieldRequiredDescription
idyesFile ID
namenoFile name
signed_idyesSigned ID
content_typeyesMIME type
urlyesFile URL
thumbnoThumbnail URL
transcriptionnoTranscription text (e.g. for audio)

Errors: 401, 402 (AI request balance not positive), 403 (subscription inactive), 429 (rate limit – thresholds listed later in this page)


GET /api/public/chats/{chat_id}/messages – Retrieve conversation history

Returns the entire conversation – there is no pagination on this endpoint; per/page have no effect.

curl https://prod-api.binomai.com/api/public/chats/order_12345/messages -u YOUR_API_KEY:

Response:

{
  "data": [
    { "id": "...", "role": "user", "content": "Hello" },
    { "id": "...", "role": "assistant", "content": "Good afternoon!" }
  ],
  "meta": { "total": 2 }
}

meta only contains total. A run_in_progress field exists in older client code paths but is obsolete – replies are synchronous now (see above), so there's nothing to poll for.

Errors: 401, 403, 429


POST /api/public/chats/{chat_id}/messages/{id}/feedback – Rate a reply

{id} = the message ID (from the send-message response or the history list).

Request body:

FieldTypeRequiredDescription
statestringyeslike, dislike, or remove (clears a previous rating)
commentstringrequired for like/dislike, not required for removeFeedback comment
curl https://prod-api.binomai.com/api/public/chats/order_12345/messages/{id}/feedback \
  -u YOUR_API_KEY: \
  -d state="like" \
  -d comment="Helpful answer"

Response (201) – the feedback object:

{
  "id": "message_feedback_id",
  "state": "like",
  "comment": "Helpful answer",
  "created_at": "2026-08-20T10:05:00Z"
}

Note: in the response schema, state here can only be like or dislike (a removed rating simply leaves no feedback object).

Errors: 401, 403, 404 (message not found), 429


GET /api/public/cards – List knowledge-base cards

A card is a saved question/answer pair in the knowledge base, generated from customer conversations.

Query parameters: per (default 10, max 500), page.

curl https://prod-api.binomai.com/api/public/cards -u YOUR_API_KEY:

Card object fields:

FieldDescription
idCard ID
organization_idOrganization ID
assistant_message_idID of the message this card was generated from
assistant_thread_idID of the chat this card was generated from
categoryCategory
question / answerThe Q&A pair
qualityQuality score (integer)
stateSee table below
filesAttached files – same field structure as above
created_at / updated_atTimestamps

Card lifecycle (state):

StatusMeaning
waitingCreated, no answer yet
in_progressBeing processed
answeredAn answer has been given
submittedAccepted for processing
consumedReady for use in the knowledge base
failedProcessing failed

Errors: 401


GET /api/public/price_lists – List price lists

Query parameters: per (default 10, max 500), page.

curl https://prod-api.binomai.com/api/public/price_lists -u YOUR_API_KEY:

Response:

{
  "data": [ /* array of price list objects, see below */ ],
  "meta": { "total": 5, "page": 1, "per": 10, "pages": 1, "parse_in_progress": false }
}

meta.parse_in_progress (boolean) reflects whether price list parsing is currently in progress across the listed items.

Errors: 401


GET /api/public/price_lists/{id} – Get a single price list

Path parameter only – this endpoint does not accept per/page (unlike the list endpoint above).

curl https://prod-api.binomai.com/api/public/price_lists/{id} -u YOUR_API_KEY:

Response – includes the parsed items directly:

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "state": "waiting",
  "form": "csv",
  "url": "https://example.com/feed.csv",
  "price_items_count": 128,
  "price_items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "organization_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "ext_id": "SKU-001",
      "title": "Example Product",
      "brand": "ExampleBrand",
      "category": "Electronics",
      "description": "Product description",
      "price": "199.99",
      "url": "https://example.com/products/sku-001",
      "image_url": "https://example.com/images/sku-001.jpg",
      "key_params": {},
      "data": {},
      "qr_code_url": "https://example.com/qr/sku-001.png",
      "qr_link": "https://example.com/products/sku-001",
      "created_at": "2026-08-21T11:12:03.287Z",
      "updated_at": "2026-08-21T11:12:03.287Z"
    }
  ],
  "file_name": "products.csv",
  "file_url": "https://example.com/uploads/products.csv",
  "processed_at": "2026-08-21T11:12:03.287Z",
  "created_at": "2026-08-21T11:12:03.287Z",
  "updated_at": "2026-08-21T11:12:03.287Z"
}

Price list fields:

FieldDescription
id / organization_idPrice list ID / organization ID
statewaiting, in_progress, processed, failed
formSource type: csv, rss, horoshop
urlAddress of the source feed, for rss/horoshop-type sources. Not used for csv uploads – see file_url instead.
price_items_countNumber of items (count only)
price_itemsArray of PriceItem objects – the actual items (see below)
file_name / file_urlFor file-based (csv) uploads
processed_at / created_at / updated_atTimestamps

PriceItem fields:

FieldDescription
id / organization_idItem ID / organization ID
ext_idExternal item ID from the client's source file
title, brand, category, descriptionStandard product fields
pricePrice (string)
urlLink to the product
image_urlLink to the product image
key_paramsKey parameters/keywords automatically extracted from the item during processing, used for more precise search and replies about this item
dataAdditional data
qr_code_url / qr_linkQR code image and the URL it resolves to
created_at / updated_atTimestamps

Errors: 401, 404


API Rate Limits (BINOMAI.com)

ScopeLimit
Messages per chat10 per minute, then the chat is blocked for 10 minutes
Whole public API100 requests per minute

Exceeding either limit returns 429.


API Error Codes (BINOMAI.com)

CodeMeaning
401Invalid or missing API key
402AI request balance is not positive (plan's available requests exhausted)
403Subscription is not active
404Resource not found (chat, message, or price list)
429Rate limit exceeded – thresholds are listed earlier in this page

Error body shapes:

{ "status": "error", "message": "Authentication failed" }
{ "error": "error text" }
{ "error": ["error one", "error two"] }

The status/message shape is used specifically for the 401-on-invalid-key case; every other error uses the error shape.


Chat Lifecycle

  • A chat that never received a single message from the user is automatically deleted after 3 hours.
  • A chat that already has message history is never deleted automatically – it persists indefinitely.
  • For long-idle-but-already-started conversations, creating a fresh chat on your side is a recommendation, not a system requirement – it keeps old context from bleeding into a new conversation, but nothing forces you to do it.

Webhooks

The public API does not use webhooks. The synthetic employee's reply is returned synchronously, in the same response as the message-send request – there's no asynchronous notification step to configure.

(Incoming webhooks for other channels – Telegram, Instagram, etc. – exist as part of configuring those channels directly in the dashboard, but are unrelated to this public REST API.)


Glossary

  • Chat – a conversation between a customer and the synthetic employee. Identified in API paths by your own chat_id.
  • Synthetic employee – the AI assistant that generates replies within a chat.
  • Message – a single message within a chat, from a user, assistant, system, or operator.
  • Card – a saved question/answer pair added to the knowledge base from a conversation.
  • Price list / Price item – an uploaded or fed-in product catalog, and an individual product entry within it.

All paths, field names, enum values, and error codes on this page reflect the current BINOMAI.com API specification.specification.

Ready to help: support@binomai.com