---
title: "Get action by ID"
type: reference
method: GET
path: /rest-api/action/id/{id}.do
tag: "Actions"
---

# Get action by ID

`GET https://YOUR-NETWORK-DOMAIN/rest-api/action/id/{id}.do`

Returns a single conversion action identified by its numeric database ID. If the optional 'campaignId' query parameter is provided, the response will include the computed pixel key for that campaign context (derived from advertiser ID + campaign ID + action ID). Without campaignId, 'pixelKey' is omitted from the response. A deleted action answers 404, as an unknown id does. Requires authentication.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `id` | integer | yes | `301` | The numeric database ID of the action to retrieve. |

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `campaignId` | integer | no | `2001` | Optional campaign ID. When provided, the response includes the computed pixelKey for this campaign context (advertiserID + campaignID + actionID). |

## Responses

- `200` — Action object with id, key, name, conversion time frames, and optionally a campaign-specific pixelKey
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Not enough permissions
- `404` — No action found with the given numeric ID

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/action/id/301.do?campaignId=2001' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/actions/get-action-id