Create a new source
Create a lead source to track where leads and calls come from. You can connect it to a campaign at the same time. Enabled live-call assignments require an existing campaign-owned tracking number; this operation never purchases numbers. Set createPingPostKey to explicitly request a one-time source-scoped vendor key.
Authorization
x-api-key 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.
Explicitly issue a vendor ping-post key for a live-call integration
Response Body
application/json
application/json
application/json
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",
"dealType": "CPA",
"pricingModel": "flat_rate",
"payout": "string",
"commissionPerSale": "string",
"leadCost": "string",
"durationThreshold": "string",
"externalRefs": {
"property1": null,
"property2": null
},
"metadata": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"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": "2019-08-24T14:15:22Z",
"unassignedAt": "2019-08-24T14:15:22Z"
}
],
"assignmentCount": -9007199254740991,
"leadDestinationCampaignId": "7a400838-4fd6-41ed-bd04-ba2363b2e7c8",
"leadDestinationCampaignName": "string",
"pingPostApiKey": "string"
}{
"message": "string",
"code": "string",
"details": {
"property1": null,
"property2": null
}
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string",
"details": {
"property1": null,
"property2": null
}
}{
"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"
}{
"message": "string",
"code": "string"
}{
"message": "string",
"code": "string"
}