> ## 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 User Websites

> Returns the websites that a user has access to within your organization, either via organization membership (implicit access to all websites in the org) or via explicit website membership. Organization membership takes precedence — if the user is an org member, all non-paused websites in your organization are returned with `access_type: "organization"`. Otherwise, only websites the user has an explicit `website_members` row for are returned. Returns `404` if the `user_id` does not match any AthenaHQ user. Returns `200` with an empty `websites` array if the user exists but has no access within your organization (this intentionally does not distinguish "user is in a different org" from "user is in your org but has no access"). Requires a global API key. **Partner integrations** additionally receive an `external_id` field on each website (`null` when no mapping exists); direct-customer responses omit the field.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/users/{user_id}/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/users/{user_id}/websites:
    parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The unique identifier of the target user
    get:
      tags:
        - Team Management
      summary: List User Websites
      description: >-
        Returns the websites that a user has access to within your organization,
        either via organization membership (implicit access to all websites in
        the org) or via explicit website membership. Organization membership
        takes precedence — if the user is an org member, all non-paused websites
        in your organization are returned with `access_type: "organization"`.
        Otherwise, only websites the user has an explicit `website_members` row
        for are returned. Returns `404` if the `user_id` does not match any
        AthenaHQ user. Returns `200` with an empty `websites` array if the user
        exists but has no access within your organization (this intentionally
        does not distinguish "user is in a different org" from "user is in your
        org but has no access"). Requires a global API key. **Partner
        integrations** additionally receive an `external_id` field on each
        website (`null` when no mapping exists); direct-customer responses omit
        the field.
      operationId: listUserWebsites
      responses:
        '200':
          description: Successful response with the list of websites (may be empty)
          content:
            application/json:
              schema:
                type: object
                properties:
                  websites:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserWebsite'
                required:
                  - websites
        '400':
          description: Bad request - Invalid user ID format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - Global API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: 'Forbidden: global API key required'
        '404':
          description: Not found - No AthenaHQ user exists for this user_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: User not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    UserWebsite:
      type: object
      description: >-
        A website that a user has access to, with information about how that
        access is granted
      required:
        - id
        - website_name
        - website_url
        - access_type
        - role
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the website
        website_name:
          type: string
          description: Display name of the website
        website_url:
          type: string
          description: The domain of the website (without protocol)
        access_type:
          type: string
          enum:
            - organization
            - website
          description: >-
            How the user has access to this website. `organization` means they
            are an organization member and have implicit access to every website
            in the org. `website` means they have an explicit website_members
            row for this specific website.
        role:
          type: string
          description: >-
            The user's role. For `access_type: "organization"`, this is the
            organization role. For `access_type: "website"`, this is the
            per-website role. Each role is its slug — the role's normalized name
            (lowercase, no spaces): `admin`, `viewer`, `editor`, `billing`, or a
            custom role's id (e.g. `contentmanager`). `admin` and `viewer` are
            unchanged from prior versions.
        external_id:
          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.
            Snake_case to match this endpoint's field naming.
          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).

````