Schedule Sales Calls
Api to schedule automated sales calls
Endpoint
POST /api/sales
Authentication
This endpoint requires an API key.
Header:
x-api-key: {token}
Request Headers
Header
Type
Required
Description
accept
string
Yes
Accept header (*/*
)
Content-Type
string
Yes
Must be application/json
x-api-key
string
Yes
API key for authorization
Request Body
{
"calls": [
{
"serviceOrProduct": "SERVICE|PRODUCT",
"agent_name": "string",
"scheduled_at": "string",
"custom_prompt": "string",
"timezone": "string",
"prospect": {
"name": "string",
"phoneNumber": "string",
"email": "string",
"companyName": "string",
"companySize": "string",
"industry": "string"
}
}
]
}
Field Descriptions
Field
Type
Required
Description
calls
array
Yes
List of calls to be scheduled.
serviceOrProduct
string
Yes
Either "SERVICE"
or "PRODUCT"
to indicate the type.
agent_name
string
Yes
Name of the sales agent.
scheduled_at
string
Yes
Scheduled time for the call in ISO 8601 or similar format.
custom_prompt
string
No
Custom prompt or context for the conversation.
timezone
string
Yes
Timezone of the scheduled call (e.g., "America/New_York"
).
prospect.name
string
Yes
Name of the prospect.
prospect.phoneNumber
string
Yes
Prospect's phone number.
prospect.email
string
Yes
Prospect's email address.
prospect.companyName
string
No
Name of the company the prospect represents.
prospect.companySize
string
No
Size of the company (e.g., "1-10"
, "50-200"
).
prospect.industry
string
No
Industry of the company.
Success Response
Status Code: 200 OK
{
"success": true,
"message": "Calls scheduled successfully",
"data": [
{
"message": "Call scheduled successfully",
"callId": "682bb905f919c505e9cb8595"
}
],
"timestamp": "2025-05-19T23:04:38.115Z"
}
Error Responses
Status Code
Description
400
Invalid request body
401
Missing or invalid API key
500
Internal server error
Example Curl Request
curl -X POST 'http://localhost:3900/api/sales' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H 'x-api-key: your_api_key_here' \
-d '{
"calls": [
{
"productOrServiceName": "Demo Service",
"serviceOrProduct": "SERVICE",
"agent_name": "Jane Doe",
"scheduled_at": "2025-05-21T14:00:00Z",
"custom_prompt": "Introduction call for new clients",
"timezone": "America/New_York",
"prospect": {
"name": "John Smith",
"phoneNumber": "+1234567890",
"email": "john.smith@example.com",
"companyName": "Acme Corp",
"companySize": "50-200",
"industry": "SaaS"
}
}
]
}'
Last updated