Developers

Public API, signed webhooks and the widget snippet

Public API, signed webhooks, and the widget snippet. Integrate the helpdesk with your own systems. Rotate secrets in Settings. This page is the public reference for webhooks and /v1. The short API and webhooks integration page is the same surface in fewer words.

Updated

API host for this site: https://api.xupport.io. The snippet in Settings already points at the same host as the workspace you are installing.

Rotate the token and the signing secret in Settings. Treat both like passwords.

Base URL and auth

Rotate api_token in Settings. Send it on every request:

Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

The token is scoped to your organization. Treat it like a password. An invalid token returns 401. Merged tickets return 404.

Widget

See Widget for the snippet. The script is served from the API host at /embed/xupport.js. It talks to that same host. CORS is limited to the origins we configure.

<script
  src="https://api.xupport.io/embed/xupport.js"
  data-org="YOUR_ORG_ID"
  data-key="YOUR_WIDGET_KEY"
  data-api="https://api.xupport.io"
  async></script>

Signed webhooks

Settings: webhook URL and secret. We POST JSON { "type": "…", "data": { } } with headers:

  • X-Xupport-Timestamp: unix seconds
  • X-Xupport-Signature: sha256= HMAC of timestamp + "." + raw body using your secret

Events: conversation.created, conversation.updated, message.created. Send a ping with “Test webhook”. Failed deliveries retry with backoff for about a day (five attempts). Verify the signature before you trust the body. Internal notes posted through the API do not emit message.created.

Conversations

A conversation is a ticket. Channels: widget, email, form, slack, agent. Status: open, pending, resolved, closed. Priority: low, normal, high, urgent.

GET /v1/conversations

List tickets, newest update first. Query:

  • q: search number, subject, and body (max 200 characters)
  • status: one of the statuses above
  • updated_after / updated_before: ISO datetimes
  • filename: match an attachment name (max 180 characters)
GET https://api.xupport.io/v1/conversations?status=open&q=checkout

POST /v1/conversations

Open a ticket. Body:

{
  "subject": "Checkout timeout on mobile",
  "body": "The card form hangs on iPhone after Apple Pay.",
  "channel": "agent",
  "priority": "normal",
  "customer_email": "ada@shop.io",
  "customer_name": "Ada"
}

channel defaults to agent. If you send a customer email, the first message is stored as a customer message; otherwise it is stored as an agent message. This emits conversation.created and can notify a linked Slack channel.

GET /v1/conversations/{id}

One ticket. Response includes ticket number, status, priority, assignee, channel, tags, snooze, customer fields, waiting-on, CSAT, first-response and SLA timestamps, and whether SLA is breached. Email tickets include inbound_to, the original recipient such as billing@….

PATCH /v1/conversations/{id}

Update subject, status, priority, assignee_id, customer_email, customer_name. Resolving can trigger CSAT mail and the optional learn-from-ticket draft. Emits conversation.updated.

PATCH https://api.xupport.io/v1/conversations/3fa85f64-5717-4562-b3fc-2c963f66afa6
{
  "status": "resolved",
  "priority": "normal"
}

Messages

GET /v1/conversations/{id}/messages

Thread in created order, including internal notes. Inbound email messages include recipients with to, cc, and received_for.

POST /v1/conversations/{id}/messages

{
  "body": "Checking mobile checkout. I will stay on this ticket.",
  "internal": false
}

Posts as an agent. Public replies mark first response, wake a snoozed ticket, notify Slack, send outbound mail when the channel allows it, and emit message.created. Set internal to true for a note: that stays in the workspace.

Metrics

GET /v1/metrics

Same numbers as the Metrics page. Either days (1–90, default window if omitted) or from and to as dates (inclusive, at most 90 days). Merged tickets are left out.

GET https://api.xupport.io/v1/metrics?days=30
GET https://api.xupport.io/v1/metrics?from=2026-09-01&to=2026-09-30

Response includes volume, volume_by_channel, volume_by_day, first_response_median_seconds, csat_average, SLA due/breached counts, sla_by_day (every day in the window), and sla_by_weekday (the weekday roll-up).

Attachments

Upload files from the inbox: up to three per message, 5 MB each. The API can find tickets by attachment filename with the filename query on GET /v1/conversations.

Questions about a workspace you pay for: hello@xupport.io. Or use the chat on this site.

Helpdesk API Docs: REST API and Signed Webhooks | Xupport