# Update attributes

Updates attributes.

```http
PUT https://api.pozy.ai/v1/accounts/{accountId}/gmb-attributes
```

- Area: Google Business / Google Business Attributes
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Query parameters

- `locationId` (string)

## Request body

Content type: `application/json`

- `attributes`, array of object, required
  - `name`, string, required
  - `valueType`, string: One of `ATTRIBUTE_VALUE_TYPE_UNSPECIFIED`, `BOOL`, `ENUM`, `URL`, `REPEATED_ENUM`
  - `values`, array of any
  - `repeatedEnumValue`, object
    - `setValues`, array of string
    - `unsetValues`, array of string
  - `uriValues`, array of object
    - `uri`, string (URL), required
- `attributeMask`, string, required

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-attributes" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "attributes": [
    {
      "name": "Acme"
    }
  ],
  "attributeMask": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-attributes", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    attributes: [
      {
        name: "Acme"
      }
    ],
    attributeMask: "string"
  }),
});
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.put(
    "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/gmb-attributes",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "attributes": [
            {
                "name": "Acme",
            },
        ],
        "attributeMask": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `accountId`, string
- `locationId`, string
- `attributes`, array of object

```json
{
  "success": true,
  "accountId": "696e0b682d0a31188e7a2ba9",
  "locationId": "6e99c3dd69982b334a43b0b2",
  "attributes": [
    {}
  ]
}
```
