Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Schedule an email to a lead
POST
/api/v1/email/schedule
const url = 'https://api.pitch2sale.com/api/v1/email/schedule';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"to":"hello@example.com","cc":["hello@example.com"],"bcc":["hello@example.com"],"subject":"example","body_html":"example","body_text":"example","connected_account_id":"example","lead_id":"example","contact_id":"example","template_id":"example","attachments":[{"filename":"example","content_type":"example","s3_key":"example","size_bytes":1}],"scheduled_at":"2026-04-15T12:00:00Z","follow_up":{"amount":1,"unit":"days"},"enroll_in_workflow_id":"example"}'};
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/email/schedule \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "to": "hello@example.com", "cc": [ "hello@example.com" ], "bcc": [ "hello@example.com" ], "subject": "example", "body_html": "example", "body_text": "example", "connected_account_id": "example", "lead_id": "example", "contact_id": "example", "template_id": "example", "attachments": [ { "filename": "example", "content_type": "example", "s3_key": "example", "size_bytes": 1 } ], "scheduled_at": "2026-04-15T12:00:00Z", "follow_up": { "amount": 1, "unit": "days" }, "enroll_in_workflow_id": "example" }'Queues the email for scheduled_at, between 1 minute and 30 days from now.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
to
required
string format: email
cc
Array<string>
bcc
Array<string>
subject
required
string
body_html
required
string
body_text
string
connected_account_id
required
string
lead_id
required
string
contact_id
string
template_id
string
attachments
Array<object>
object
filename
required
string
content_type
required
string
s3_key
required
string
size_bytes
required
integer
scheduled_at
required
string format: date-time
follow_up
object
amount
required
integer
unit
required
string
enroll_in_workflow_id
string
Responses
Section titled “Responses”The scheduled job
Media typeapplication/json
object
message
required
string
job_id
required
string
scheduled_at
required
string
Examplegenerated
{ "message": "example", "job_id": "example", "scheduled_at": "example"}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" } ]}