# Create mapping

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

Use this method to create a new mapping.

#### **Headers**

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

#### **Body**

```typescript
{
  placement: {
    id: number, // Mandatory, placementId (looks like 1723)
    name?: string,
  },
  tag_id: {
    id: string, // Mandatory, tagId (looks like '0bonobfw')
    name?: string,
  },
  mapping: {
    adunit_code?: string[],
    bundle?: string[],
    country?: string[], // Array of country codes (e.g. 'FR', 'US')
    device?: string[], // desktop | mobile | tablet | tv | other
    domain?: string[], // Must be in this format 'domain.com'
    gam_ad_unit_path?: string[], // GAM ad unit path. Supports '*' wildcards matching any characters including '/' (e.g. '/5144/desktop/vip/*', '/4216/usweekly/mb-sticky*')
    gpid?: string[], // Supports '*' wildcards matching any characters including '/' (e.g. '/5144/desktop/vip/*', '/4216/usweekly/mb-sticky*')
    mediatype?: string[], // audio | banner | native | video
    os?: string[], // android | chromium os | freebsd | ios | linux | mac os | nintendo | other | playstation | tizen | windows
    size?: { w: number, h: number }[], // Array of sizes
  }
}

```

#### **Response**

{% tabs %}
{% tab title="200 : OK Mapping added" %}
{% code fullWidth="false" %}

```json
{
  "id": number,
  "placement": {
      "id": number,
      "name": string
  },
  "tag_id": {
      "id": string,
      "name": string
  },
  "mapping": {
    "adunit_code": string[],
    "bundle": string[],
    "country": string[],
    "device": string[],
    "domain": string[],
    "gam_ad_unit_path": string[],
    "gpid": string[],
    "mediatype": string[],
    "os": string[],
    "size": { "w": number, "h": number }[]
  }
}

```

{% endcode %}
{% endtab %}

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

```json
{
  "missingProperty": "placement_id"
}
```

{% endtab %}
{% endtabs %}


---

# 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/management-api/placements/mapping/create-mapping.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.
