---
title: "Get placement code by key (deprecated)"
type: reference
method: GET
path: /rest-api/placement-code/{key}.do
tag: "Placements"
---

# Get placement code by key (deprecated)

`GET https://YOUR-NETWORK-DOMAIN/rest-api/placement-code/{key}.do`

Returns the invocation code formats a placement still has (Simple Iframe and Direct URL) for a placement identified by its unique key string. This endpoint is deprecated -- use /placement/{key}/code with a specific code type instead. The returned fields vary based on placement type (site, non-standard, or mobile).

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `key` | string | yes | `a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4` | Unique placement key string (MD5 hash) |

## Responses

- `200` — Placement code returned
- `400` — The placement type has no code of this kind
- `404` — No live placement has this key

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/placement-code/a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/placements/get-placement-code