---
title: "Re-apply auto-linking to a campaign"
type: reference
method: POST
path: /rest-api/campaigns/{campaignId}/auto-linking/apply.do
tag: "Placements"
---

# Re-apply auto-linking to a campaign

`POST https://YOUR-NETWORK-DOMAIN/rest-api/campaigns/{campaignId}/auto-linking/apply.do`

Links each creative of the campaign to the placements its auto-linking rule now matches and unlinks it from the ones it no longer matches. Creatives without auto-linking rules and placements with auto-linking disabled are left alone. linkCount: creative-placement links to add, unlinkCount: links to remove, placementCount: placements affected. All zero means the links already follow the auto-linking rules. Requires UPDATE share on the campaign and AUTO_LINKING_SETTINGS.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | yes | `3001` | ID of the campaign |

## Responses

- `200` — Applied; the counts say what changed
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Missing share or permission; the message names the permission
- `404` — Campaign not found

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaigns/3001/auto-linking/apply.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/placements/post-campaigns-auto-linking-apply