careCycle
Sources

Assign a source to a campaign

Connect a lead source to a campaign. Choose how leads arrive (the acquisition type) and, if you want, an existing tracking number. Connecting the same source again keeps its current setup and number. The campaign still decides how calls are handled.

POST
/v2/sources/{id}/assignments

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

POST /v2/sources/:id/assignments Parameter

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

POST /v2/sources/:id/assignments Request body

TypeScript Definitions

Use the request body type in TypeScript.

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

Acquisition type: outbound for lead records, inbound for live calls. Independent of campaign direction.

Value in"outbound" | "inbound"
integer | null
Range0 < value <= 9007199254740991
boolean
object | null

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/497f6eca-6276-4993-bfeb-53cbbbba6f08/assignments" \  -H "Content-Type: application/json" \  -d '{    "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf"  }'
{
  "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",
  "metadata": {
    "property1": null,
    "property2": null
  }
}
{
  "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"
}