Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Create campaign
POST
/api/v1/campaigns
const url = 'https://api.pitch2sale.com/api/v1/campaigns';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","voice_agent_id":"example","from_number_id":"example","target_type":"smart_view","smart_view_id":"example","lead_ids":["example"],"max_concurrent_calls":1,"calls_per_minute":1,"quiet_hours":{"start_hour":1,"end_hour":1},"respect_dnc":true,"purpose":"marketing","adaptive_pacing":true,"abandonment_warning_threshold":1,"abandonment_pause_threshold":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pitch2sale.com/api/v1/campaigns \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "voice_agent_id": "example", "from_number_id": "example", "target_type": "smart_view", "smart_view_id": "example", "lead_ids": [ "example" ], "max_concurrent_calls": 1, "calls_per_minute": 1, "quiet_hours": { "start_hour": 1, "end_hour": 1 }, "respect_dnc": true, "purpose": "marketing", "adaptive_pacing": true, "abandonment_warning_threshold": 1, "abandonment_pause_threshold": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
voice_agent_id
required
string
from_number_id
required
string
target_type
required
string
lead_ids
Array<string>
max_concurrent_calls
integer
calls_per_minute
integer
quiet_hours
object
start_hour
required
integer
end_hour
required
integer
respect_dnc
boolean
purpose
string
adaptive_pacing
boolean
abandonment_warning_threshold
number
abandonment_pause_threshold
number
Responses
Section titled “Responses”Created
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" } ]}Feature not available on the organization plan
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" } ]}