# Inbox sla set

`PUT /workspace/inbox/sla` · Rivier · inbox

Set first-response and resolution times for an inbox or the project, optionally counting business hours only (owner or manager).

- Scope: inbox:write
- Graphql: Mutation.inboxSlaSet
- Sdk: inbox.sla.set
- Cli: inbox sla set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "inboxId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "firstResponseMinutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 43200
        },
        {
          "type": "null"
        }
      ]
    },
    "resolutionMinutes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 129600
        },
        {
          "type": "null"
        }
      ]
    },
    "businessHours": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "tz": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            "days": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 6
              },
              "minItems": 1,
              "maxItems": 7
            },
            "from": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "to": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            }
          },
          "required": [
            "tz",
            "days",
            "from",
            "to"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/workspace/inbox/sla' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "inboxId": "string",
  "firstResponseMinutes": 0,
  "resolutionMinutes": 0,
  "businessHours": {
    "tz": "string",
    "days": [
      0
    ],
    "from": "string",
    "to": "string"
  }
}'
```
