Set Incident Service
Names the service an Incident Management incident affects, or removes it.
POST /api/im/incidents/:id/service
Sets the affected service of an incident by hand, or removes it with null. Allowed in every status, also after the incident is resolved. Purely descriptive: nobody is paged, no status page or outbound integration is notified. The change is written to the incident timeline (service_changed, payload { from, to } with { id, name } or null) and to the organization audit log. A call that changes nothing writes nothing.
Authentication
Any IM-eligible role or an organization-wide API token, see Authentication. You must be a member of the incident's team or an organization admin.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
serviceId | integer | string | null | Yes | id or publicId of a service of the incident's organization; null removes the service. |
curl -X POST "$BASE_URL/api/im/incidents/42/service" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "serviceId": 4 }'Response
200 OK: the updated incident row (same shape as the items of List Incidents, without the enrichment fields), with serviceId set.
Common errors
401 Unauthorizedwhen not authenticated403 Forbidden(imTeamMembershipRequired) when you are not a member of the incident's team and not an organizationadmin400 Bad Request(invalidRequestBody) whenserviceIdis missing or neither an integer, a UUID nornull404 Not Found(imIncidentNotFound) when the incident does not exist or belongs to another organization404 Not Found(imServiceNotFound) when the service does not exist or belongs to another organization