# Create a Creative

<mark style="color:green;">`POST`</mark> `/creative`

Use this method to create a creative.

#### **Headers**

| Name          | Value           |
| ------------- | --------------- |
| Authorization | `Basic <token>` |

#### **Body**

```typescript
 {
  name: string,
  is_archived?: boolean,
  line_item: {
    id: number, // Mandatory, lineItemId (looks like 1234)
    name?: string
  },
  mediatype: string, //Options ('banner', 'video', 'native', 'audio')
  w?: number, //The width of the creative (required for banner)
  h?: number, //The height of the creative (required for banner)
  content: string,
  adomain: string, //Must be in this format 'domain.com'
  weight?: number, //Default value : 1
  comment?: string
}
```

#### Native creative content format

For native creatives (`mediatype: 'native'`), the `content` field must be a JSON string with the following structure:

```json
{
  "title": "Ad Title",
  "img": "https://cdn.example.com/main-image.jpg",
  "icon": "https://cdn.example.com/icon.png",
  "description": "Ad description text",
  "brand": "Advertiser Name",
  "cta": "Learn More",
  "price": "$9.99",
  "clickUrl": "https://advertiser.com/landing-page"
}
```

All fields are optional. The DSP will match the creative against the publisher's native request assets and only include the fields that are requested. At minimum, provide the fields that match the **required** assets in the target publisher's native ad unit.

| Field         | Description                                                  |
| ------------- | ------------------------------------------------------------ |
| `title`       | Ad headline text                                             |
| `img`         | URL for the main image                                       |
| `icon`        | URL for the icon/logo image                                  |
| `description` | Body text or description                                     |
| `brand`       | Advertiser or sponsor name                                   |
| `cta`         | Call-to-action button text (e.g. "Learn More", "Buy Now")    |
| `price`       | Product price (e.g. "$9.99")                                 |
| `clickUrl`    | Landing page URL (wrapped with click tracking automatically) |

````

#### **Response**

{% tabs %}
{% tab title="200 : OK Creative created" %}
```json
{
  "id": number,
  "name": string,
  "is_archived": boolean,
  "account": {
    "id": number,
    "name": string
  },
  "order": {
    "id": number,
    "name": string
  },
  "line_item": {
    "id": number,
    "name": string
  },
  "mediatype": string, //Options ('banner', 'video', 'native', 'audio')
  "w": number,
  "h": number,
  "content": string,
  "adomain": string,
  "weight": number,
  "comment": string
}
````

{% endtab %}

{% tab title="400 : Bad request no line item ID provided" %}

```json
{
  "missingProperty": "lineItem.id"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nexx360.io/platform-apis/campaign-api/creatives/create-a-creative.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
