Skip to main content

Update SLA Policy

PUT 

/api/support/admin/sla-policies/:policy

Partially updates an SLA policy. Only the fields you send change. Due dates already stamped on existing tickets are not recalculated.

Required scope: support:write

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

Request body (every field optional)

  • name (string) — max 100.
  • targets (object, optional) — 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).

Setting business_hours to false clears the stored hours. Sending hours: null clears the calendar; a policy with business_hours true and no calendar of its own falls back to the built-in Monday–Friday 09:00–17:00 calendar. is_default: false on the current default is refused with 422 (under is_default): pick another policy as the default instead.

Response: 200 with the updated policy and its current counts.

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

OK

Response Headers
    Content-Type