Ukigai

Access by invitation

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; every GET.
  • 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

  1. Read your setup — GET /ticketing/metadata for statuses, ticket types and tags; GET /ticketing/companies for the companies tickets belong to.
  2. Check what a company needs — GET /ticketing/companies/:id/forms. If form_required is true, a ticket must carry one of those forms.
  3. File the ticket — POST /ticketing/tickets.
  4. Follow it — poll GET /ticketing/tickets?updated_after=…, and read the conversation with GET /ticketing/tickets/:id/messages.
  5. Answer it — POST …/messages to reply or add a note, PATCH /ticketing/tickets/:id to 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:

KindMeaning
in_progressThe support team owes the next move. SLA clocks run.
waiting_customerThe customer owes the next move. SLA clocks pause.
resolvedDone. 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.

FilterMatches
idexact company id
slugexact portal slug
namecase-insensitive exact name
is_activetrue / false
cursor, limitpagination (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"
}
  • subject is the title you sent, or the first line of content.
  • requester is null for a ticket filed against the company without naming anyone.
  • priority is low, normal, high or urgent — every ticket has one, normal until someone sets it.
  • assignee is the agent working the ticket, or null. name is their name when they were assigned.
  • crm_account_id / crm_lead_id are the CRM account and lead (contact) the ticket is about, or null. Read them through the CRM API.
  • creation_channel is how the ticket arrived: platform (the customer portal), email, agent (logged by your team), assistant (handed over by the chatbot) or api.
  • answers is keyed by question id. A single_select answer is an option id, multi_select an array of option ids, yes_no a 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.
  • sla deadlines are fixed when the ticket is created. While the ticket is in a waiting_customer status, paused_at is 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"
  }'
FieldTypeRequired
company_iduuidyes — an active company
contentstring, up to 20,000 charsyes
titlestring, up to 300 charsno — defaults to the first line of content
requester_emailstringno — an active member of the company
requester_user_iduuidno — alternative to requester_email, not both
type_iduuidno — an active ticket type
form_iduuidwhen the company has forms (form_required)
answersobjectno — validated against the form
tag_idsuuid[]no — active tags, up to 20
prioritylow | normal | high | urgentno — default normal
assignee_user_iduuidno — a user who can manage tickets in your organization
crm_account_iduuidno — a CRM account of your organization
crm_lead_iduuidno — a CRM lead; its account is linked too
author_namestringno — see "Who writes what" above
external_sourcestring (slug, e.g. pagerduty)no — both or neither with external_id
external_idstringno — 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:

CodeStatusMeaning
COMPANY_NOT_FOUND404No such company in your organization.
COMPANY_INACTIVE400The company is deactivated.
MEMBER_NOT_FOUND404The requester isn't an active member of that company.
FORM_REQUIRED400This company needs a form — see …/forms.
FORM_NOT_AVAILABLE404That form isn't offered for this company and type.
INVALID_ANSWERS400An answer is missing or invalid; details.question_id says which.
INVALID_TYPE / INVALID_TAG400An unknown or retired type or tag (details.tag_ids).
INVALID_ASSIGNEE400Not a user who can manage tickets in your organization.
INVALID_CRM_ACCOUNT / INVALID_CRM_LEAD400No such account or lead in your organization.
LEAD_ACCOUNT_MISMATCH400The 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.

FilterMatches
id, codeexact ticket id, or code like TKT-000042
company_idone company
status_idone of your statuses
statusa status kind: in_progress, waiting_customer, resolved
type_idone ticket type
prioritylow, normal, high, urgent
assignee_ida user id, or none for unassigned tickets
account_idtickets linked to that CRM account
lead_idtickets linked to that CRM lead
creation_channelplatform, email, agent, assistant, api
requester_emailcase-insensitive exact
external_source + external_idexact (must be given together)
created_afterISO 8601 timestamp
updated_afterISO 8601 timestamp
cursor, limitpagination (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:

FieldTypeEffect
status_iduuidMoves the ticket to one of your active statuses.
type_iduuid or nullSets or clears the type.
tag_idsuuid[]Replaces the tags with exactly this set ([] clears them).
prioritylow | normal | high | urgentSets the priority.
assignee_user_iduuid or nullAssigns the ticket to a user who can manage tickets; null unassigns.
crm_account_iduuid or nullLinks or unlinks the CRM account.
crm_lead_iduuid or nullLinks or unlinks the CRM lead; linking a lead alone also links its account.
author_namestringDisplay 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.kind is requester (the customer's side), agent (your team or an integration) or system.
  • channel is platform, email or system (a bare status change).
  • status_change names the statuses as they were called at the time.
  • to / cc record 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"]
  }'
FieldTypeRequired
bodystring, up to 10,000 chars (plain text)yes
internalbooleanno — true writes a note only your team sees
tostring[] (up to 10)no — added to the default recipient
ccstring[] (up to 10)no
author_namestringno — 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

StatusMeaning
400Invalid JSON, body or filter (VALIDATION_ERROR carries details)
401Missing, invalid or expired token
403INSUFFICIENT_SCOPE (e.g. a read-only key writing), or MODULE_DISABLED
404The ticket, company, form, member or status isn't in your organization
409EXTERNAL_ID_CONFLICT or IDEMPOTENCY_KEY_CONFLICT
429Rate limited — see below
503RATE_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.