SLAs
Los objetivos de primera respuesta y resolución que un ticket debe cumplir, y qué canales/prioridades los disparan.
Descarga la proyección completa de la API pública: openapi.json.
Fijar SLAs y automatizar acciones explica este recurso en prosa, con ejemplos ejecutables.
| Método | Ruta | Qué hace |
|---|---|---|
GET | /slas | List SLA policies |
POST | /slas | Create an SLA policy |
DELETE | /slas/{id} | Delete an SLA policy |
GET | /slas/{id} | Fetch one SLA policy |
PUT | /slas/{id} | Update an SLA policy |
GET /slas
List SLA policies
Every policy in the workspace. Unfiltered and unpaginated — a workspace configures a handful of policies, not thousands.
curl https://api.vitrinadev.com/api/v1/slas \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": [
{
"id": "d7d7d7d7-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "Soporte estándar",
"description": "Primera respuesta en media hora hábil, resolución en un día.",
"target_first_response_minutes": 30,
"target_resolution_minutes": 1440,
"business_hours_only": true,
"applies_to": {
"channel": "whatsapp"
},
"active": true,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
],
"meta": {
"total": 1
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /slas
Create an SLA policy
Both targets are optional and independent: a policy can set only a first-response target, only a resolution target, or both. name is unique per workspace (a collision is a 409).
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
name | string | sí | mín. 1, máx. 200 |
description | string | null | — | máx. 2000 |
target_first_response_minutes | integer | null | — | > 0 |
target_resolution_minutes | integer | null | — | > 0 |
business_hours_only | boolean | — | |
applies_to | object | — | |
active | boolean | — |
curl -X POST https://api.vitrinadev.com/api/v1/slas \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Soporte estándar",
"target_first_response_minutes": 30,
"target_resolution_minutes": 1440,
"business_hours_only": true,
"applies_to": {
"channel": "whatsapp"
}
}'Ejemplo de respuesta (201)
{
"data": {
"id": "d7d7d7d7-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "Soporte estándar",
"description": "Primera respuesta en media hora hábil, resolución en un día.",
"target_first_response_minutes": 30,
"target_resolution_minutes": 1440,
"business_hours_only": true,
"applies_to": {
"channel": "whatsapp"
},
"active": true,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
}Responde: 201 · 400 · 401 · 403 · 404 · 409 · 429
DELETE /slas/{id}
Delete an SLA policy
Removes the policy. Conversations and tickets it applied to keep whatever coverage state they already reached; nothing is recomputed against a policy that no longer exists.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | uuid | sí |
curl -X DELETE https://api.vitrinadev.com/api/v1/slas/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Responde: 204 · 400 · 401 · 403 · 404 · 409 · 429
GET /slas/{id}
Fetch one SLA policy
The policy — both targets, applies_to and business_hours_only.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | uuid | sí |
curl https://api.vitrinadev.com/api/v1/slas/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": {
"id": "d7d7d7d7-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "Soporte estándar",
"description": "Primera respuesta en media hora hábil, resolución en un día.",
"target_first_response_minutes": 30,
"target_resolution_minutes": 1440,
"business_hours_only": true,
"applies_to": {
"channel": "whatsapp"
},
"active": true,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
PUT /slas/{id}
Update an SLA policy
A PUT that behaves as a PATCH: only the fields present are applied and at least one is required.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | uuid | sí |
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
name | string | — | mín. 1, máx. 200 |
description | string | null | — | máx. 2000 |
target_first_response_minutes | integer | null | — | > 0 |
target_resolution_minutes | integer | null | — | > 0 |
business_hours_only | boolean | — | |
applies_to | object | — | |
active | boolean | — |
curl -X PUT https://api.vitrinadev.com/api/v1/slas/<id> \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_first_response_minutes": 20
}'Ejemplo de respuesta (200)
{
"data": {
"id": "d7d7d7d7-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"name": "Soporte estándar",
"description": "Primera respuesta en media hora hábil, resolución en un día.",
"target_first_response_minutes": 20,
"target_resolution_minutes": 1440,
"business_hours_only": true,
"applies_to": {
"channel": "whatsapp"
},
"active": true,
"created_at": "2026-01-10T13:00:00.000Z",
"updated_at": "2026-09-10T13:00:00.000Z"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429