---
title: "Update a placement piggyback"
type: reference
method: POST
path: /rest-api/piggyback/placement/{id}/update.do
tag: "Piggybacks"
---

# Update a placement piggyback

`POST https://YOUR-NETWORK-DOMAIN/rest-api/piggyback/placement/{id}/update.do`

Changes one placement piggyback the way the console's piggyback grid does: codeUrl, active, sampling, deliveryAttribution and the action it fires for (actionId, or allActions=true for every action of the campaign). A field not sent keeps its value; the type cannot change. Needs the Piggyback Pixel Tracking permission and update rights on the placement's site. Returns the piggyback as the list does, in 'piggyback'. Parameters that were sent but not applied are listed in 'ignoredFields', each with its reason in 'ignoredFieldReasons'.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `id` | integer | yes | `701` | The unique numeric identifier of the piggyback to change |

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `actionId` | integer | no | `101` | Fire only for this action; ignored when allActions is true |
| `active` | boolean | no | `true` | Whether the piggyback fires |
| `allActions` | boolean | no | `false` | true to fire for every action of the campaign |
| `codeUrl` | string | no | `https://tracker.example.com/pixel?pid=789` | New tracking code (BEACON) or URL (URL type) |
| `deliveryAttribution` | string | no | `ALL` | Which conversions the piggyback fires for: ALL, POST_CLICK_ONLY or POST_VIEW_ONLY |
| `sampling` | integer | no | `100` | Percentage of conversions the piggyback fires on (0-100) |

## Responses

- `200` — Piggyback updated (success:true), or success:false with per-field 'errors'
- `400` — Bad request — invalid or missing parameters
- `401` — Unauthorized - authentication error
- `403` — Forbidden - no update rights on the placement, or the Piggyback Pixel Tracking permission is not enabled
- `404` — No placement piggyback with this id

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/piggyback/placement/701/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'active=true' \
  --data-urlencode 'actionId=101' \
  --data-urlencode 'allActions=false'
```

Source: https://epom.com/ad-server/docs/api/piggybacks/post-piggyback-placement-update