Developers
Public Ticketing API (v1)
File tickets from your own systems, follow their conversations, and answer them — reply, add internal notes, change status. Generate an API key from Ticketing → Settings → API access inside your Ukigai organization, then follow the flow below.
All examples below use https://app.ukigai.com — replace it with your own
Ukigai URL.
Scope
v1 lets an external system work your support desk: file tickets (a monitoring alert, a web form, another help desk), read them and their conversations (reporting, sync, a Slack bot), and answer them — reply to the customer, add an internal note, change the status, type and tags, set the priority and assignee, and link the ticket to the CRM account and lead it is about.
A Ticketing key speaks for your whole support desk: every company you serve, the same reach an agent has in the Ticketing inbox. It is a separate API from CRM and Marketing — a Ticketing key only works on Ticketing endpoints, and vice versa.
Not in v1: attachments (upload and download), creating companies, and inviting portal users. Those stay in the app.
Authentication
Same two-step exchange as every Ukigai public API, using a key generated from Ticketing → Settings → API access inside your organization:
curl -X POST https://app.ukigai.com/api/public/v1/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "uak_your_ticketing_api_key_here"}'
{
"access_token": "uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"token_type": "Bearer",
"expires_in": 3600,
"request_id": "b3f2..."
}
Use the access token as Authorization: Bearer ... on every other call.
When it expires, exchange the API key again. Your organization is always
resolved from the token — there is no organization id in any URL or body.
A key carries one or two scopes, chosen when it's created:
ticketing:read— always included; everyGET.ticketing:write— create tickets, post replies and internal notes, change status, type, tags, priority, assignee and CRM links. Replies are emailed to customers, so leave this off for a reporting or export key.
Every response — success or error — includes a request_id (body and
X-Request-Id header); errors are { error, code, request_id }, sometimes
with details. See the CRM API docs for the shared
conventions — they apply here identically.
Who writes what
Ticket history is a record of who said what, so what an integration writes
is attributed to the integration, never to a person. Each entry it
creates is authored by the API key's name (for example "Monitoring
alerts"), as the support team (author.kind: "agent").
Every write accepts an optional author_name to override that display name
— useful for a relay that forwards a named person's words, e.g.
"Maria (via Slack)". Your organization's audit log still records which key
made the call.
The order you'll actually use this in
- Read your setup —
GET /ticketing/metadatafor statuses, ticket types and tags;GET /ticketing/companiesfor the companies tickets belong to. - Check what a company needs —
GET /ticketing/companies/:id/forms. Ifform_requiredistrue, a ticket must carry one of those forms. - File the ticket —
POST /ticketing/tickets. - Follow it — poll
GET /ticketing/tickets?updated_after=…, and read the conversation withGET /ticketing/tickets/:id/messages. - Answer it —
POST …/messagesto reply or add a note,PATCH /ticketing/tickets/:idto move the status.
Reference data
GET /api/public/v1/ticketing/metadata
Requires scope ticketing:read. Your organization's statuses, ticket types
and tags. Retired entries are included with is_active: false — older
tickets still point at them.
{
"statuses": [
{ "id": "…", "name": "Open", "kind": "in_progress", "is_default": true, "is_active": true },
{ "id": "…", "name": "Waiting on customer", "kind": "waiting_customer", "is_default": false, "is_active": true },
{ "id": "…", "name": "Resolved", "kind": "resolved", "is_default": false, "is_active": true }
],
"ticket_types": [ { "id": "…", "name": "Incident", "is_active": true } ],
"tags": [ { "id": "…", "name": "Billing", "is_active": true } ],
"request_id": "b3f2..."
}
Status names are yours; every status has one of three kinds, and the kind is what the rest of the product reasons about:
| Kind | Meaning |
|---|---|
in_progress | The support team owes the next move. SLA clocks run. |
waiting_customer | The customer owes the next move. SLA clocks pause. |
resolved | Done. Resolving raises the satisfaction survey. |
Companies
GET /api/public/v1/ticketing/companies
Requires scope ticketing:read. The companies (your customers) you run
support for. No filter is required.
| Filter | Matches |
|---|---|
id | exact company id |
slug | exact portal slug |
name | case-insensitive exact name |
is_active | true / false |
cursor, limit | pagination (limit default 25, max 100) |
{
"data": [
{
"id": "…",
"name": "Globex",
"slug": "globex",
"is_active": true,
"support_emails": ["support@acme.example"],
"time_zone": "America/Santiago",
"default_language": "es",
"created_at": "2026-03-01T12:00:00.000Z",
"updated_at": "2026-03-01T12:00:00.000Z"
}
],
"next_cursor": null,
"request_id": "b3f2..."
}
Pass next_cursor back as cursor for the following page; null means
there are no more.
GET /api/public/v1/ticketing/companies/:id/forms
Requires scope ticketing:read. The forms a ticket for this company can be
filed with — the same ones the customer portal offers — with their
questions. Pass type_id if you'll create the ticket with a type: some
forms only apply to certain types.
{
"data": [
{
"id": "…",
"name": "Report an incident",
"description": null,
"ticket_type_ids": null,
"questions": [
{
"id": "6f1c…",
"label": "Severity",
"help_text": null,
"type": "single_select",
"required": true,
"options": [ { "id": "high", "label": "High" }, { "id": "low", "label": "Low" } ],
"visible_when": null
}
]
}
],
"form_required": true,
"request_id": "b3f2..."
}
ticket_type_ids: null means the form applies to every type.
visible_when makes a question conditional on an earlier answer
(question_id plus option_ids or bool_value) — a hidden question is
neither required nor stored.
GET /api/public/v1/ticketing/companies/:id/members
Requires scope ticketing:read. The company's portal users. A ticket's
requester must be an active member, so check here first. Filters:
email (case-insensitive exact), status (active / disabled), plus
cursor / limit.
{
"data": [
{
"id": "…",
"user_id": "…",
"email": "ana@globex.example",
"name": "Ana Pérez",
"role": "member",
"status": "active",
"created_at": "2026-03-02T09:00:00.000Z"
}
],
"next_cursor": null,
"request_id": "b3f2..."
}
Members are invited from the app, not through the API.
Tickets
The ticket object
{
"id": "1d0e…",
"code": "TKT-000042",
"company_id": "…",
"subject": "Checkout returns 500",
"content": "Checkout returns 500 since 09:12.\nAffects all card payments.",
"status": { "id": "…", "name": "Open", "kind": "in_progress" },
"type_id": "…",
"tag_ids": ["…"],
"priority": "high",
"assignee": { "user_id": "…", "name": "Carla Soto" },
"crm_account_id": "…",
"crm_lead_id": "…",
"requester": { "user_id": "…", "email": "ana@globex.example", "name": "Ana Pérez" },
"creation_channel": "api",
"last_message_channel": "platform",
"form": {
"id": "…",
"name": "Report an incident",
"questions": [ "… only on single-ticket responses …" ]
},
"answers": { "6f1c…": "high" },
"sla": {
"rule": "Critical",
"first_response_due_at": "2026-11-27T13:12:00.000Z",
"resolution_due_at": "2026-11-27T20:12:00.000Z",
"first_response_at": null,
"paused_at": null
},
"last_activity_at": "2026-11-27T12:12:00.000Z",
"closed_at": null,
"created_at": "2026-11-27T12:12:00.000Z",
"updated_at": "2026-11-27T12:12:00.000Z",
"external_source": "pagerduty",
"external_id": "incident:Q2X8"
}
subjectis the title you sent, or the first line ofcontent.requesterisnullfor a ticket filed against the company without naming anyone.priorityislow,normal,highorurgent— every ticket has one,normaluntil someone sets it.assigneeis the agent working the ticket, ornull.nameis their name when they were assigned.crm_account_id/crm_lead_idare the CRM account and lead (contact) the ticket is about, ornull. Read them through the CRM API.creation_channelis how the ticket arrived:platform(the customer portal),email,agent(logged by your team),assistant(handed over by the chatbot) orapi.answersis keyed by question id. Asingle_selectanswer is an option id,multi_selectan array of option ids,yes_noa boolean, text questions a string.form.questions— the form exactly as it was when the ticket was filed — comes on single-ticket responses (GET,POST,PATCH), not on lists.sladeadlines are fixed when the ticket is created. While the ticket is in awaiting_customerstatus,paused_atis set and the deadlines move forward when it leaves that status.
POST /api/public/v1/ticketing/tickets
Requires scope ticketing:write.
curl -X POST https://app.ukigai.com/api/public/v1/ticketing/tickets \
-H "Authorization: Bearer uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 8b297cf0-1234-4a3b-9abc-1234567890ab" \
-d '{
"company_id": "COMPANY_ID",
"content": "Checkout returns 500 since 09:12.\nAffects all card payments.",
"requester_email": "ana@globex.example",
"form_id": "FORM_ID",
"answers": { "QUESTION_ID": "high" },
"external_source": "pagerduty",
"external_id": "incident:Q2X8"
}'
| Field | Type | Required |
|---|---|---|
company_id | uuid | yes — an active company |
content | string, up to 20,000 chars | yes |
title | string, up to 300 chars | no — defaults to the first line of content |
requester_email | string | no — an active member of the company |
requester_user_id | uuid | no — alternative to requester_email, not both |
type_id | uuid | no — an active ticket type |
form_id | uuid | when the company has forms (form_required) |
answers | object | no — validated against the form |
tag_ids | uuid[] | no — active tags, up to 20 |
priority | low | normal | high | urgent | no — default normal |
assignee_user_id | uuid | no — a user who can manage tickets in your organization |
crm_account_id | uuid | no — a CRM account of your organization |
crm_lead_id | uuid | no — a CRM lead; its account is linked too |
author_name | string | no — see "Who writes what" above |
external_source | string (slug, e.g. pagerduty) | no — both or neither with external_id |
external_id | string | no — both or neither with external_source |
With no requester, the ticket belongs to the company: its administrators see it in their portal and nobody gets a personal copy.
Returns 201 with the ticket and created: true. The ticket starts in your
default status, and the usual notifications go out: your company's support
addresses, the requester (with a reply address that threads their answer
back onto the ticket), and your Slack channel if you've set one up.
Safe retries. external_source / external_id give the ticket your own
name for it, unique per organization. Filing again with a pair that already
exists returns that ticket (200, created: false) if company_id and
content match it, or 409 EXTERNAL_ID_CONFLICT if they don't. An
Idempotency-Key header replays the first result for a repeat of the same
body, and returns 409 IDEMPOTENCY_KEY_CONFLICT for the same key with a
different body. Both work exactly as they do in the CRM API.
Codes worth handling:
| Code | Status | Meaning |
|---|---|---|
COMPANY_NOT_FOUND | 404 | No such company in your organization. |
COMPANY_INACTIVE | 400 | The company is deactivated. |
MEMBER_NOT_FOUND | 404 | The requester isn't an active member of that company. |
FORM_REQUIRED | 400 | This company needs a form — see …/forms. |
FORM_NOT_AVAILABLE | 404 | That form isn't offered for this company and type. |
INVALID_ANSWERS | 400 | An answer is missing or invalid; details.question_id says which. |
INVALID_TYPE / INVALID_TAG | 400 | An unknown or retired type or tag (details.tag_ids). |
INVALID_ASSIGNEE | 400 | Not a user who can manage tickets in your organization. |
INVALID_CRM_ACCOUNT / INVALID_CRM_LEAD | 400 | No such account or lead in your organization. |
LEAD_ACCOUNT_MISMATCH | 400 | The lead belongs to a different account than crm_account_id. |
A form with a required file question can't be filed through the API in
v1, since attachments aren't supported — it returns INVALID_ANSWERS.
GET /api/public/v1/ticketing/tickets
Requires scope ticketing:read. Tickets across all your companies, oldest
first. Every filter is optional and they combine with AND.
| Filter | Matches |
|---|---|
id, code | exact ticket id, or code like TKT-000042 |
company_id | one company |
status_id | one of your statuses |
status | a status kind: in_progress, waiting_customer, resolved |
type_id | one ticket type |
priority | low, normal, high, urgent |
assignee_id | a user id, or none for unassigned tickets |
account_id | tickets linked to that CRM account |
lead_id | tickets linked to that CRM lead |
creation_channel | platform, email, agent, assistant, api |
requester_email | case-insensitive exact |
external_source + external_id | exact (must be given together) |
created_after | ISO 8601 timestamp |
updated_after | ISO 8601 timestamp |
cursor, limit | pagination (limit default 25, max 100) |
Keeping in sync: remember when you last polled and ask for
updated_after that time. updated_at moves on every reply, internal note,
status change, and priority, assignee or CRM-link change. A type or tag
change alone doesn't move it.
curl "https://app.ukigai.com/api/public/v1/ticketing/tickets?status=in_progress&updated_after=2026-11-27T00:00:00Z" \
-H "Authorization: Bearer uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{
"data": [ { "id": "…", "code": "TKT-000042", "...": "..." } ],
"next_cursor": "eyJjcmVhdGVkQXQiOi…",
"request_id": "b3f2..."
}
GET /api/public/v1/ticketing/tickets/:id
Requires scope ticketing:read. One ticket, including form.questions.
PATCH /api/public/v1/ticketing/tickets/:id
Requires scope ticketing:write. Send any of:
| Field | Type | Effect |
|---|---|---|
status_id | uuid | Moves the ticket to one of your active statuses. |
type_id | uuid or null | Sets or clears the type. |
tag_ids | uuid[] | Replaces the tags with exactly this set ([] clears them). |
priority | low | normal | high | urgent | Sets the priority. |
assignee_user_id | uuid or null | Assigns the ticket to a user who can manage tickets; null unassigns. |
crm_account_id | uuid or null | Links or unlinks the CRM account. |
crm_lead_id | uuid or null | Links or unlinks the CRM lead; linking a lead alone also links its account. |
author_name | string | Display name for the status-change entry. |
curl -X PATCH https://app.ukigai.com/api/public/v1/ticketing/tickets/TICKET_ID \
-H "Authorization: Bearer uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "status_id": "RESOLVED_STATUS_ID" }'
A status change works exactly as it does in the inbox: it's written into
the ticket's history, pauses or resumes the SLA clocks, and moving to a
resolved status raises the satisfaction survey for the requester. It
doesn't email the customer — post a reply for that. Everything is
validated before anything is saved, so one bad id can't leave a change
half-applied. Returns the updated ticket.
A lead must belong to the linked account. Moving a ticket to another
account while it keeps a lead of the old one is refused — send
crm_lead_id (null, or a lead of the new account) in the same call.
Codes: STATUS_NOT_FOUND (404), STATUS_INACTIVE, INVALID_TYPE,
INVALID_TAG, INVALID_ASSIGNEE, INVALID_CRM_ACCOUNT,
INVALID_CRM_LEAD, LEAD_ACCOUNT_MISMATCH (400).
Conversation
GET /api/public/v1/ticketing/tickets/:id/messages
Requires scope ticketing:read. The ticket's history, oldest first: the
opening report, every reply, and every status change. Cursor paginated like
the lists above.
Internal notes are left out unless you pass include_internal=true.
If you mirror conversations anywhere a customer can see them, leave it off.
{
"data": [
{
"id": "…",
"author": { "kind": "requester", "user_id": "…", "name": "Ana Pérez", "email": "ana@globex.example" },
"channel": "email",
"body": "Still failing for Visa cards.",
"internal": false,
"status_change": null,
"to": [],
"cc": [],
"created_at": "2026-11-27T12:40:00.000Z"
},
{
"id": "…",
"author": { "kind": "agent", "user_id": null, "name": "Monitoring alerts", "email": null },
"channel": "system",
"body": "",
"internal": false,
"status_change": { "from": "Open", "to": "Resolved" },
"to": [],
"cc": [],
"created_at": "2026-11-27T13:05:00.000Z"
}
],
"next_cursor": null,
"request_id": "b3f2..."
}
author.kindisrequester(the customer's side),agent(your team or an integration) orsystem.channelisplatform,emailorsystem(a bare status change).status_changenames the statuses as they were called at the time.to/ccrecord who a reply was actually sent to.
POST /api/public/v1/ticketing/tickets/:id/messages
Requires scope ticketing:write. Replies to the customer, or adds an
internal note.
curl -X POST https://app.ukigai.com/api/public/v1/ticketing/tickets/TICKET_ID/messages \
-H "Authorization: Bearer uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"body": "We have rolled back the release; card payments are working again.",
"cc": ["ops@globex.example"]
}'
| Field | Type | Required |
|---|---|---|
body | string, up to 10,000 chars (plain text) | yes |
internal | boolean | no — true writes a note only your team sees |
to | string[] (up to 10) | no — added to the default recipient |
cc | string[] (up to 10) | no |
author_name | string | no — see "Who writes what" above |
A reply is emailed to the requester plus any to/cc you add, with a
reply address that threads their answer back onto the ticket. It counts as
the team's first response for the SLA. A ticket with no requester and no
to is still answered: the reply is recorded and visible in the portal.
A note (internal: true) is stored and emailed to nobody; to and cc
are ignored.
Replying never changes the status. To reply and hand the ticket to the
customer, post the reply, then PATCH the status to a waiting_customer
one.
Returns 201 with the message. Codes: INVALID_RECIPIENT (400,
details.addresses), TICKET_NOT_FOUND (404).
Activity and webhooks
Ticket events — ticket.created, ticket.updated,
ticket.status_changed, ticket.message_added — come through the shared
activity feed (GET /api/public/v1/crm/activity, which a Ticketing key can
call) and webhooks (/api/public/v1/webhooks). Both are documented in the
CRM API docs; with a Ticketing key you see, and can
subscribe to, ticket events only.
Errors
| Status | Meaning |
|---|---|
400 | Invalid JSON, body or filter (VALIDATION_ERROR carries details) |
401 | Missing, invalid or expired token |
403 | INSUFFICIENT_SCOPE (e.g. a read-only key writing), or MODULE_DISABLED |
404 | The ticket, company, form, member or status isn't in your organization |
409 | EXTERNAL_ID_CONFLICT or IDEMPOTENCY_KEY_CONFLICT |
429 | Rate limited — see below |
503 | RATE_LIMIT_UNAVAILABLE — retry after Retry-After |
Rate limits
POST /auth/token: 20 requests per minute, per IP.- All other endpoints: 600 requests per 60 seconds, per API key.
Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and
X-RateLimit-Reset. A 429 includes a Retry-After header (seconds) and
says in its body what the limit is — see the
CRM API docs.