---
title: "v2_patch_brands_brand_id | Python SDK | AEO API"
description: "Change a brand or its settings. For a brand edit, set section to brand and pass the current revision as if_match."
url: "https://aeoapi.dev/docs/sdks/python/v2-patch-brands-brand-id"
canonical: "https://aeoapi.dev/docs/sdks/python/v2-patch-brands-brand-id"
last_updated: "2026-11-30"
---

# v2_patch_brands_brand_id

Change a brand or its settings. For a brand edit, set section to brand and pass the current revision as if_match.

See the REST reference for [`PATCH /v2/brands/{brand_id}`](https://aeoapi.dev/docs/api-reference#patch-v2-brands-brand_id).

## Signature

```
v2_patch_brands_brand_id(
    brand_id: str,
    body: Mapping[str, Any],
    *,
    website: str | None = None,
    idempotency_key: str | None = None,
    if_match: str | int | None = None,
    hubspot_access_token: str | None = None,
) -> Response[Any]
```

## Parameters

**`brand_id`**

Identifier for the brand.

**`body`**

Dictionary for the selected operation. See the REST reference for its required fields.

**`website`**

Website for the selected brand or connection.

**`idempotency_key`**

Value for Idempotency-Key. For requests that require this header, the SDK generates a UUID if you omit it. Send the original value if your application repeats the same write.

**`if_match`**

Current revision as an integer, decimal string, or quoted numeric ETag. Required for edits that check the revision.

**`hubspot_access_token`**

Your HubSpot credential for a connection action that requires it. Omit it for other requests.

## Return value

For an update, response.data contains the changed brand and its revision. Use the new revision on your next edit.

## Errors

- AeoApiError includes the HTTP status, error code and request ID. An invalid key raises UnauthenticatedError. Check the key’s scopes if you receive ForbiddenError.
- Invalid arguments can raise ValueError or TypeError before the SDK sends a request.
- AeoTransportError means the request could not reach the API after any allowed retries, or the response could not be read as JSON.
- PreconditionFailedError means the revision has changed. Read the current record before editing it again.
- For a conflict, read the error message before repeating the write. Check the saved record for a competing edit or a repeated request.

## Python example

```
import os
from aeo_sdk import AeoClient

with AeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
    response = client.v2_patch_brands_brand_id(
        brand_id='00000000-0000-4000-8000-000000000001',
        body={'action': 'update', 'name': 'Example Plumbing', 'section': 'brand'},
        if_match=1,
    )
    print(response.body)
```

## Async example

```
import asyncio
import os
from aeo_sdk import AsyncAeoClient

async def main():
    async with AsyncAeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
        response = await client.v2_patch_brands_brand_id(
            brand_id='00000000-0000-4000-8000-000000000001',
            body={'action': 'update', 'name': 'Example Plumbing', 'section': 'brand'},
            if_match=1,
        )
        print(response.body)

asyncio.run(main())
```

## Requests by feature

### Brands, locations and connections

- [Update or archive a brand](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-brand)
- [Edit profile assignments](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-profile)
- [Dismiss competitors](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-competitor-suggestions)
- [Refresh Bing reports](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-connection-bing)
- [Configure HubSpot](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-connection-hubspot)
- [Configure the report webhook](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-connection-webhook)
- [Edit collection schedules](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-schedule-collection)
- [Set the tracking schedule](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-schedule-managed)
- [Schedule cited page checks](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-schedule-cited-page-sweep)
- [Schedule accuracy checks](https://aeoapi.dev/docs/features/brands-locations-and-connections/patch-brands-brand-id-schedule-answer-accuracy)

### Content drafts and editorial generation

- [Set the writing voice](https://aeoapi.dev/docs/features/content-drafts-and-editorial-generation/patch-brands-brand-id-voice)

See [Python client setup](https://aeoapi.dev/docs/sdks/python) for the environment variables, response properties and retry settings.
