Skip to main content

Create SLA Policy

POST 

/api/support/admin/sla-policies

Creates an SLA policy: per-priority first-response and resolution targets in minutes, optionally counted in business hours only, plus the fraction of a target at which the "breaching soon" warning fires. Tickets pick up a policy from their account's settings, falling back to the default policy.

Required scope: support:write

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

Request body

  • name (string, required) — max 100.
  • targets (object, required) — one entry per priority, all four required when present: targets.low, targets.medium, targets.high, targets.urgent. Each is an object with respond_within and resolve_within (integer minutes, required, 1–525600).
  • business_hours (boolean, optional) — when true the targets count only inside hours (a target that starts outside the hours begins counting at the next opening; nights, weekends and unlisted days are skipped). Default false: calendar time.
  • hours (object, nullable; required when business_hours is true) — the business-hours calendar.
    • hours.timezone (string, required with hours) — an IANA timezone, e.g. America/Los_Angeles.
    • hours.days (object, required with hours) — keyed by day: mon, tue, wed, thu, fri, sat, sun (any other key is rejected). Each day is an array of ranges; each range is a two-item array ["HH:MM", "HH:MM"] (24-hour, H:i) whose end must be after its start. Days you omit are closed. Within a day, every range must end after it starts and ranges must be listed in time order without overlapping — adjacent ranges (09:00–12:00 then 12:00–17:00) are fine. A bad range is reported under hours.days.{day}.{index}, e.g. hours.days.mon.1.
  • warning_fraction (number, optional) — how far through a target the "breaching soon" warning fires, 0.50–0.95; rounded to two decimals. Default 0.75.
  • is_default (boolean, optional) — make this the default policy (the previous default is unset).

hours is only stored when business_hours is true; otherwise it is saved as null. If no default policy exists yet, the new policy becomes the default regardless of is_default.

Response: 201 with the policy (tickets_count and tenants_count are 0 for a new policy).

Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role who also holds the support admin role. No tenant context — this endpoint is central.

Request

Responses

Created

Response Headers
    Content-Type