# Update placement

<mark style="color:green;">`PUT`</mark> `/placement/:placementId`

Use this method to update your placement.

#### **Path Parameters**

| Name        | Type   | Description         |
| ----------- | ------ | ------------------- |
| placementId | Number | ID of the placement |

#### **Headers**

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

#### **Body**

```typescript
{
  name?: string, // Name must only contain alphabets, numeric and space
  is_archived?: boolean,
  account?: {
    id: number,
    name?: string,
  },
  tag_id?: { // Default tagId
    id: string,
    name?: string,
  },
  mappings?: [  // Array of targeted elements
    {
      id?: number, // Optional, for updating existing mappings
      tag_id: {
        id: string,
        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
        gpid?: string[], // Supports wildcard prefix matching with '*' (e.g. '/5144/desktop/vip/*')
        mediatype?: string[], // audio | banner | native | video
        size?: { w: number, h: number }[], // Array of sizes
      },
      placement?: {
        id: number,
        name?: string,
      },
    }
  ]
}

```

#### **Response**

{% tabs %}
{% tab title="200 : OK Placement updated" %}

```json
{
  "id": number,
  "external_id": string,
  "name": string,
  "is_archived": boolean,
  "tag_id": {
    "id": string,
    "name": string
  },
  "account": {
    "id": number,
    "name": string
  },
  "mappings": [
    {
      "id": number,
      "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[],
        "size": { "w": number, "h": number }[]
      },
      "placement": {
        "id": number,
        "name": string
      }
    }
  ]
}

```

{% endtab %}

{% tab title="401 : Unauthorized" %}

```json
Unauthorized
```

{% endtab %}
{% endtabs %}
