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

# Remove User From Websites

> Batch-removes a user's explicit website memberships within your organization. Pass the website IDs as a comma-separated list in the `website_ids` query parameter (at most 100). Requires a global API key. Idempotent: websites where the user has no explicit membership are reported with status `not_a_member` rather than failing the request, so re-calling is safe. Organization-level access is not affected — this only removes explicit `website_members` rows.



## OpenAPI

````yaml /api-reference/openapi.json delete /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.
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
    delete:
      tags:
        - Team Management
      summary: Remove User From Websites
      description: >-
        Batch-removes a user's explicit website memberships within your
        organization. Pass the website IDs as a comma-separated list in the
        `website_ids` query parameter (at most 100). Requires a global API key.
        Idempotent: websites where the user has no explicit membership are
        reported with status `not_a_member` rather than failing the request, so
        re-calling is safe. Organization-level access is not affected — this
        only removes explicit `website_members` rows.
      operationId: removeUserFromWebsites
      parameters:
        - name: website_ids
          in: query
          required: true
          description: >-
            Comma-separated list of website UUIDs to remove the user from (at
            most 100).
          schema:
            type: string
      responses:
        '200':
          description: Per-website removal results
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        website_id:
                          type: string
                        status:
                          type: string
                          enum:
                            - removed
                            - not_a_member
                      required:
                        - website_id
                        - status
                required:
                  - success
                  - results
        '400':
          description: Bad request - Invalid user ID or website_ids
          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
        '429':
          description: Too many requests - Rate limit exceeded. Retry after a short delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    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).

````