Unlink campaigns
unlink_campaignsClear a platform link from the active Space's campaigns, keeping the local campaigns. With delete_remote=true, also removes the campaign on the ad platform (already-gone counts as success). Returns a per-id result map (already-unlinked ids report 'not_linked'). Unlink then trigger_sync to re-create campaigns cleanly on the platform. Mutates external platforms when delete_remote is set. Scoped to the active Space — see set_active_space to switch, or pass space_id to override for this one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Platform id to unlink from, e.g. "microsoft-ads". | |
| space_id | No | Override the active Space for this one call. Defaults to the active Space set via set_active_space (or GROWOMAT_SPACE_ID on the server). Pass to read/write a different Space without changing the session binding. | |
| campaign_ids | No | Campaign ids to unlink. Omit to unlink every campaign linked to the platform. | |
| delete_remote | No | Also remove the campaign on the ad platform. Default false (only the local link is cleared). |