---
title: "Update campaign action (deprecated)"
type: reference
method: POST
path: /rest-api/campaign/{campaignId}/action/{key}/update.do
tag: "Actions"
---

# Update campaign action (deprecated)

`POST https://YOUR-NETWORK-DOMAIN/rest-api/campaign/{campaignId}/action/{key}/update.do`

DEPRECATED: Use POST /rest-api/action/{key}/update instead. Updates a conversion action identified by campaign ID and action key. Only provided (non-null) parameters are applied (partial update). The campaignId path variable is accepted for backward compatibility but is not used in the update logic -- the action is looked up by key only. The update is logged to the action log. Requires authentication.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | yes | `2001` | Campaign ID (kept for backward compatibility, not used in lookup). |
| `key` | string | yes | `a1b2c3d4e5` | The unique action key string identifying the action to update. |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `name` | string | no | `Purchase` | New display name for the action, up to 64 characters and not blank. If omitted, the existing name is preserved. |
| `clickToConversionTimeFrame` | integer | no | `7` | Click-to-conversion attribution window duration, 0 to 255 units. Defines how long after a click a conversion can be attributed to it. |
| `clickToConversionTimeFramePeriodType` | string | no | `DAY` | Time unit for clickToConversionTimeFrame. Allowed values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR. |
| `viewToConversionTimeFrame` | integer | no | `1` | View-to-conversion attribution window duration, 0 to 255 units. Defines how long after an ad impression a conversion can be attributed to it. |
| `viewToConversionTimeFramePeriodType` | string | no | `DAY` | Time unit for viewToConversionTimeFrame. Allowed values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR. |
| `applyAttributionWindowToServerToServer` | boolean | no | `true` | Whether the attribution window is also applied to server-to-server conversions. Server-to-server postbacks carry no impression or click identity of their own, so this is off for actions created before the option existed and on for new ones. Omit to keep the current value. |
| `rejectDuplicateConversions` | boolean | no | `false` | Whether a repeat of the same event on one click is thrown away. Off by default: repeats count. Applies to both server-to-server postbacks and the cookie pixel. A tracking-event action repeats by definition and is exempt regardless. |
| `defaultAttributionType` | string | no | `POST_CLICK` | Attribution type applied to a conversion that arrives with no attribution of its own — the last resort, below the action's tracking event, the partner's att= parameter and the classification carried by the tracking token. Allowed values: UNSPECIFIED, POST_CLICK, POST_VIEW (or integer IDs 0, 1, 2). Omit to keep the current value. |

## Responses

- `200` — The updated action, in the shape the action GET returns
- `400` — Bad request — wrong parameter types or campaign not found
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — Not found — resource does not exist

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/campaign/2001/action/a1b2c3d4e5/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'name=Purchase' \
  --data-urlencode 'clickToConversionTimeFrame=7' \
  --data-urlencode 'clickToConversionTimeFramePeriodType=DAY'
```

Source: https://epom.com/ad-server/docs/api/actions/post-campaign-action-update