Sources
Create a new source
Create a new source. The response includes pingPostApiKey, a vendor API key restricted to the ping-post permission and scoped to this source, returned only once. Share it with the vendor that will ping before transferring callers.
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/sources Request body
TypeScript Definitions
Use the request body type in TypeScript.
string
Value in"CPA" | "CPL"
string
Value in"flat_rate" | "percentage" | "dynamic" | "static" | "duration"
string
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
Lengthlength <= 255
string
string
Lengthlength <= 1000
string
Lengthlength <= 255
string
Lengthlength <= 100
string
Lengthlength <= 100
string
Value in"active" | "inactive" | "archived"
string
string
string
string
integer | null
Range0 < value <= 9007199254740991
boolean
Defaulttrue
object | null
object
object
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/sources" \ -H "Content-Type: application/json" \ -d '{ "dealType": "CPA", "pricingModel": "flat_rate" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"sourceId": "string",
"clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
"name": "string",
"description": "string",
"label": "string",
"type": "string",
"channel": "string",
"status": "active",
"campaignSourceId": "6c01d52e-d0de-4719-a11a-73358f8962c1",
"campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",
"phoneNumberId": -9007199254740991,
"phoneNumber": "string",
"dealType": "CPA",
"sourceType": "outbound",
"pricingModel": "flat_rate",
"payout": "string",
"commissionPerSale": "string",
"leadCost": "string",
"durationThreshold": "string",
"enabled": true,
"externalRefs": {
"property1": null,
"property2": null
},
"metadata": {
"property1": null,
"property2": null
},
"createdAt": null,
"updatedAt": null,
"campaignName": "string",
"assignments": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",
"campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",
"campaignName": "string",
"direction": "outbound",
"enabled": true,
"phoneNumberId": -9007199254740991,
"phoneNumber": "string",
"service": "mobius",
"assignedAt": null,
"unassignedAt": null
}
],
"assignmentCount": -9007199254740991,
"pingPostApiKey": "string"
}{
"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"
}