Skip to content

    v2_put_brands_brand_id_evidence_kind_key

    Save evidence that belongs to a brand. For keyword measurements, provide the dataset revision, rights and measured rows.

    See the REST reference for PUT /v2/brands/{brand_id}/evidence/{kind}/{key}.

    Signature

    v2_put_brands_brand_id_evidence_kind_key(
        brand_id: str,
        key: str,
        kind: str,
        body: Mapping[str, Any],
    ) -> Response[Any]

    Parameters

    brand_id
    Identifier for the brand.
    key
    Evidence identifier. For a keyword dataset, pass its UUID.
    kind
    Selects the kind of record. The accepted values depend on the operation.
    body
    Dictionary for the selected operation. See the REST reference for its required fields.

    Return value

    For a keyword dataset, response.data includes dataset_id, source_revision, stored_keywords and state.

    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.

    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_put_brands_brand_id_evidence_kind_key(
            brand_id='00000000-0000-4000-8000-000000000001',
            key='00000000-0000-4000-8000-000000000002',
            kind='keyword_dataset',
            body={
                'rights_basis': 'customer_licensed',
                'rights_expires_at': '2026-12-24T10:00:00Z',
                'rights_reference': 'fixture-license',
                'rows': [
                    {
                        'country': 'US',
                        'estimated_monthly_searches': 120,
                        'keyword': 'setup',
                        'language': 'en',
                        'measured_on': '2026-11-24',
                        'source': 'example',
                        'source_reference': 'fixture-measurement',
                        'volume_period_end': '2026-10-31',
                        'volume_period_start': '2026-10-01',
                    },
                ],
                'source_revision': 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_put_brands_brand_id_evidence_kind_key(
                brand_id='00000000-0000-4000-8000-000000000001',
                key='00000000-0000-4000-8000-000000000002',
                kind='keyword_dataset',
                body={
                    'rights_basis': 'customer_licensed',
                    'rights_expires_at': '2026-12-24T10:00:00Z',
                    'rights_reference': 'fixture-license',
                    'rows': [
                        {
                            'country': 'US',
                            'estimated_monthly_searches': 120,
                            'keyword': 'setup',
                            'language': 'en',
                            'measured_on': '2026-11-24',
                            'source': 'example',
                            'source_reference': 'fixture-measurement',
                            'volume_period_end': '2026-10-31',
                            'volume_period_start': '2026-10-01',
                        },
                    ],
                    'source_revision': 1,
                },
            )
            print(response.body)
    
    asyncio.run(main())

    Requests by feature

    Brand evidence

    See Python client setup for the environment variables, response properties and retry settings.