Supovia API reference

Every endpoint of the Supovia REST API, generated from the API itself.

All endpoints are relative to https://api.supovia.com. Create an API key in your Supovia dashboard, then authenticate every request with it.

apiKey HTTP Basic auth carrying only the API key secret: Authorization: Basic base64(<key secret>).

accessToken Operator session token issued by the Supovia dashboard: Authorization: Token <access token>.

Download the OpenAPI specification for use with your own tooling.

Batch

POST/api/batch

Read several organization resources in one request

Executes a bounded batch of collection reads and returns an object keyed by each operation's alias. Only explicitly allow-listed, organization-scoped collections can be queried.

accessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Results keyed by operation alias

Conversations

GET/api/conversations

List conversations

Lists the conversations of your organization, newest first when sorted by lastEditTime. Requires the conversations:read scope.

conversations:readapiKeyaccessToken
Parameters
NameInTypeDescription
websiteIdquerystring
customerIdquerystring
limitqueryinteger
skipqueryinteger
sortFieldquerystring
sortDirectionquerystring (ASC | DESC)
resolvedqueryboolean
fieldsquerystringComma-separated projection of fields to return
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of conversations
401Missing or invalid credentials
403API key is missing the conversations:read scope
429API key rate limit exceeded
GET/api/conversations/{conversationId}

Get a conversation

Returns a single conversation by id. Conversations belonging to another organization respond 404. Requires the conversations:read scope.

conversations:readapiKeyaccessToken
Parameters
NameInTypeDescription
conversationIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The conversation
404Not found (or owned by another organization)

Customers

GET/api/customers

List customers

Requires the customers:read scope.

customers:readapiKeyaccessToken
Parameters
NameInTypeDescription
websiteIdquerystring
emailquerystring
userIdquerystringYour own user id set via the widget setUserId
fieldsquerystringComma-separated projection of fields to return
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of customers
POST/api/customers

Create a customer

Creates a customer on a website. Emits the customer.created webhook event. Requires the customers:write scope.

customers:writeapiKeyaccessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Request body
FieldTypeDescription
emailstring
nicknamestring
phonestring
languagestring
Responses
StatusMeaning
200The created customer
403API key is missing the customers:write scope
GET/api/customers/{customerId}

Get a customer

Returns a single customer by id. Customers belonging to another organization respond 404. Requires the customers:read scope.

customers:readapiKeyaccessToken
Parameters
NameInTypeDescription
customerIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The customer
404Not found (or owned by another organization)
PUT/api/customers/{customerId}

Update a customer

Requires the customers:write scope.

customers:writeapiKeyaccessToken
Parameters
NameInTypeDescription
customerIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The updated customer

Documents

GET/api/documents

List documents

Requires the documents:read scope. For stable traversal, set pagination=cursor; the response becomes {items, nextCursor} and is ordered by ascending _id. Pass nextCursor back as cursor until it is null. Existing array responses and offset pagination remain available when cursor pagination is not requested.

documents:readapiKeyaccessToken
Parameters
NameInTypeDescription
websiteIdquerystring
localequerystring
documentIdquerystringExact document id
categoryquerystring
publishedqueryboolean
searchquerystringPlain-text title search
paginationquerystring (cursor)Set to cursor for a stable page envelope
cursorquerystringOpaque nextCursor from the preceding cursor page
limitqueryintegerOptional bounded page size (maximum 500 and default 100 in cursor mode; 0 returns everything otherwise)
skipqueryinteger
fieldsquerystringComma-separated projection of fields to return
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of documents, or {items, nextCursor} in cursor mode

Messages

GET/api/messages

List messages

Lists messages, usually filtered by conversationId. Requires the messages:read scope.

messages:readapiKeyaccessToken
Parameters
NameInTypeDescription
conversationIdquerystring
limitqueryinteger
skipqueryinteger
sortFieldquerystring
sortDirectionquerystring (ASC | DESC)
fieldsquerystringComma-separated projection of fields to return
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of messages
POST/api/messages

Create a message

Appends a message to a conversation. from is operator for replies sent on behalf of your team and customer for messages on behalf of the visitor. Emits the message.created webhook event. Requires the messages:write scope.

messages:writeapiKeyaccessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Idempotency-KeyheaderstringUnique retry key retained for 24 hours (maximum 255 characters). Authenticated callers only.
Request body
FieldTypeDescription
conversationIdrequiredstring
contentrequiredstring
fromrequiredstring (operator | customer)
Responses
StatusMeaning
200The created message
403API key is missing the messages:write scope
GET/api/messages/{messageId}

Get a message by id

Returns one message to an authenticated operator or API key. A key requires the messages:read scope. Anonymous chat sessions cannot use this route. Messages belonging to another organization, or to a different Website than a Website-pinned key, respond 404.

messages:readapiKeyaccessToken
Parameters
NameInTypeDescription
messageIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The message
404Not found (or outside the authenticated tenant)
POST/api/messages/{messageId}/read

Mark a protected customer reply as read

Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The receipt is read (including an idempotent retry)
POST/api/messages/{messageId}/rating

Rate an agent or operator reply

Records how the visitor rated one reply, as rating and ratingTime on that message. Called by the embedded chat surfaces with the visitor's chat-session credentials; there is no API-key or operator-token path, because the rating is the customer's own answer and nobody else may author it. Re-rating the same message overwrites the previous value. Emits MESSAGE_UPDATED_EVENT to the dashboard.

Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Request body
FieldTypeDescription
websiteIdrequiredstring
ratingrequiredstring (unhappy | neutral | happy)
Responses
StatusMeaning
200The rated message
400Unrecognised rating value
404No such rateable message for this chat session

Sandbox

GET/api/sandbox/documents

Read sandbox help-center documents without authentication

Returns a fixed set of demonstration help-center documents in the same {title, locale} shape as authenticated document reads. No account, credential, or key is required, so agents can evaluate the API before onboarding. Responses carry the standard RateLimit response headers and the anonymous pacing limit applies.

Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Demonstration help-center documents.
429Anonymous rate limit exceeded; retry after Retry-After seconds.
POST/api/sandbox/documentsummaryjobs

Start a demonstration asynchronous document-summary job

Demonstrates the API's asynchronous-job pattern without authentication. The response is 202 Accepted with a Location header pointing at the job resource and a body carrying the job _id and status. Poll the Location URL until the status is succeeded, then read the summary from the job body. The job is deterministic fixture work that completes about two seconds after creation.

Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
202Job accepted; poll the Location URL for the result.
429Anonymous rate limit exceeded; retry after Retry-After seconds.
GET/api/sandbox/documentsummaryjobs/{jobId}

Poll a demonstration document-summary job

Reads the status of a demonstration job started at POST /api/sandbox/documentsummaryjobs. While the job runs the status is running; afterwards it is succeeded and the body carries the document summary. No authentication is required.

Parameters
NameInTypeDescription
jobIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Current job state.
404Unknown job id.

Webhook subscriptions

GET/api/webhooksubscriptions

List webhook subscriptions

Webhook subscriptions deliver message.created, conversation.created and customer.created events to your server as signed POST requests (X-Supovia-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of "timestamp.body">). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the secret is only returned once, on create.

accessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of webhook subscriptions (without secrets)
POST/api/webhooksubscriptions

Create a webhook subscription

The response includes the signing secret exactly once — store it; it cannot be retrieved again.

accessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Request body
FieldTypeDescription
websiteIdrequiredstring
urlrequiredstring
eventsarray (message.created | conversation.created | customer.created)Empty array subscribes to all events
Responses
StatusMeaning
200The created subscription, including its secret
PUT/api/webhooksubscriptions/{webhookSubscriptionId}

Update a webhook subscription

url, events and active are editable; the secret and website are immutable. Re-enabling an auto-disabled endpoint is done by setting active back to true.

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The updated subscription (without secret)
DELETE/api/webhooksubscriptions/{webhookSubscriptionId}

Delete a webhook subscription

accessToken
Parameters
NameInTypeDescription
webhookSubscriptionIdrequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Deleted

Websites

GET/api/websites

List websites

Lists the websites (projects) of your organization. Requires the websites:read scope.

websites:readapiKeyaccessToken
Parameters
NameInTypeDescription
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200Array of websites
GET/api/websites/{websiteName}

Get a website by name

Requires the websites:read scope.

websites:readapiKeyaccessToken
Parameters
NameInTypeDescription
websiteNamerequiredpathstring
API-Versionheaderstring (1)Compatibility version. Omit to select version 1.
Responses
StatusMeaning
200The website
404Not found