> ## 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 Group Member Access

> Removes a user's direct group membership and their explicit website memberships for websites currently in the group. Both sets of rows are removed atomically. The request is idempotent: a retry, or a well-formed user ID with no matching membership rows, returns `200` with `group_membership_removed: false` and `website_memberships_removed: 0`.

Organization membership, membership in other groups, and website membership outside this group are preserved. If another group grants access to one of the same websites, that effective access remains through the other group even though the user's explicit website membership row is removed. Organization members return `409` because their organization-derived access would remain. Requires a global API key, and the API key's own user cannot be removed. The endpoint accepts no request body.



## OpenAPI

````yaml /api-reference/openapi.json delete /api/v1/groups/{group_id}/members/{user_id}
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/{group_id}/members/{user_id}:
    parameters:
      - name: group_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The unique identifier of the group
      - 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 Group Member Access
      description: >-
        Removes a user's direct group membership and their explicit website
        memberships for websites currently in the group. Both sets of rows are
        removed atomically. The request is idempotent: a retry, or a well-formed
        user ID with no matching membership rows, returns `200` with
        `group_membership_removed: false` and `website_memberships_removed: 0`.


        Organization membership, membership in other groups, and website
        membership outside this group are preserved. If another group grants
        access to one of the same websites, that effective access remains
        through the other group even though the user's explicit website
        membership row is removed. Organization members return `409` because
        their organization-derived access would remain. Requires a global API
        key, and the API key's own user cannot be removed. The endpoint accepts
        no request body.
      operationId: removeGroupMemberAccess
      responses:
        '200':
          description: Group-scoped membership removal completed
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - group_membership_removed
                  - website_memberships_removed
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                    example: true
                  group_membership_removed:
                    type: boolean
                    description: Whether a direct group membership row was removed
                    example: true
                  website_memberships_removed:
                    type: integer
                    minimum: 0
                    description: >-
                      Number of explicit website membership rows removed for
                      websites currently in the group
                    example: 3
        '400':
          description: Bad request - Invalid group or user ID
          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 - Not a global API key, or attempted self-removal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_global:
                  value:
                    error: 'Forbidden: global API key required'
                self_removal:
                  value:
                    error: You cannot remove your own membership
        '404':
          description: Not found - Group does not exist in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Group not found
        '409':
          description: >-
            Conflict - The target is an organization member whose
            organization-derived access would remain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: >-
                  User is an organization member: removing group-scoped
                  memberships would not revoke their organization-derived access
        '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).

````