---
title: "Get a header-bidding tag by id"
type: reference
method: GET
path: /rest-api/hb-tags/{tagId}.do
tag: "Header Bidding"
---

# Get a header-bidding tag by id

`GET https://YOUR-NETWORK-DOMAIN/rest-api/hb-tags/{tagId}.do`

Every field of the tag: id, name, publicId, domain, siteId, siteName, refreshSeconds, bidTimeoutMs, collapseEmpty, loadInViewOnly, refreshInViewOnly, refreshIdleMinutes, refreshForegroundOnly, setDocumentLanguage, adServerWithoutConsent, ourDemandFirst, allowZeroCpmBids, integration (owned, adopt, bidder), bidderCode, active, the Prebid Server addresses (storedRequestsUrl, prebidServerUrl, prebidCacheUrl, prebidSyncUrl, prebidAccountId) and slots, each with id, placementId, placementName, placementKey, slotName, adUnitIds, adUnitPath, rewarded, fallbackCode, storedRequestId, storedImp and bidders (bidderCode, alias, params). code holds what the page carries: script (the tag's script element), containers (one per named slot) and gamKeys (the key-values Google Ad Manager line items target). Requires the HEADER_BIDDING_TAB_VISIBLE permission and access to the tag's site.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `tagId` | integer | yes | `1` | Unique numeric ID of the tag |

## Responses

- `200` — {data: tag, code: {script, containers, gamKeys}}
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `404` — Tag not found or deleted

## Example request

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

Source: https://epom.com/ad-server/docs/api/header-bidding/get-hb-tags-by-tag-id