VitrinaAPI

SLAs

The first-response and resolution targets a ticket must meet, and which channels/priorities trigger them.

Beta
This may change at any time, with a changelog entry and a notice to recent callers — see versioning.

Download the full API pública projection: openapi.json.

Set SLAs and automate actions explains this resource in prose, with runnable examples.

MethodPathWhat it does
GET/slasList SLA policies
POST/slasCreate 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"

Example response (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
  }
}

Answers: 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).

Body

FieldTypeRequiredConstraints
namestringyesmín. 1, máx. 200
descriptionstring | nullmáx. 2000
target_first_response_minutesinteger | null> 0
target_resolution_minutesinteger | null> 0
business_hours_onlyboolean
applies_toobject
activeboolean
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"
    }
  }'

Example response (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"
  }
}

Answers: 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.

ParameterInTypeRequiredConstraints
idpathuuidyes
curl -X DELETE https://api.vitrinadev.com/api/v1/slas/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Answers: 204 · 400 · 401 · 403 · 404 · 409 · 429

GET /slas/{id}

Fetch one SLA policy

The policy — both targets, applies_to and business_hours_only.

ParameterInTypeRequiredConstraints
idpathuuidyes
curl https://api.vitrinadev.com/api/v1/slas/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (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"
  }
}

Answers: 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.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
namestringmín. 1, máx. 200
descriptionstring | nullmáx. 2000
target_first_response_minutesinteger | null> 0
target_resolution_minutesinteger | null> 0
business_hours_onlyboolean
applies_toobject
activeboolean
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
  }'

Example response (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"
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

On this page