Campaigns
Update a campaign
Update campaign configuration (including name, description, retry settings, and SMS configuration) for the authenticated client
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
Path Parameters
string
Campaign ID
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
Request Body
application/json
PATCH /v2/campaigns/:campaignId Request body
TypeScript Definitions
Use the request body type in TypeScript.
string
Lengthlength <= 255
string | null
string
Value in"draft" | "active" | "paused" | "completed" | "archived" | "cancelled"
string | number | boolean | null | object | array<unknown>
integer | null
Range1 <= value <= 9007199254740991
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
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Formatdate-time
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
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
array<string>
string
Value in"voice_ai" | "agent_first"
string
object | null
array | null
Campaign-assigned transfer configs. Ordered list, first item is default.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.carecycle.ai/v2/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"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",
"mode": "journey",
"behaviorsEngineEnabled": false,
"dialerConfig": {
"voicemailMessage": "string",
"voicemailDetectionEnabled": true
},
"compatibilityWarnings": [],
"smsCompanyName": "string",
"requiredVars": [],
"client": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"smsCompanyName": "string"
},
"hasInquiryCallback": true,
"customerStats": {
"total": 0,
"totalCalls": 0,
"todayCalls": 0,
"todayInboundCalls": 0,
"todayOutboundCalls": 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": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"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",
"agentFirstFallbackConfig": {
"callback": {
"offerEnabled": true,
"expiryMinutes": 15,
"maxAttempts": 1,
"retryDelayMinutes": 1,
"closeBufferMinutes": 5,
"offerMessage": "string",
"confirmMessage": "string"
},
"primaryVoicemailGreeting": "string",
"afterHoursVoicemailGreeting": "string"
},
"transferWaitingMessages": [
"string"
],
"screenBehavior": "call-form",
"callFormId": "ce7b9bca-896d-440b-961b-042f5bf12d2d",
"compatibilityWarnings": [],
"assignedCampaignCount": 0,
"usedByCampaigns": [
{
"id": "string",
"name": "string",
"kind": "string",
"status": "string"
}
],
"usedByReceptionist": true,
"routingConfig": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
}
},
"transferConfigIds": [],
"callFormId": "ce7b9bca-896d-440b-961b-042f5bf12d2d",
"appointmentConfig": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"name": "string",
"description": "string",
"concurrentLimit": -2147483648,
"appointmentLength": -2147483648,
"appointmentSpacing": -2147483648,
"maxOptions": -2147483648,
"minDate": "2019-08-24",
"maxDate": "2019-08-24",
"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,
"usedByCampaigns": [
{
"id": "string",
"name": "string",
"kind": "string",
"status": "string"
}
],
"usedByTransferConfigs": [
{
"id": "string",
"name": "string"
}
],
"usedByReceptionist": true
},
"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"
}