SilentChat

REST API Reference

The SilentChat REST API lets you access and manage all platform resources programmatically. All endpoints are versioned and return JSON.

Overview

Base URL

https://api.silentchat.de/api

Versioning

All endpoints live under /api/v1/. When breaking changes are introduced, a new version prefix is published and the old version is deprecated with six months' notice.

Content Type

Send all request bodies as JSON with the Content-Type: application/json header.

Authentication

See the Authentication guide for full details. Every endpoint (unless marked Public) requires either a valid JWT bearer token or an X-API-Key header.

Auth

MethodPathDescription
POST/v1/auth/registerAuthenticate with email and password. Returns access and refresh tokens.
POST/v1/auth/loginAuthenticate with email and password. Returns access and refresh tokens.
POST/v1/auth/refreshExchange a refresh token for a new access token.
POST/v1/auth/logoutInvalidate the current refresh token.
POST/v1/auth/verify-emailReturn the authenticated user's profile.
POST/v1/auth/forgot-passwordReturn the authenticated user's profile.
POST/v1/auth/reset-passwordReturn the authenticated user's profile.

Tenants

MethodPathDescription
POST/v1/tenantsReturn the tenant details for the authenticated user.
GET/v1/tenants/:idReturn the tenant details for the authenticated user.
PATCH/v1/tenants/:idUpdate tenant settings (name, timezone, etc.).
GET/v1/tenants/:id/membersReturn the tenant details for the authenticated user.
POST/v1/tenants/:id/membersUpdate tenant settings (name, timezone, etc.).
DELETE/v1/tenants/:id/members/:userIdUpdate tenant settings (name, timezone, etc.).

Conversations

MethodPathDescription
GET/v1/conversationsList conversations for the tenant with optional filters and cursor pagination.
GET/v1/conversations/:idReturn a single conversation by ID.
PUT/v1/conversations/:idChanges status, priority or subject. Status "closed" closes the conversation like /close; "open" reopens a closed one like /reopen.
POST/v1/conversations/:id/assignAssigns the conversation to a member of your team.
POST/v1/conversations/:id/transferHands an open conversation over to a colleague or a department.
POST/v1/conversations/:id/closeCloses a conversation (system message, satisfaction survey, workflows). Messages are kept.
POST/v1/conversations/:id/reopenReopens a closed conversation — open and unassigned.

Hand over and reopen

Both actions require a user token (JWT) with write access to conversations. They are rejected for API keys and for lite seats.

Hand over

The body names exactly one target: user_id (a person) or department_id (a department). For a department, SilentChat picks an active member, preferring one who is online. note is optional (at most 2,000 characters) and is saved as an internal note. The conversation is then "assigned"; the recipient is notified and the visitor sees a short notice without names.

POST /api/v1/conversations/:id/transfer
Authorization: Bearer <token>
Content-Type: application/json

{ "user_id": "<uuid>", "note": "…" }
// oder / or: { "department_id": "<uuid>" }

200 → { "message": "Conversation transferred", "conversation": { … } }

Reopen

No body. The conversation is then "open" and unassigned; the AI bot's state is left as it was. The visitor sees a short notice.

POST /api/v1/conversations/:id/reopen
Authorization: Bearer <token>

200 → { "conversation": { "status": "open", "assigned_user_id": null, … } }

Error codes

CodeDescription
ERR_TRANSFER_TARGETNo target or more than one target given.
ERR_USER_NOT_IN_TENANTThe person is not an active member of your team.
ERR_ASSIGNEE_LITE_SEATThe selected person has a lite seat and cannot handle conversations (assign and transfer).
ERR_INVALID_DEPARTMENTThe department does not belong to your account.
ERR_DEPARTMENT_NO_AGENTSNobody in the department can take over (409).
ERR_CONVERSATION_CLOSEDThe conversation is closed — reopen it first (409).
ERR_CONVERSATION_NOT_CLOSEDOnly a closed conversation can be reopened (409).

Real-time events over the WebSocket: conversation.transferred (conversation_id, assigned_user_id, department_id) and conversation.reopened (conversation_id). For a picker, GET /api/v1/team/members?include=presence adds presence (online, away, offline) and open_conversations to each member.

Messages

MethodPathDescription
GET/v1/messages/:conversation_idLists the messages of a conversation (paginated).
POST/v1/messagesSends a message into a conversation (conversation_id and content in the body).
POST/v1/messages/:conversation_id/readMarks the messages of a conversation as read.

Visitors

MethodPathDescription
GET/v1/visitorsList visitors currently on tracked domains.
GET/v1/visitors/:idReturn details for a single visitor.

Contacts

MethodPathDescription
GET/v1/contactsList contacts with optional search and cursor pagination.
POST/v1/contactsCreate a new contact.
GET/v1/contacts/:idReturn a single contact by ID.
PATCH/v1/contacts/:idUpdate contact details.
DELETE/v1/contacts/:idDelete a contact.

Widgets

MethodPathDescription
GET/v1/widgetsList all widgets for the tenant.
POST/v1/widgetsCreate a new widget.
GET/v1/widgets/:idReturn a single widget by ID.
PATCH/v1/widgets/:idUpdate widget settings.
DELETE/v1/widgets/:idDelete a widget.

Domains

MethodPathDescription
GET/v1/domainsList domains allowed for a widget.
POST/v1/domainsAdd a new allowed domain to a widget.
DELETE/v1/domains/:idRemove an allowed domain from a widget.

Canned Responses

MethodPathDescription
GET/v1/canned-responsesList canned responses.
POST/v1/canned-responsesCreate a new canned response.
PATCH/v1/canned-responses/:idUpdate a canned response.
DELETE/v1/canned-responses/:idDelete a canned response.

Files

MethodPathDescription
POST/v1/filesUpload a file attachment (max 20 MB).
GET/v1/files/:idReturn a pre-signed download URL for a file.

Billing

MethodPathDescription
GET/v1/billing/subscriptionReturn the current subscription and usage.
POST/v1/billing/checkoutCreate a Stripe billing portal session URL.
POST/v1/billing/portalCreate a Stripe billing portal session URL.
GET/v1/billing/invoicesReturn the current subscription and usage.
GET/v1/billing/usageReturn the current subscription and usage.

Example Request & Response

The SilentChat REST API lets you access and manage all platform resources programmatically. All endpoints are versioned and return JSON.

Request

GET /v1/conversations?status=open&limit=10 HTTP/1.1
Host: api.silentchat.de
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json
X-Tenant-ID: tn_abc123

Response

{
"data": [
{
"id": "conv_01HXYZ",
"status": "open",
"visitor_id": "vis_9f2c4e1a",
"assigned_to": "usr_d4e5f6",
"last_message": "Hi, I have a question about pricing.",
"last_message_at": "2025-10-12T14:32:00Z",
"created_at": "2025-10-12T14:30:00Z"
}
],
"pagination": {
"total": 42,
"limit": 10,
"offset": 0,
"has_more": true
}
}