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)
/api/incoming-call-policy/get-listList
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
query- If you would like to filter on Incoming Call Policy. You can specify include a query here. For more information, please check out writing queries here.
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
sort- Objects will be sorted based on created date by default. You can change the sort order — see Data Types: Sort.
List Request
POST/api/incoming-call-policy/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"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
}
]
}/api/incoming-call-policy/:id/get-itemGet item by ID
This endpoint allows you to retrieve Incoming Call Policy by ID.
id- text
- ID of the Object
Optional Request Body
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
Get Item Request
POST/api/incoming-call-policy/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"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
}/api/incoming-call-policy/countCount
This endpoint allows you to retrieve the count of all your Incoming Call Policy.
Optional Request Body
query- If you would like to filter on Incoming Call Policy. You can specify include a query here. For more information, please check out writing queries here.
Count Request
POST/api/incoming-call-policy/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "Example name"
}
}Response
{
"count": 107
}/api/incoming-call-policyCreate Incoming Call Policy
This endpoint allows you to create a new object.
Create Request
POST/api/incoming-call-policyContent-Type: application/json ApiKey: YOUR_API_KEY
{
"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
}/api/incoming-call-policy/:idUpdate 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:
Update Request
PUT/api/incoming-call-policy/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"isEnabled": true,
"name": "Example name",
"repeatPolicyIfNoOneAnswers": true
}
}Response
{}/api/incoming-call-policy/:idDelete 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:
Delete Request
DELETE/api/incoming-call-policy/:idContent-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 OwnerProject AdminProject MemberRead Incoming Call PolicyRead All Project Resources
Create Permissions
Required to create Incoming Call Policy
Project OwnerProject AdminProject MemberCreate Incoming Call Policy
Update Permissions
Required to update Incoming Call Policy
Project OwnerProject AdminProject MemberEdit Incoming Call Policy
Delete Permissions
Required to delete Incoming Call Policy
Project OwnerProject AdminProject MemberDelete Incoming Call Policy