# Update an SLA policy

```http
PATCH https://trydimmi.com/api/v1/sla-policies/{policy}
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:write`.

## Path parameters

- `policy` (string, required): Id of the SLA policy, starting with sla_, such as sla_01jx2m8k4t. Find it with GET /sla-policies.

## Body

- `breach_priority` (string): The priority a ticket or conversation is raised to when it misses a target of this policy: low, medium, high or urgent, such as "urgent". It is only raised, never lowered. Send "none" for no priority change on a breach. One of: `none`, `low`, `medium`, `high`, `urgent`.
- `breach_team_id` (string): Id of the team, starting with team_, such as team_01jx2m8k4t. Find it with GET /teams.
- `description` (string): The description of the sla policy, at most 500 characters.
- `first_reply_seconds` (integer): A length of time in seconds, such as 3600 for one hour.
- `follow_up_seconds` (integer): A length of time in seconds, such as 3600 for one hour.
- `name` (string): The name of the sla policy, at most 80 characters.
- `next_reply_seconds` (integer): A length of time in seconds, such as 3600 for one hour.
- `pause_on_waiting_customer` (boolean): true to pause the clocks while a ticket is in a state waiting on the customer, or a conversation is snoozed; false to keep them running. A new policy starts with true.
- `pause_on_waiting_team` (boolean): true to pause the clocks while a ticket is in a state waiting on another team; false to keep them running. A new policy starts with false.
- `priorities` (string[] | null): The ticket priorities this policy applies to, as a list of none, low, medium, high, urgent, such as ["high", "urgent"]. An empty list means any priority. A policy with no priorities and no ticket types is never applied on its own. When updating, sending it replaces the list.
- `resolution_seconds` (integer): A length of time in seconds, such as 3600 for one hour.
- `schedule_id` (string): Id of the office hours schedule, starting with sch_, such as sch_01jx2m8k4t. Find it with GET /schedules.
- `ticket_type_ids` (string[] | null): Ids of ticket types, as a list, such as ["tktt_01jx2m8k4t"]. Find them with GET /ticket-types.
- `warn_before_seconds` (integer): A length of time in seconds, such as 3600 for one hour.

## Response 200 (OK)

- `data` (object, required)
  - `archived_at` (string | null, required): When the policy was archived; null while it is in use.
  - `breach_priority` (string | null, required): Priority a breach raises the work to: none, low, medium, high or urgent; null to leave the priority alone.
  - `breach_team_id` (string | null, required): Id of the team a breach moves the work to, such as team_...; null to leave it where it is.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `description` (string, required): What the policy is for; empty when none was written.
  - `first_reply_seconds` (integer | null, required): Seconds allowed for the first reply, counted in the schedule's open hours; null when the policy sets no such target.
  - `follow_up_seconds` (integer | null, required): Seconds allowed for a follow-up when the team spoke last; null when the policy sets no such target.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `name` (string, required): The policy's name.
  - `next_reply_seconds` (integer | null, required): Seconds allowed for every reply after the first; null when the policy sets no such target.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `pause_on_waiting_customer` (boolean, required): True when the policy's clocks pause while the work waits on the customer.
  - `pause_on_waiting_team` (boolean, required): True when the policy's clocks pause while the work waits on another team.
  - `position` (integer, required): The policy's place in the order policies are tried; the first one matching a new ticket's type and priority applies.
  - `priorities` (string[] | null, required): Priorities of new tickets the policy applies to: none, low, medium, high or urgent. Empty when it names none.
  - `resolution_seconds` (integer | null, required): Seconds allowed to resolve the work; null when the policy sets no such target.
  - `schedule_id` (string | null, required): Id of the schedule whose open hours the targets count in, such as sch_...; null when the policy has none.
  - `ticket_type_ids` (string[] | null, required): Ids of the ticket types the policy applies to new tickets of, such as tktt_...; empty when it names none.
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `warn_before_seconds` (integer, required): How many seconds before a target is due the team is warned.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request PATCH \
  --url 'https://trydimmi.com/api/v1/sla-policies/{policy}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "breach_priority": "none",
  "breach_team_id": "<string>",
  "description": "<string>",
  "first_reply_seconds": 123,
  "follow_up_seconds": 123,
  "name": "<string>",
  "next_reply_seconds": 123,
  "pause_on_waiting_customer": true,
  "pause_on_waiting_team": true,
  "priorities": [
    "<string>"
  ],
  "resolution_seconds": 123,
  "schedule_id": "<string>",
  "ticket_type_ids": [
    "<string>"
  ],
  "warn_before_seconds": 123
}'
```

## Example response

```json
{
  "data": {
    "archived_at": "2026-11-01T09:30:00Z",
    "breach_priority": "<string>",
    "breach_team_id": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "description": "<string>",
    "first_reply_seconds": 123,
    "follow_up_seconds": 123,
    "id": "<string>",
    "name": "<string>",
    "next_reply_seconds": 123,
    "object": "<string>",
    "pause_on_waiting_customer": true,
    "pause_on_waiting_team": true,
    "position": 123,
    "priorities": [
      "<string>"
    ],
    "resolution_seconds": 123,
    "schedule_id": "<string>",
    "ticket_type_ids": [
      "<string>"
    ],
    "updated_at": "2026-11-01T09:30:00Z",
    "warn_before_seconds": 123
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
