POST
/
v1
/
sla
/
policy
{
  "name": "High Priority Ticket SLA",
  "description": "SLA policy for handling high priority tickets",
  "entityType": "ticket",
  "filter": {
    "all": [
      {
        "entity": "ticket",
        "field": "status",
        "operator": "equals",
        "values": [
          {
            "label": "Open"
          }
        ]
      }
    ],
    "any": [
      {
        "entity": "ticket",
        "field": "priority",
        "operator": "in",
        "values": [
          {
            "label": "High Priority"
          },
          {
            "label": "Medium Priority"
          }
        ]
      }
    ]
  },
  "policyMetrics": [
    {
      "metric": "FIRST_RESPONSE_TIME",
      "default": true,
      "durationInMinutes": "120",
      "specific": [
        {
          "entity": "ticket",
          "field": "priority",
          "operator": "equals",
          "values": [
            {
              "label": "High Priority"
            }
          ],
          "durationInMinutes": "60"
        }
      ]
    }
  ],
  "pauseConditions": {
    "all": [
      {
        "entity": "ticket",
        "field": "status",
        "operator": "equals",
        "values": [
          {
            "label": "Open"
          }
        ]
      }
    ],
    "any": [
      {
        "entity": "ticket",
        "field": "priority",
        "operator": "in",
        "values": [
          {
            "label": "High Priority"
          },
          {
            "label": "Medium Priority"
          }
        ]
      }
    ]
  },
  "teamId": "<string>",
  "organizationId": "<string>",
  "version": 123,
  "priority": 123,
  "isActive": true,
  "uid": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Body

application/json
name
string
required

The name of the policy

Example:

"High Priority Ticket SLA"

description
string
required

The description of the policy

Example:

"SLA policy for handling high priority tickets"

entityType
string
required

The type of the entity

Example:

"ticket"

filter
object
required

The filter of the policy

policyMetrics
object[]
required

The metrics of the policy

pauseConditions
object
required

The pause conditions of the policy

teamId
string
required

The unique identifier of the team

Example:

"team-123456"

Response

201
application/json
Operation successful
name
string
required

The name of the policy

Example:

"High Priority Ticket SLA"

description
string
required

The description of the policy

Example:

"SLA policy for handling high priority tickets"

entityType
string
required

The type of the entity

Example:

"ticket"

filter
object
required

The filter of the policy

policyMetrics
object[]
required

The metrics of the policy

pauseConditions
object
required

The pause conditions of the policy

teamId
string
required

The unique identifier of the team

organizationId
string
required

The unique identifier of the organization

version
number
required

The version number of the policy

priority
number
required

The priority of the policy

isActive
boolean
required

Whether the policy is active

uid
string
required

The unique identifier string of the policy

createdAt
string
required

The creation timestamp of the policy

updatedAt
string
required

The last update timestamp of the policy