Create a new dialer rule
POST/:organization_id/dialer_rules
Creates a new dialer rule for the organization
Request
- application/json
Bodyrequired
organization_idinteger
Organization ID (automatically set on server)
dialer_campaign_idintegernullable
Optional campaign ID. If null, rule applies to all campaigns
orderintegernullable
Execution order (rules with null order are always evaluated)
conditions object[]
actions object[]required
Responses
- 201
- 401
- 403
- 422
Successfully created
- application/json
- Schema
- Example (auto)
Schema
idinteger
organization_idinteger
dialer_campaign_idintegernullable
Optional campaign ID. If null, rule applies to all campaigns
orderintegernullable
Execution order (rules with null order are always evaluated)
conditions object[]
actions object[]
created_atdate-time
updated_atdate-time
{
"id": 0,
"organization_id": 0,
"dialer_campaign_id": 0,
"order": 0,
"conditions": [
{
"field": "string",
"custom_field_name": "string",
"custom_field_id": 0,
"comparison": "string"
}
],
"actions": [
{
"type": "string",
"settings": {
"unit": "string",
"limit": "string"
}
}
],
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
Unauthorized
Forbidden
Unprocessable entity
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {}
}
Authorization: http
name: basicAuthtype: httpscheme: basicdescription: Basic Authentication using API Key ID and API Key. - API Key ID is used as the username - API Key is used as the password
- python
- nodejs
- ruby
- curl
- go
- php
- java
- powershell
- javascript
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("cloud-staging.cloverhound.com")
payload = ''
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Basic PHVzZXJuYW1lPjo8cGFzc3dvcmQ+'
}
conn.request("POST", "/:organization_id/dialer_rules", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))