> ## Documentation Index
> Fetch the complete documentation index at: https://developers.cloudtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

Every `ref_id` is a weak reference: this call does not check that a contact tag, queue group or agent with that id exists. A nonexistent target tag is stored and simply contributes no contacts, so validate the ids on your side before sending them.

<Warning>The Dialer is a newly released product surface: depending on your account's rollout stage, campaigns managed through this API may not yet be visible in your CloudTalk Dashboard.</Warning>


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://developers.cloudtalk.io/llms.txt).


## Related topics

- [CloudTalk MCP Tool Reference](/guides/mcp/tools.md)
- [Changelog](/changelog.md)
- [Get a campaign's associations](/api-reference/dialer/get-a-campaigns-associations.md)
