Replace a campaign's associations
Replaces every association of the campaign in one call: the contact tags that define its membership (target_tag), the queue groups it draws agents from (queue_group), and the individually assigned agents (agent). Each array is optional and defaults to empty, so an omitted kind clears that kind. Entries can be given as objects or as bare ids — [10, 11] is shorthand for [{ "ref_id": 10 }, { "ref_id": 11 }].
priority and label rank a target tag (highest priority served first) and are only valid on target_tag entries — sending them on a queue group or agent returns 422. Naming the same (kind, ref_id) twice in one body returns 409 and nothing is written. A target tag owned by a CRM connection can be re-ranked here, but adding or removing it stays with the connection that owns it; leaving it out of the body does not remove it.
Authorizations
HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).
Path Parameters
Dialer campaign ID.
^[1-9][0-9]*$Body
Replace-all body for a campaign's associations. Each array is optional and defaults to empty, so an omitted kind clears that kind. Every entry may be given either as an object or as a bare id. Naming the same (kind, ref_id) twice in one body is rejected as a conflict.
Contact tags that define the campaign's membership. Naming a CRM-connection-owned tag re-ranks it in place; adding or removing such a tag is owned by the CRM connection, not this call.
One association in the replace-all body. priority and label are only accepted on target_tag entries.
Queue groups the campaign draws its agents from.
One association in the replace-all body. priority and label are only accepted on target_tag entries.
Agents (users) assigned to the campaign.
One association in the replace-all body. priority and label are only accepted on target_tag entries.
Related topics
Get a campaign's associationsReplace a campaign's disposition buttonsCloudTalk REST API: Call Center Automation Platform