> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athenahq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Groups

> Returns all groups for your organization, including associated websites. Requires a global API key. **Partner integrations** may pass `external_id` as a query parameter to find the Athena group mapped to a partner-supplied identifier. Partner responses additionally include `externalId` on each group and on every website object inside `websites` (`null` when no mapping exists), so sites can be matched by your own identifier instead of by URL.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/groups
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
  - name: Knowledge Base
    description: >-
      Endpoints for reading the brand Knowledge Base — approved brand facts and
      the pillars that organize them.
paths:
  /api/v1/groups:
    get:
      tags:
        - Groups
      summary: List Groups
      description: >-
        Returns all groups for your organization, including associated websites.
        Requires a global API key. **Partner integrations** may pass
        `external_id` as a query parameter to find the Athena group mapped to a
        partner-supplied identifier. Partner responses additionally include
        `externalId` on each group and on every website object inside `websites`
        (`null` when no mapping exists), so sites can be matched by your own
        identifier instead of by URL.
      operationId: listGroups
      parameters:
        - name: external_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            **Partner-only.** Filter results to the group mapped to this
            partner-supplied identifier. Accepted only when authenticating with
            a partner API key — direct customers that pass this parameter
            receive `403 Forbidden`. Exact match, scoped to your organization;
            unmapped IDs return an empty array.
          example: acct_9e4c1b8d
      responses:
        '200':
          description: >-
            Successful response with list of groups. Partner responses include
            an `externalId` field on each item (string or `null`);
            direct-customer responses omit the field entirely.
          content:
            application/json:
              schema:
                type: object
                properties:
                  groups:
                    type: array
                    items:
                      $ref: '#/components/schemas/Group'
                required:
                  - groups
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - Requires a global API key, or (when using the
            `external_id` filter) a partner API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                global_required:
                  summary: Global API key required
                  value:
                    error: 'Forbidden: global API key required'
                partner_required:
                  summary: Partner API key required for external_id filter
                  value:
                    error: 'Forbidden: partner API key required'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    Group:
      type: object
      description: A group of websites in your organization
      required:
        - id
        - name
        - orgId
        - billingEnabled
        - createdAt
        - websites
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the group
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: Display name of the group
          example: Enterprise Clients
        orgId:
          type: string
          format: uuid
          description: The organization ID the group belongs to
          example: 987e6543-e21b-12d3-a456-426614174000
        billingEnabled:
          type: boolean
          description: Whether billing is enabled for this group
          example: false
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the group was created (UTC)
          example: '2024-06-15T10:30:00.000Z'
        websites:
          type: array
          description: Websites associated with this group
          items:
            $ref: '#/components/schemas/GroupWebsite'
        externalId:
          type: string
          nullable: true
          description: >-
            **Partner-only.** The partner-supplied identifier mapped to this
            group. Only present on responses to callers whose organization is
            flagged as a partner. Direct-customer responses omit the field
            entirely. `null` indicates no mapping exists for this group.
          example: acct_9e4c1b8d
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
    GroupWebsite:
      type: object
      description: A website associated with a group
      required:
        - id
        - websiteUrl
        - websiteName
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the website
          example: 123e4567-e89b-12d3-a456-426614174000
        websiteUrl:
          type: string
          description: The URL of the website
          example: example.com
        websiteName:
          type: string
          description: Display name of the website
          example: My Awesome Blog
        externalId:
          type: string
          nullable: true
          description: >-
            **Partner-only.** The partner-supplied identifier mapped to this
            website. Only present on responses to callers whose organization is
            flagged as a partner. Direct-customer responses omit the field
            entirely. `null` indicates no mapping exists for this website.
          example: ws_a7f3b2c9
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````