Skip to content

API

REST API

Authentication, POST /v1/notify, logs, the public contact and chat endpoints, conversations and contacts, errors and rate limits, the OpenAPI document, with curl examples.

On this page

Base URL: https://api.channlize.com. Every path works with or without the /api prefix (/v1/notify and /api/v1/notify are the same route); the SDKs use the short form. Requests and responses are JSON. An OpenAPI document describes the endpoints on this page.

Note

The contacts, project and public widget endpoints moved under /v1. The old unversioned paths (/public/contact, /public/events, /public/plans, /contacts, /projects/me, /projects/analytics) still work and behave the same, so deployed widgets and older SDK versions keep working. Their responses carry Deprecation: true and a Link header pointing at the /v1 path; use /v1 in new code. The conversations endpoints moved too, see Conversations.

Authentication

Two kinds of keys, used differently:

KeyFormatHow to send itEndpoints
Server API keych_live_ (or ch_test_, test mode) + 48 hex charactersAuthorization: Bearer ch_live_… header/v1/notify, /v1/events, /v1/projects/…, /v1/contacts, /v1/conversations
Widget keywk_ + 32 hex characterswidgetKey field in the JSON body, no header/v1/public/contact, /v1/public/events, /v1/chat/…

Server keys are secret: call those endpoints from your server only. Each key has scopes:

ScopeGrants
readcontacts:read, conversations:read, events:read, analytics:read
writecontacts:write, conversations:write, events:write, events:notify

Test mode: a ch_test_… key's calls are stored and shown in the dashboard as test ("livemode": false in responses), but never posted to Slack, Discord or Teams, emailed or sent to webhooks, and never counted toward your plan. It only sees test data, so a live conversation or contact is a 404 to it. See Test-mode keys.

A missing or wrong key returns 401, with a message that says what to fix and a docsUrl pointing at API keys: no header gets "No API key provided. Send your server API key as the header Authorization: Bearer ch_live_… (or ch_test_… for a test-mode key)", a widget key (wk_…) sent as a bearer token gets "This is a widget key (wk_…) … Server endpoints need a server API key (ch_live_…, or ch_test_… for test mode)", and an unknown, revoked or expired key gets "Invalid API key. …". A key without the needed permission returns 403 with API key lacks required permission: <permission>.

Shell
export CHANNLIZE_SERVER_API_KEY=ch_live_your_server_key
export CHANNLIZE_PROJECT_ID=your-project-id

POST /v1/notify

Send an Event: a Slack message designed in the dashboard. Needs the write scope.

Shell
curl https://api.channlize.com/v1/notify \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-42" \
  -d '{"projectId":"'"$CHANNLIZE_PROJECT_ID"'","event":"user.subscribed","data":{"username":"ada","plan":"Pro"}}'
JSON
{ "success": true, "id": "4f6c…", "event": "user.subscribed", "status": "queued" }
FieldTypeDescription
projectIduuidRequired. Must belong to the key's organization, otherwise 404 Project not found.
eventstringRequired. 1-100 characters, ^[a-z0-9][a-z0-9._-]*$.
dataobjectOptional. Fills the template; at most 16 KB as JSON.
channelstringOptional Slack channel ID for this call (only when the event is enabled).
idempotencyKeystringOptional, 1-255 characters. The Idempotency-Key header wins over it.

The response is always 202 Accepted:

FieldDescription
idDelivery ID, listed under Events → Recent deliveries.
statusqueued (will be posted) or skipped (won't be). A duplicate reports the first delivery's current status, which can also be sent or failed.
reasonWhy it was skipped: new event saved as a draft, event disabled, no Slack workspace, or no channel.
duplicatetrue when the idempotency key was already used on this project; nothing is posted and the first delivery's id, status and reason are returned.
livemodefalse for a test-mode key: the call is always skipped, shown under Recent deliveries with a Test badge and not counted. Test and live calls never share idempotency keys.

A 503 ("Could not queue the notification. Try again.") is safe to retry with the same idempotency key.

Log tracking

POST /v1/events

A server log line (log tracking). Needs the write scope. No deduplication.

Shell
curl https://api.channlize.com/v1/events \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"'"$CHANNLIZE_PROJECT_ID"'","name":"payment.failed","severity":"error","properties":{"reason":"card_declined"}}'
# 200 {"success":true,"id":"…"}

name (1-255 characters) is required, properties is any object, and severity is info, warning or error (anything else is stored as info).

GET /v1/events

Query logs. Needs the read scope.

Shell
curl "https://api.channlize.com/v1/events?projectId=$CHANNLIZE_PROJECT_ID&severity=error&limit=20" \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"

Filters: projectId, severity (info|warning|error), source (client_sdk|server_api|system), search (in the name and properties, up to 200 characters), from and to (ISO 8601), limit (default 50, max 100) and offset. Returns { events: [{ id, name, properties, severity, source, projectId, projectName, conversationId, distinctId, pageUrl, createdAt }], total, limit, offset, hasMore }.

POST /v1/public/events

A browser log line, with the widget key in the body and no auth header.

Shell
curl https://api.channlize.com/v1/public/events \
  -H "Content-Type: application/json" \
  -d '{"widgetKey":"wk_your_widget_key","name":"checkout.started","severity":"info","distinctId":"user_42"}'

Events and deliveries

Read your Events setup and history. Both need the read scope.

Shell
# Event definitions, including "Seen, not configured" drafts
curl https://api.channlize.com/v1/projects/$CHANNLIZE_PROJECT_ID/event-definitions \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"

# Latest deliveries (newest first), optionally for one definition
curl "https://api.channlize.com/v1/projects/$CHANNLIZE_PROJECT_ID/event-deliveries?limit=20" \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"
  • Definitions: { definitions: [{ id, key, name, description, slackChannelId, messageTemplate, emoji, isEnabled, lastSeenAt, createdAt, updatedAt }] }.
  • Deliveries take definitionId (uuid) and limit (1-100, default 20; out of range is a 400) and return { deliveries: [{ id, eventDefinitionId, event, data, status, reason, slackChannelId, isTest, attempts, sentAt, createdAt }] }. status is queued, sent, failed or skipped.

Public contact endpoint

POST /v1/public/contact

What ContactForm posts to: files a conversation and posts it to Slack. Widget key in the body, no auth header.

Shell
curl https://api.channlize.com/v1/public/contact \
  -H "Content-Type: application/json" \
  -d '{"widgetKey":"wk_your_widget_key","name":"Ada Lovelace","email":"ada@example.com","subject":"Billing question","message":"Can I switch to yearly billing?"}'
JSON
{ "success": true, "conversationId": "…", "message": "Thank you for contacting us! We will get back to you soon." }
FieldRules
widgetKeyRequired. An active widget key, otherwise 400 Invalid widget key.
emailRequired, a valid email.
messageRequired, 10-10,000 characters.
nameOptional, up to 200 characters.
subjectOptional, up to 200 characters. Blank: the topic custom field, then the first line of the message.
customFieldsOptional object, at most 20 keys (1-64 characters), values string (up to 500), number or boolean. Shown on the Slack post.
pageUrlOptional, up to 2,000 characters. Used only when its host matches the request's Referer.

The same email, subject and message within 30 seconds returns the existing conversation instead of a duplicate.

Widget appearance

GET /v1/public/widgets/:widgetKey

The appearance set for a widget key in the dashboard, which the React components read. No auth, and nothing about your organization is returned.

Shell
curl https://api.channlize.com/v1/public/widgets/wk_your_widget_key
JSON
{ "appearance": { "primaryColor": "#0f766e", "launcherPosition": "bottom-left", "greeting": "Hi there!", "welcomeMessage": null, "logoUrl": null } }

null means not set, so the widget's default applies. launcherPosition is bottom-right (the default), bottom-left, top-right or top-left. An unknown or inactive key answers 404. Browsers may cache the response for 60 seconds.

Chat sessions

The live chat behind ChannlizeChat. Widget key in the body when creating a session; then the session ID is the handle. Responses are wrapped in { success, data }.

Shell
# Create a session
curl https://api.channlize.com/v1/chat/sessions \
  -H "Content-Type: application/json" \
  -d '{"widgetKey":"wk_your_widget_key","metadata":{"plan":"Pro"}}'
# {"success":true,"data":{"session":{"id":"SESSION_ID","status":"active",…},"sseEndpoint":"/v1/chat/sessions/SESSION_ID/events"}}

# Send a message
curl https://api.channlize.com/v1/chat/sessions/SESSION_ID/messages \
  -H "Content-Type: application/json" \
  -d '{"content":"Hi! Can I change my plan?"}'

# Read messages, then close
curl "https://api.channlize.com/v1/chat/sessions/SESSION_ID/messages?limit=50&offset=0"
curl -X POST https://api.channlize.com/v1/chat/sessions/SESSION_ID/close
EndpointDescription
POST /v1/chat/sessions{ widgetKey, metadata? }. Returns the session and its sseEndpoint.
GET /v1/chat/sessions/{id}{ id, status, createdAt, updatedAt, metadata, reactionsEnabled, reactionEmojis }.
POST /v1/chat/sessions/{id}/messagesJSON { content, customerName?, customerEmail? }, or multipart/form-data with content and up to 10 attachments (50 MB each). The same content within 10 seconds is deduplicated.
GET /v1/chat/sessions/{id}/messageslimit (default 50, max 100), offset. Returns data plus meta: { total, limit, offset, hasMore, reactionsEnabled, reactionEmojis }. Each message carries its reactions.
POST /v1/chat/sessions/{id}/messages/{messageId}/reactions{ emoji }. Adds the customer's reaction and answers the message's reactions. Needs the workspace to have reactions turned on (403 otherwise) and one of the offered emoji (400 otherwise); an unknown message answers 404.
DELETE /v1/chat/sessions/{id}/messages/{messageId}/reactions{ emoji }. Removes the customer's reaction and answers the message's reactions.
POST /v1/chat/sessions/{id}/closeEnds the session.
GET /v1/chat/sessions/{id}/eventsServer-sent events: connected, message and reaction. The reaction event carries { messageId, reactions } (the same shape as a message's reactions) and has no event id, so it never moves the Last-Event-ID cursor. Each stream ends after about 50 seconds and the browser reconnects, resuming with Last-Event-ID.

Conversations

Listing and reading need inbox:read (granted by the read and inbox:read scopes); opening a conversation needs conversations:write (scope write).

Shell
# Open conversations, newest activity first, 25 per page
curl "https://api.channlize.com/v1/conversations?status=open&limit=25&offset=0" \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"

# One conversation with its messages
curl https://api.channlize.com/v1/conversations/CONVERSATION_ID \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"

# Open a conversation and post it to Slack
curl https://api.channlize.com/v1/conversations \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Integration help","message":"Hi, the SDK…","customerEmail":"ada@example.com"}'
  • GET /v1/conversations: limit (default 25, max 100) and offset. Optional filters, combined with AND: status, priority and source (one value or a comma list such as open,pending), assignee (a user ID, a member's email, unassigned or assigned), projectId, updatedSince (ISO 8601), tag, intent and urgency (AI triage), and q (subject, customer name or email, or any message's text). sort is recent (default, latest activity), newest, oldest or priority. Returns { conversations: [{ id, subject, status, priority, source, tags, projectId, customer: { id, email, name }, assignee, aiAgent, triage, messageCount, needsReply, latestMessage, createdAt, updatedAt, lastActivityAt }], total, limit, offset, hasMore }.
  • GET /v1/conversations/{id}: { conversation: { id, subject, status, priority, source, tags, customer, assignee, slack, messages, messagesPage, createdAt, updatedAt, … } }, or 404 Conversation not found. Messages are paged from the newest: limit (default 500, max 1000) and offset, each page oldest first; messagesPage is { total, limit, offset, hasMore }.
  • POST /v1/conversations opens a conversation and posts it to Slack: { subject, message, customerEmail, customerName?, channel?, tags? }. channel pins a Slack channel ID and skips routing rules. Returns 201; the same customer, subject and message within 30 seconds returns the existing conversation.

Replying, internal notes and status, assignee or tag changes live under the same path and need inbox:write; see MCP tools.

The unversioned GET /conversations, GET /conversations/{id} and POST /conversations are deprecated. They still work, and their responses carry Deprecation: true and a Link header pointing at the /v1 path. POST /conversations behaves exactly like POST /v1/conversations. The two GET paths keep their older response shape and have no filters: GET /conversations takes limit (default 50, max 100) and offset and returns { conversations: [{ id, subject, status, customerEmail, customerName, createdAt, slackThreadId, priority, tags, source }], total, limit, offset, hasMore }.

Contacts

Shell
curl "https://api.channlize.com/v1/contacts?limit=50&offset=0" \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY"

curl https://api.channlize.com/v1/contacts \
  -H "Authorization: Bearer $CHANNLIZE_SERVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"ada@example.com","name":"Ada Lovelace","company":"Analytical Engines","tags":["vip"]}'
  • GET /v1/contacts: limit (default 50, max 100) and offset, most recently seen first. Returns { contacts: [{ id, email, name, totalConversations }], total, limit, offset, hasMore }.
  • GET /v1/contacts/{id}: one contact, or 404 Contact not found.
  • POST /v1/contacts: { email, name?, company?, phone?, tags? }. Finds or creates by email; returns 201.

Project

Any valid server key:

  • GET /v1/projects/me: the organization's first project, with usage totals and Slack status.
  • GET /v1/projects/analytics: daily figures for the last 30 days (conversations created and resolved, customer and agent messages).

Analytics

Keys with the analytics:read scope (or read):

  • GET /v1/analytics/summary: the headline KPIs against the previous period, and the inbox right now.
  • GET /v1/analytics/report: the full report (volume, first-reply and resolution times, target met %, daily series, busiest hours, AI deflection).
  • GET /v1/analytics/breakdown?dimension=…: one row per value of a dimension.
  • GET /v1/analytics/assignees: workload and response times per assignee.

They take days or from / to, tz, compare and the filters; see Analytics.

Errors

Errors share one shape:

JSON
{
  "statusCode": 400,
  "error": "BAD_REQUEST",
  "message": "event: Event key must be lowercase letters, digits, dots, underscores or dashes (e.g. user.subscribed), starting with a letter or digit, at most 100 characters",
  "timestamp": "2026-11-04T10:00:00.000Z",
  "path": "https://api.channlize.com/api/v1/notify",
  "requestId": "…"
}
  • error is the status name: BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE, INTERNAL_SERVER_ERROR.
  • message is a string; validation errors are field: message entries joined with , .
  • Every response has an X-Request-Id header (yours is echoed if you send one). Include it when you contact support.
StatusMeaningRetry?
400Invalid input; see message.No, fix the request.
401Missing, wrong, revoked or expired key.No.
403The key lacks a scope, or code: "PLAN_LIMIT_REACHED" for a connection or seat past the plan's limit.No.
404Unknown resource, or not in your organization.No.
409Idempotency key race.Yes.
429Rate limited, or code: "PLAN_LIMIT_REACHED" past 110% of a monthly plan limit.Yes, after Retry-After.
503Temporarily unavailable.Yes, with backoff (and the same idempotency key).

Rate limits

Default limits, in fixed 15-minute windows (they may change; read the headers rather than hard-coding them):

TrafficLimitCounted per
Server-key endpoints100 requests / 15 minAPI key
Public endpoints (contact form, chat)100 requests / 15 minIP address
Contact form submissions100 / 15 min, on top of the public limitIP address
Browser logs (/v1/public/events)600 requests / 15 minIP address
Connections inbound webhooks1,000 requests / 15 minconnection URL

Successful responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). A 429 has the same headers plus Retry-After (seconds) and the message Too many requests. Retry in Ns.. Browser logs are also capped at 60 requests per minute per project; over it, the 429 says Rate limit exceeded.

Machine-readable schemas

OpenAPI

An OpenAPI 3.1 document of the endpoints on this page: https://api.channlize.com/openapi.json. Request bodies and query parameters are generated from the validation the API runs, so they match what it accepts.

  • Postman: Import → paste the URL. Insomnia: Create → Import → From URL.

  • Generate a client, for example with openapi-typescript:

    Shell
    npx openapi-typescript https://api.channlize.com/openapi.json -o channlize.d.ts
  • Validate a payload with any JSON Schema 2020-12 validator: each operation's requestBody schema is the one the API checks.

Server-key operations use the serverApiKey bearer scheme and name their permission in x-channlize-permission; widget-key operations have no security requirement (the key goes in the body). The inbox write endpoints (reply, notes, PATCH /v1/conversations/{id}), agent, webhook and routing-rule endpoints aren't in it yet.

Automation contract

The automation contract for Zapier, Make and n8n has a JSON Schema at https://api.channlize.com/api/in/schema.json.