---
title: "Add an advertising category"
type: reference
method: POST
path: /rest-api/categories/advertising/create.do
tag: "Categories"
---

# Add an advertising category

`POST https://YOUR-NETWORK-DOMAIN/rest-api/categories/advertising/create.do`

Adds an advertising category to the network's list, the one advertisers are classified with. 'name' is required and must not be taken by another advertising category; 'type' defaults to PUBLIC. Invalid values come back per field in 'errors'. The answer is the stored category, in the shape the single-category read returns. Requires the ADVERTISING_CATEGORIES_MANAGEMENT admin permission (Admin -> Advertising Categories).

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `name` | string | yes | `Automotive` | Category name, unique within its list (advertising or publishing categories, compared without case), at most 128 characters |
| `type` | string | no | `PUBLIC` | PUBLIC or INTERNAL (or their integer ids 1 and 2). Defaults to PUBLIC |

## Responses

- `200` — {success, category: {id, name, type}}
- `400` — Invalid request, each problem named in errors by field (name, type)
- `401` — Authentication error
- `403` — Without the ADVERTISING_CATEGORIES_MANAGEMENT admin permission

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/categories/advertising/create.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'name=Automotive' \
  --data-urlencode 'type=PUBLIC'
```

Source: https://epom.com/ad-server/docs/api/categories/post-categories-advertising-create