SLA Policies

List SLA policies

GET/workspaces/{workspaceId}/inbox/sla-policies
Authorization
Path parameters
workspaceId*string
Query parameters
Response

A paginated list of SLA policies.

Body
nextPageTokenstring

The token to fetch the next page of results. If empty, there are no more results to fetch.

results*array of SlaPolicy (object)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/sla-policies', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "nextPageToken": "text",
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "description": "text",
      "timeKeepingMethod": "clock",
      "metrics": {
        "firstReplyTime": [
          {
            "priority": "text",
            "breachThreshold": 0,
            "warningThreshold": 0
          }
        ],
        "nextReplyTime": [
          {
            "priority": "text",
            "breachThreshold": 0,
            "warningThreshold": 0
          }
        ]
      },
      "createdAt": "2024-12-21T12:02:32.349Z",
      "updatedAt": "2024-12-21T12:02:32.349Z"
    }
  ]
}

Create SLA policy

POST/workspaces/{workspaceId}/inbox/sla-policies
Authorization
Path parameters
workspaceId*string
Body
name*string
description*string
timeKeepingMethod*SlaTimeKeepingMethod (enum)

Determine how the timers are tracking expiry.

  • clock will simply count using the full 24 hours of a day.
  • businessHours takes into account the business hours configured for the assigned team.
clockbusinessHours
metricsSlaMetrics (object)
Response

The SLA policy.

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
timeKeepingMethod*SlaTimeKeepingMethod (enum)

Determine how the timers are tracking expiry.

  • clock will simply count using the full 24 hours of a day.
  • businessHours takes into account the business hours configured for the assigned team.
clockbusinessHours
metricsSlaMetrics (object)
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/sla-policies', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "description": "text",
      "timeKeepingMethod": "clock"
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "timeKeepingMethod": "clock",
  "metrics": {
    "firstReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ],
    "nextReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ]
  },
  "createdAt": "2024-12-21T12:02:32.349Z",
  "updatedAt": "2024-12-21T12:02:32.349Z"
}

Get SLA policy

GET/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}
Authorization
Path parameters
workspaceId*string
slaPolicyId*string (uuid)
Response

The SLA policy.

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
timeKeepingMethod*SlaTimeKeepingMethod (enum)

Determine how the timers are tracking expiry.

  • clock will simply count using the full 24 hours of a day.
  • businessHours takes into account the business hours configured for the assigned team.
clockbusinessHours
metricsSlaMetrics (object)
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "timeKeepingMethod": "clock",
  "metrics": {
    "firstReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ],
    "nextReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ]
  },
  "createdAt": "2024-12-21T12:02:32.349Z",
  "updatedAt": "2024-12-21T12:02:32.349Z"
}

Update SLA policy

PATCH/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}
Authorization
Path parameters
workspaceId*string
slaPolicyId*string (uuid)
Body
namestring
descriptionstring
timeKeepingMethodSlaTimeKeepingMethod (enum)

Determine how the timers are tracking expiry.

  • clock will simply count using the full 24 hours of a day.
  • businessHours takes into account the business hours configured for the assigned team.
clockbusinessHours
metricsSlaMetrics (object)
Response

The SLA policy.

Body
id*string (uuid)
workspaceId*string (uuid)
name*string
description*string
timeKeepingMethod*SlaTimeKeepingMethod (enum)

Determine how the timers are tracking expiry.

  • clock will simply count using the full 24 hours of a day.
  • businessHours takes into account the business hours configured for the assigned team.
clockbusinessHours
metricsSlaMetrics (object)
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "timeKeepingMethod": "clock",
  "metrics": {
    "firstReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ],
    "nextReplyTime": [
      {
        "priority": "text",
        "breachThreshold": 0,
        "warningThreshold": 0
      }
    ]
  },
  "createdAt": "2024-12-21T12:02:32.349Z",
  "updatedAt": "2024-12-21T12:02:32.349Z"
}

Delete SLA policy

DELETE/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}
Authorization
Path parameters
workspaceId*string
slaPolicyId*string (uuid)
Response

OK

Request
const response = await fetch('/workspaces/{workspaceId}/inbox/sla-policies/{slaPolicyId}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer jwt"
    },
});
const data = await response.json();
Response
{
  "code": "text",
  "message": "text"
}

Last updated