Skip to main content
POST
/
campaign
Create a new call campaign
curl --request POST \
  --url https://app.closerx.ai/api/campaign/ \
  --header 'Company-Name: <company-name>' \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "name": "Summer Sales 2025",
  "new_agent": 123,
  "direction": "Outbound",
  "calling_number": "+18446020950",
  "tags": [
    1,
    2
  ],
  "enable_number_rotation": false,
  "total_bugget": 60,
  "start_date": "2025-08-30",
  "start_time": "10:00:00",
  "end_date": "2025-08-30",
  "end_time": "17:00:00",
  "number_dict": {}
}
'
{
  "success": true,
  "message": "campaign created successfully",
  "data": {
    "campaign": {
      "name": "Rell (test)",
      "new_agent": 527,
      "direction": "Outbound",
      "contact_list": null,
      "knowledge_base": null,
      "calling_number": "+18446020950",
      "start_date": "2025-08-24",
      "start_time": "11:00:00",
      "end_time": "12:30:00",
      "saturday": false,
      "sunday": false,
      "total_bugget": 60,
      "bugget_left": "60.0000",
      "tags": [
        1
      ]
    }
  }
}

Authorizations

api_key
string
header
required

Headers

Company-Name
string
required

The name of the schema to be used for the request

Body

application/json
name
string
required

Name of the campaign to be created

Example:

"Summer Sales 2025"

new_agent
integer
required

ID of the agent assigned to the campaign

Example:

123

direction
enum<string>
required

Direction of the campaign, either 'Inbound' or 'Outbound'

Available options:
Inbound,
Outbound
Example:

"Outbound"

calling_number
string
required

Phone number used for calls

Example:

"+18446020950"

tags
integer[]
required

List of tag IDs to associate with the campaign

Example:
[1, 2]
enable_number_rotation
boolean
required

Toggle to enable or disable number rotation for calls

Example:

false

total_bugget
number<float>
required

Total budget (in minutes) allocated for the campaign

Example:

60

start_date
string<date>
required

Start date of the campaign in YYYY-MM-DD format

Example:

"2025-08-30"

start_time
string<time>
required

Start time of the campaign in HH:mm:ss format

Example:

"10:00:00"

end_date
string<date>
required

End date of the campaign in YYYY-MM-DD format

Example:

"2025-08-30"

end_time
string<time>
required

End time of the campaign in HH:mm:ss format

Example:

"17:00:00"

number_dict
object

Whether number rotation is enabled

Example:
{}

Response

Campaign created successfully

success
boolean

Indicates whether the campaign was created successfully

Example:

true

message
string

A message confirming the status of the campaign creation

Example:

"campaign created successfully"

data
object