Create SLA Definition
Create an SLA definition for a team. SLA definitions specify target resolution times, business hours schedules, and auto-attachment criteria.
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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
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.
SLA_STARTING_POINT_UNSPECIFIED, SLA_STARTING_POINT_FROM_ATTACHMENT, SLA_STARTING_POINT_FROM_CREATION 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.
SLA_METRIC_UNSPECIFIED, SLA_METRIC_RESOLUTION, SLA_METRIC_FIRST_RESPONSE 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.
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
Success
SlaDefinition represents a reusable SLA policy.

