> ## 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.

# Get Websites

> Returns all active websites associated with your API key. **Partner integrations** may pass `external_id` as a query parameter to find the Athena website mapped to a partner-supplied identifier.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/websites
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/websites:
    get:
      tags:
        - Basics
      summary: Get Websites
      description: >-
        Returns all active websites associated with your API key. **Partner
        integrations** may pass `external_id` as a query parameter to find the
        Athena website mapped to a partner-supplied identifier.
      operationId: getWebsites
      parameters:
        - name: external_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
          description: >-
            **Partner-only.** Filter results to the website 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: ws_a7f3b2c9
      responses:
        '200':
          description: >-
            Successful response with list of websites. 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:
                  websites:
                    type: array
                    items:
                      $ref: '#/components/schemas/Website'
                required:
                  - websites
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - `external_id` is partner-only; non-partner API keys
            cannot use this filter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: 'Forbidden: partner API key required'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    Website:
      type: object
      description: A website resource in AthenaHQ
      required:
        - id
        - websiteName
        - websiteUrl
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the website
          example: 123e4567-e89b-12d3-a456-426614174000
        websiteName:
          type: string
          description: Display name of the website
          example: My Awesome Blog
        websiteUrl:
          type: string
          description: The domain of the website (without protocol)
          example: example.com
        onboardingStep:
          type: integer
          nullable: true
          description: >-
            Current onboarding step for the website. Null indicates onboarding
            is complete.
          example: null
        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
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  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).

````