Skip to main content
POST
Create SLA Definition

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 (e.g. ticket.escalation_level = human) combined with FROM_ATTACHMENT.

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.