# Promise a stage an SLA

Admin only. Names the pack page and the stage band it measures, the target and warning in minutes (the warning must be the smaller), and optionally a business-hours calendar: an IANA time zone, the working day as minutes from midnight, and the working days as 0 (Sunday) through 6 (Saturday). A second policy on the same page and stage is refused as a conflict, and a time zone this service cannot load is refused with the name in the message.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/sla-policies`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "active": true,
    "businessHoursOnly": true,
    "definitionKey": "string",
    "stage": "string",
    "targetMinutes": 1,
    "timezone": "string",
    "warningMinutes": 1,
    "workdayEndMinute": 1,
    "workdayStartMinute": 1,
    "workdays": [
      1
    ]
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "active": true,
    "businessHoursOnly": true,
    "createdAt": "string",
    "createdBy": 1,
    "definitionKey": "string",
    "id": "",
    "stage": "string",
    "targetMinutes": 1,
    "timezone": "string",
    "updatedAt": "string",
    "warningMinutes": 1,
    "workdayEndMinute": 1,
    "workdayStartMinute": 1,
    "workdays": [
      1
    ]
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
