Campaigns
Create Campaign
Create a draft campaign for the authenticated client, optionally from a template.
Authorization
x-api-key x-api-key<token>
API key required for authentication.
Keys begin with 'cc_' prefix. Get your API key from the Developer Dashboard.
In: header
Request Body
application/json
POST /v2/campaigns Request body
TypeScript Definitions
Use the request body type in TypeScript.
string
Campaign name
Length1 <= length <= 255
string | null
Campaign description
string | null
Optional campaign template ID
integer | null
Optional Pulse call concurrency cap for this campaign
Range1 <= value <= 9007199254740991
string
Campaign direction
Value in"inbound" | "outbound"
string
Campaign kind (defaults to voice_ai)
Value in"voice_ai" | "agent_first"
string | null
Value in"agents" | "ai" | "terminal"
string | null
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Formatuuid
string | null
string | null
Value in"voicemail" | "forward"
string | null
string | null
Value in"agents" | "ai" | "terminal"
string | null
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Formatuuid
string | null
string | null
Value in"voicemail" | "forward"
string | null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.carecycle.ai/v2/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{
"campaign": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "2019-08-24T14:15:22Z",
"dialAfterhours": true,
"name": "string",
"templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",
"templateName": "string",
"lastModifiedByName": "string",
"lastModifiedByIsStaff": true,
"description": "string",
"tags": [],
"status": "draft",
"direction": "inbound",
"pulseWorkflowId": "6cbf4411-f62a-452f-b47e-a87913280a83",
"maxConcurrentCalls": 1,
"suite": "receptionist",
"kind": "voice_ai",
"behaviorsEngineEnabled": false,
"primaryHandlerKind": "agents",
"primaryRoutingConfigId": "8c4efc65-99e2-4034-9e3a-f89e12da578b",
"primaryAssistantId": "string",
"primaryTerminalType": "voicemail",
"primaryTerminalNumber": "string",
"afterHoursHandlerKind": "agents",
"afterHoursRoutingConfigId": "216e2eba-05c6-4442-991f-e93afa960bcf",
"afterHoursAssistantId": "string",
"afterHoursTerminalType": "voicemail",
"afterHoursTerminalNumber": "string",
"maxAttempts": -9007199254740991,
"smsCompanyName": "string",
"requiredVars": [],
"client": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"smsCompanyName": "string"
},
"hasInquiryCallback": true,
"customerStats": {
"total": 0,
"totalCalls": 0,
"todayCalls": 0,
"todayConnectRate": 0,
"todayDurationMs": 0,
"statusCounts": {
"expired": 0,
"failed": 0,
"pending": 0,
"completed": 0,
"exceeded_max_calls": 0,
"in_progress": 0,
"cancelled": 0,
"skipped": 0
}
},
"features": {
"transfers": false,
"appointments": false,
"inquiries": false,
"checkPlan": false
},
"transferConfig": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"name": "string",
"routingConfigId": "b6e138dd-eba1-4cd6-85c1-31882f4d70e7",
"type": "direct",
"warmTransfer": true,
"directPhoneNumber": "string",
"dynamicOptions": {
"pingUrl": "string",
"method": "GET",
"timeout": 0,
"headers": {
"property1": "string",
"property2": "string"
},
"body": {
"property1": null,
"property2": null
},
"transferNumberField": "string",
"transferNumber": "string",
"successConditions": [
{
"field": "string",
"operator": "equals",
"value": "string"
}
]
},
"sipUri": "string",
"sipHeaders": "string",
"warmSummaryPrompt": "string",
"warmMode": "wait-for-operator",
"softphoneFallbackType": "appointment_booking",
"softphoneHandoffStrategy": "wait-for-operator",
"softphoneFallbackPhoneNumber": "string",
"appointmentBookingEnabled": true,
"appointmentConfigId": "1c7d76df-b376-45c7-a6f4-7e4bd224ddc2",
"transferWaitingMessages": [
"string"
],
"screenBehavior": "call-form",
"callFormId": "ce7b9bca-896d-440b-961b-042f5bf12d2d",
"routingConfig": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"name": "string",
"description": "string",
"routingType": "linear",
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"fallbackBehavior": "voicemail",
"fallbackNumber": "string",
"maxRingPerAgent": -2147483648,
"maxWaitTime": -2147483648,
"tryCustomerAgentFirst": true,
"tryPreviousSoftphoneAgentFirst": true,
"customerAgentPriority": -2147483648,
"previousSoftphoneAgentPriority": -2147483648,
"stateBasedRouting": true,
"stateRoutingFallback": "fallback",
"agents": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"routingConfigId": "b6e138dd-eba1-4cd6-85c1-31882f4d70e7",
"memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e",
"groupId": "eb54e96e-21b8-4f54-9cd4-80fccbd06f55",
"priority": -2147483648,
"weight": -2147483648,
"lastCallAt": null,
"isActive": true,
"skills": "string",
"member": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"role": "string",
"removedAt": null,
"removedByUserId": "0ab9d7f1-8348-48e7-a45a-4e4f67bcb432",
"removedReason": "string",
"replacementMemberId": "901a8fdf-3dae-42cd-8a64-909f4c74e8b3",
"filterData": "string",
"user": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "user@example.com"
}
}
}
],
"groups": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"routingConfigId": "b6e138dd-eba1-4cd6-85c1-31882f4d70e7",
"name": "string",
"description": "string",
"routingType": "linear",
"priority": -2147483648,
"isActive": true,
"agents": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"routingConfigId": "b6e138dd-eba1-4cd6-85c1-31882f4d70e7",
"memberId": "92983ab9-49c8-444b-85ae-6e40402cf72e",
"groupId": "eb54e96e-21b8-4f54-9cd4-80fccbd06f55",
"priority": -2147483648,
"weight": -2147483648,
"lastCallAt": null,
"isActive": true,
"skills": "string",
"member": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"role": "string",
"removedAt": null,
"removedByUserId": "0ab9d7f1-8348-48e7-a45a-4e4f67bcb432",
"removedReason": "string",
"replacementMemberId": "901a8fdf-3dae-42cd-8a64-909f4c74e8b3",
"filterData": "string",
"user": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "user@example.com"
}
}
}
]
}
]
},
"assignedCampaignCount": 0
},
"transferConfigIds": [],
"callFormId": "ce7b9bca-896d-440b-961b-042f5bf12d2d",
"appointmentConfig": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": null,
"updatedAt": null,
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"name": "string",
"description": "string",
"concurrentLimit": -2147483648,
"appointmentLength": -2147483648,
"appointmentSpacing": -2147483648,
"maxOptions": -2147483648,
"minDate": "string",
"maxDate": "string",
"minHours": -2147483648,
"preferredMode": "timezone",
"appointmentMode": "phone_call",
"showCallerIdOnBookingPage": true,
"assignmentMode": "customer_agent",
"routingConfigId": "b6e138dd-eba1-4cd6-85c1-31882f4d70e7",
"transferConfigId": "e0ca1204-c276-46be-8cf8-5259ed04eb66",
"workflows": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"enabled": true,
"trigger": {
"anchor": "event_starts",
"offsetMinutes": -9007199254740991
},
"condition": {
"kind": "appointment_status",
"statuses": [
"scheduled"
]
},
"action": {
"type": "sms",
"senderId": "string",
"template": "string"
}
}
],
"bookingHours": [
{
"startHour": 23,
"startMinute": 59,
"endHour": 24,
"endMinute": 59,
"dayOfWeek": [
6
]
}
],
"createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
"updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e",
"assignedCampaignCount": 0,
"assignedTransferConfigCount": 0
},
"campaignAutomations": []
}
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "VALIDATION_ERROR",
"errors": [
{
"path": [
"string"
],
"message": "string",
"expected": "string",
"received": "string",
"code": "string"
}
],
"failedRecords": [
{
"index": 0,
"phoneNumber": "string",
"firstName": "string",
"lastName": "string",
"externalId": "string"
}
]
}{
"message": "string",
"code": "string",
"retryAfter": 0
}{
"message": "string",
"code": "string"
}