Skip to main content
POST
Create SLA Definition

Authentication and permissions

Token requirements: User-based token (OAuth) or Organization-scoped API key or Team-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
Permissions joined by + are all required; or separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Team keys must allow every team checked by the request. OAuth access depends on the user’s roles and resource access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string
required

Body

application/json
name
string
description
string | null
targetDurationSeconds
integer<int32>
useCalendarTime
boolean
scheduleId
string | null
attachmentCriteria
SlaConditionRule · object[]
startingPoint
enum<string> | null

SlaStartingPoint controls when the SLA clock starts counting for auto-attached SLAs. Milestone-dependent starting points (e.g. "after escalation") are intentionally not modeled here — express them via attachment criteria combined with FROM_ATTACHMENT. For example, the criterion {"type": "ticket_escalated", "logicOp": "AND"} is false until the ticket is escalated to a human, so the SLA attaches and starts then.

Available options:
SLA_STARTING_POINT_UNSPECIFIED,
SLA_STARTING_POINT_FROM_ATTACHMENT,
SLA_STARTING_POINT_FROM_CREATION
metric
enum<string> | null

SlaMetric identifies what an SLA measures (i.e., what stops the clock). New metrics are added by extending this enum and registering a metric handler in backend/services/svhelp/src/internal/state/ticket/rule/sla/metric.

Available options:
SLA_METRIC_UNSPECIFIED,
SLA_METRIC_RESOLUTION,
SLA_METRIC_FIRST_RESPONSE
policyGroup
string | null

Named exclusivity group. Definitions sharing a group hold one SLA slot per ticket between them; definitions in different groups run concurrently on the same ticket. Omitted or blank = the metric's default group. All definitions in a group must share a metric.

useAssignedGroupSchedule
boolean | null

Resolve the schedule from the ticket's assigned group at attach time. When true, use_calendar_time/schedule_id act as the fallback for tickets with no assigned group or a group with no schedule mapping.

Response

200 - application/json

Success

data
data · object

SlaDefinition represents a reusable SLA policy.