Resource

Incoming Call Policy

Manage incoming call routing policies with escalation rules for on-call teams

The Incoming Call Policy Model

Properties

  • Name
    _id
    Type
    Object ID
    Description

    ID of this object

  • Name
    createdAt
    Type
    Date
    Description

    Date and Time when the object was created.

  • Name
    updatedAt
    Type
    Date
    Description

    Date and Time when the object was updated.

  • Name
    project
    Type
    Project
    Description

    Relation to Project Resource in which this object belongs

  • Name
    projectId
    Type
    Object IDRequired
    Description

    ID of your Project in which this object belongs

  • Name
    name
    Type
    TextRequired
    Description

    Any friendly name of this policy

  • Name
    description
    Type
    Long Text
    Description

    Friendly description that will help you remember

  • Name
    slug
    Type
    SlugRequired
    Description

    Friendly globally unique name for your object

  • Name
    routingPhoneNumber
    Type
    Phone
    Description

    The phone number for incoming calls to this policy

  • Name
    callProviderPhoneNumberId
    Type
    Text
    Description

    The call provider's ID for the phone number (e.g., Twilio SID)

  • Name
    phoneNumberCountryCode
    Type
    Text
    Description

    Country code of the phone number (US, GB, etc.)

  • Name
    phoneNumberAreaCode
    Type
    Text
    Description

    Area code of the phone number

  • Name
    phoneNumberPurchasedAt
    Type
    Date
    Description

    When the phone number was purchased

  • Name
    greetingMessage
    Type
    Long Text
    Description

    Custom TTS greeting message for incoming calls

  • Name
    noAnswerMessage
    Type
    Long Text
    Description

    Message when escalation is exhausted and no one answers

  • Name
    noOneAvailableMessage
    Type
    Long Text
    Description

    Message when no one is on-call or reachable

  • Name
    isEnabled
    Type
    BooleanRequired
    Description

    Enable or disable this incoming call policy

  • Name
    repeatPolicyIfNoOneAnswers
    Type
    BooleanRequired
    Description

    Restart from first rule if all fail

  • Name
    repeatPolicyIfNoOneAnswersTimes
    Type
    NumberRequired
    Description

    Maximum repeat attempts if no one answers

  • Name
    labels
    Type
    Label
    Description

    Relation to Labels Array where this object is categorized in.

  • Name
    projectCallSMSConfig
    Type
    Entity
    Description

    Optional project-level Twilio configuration. If set, uses this config instead of global config and billing does not apply.

  • Name
    projectCallSMSConfigId
    Type
    Object ID
    Description

    ID of the project-level Twilio configuration. If set, uses this config instead of global config and billing does not apply.

  • Name
    createdByUser
    Type
    User
    Description

    Relation to User who created this object (if this object was created by a User)

  • Name
    createdByUserId
    Type
    Object ID
    Description

    User ID who created this object (if this object was created by a User)

GETorPOST/api/incoming-call-policy/get-list

List

This endpoint allows you to retrieve a paginated list of all your Incoming Call Policy. By default, a maximum of ten Incoming Call Policy are shown per page.

Optional Query Params

  • limit
    number
    Number of objects to fetch. By default 10, you can increase this count up to 100
  • skip
    number
    Number of objects to skip. This can be useful in pagination

Optional Request Body

List Request

POST
/api/incoming-call-policy/get-list?skip=0&limit=10
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "isEnabled": true,
    "name": true,
    "projectId": true,
    "repeatPolicyIfNoOneAnswers": true,
    "repeatPolicyIfNoOneAnswersTimes": true
  },
  "query": {
    "name": "Example name"
  },
  "sort": {
    "createdAt": -1
  }
}

Response

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "37738d80-28fe-11f1-b591-3fdcef396aba",
      "isEnabled": true,
      "name": "Example name",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "repeatPolicyIfNoOneAnswers": true,
      "repeatPolicyIfNoOneAnswersTimes": 100
    },
    {
      "_id": "37738d81-28fe-11f1-b591-3fdcef396aba",
      "isEnabled": true,
      "name": "Example name",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "repeatPolicyIfNoOneAnswers": true,
      "repeatPolicyIfNoOneAnswersTimes": 100
    },
    {
      "_id": "37738d82-28fe-11f1-b591-3fdcef396aba",
      "isEnabled": true,
      "name": "Example name",
      "projectId": "550e8400-e29b-41d4-a716-446655440000",
      "repeatPolicyIfNoOneAnswers": true,
      "repeatPolicyIfNoOneAnswersTimes": 100
    }
  ]
}
GETorPOST/api/incoming-call-policy/:id/get-item

Get item by ID

This endpoint allows you to retrieve Incoming Call Policy by ID.

  • id
    text
    ID of the Object

Optional Request Body

Get Item Request

POST
/api/incoming-call-policy/:id/get-item
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "select": {
    "isEnabled": true,
    "name": true,
    "projectId": true,
    "repeatPolicyIfNoOneAnswers": true,
    "repeatPolicyIfNoOneAnswersTimes": true
  }
}

Response

{
  "_id": "37738d80-28fe-11f1-b591-3fdcef396aba",
  "isEnabled": true,
  "name": "Example name",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "repeatPolicyIfNoOneAnswers": true,
  "repeatPolicyIfNoOneAnswersTimes": 100
}
POST/api/incoming-call-policy/count

Count

This endpoint allows you to retrieve the count of all your Incoming Call Policy.

Optional Request Body

Count Request

POST
/api/incoming-call-policy/count
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "query": {
    "name": "Example name"
  }
}

Response

{
  "count": 107
}
POST/api/incoming-call-policy

Create Incoming Call Policy

This endpoint allows you to create a new object.

Create Request

POST
/api/incoming-call-policy
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "isEnabled": true,
    "name": "Example name",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "repeatPolicyIfNoOneAnswers": true,
    "repeatPolicyIfNoOneAnswersTimes": 100
  }
}

Response

{
  "_id": "37738d80-28fe-11f1-b591-3fdcef396aba",
  "isEnabled": true,
  "name": "Example name",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "repeatPolicyIfNoOneAnswers": true,
  "repeatPolicyIfNoOneAnswersTimes": 100
}
PUT/api/incoming-call-policy/:id

Update by ID

This endpoint allows you to update object by its ID.

Alternative Methods

For clients that do not support PUT requests, you can use POST or GET with the same request headers and body:

POST/api/incoming-call-policy/:id/update-item
GET/api/incoming-call-policy/:id/update-item

Update Request

PUT
/api/incoming-call-policy/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "isEnabled": true,
    "name": "Example name",
    "repeatPolicyIfNoOneAnswers": true
  }
}

Response

{}
DELETE/api/incoming-call-policy/:id

Delete by ID

This endpoint allows you to delete object by its ID.

Alternative Methods

For clients that do not support DELETE requests, you can use POST or GET with the same request headers and body:

POST/api/incoming-call-policy/:id/delete-item
GET/api/incoming-call-policy/:id/delete-item

Delete Request

DELETE
/api/incoming-call-policy/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY

Response

{}

Permissions

Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.

Read Permissions

Required to read Incoming Call Policy

  • Project Owner
  • Project Admin
  • Project Member
  • Read Incoming Call Policy
  • Read All Project Resources

Create Permissions

Required to create Incoming Call Policy

  • Project Owner
  • Project Admin
  • Project Member
  • Create Incoming Call Policy

Update Permissions

Required to update Incoming Call Policy

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Incoming Call Policy

Delete Permissions

Required to delete Incoming Call Policy

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Incoming Call Policy