# Update a Google Ads label

Updates a Google Ads label. Fields you leave out keep their current values. Works with Google Ads.

```http
PATCH https://api.pozy.ai/v1/ads/labels/{labelId}
```

- Area: Ads / Ad Accounts
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `labelId` (string, required)

## Request body

Content type: `application/json`

- `accountId`, string, required
- `adAccountId`, string: Matches `^\d+$`
- `customerId`, string: Matches `^\d+$`
- `name`, string: 1 to 80 characters
- `backgroundColor`, string: Matches `^#[0-9a-fA-F]{6}$`
- `description`, string: Up to 200 characters

## Example request

```bash
curl -X PATCH "https://api.pozy.ai/v1/ads/labels/66baff0a87a6a0bd897d2888" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/labels/66baff0a87a6a0bd897d2888", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountId: "696e0b682d0a31188e7a2ba9"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.patch(
    "https://api.pozy.ai/v1/ads/labels/66baff0a87a6a0bd897d2888",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountId": "696e0b682d0a31188e7a2ba9",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `customerId`, string
- `label`, object
  - `id`, string
  - `resourceName`, string
  - `name`, string
  - `status`, string: One of `ENABLED`, `REMOVED`, `UNKNOWN`
  - `backgroundColor`, string: Can be null
  - `description`, string: Can be null

```json
{
  "customerId": "691909ff82eb5ed7c816716d",
  "label": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "resourceName": "Acme",
    "name": "Acme",
    "status": "ENABLED",
    "backgroundColor": "string",
    "description": "A short description"
  }
}
```
