Skip to content

    v2_get_account

    Read the account plan before choosing a collection workflow. The view argument also selects usage, limits, source availability, or tracking fields.

    See the REST reference for GET /v2/account.

    Signature

    v2_get_account(
        *,
        brand_id: str | None = None,
        cursor: str | None = None,
        include: Literal['overview', 'schedules', 'webhooks'] | None = None,
        limit: int | None = None,
        period_end: str | datetime | None = None,
        period_start: str | datetime | None = None,
        resource_kind: Literal['citation', 'prompt', 'topic'] | None = None,
        view: Literal['overview', 'limits', 'sources', 'usage', 'fields'] | None = None,
    ) -> Response[Any]

    Parameters

    brand_id
    Identifier for the brand.
    cursor
    Pass the previous page's next cursor with the original filters.
    include
    Choose account overview, schedules or webhook configuration.
    limit
    Maximum number of records per page. Each view sets its own limit.
    period_end
    End of the account usage period.
    period_start
    Start of the account usage period.
    resource_kind
    Record type whose tracking fields you want: citation, prompt or topic.
    view
    Choose the result to read. See the linked REST reference for the fields and access each view requires.

    Return value

    The overview returns the account ID, plan, limits and billing period in response.data.

    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_get_account()
        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_get_account()
            print(response.body)
    
    asyncio.run(main())

    Requests by feature

    Account and usage

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