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

# Update a header-bidding tag

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

Changes only the fields in the body and keeps every other one as it is — {"refreshInViewOnly": true} touches nothing else. slots, when sent, replace all slots: repeat a slot's id (and its bidders' ids) to keep it, leave a slot out to remove it. The site cannot change. The response is the stored tag and its page code; fields that were sent but not applied are listed in 'ignoredFields', each with its reason in 'ignoredFieldReasons'. Requires the HEADER_BIDDING_TAB_VISIBLE permission and access to the tag's site. UPDATE access to the site is needed.

## Path params

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

## Body

A JSON body. An example, built from the field definitions:

```json
{
  "id": "1",
  "siteId": "139",
  "name": "Futbol24 — desktop",
  "domain": "ads.example.com"
}
```

## Responses

- `200` — {data: tag, code, ignoredFields, ignoredFieldReasons}
- `400` — Refused, the reason in msg or per field in errors
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `404` — Tag not found or deleted

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/hb-tags/1.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "1",
  "siteId": "139",
  "name": "Futbol24 — desktop",
  "domain": "ads.example.com"
}'
```

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