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

# Add Member to Organization

> Add a member to an organization. This endpoint is idempotent - Adding an existing member returns the existing membership.



## OpenAPI

````yaml api-reference/openapi/accounts.json POST /api/organizations/members
openapi: 3.1.0
info:
  title: Recoup API - Accounts
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/organizations/members:
    post:
      description: >-
        Add a member to an organization. This endpoint is idempotent - Adding an
        existing member returns the existing membership.
      requestBody:
        description: Member-organization association parameters
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddOrganizationMemberRequest'
      responses:
        '200':
          description: Member added to organization successfully (or already a member)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddOrganizationMemberResponse'
        '400':
          description: Bad request - invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized - missing or invalid authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden - caller is not a member of the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    AddOrganizationMemberRequest:
      type: object
      required:
        - organizationId
      properties:
        organizationId:
          type: string
          format: uuid
          description: The account ID of the organization
        accountId:
          type: string
          format: uuid
          description: >-
            The account ID of the member to add. Provide exactly one of
            accountId or email.
        email:
          type: string
          format: email
          description: >-
            Email of the member to add. The account is created if it does not
            exist yet. Provide exactly one of accountId or email.
    AddOrganizationMemberResponse:
      type: object
      required:
        - status
        - id
        - account_id
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the request
        id:
          type: string
          format: uuid
          description: UUID of the membership record
        account_id:
          type: string
          format: uuid
          description: >-
            The account ID of the member (resolved from email when email was
            provided)
    ErrorEnvelope:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````