Skip to main content

Get Ticket Customer Context

GET 

/api/support/agent/tickets/:ticket/customer

Returns who the customer behind a ticket is: the tenant (account), the requester, the people who can speak for the account, how much the account has open, its most recently touched tickets, and links out to the tenant's app and the record the ticket was raised from.

Required scope: support:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Path parameters

  • ticket (integer) — the ticket id.

Response fields (data)

  • tenant (object, nullable — null when the ticket has no tenant, e.g. email from an unknown sender that was later attached to a ticket without one)
    • id (string) — the tenant id
    • name (string) — the tenant's name, falling back to its id
    • domain (string, nullable) — the host of the tenant's primary app domain (its *.sku.io domain when it has several)
    • pod (string) — the pod the tenant lives on (e.g. app1)
    • plan (string, nullable) — the tenant's plan when one is recorded
  • environment (string) — where the ticket was raised: production, beta, demo or dev; origin_host (string, nullable) — the host the customer was on, for a ticket from another environment
  • requester — id (integer, nullable when the requester is not a user), name (string, nullable), email (string, nullable), last_seen_at (ISO-8601, nullable — the user's last login), role (string, nullable) — owner, admin or user on the ticket's tenant, null when they are not a member; linked (boolean) — the requester is linked to a SKU.io user
  • other_environments[] — up to 10 tickets the same email address raised from other environments, newest first: id, number, subject, environment, origin_host, status, status_label, created_at
  • contacts[] — the tenant's admins and its owner, sorted by name: id, name, email, is_admin (always true), is_owner (boolean)
  • open_count (integer) — the tenant's unresolved tickets (anything not resolved or closed)
  • recent[] — up to 10 of the tenant's most recently updated tickets, newest first: id, number, subject, status, status_label, priority, updated_at
  • links — tenant_admin_url (string, nullable — the tenant's dashboard), record_url (string, nullable — the record the ticket was raised from, when its context names a known record type and id), console_url (string — this ticket in the agent console)

A requester who wrote in from another environment with no linked account is linked automatically when exactly one SKU.io user holds their email address (an internal requester_linked event is recorded). Otherwise link them by hand with Link Ticket Requester to User.

Authentication: Bearer token with the support:read scope, or an authenticated session, from a caller with an active support role (any role, including viewer). No tenant context — this endpoint is central.

Request​

Responses​

OK

Response Headers
    Content-Type