Skip to content
Pitch2SaleDevelopers
Open the app
Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.

Update call routing rule

PUT
/api/v1/call-routing-rules/{id}
curl --request PUT \
--url https://api.pitch2sale.com/api/v1/call-routing-rules/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "priority": 1, "condition": { "cf_path": "example", "cf_value": "example", "lead_status_id": "example", "is_client": true, "owner_user_id": "example" }, "route": { "type": "user", "user_id": "example", "group_id": "example", "number": "example", "voicemail_id": "example", "voice_agent_id": "example" }, "is_enabled": true }'
id
required
string
Media typeapplication/json
object
name
string
>= 1 characters <= 120 characters
priority
integer
<= 10000
condition
object
cf_path
string
<= 200 characters
cf_value
string | number | boolean | null
lead_status_id
string
/^[0-9a-fA-F]{24}$/
is_client
boolean | null
owner_user_id
string
/^[0-9a-fA-F]{24}$/
route
object
type
required
string
Allowed values: user group number voicemail voice_agent
user_id
string
/^[0-9a-fA-F]{24}$/
group_id
string
/^[0-9a-fA-F]{24}$/
number
string
/^\+[1-9]\d{1,14}$/
voicemail_id
string
/^[0-9a-fA-F]{24}$/
voice_agent_id
string
/^[0-9a-fA-F]{24}$/
is_enabled
boolean

OK

Validation failed

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Authentication required or token invalid

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Role permission or token scope missing

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Rate limit exceeded

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}