# Create a banner

`POST https://api.cademi.com.br/api/v3/banners`

Operation ID: `banners.create` · API v3

Creates a content banner.

The banner `type` must be available for the account's current layout; otherwise, the API returns the `banner_type_unavailable` error code. Link URLs must use the HTTP or HTTPS scheme, and HTML content is sanitized before it is stored.

Required permissions: `banners.create`.

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `html` | string | no |  |
| `images` | object | no |  |
| `link` | object | no |  |
| `name` | string | yes |  |
| `showcases` | array of string | no |  |
| `type` | string, one of `netflix`, `simple`, `html` | yes |  |

## Responses

### 201

Returns the newly created banner.

Body: `data`: Banner.

Fields of Banner:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `deleted` | boolean | yes |  |
| `html` | string or null | no |  |
| `id` | string | yes | Public ID of the banner, prefixed with ban_. |
| `images` | object | yes |  |
| `link` | object | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `banner` | yes |  |
| `position` | integer | yes |  |
| `revision` | string | yes |  |
| `showcases` | array of string | yes |  |
| `status` | string, one of `active`, `inactive` | yes |  |
| `type` | string, one of `netflix`, `simple`, `html` | yes |  |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 422

The request contains invalid data, or the selected banner type is not available for the account's current layout.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
