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

# Add Org Member

> Add a user to the org by email.

If the email matches a Lyceum account, they're added directly and get a
"you've been added" email. If not, a pending invite is created and an
invite email is sent; signup auto-accepts via the user-created auth hook.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/external/orgs/{slug}/members
openapi: 3.1.0
info:
  title: Lyceum Cloud Execution API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/external/orgs/{slug}/members:
    post:
      tags:
        - Organizations
      summary: Add Org Member
      description: >-
        Add a user to the org by email.


        If the email matches a Lyceum account, they're added directly and get a

        "you've been added" email. If not, a pending invite is created and an

        invite email is sent; signup auto-accepts via the user-created auth
        hook.
      operationId: add_org_member_api_v2_external_orgs__slug__members_post
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddMemberResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AddMemberRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
        role:
          $ref: '#/components/schemas/OrgRole'
          default: member
      type: object
      required:
        - email
      title: AddMemberRequest
    AddMemberResponse:
      properties:
        status:
          type: string
          enum:
            - added
            - invited
          title: Status
        member:
          anyOf:
            - $ref: '#/components/schemas/OrgMemberResponse'
            - type: 'null'
        invite:
          anyOf:
            - $ref: '#/components/schemas/OrgInviteResponse'
            - type: 'null'
      type: object
      required:
        - status
      title: AddMemberResponse
      description: |-
        Result of POST /orgs/{slug}/members.

        The invitee either had a Lyceum account already (``status='added'``,
        ``member`` populated) or didn't (``status='invited'``, ``invite``
        populated and an invite email was sent).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrgRole:
      type: string
      enum:
        - owner
        - admin
        - member
      title: OrgRole
    OrgMemberResponse:
      properties:
        user_id:
          type: string
          title: User Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        role:
          $ref: '#/components/schemas/OrgRole'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - user_id
        - role
        - created_at
      title: OrgMemberResponse
    OrgInviteResponse:
      properties:
        id:
          type: string
          title: Id
        org_id:
          type: string
          title: Org Id
        org_slug:
          type: string
          title: Org Slug
        org_name:
          type: string
          title: Org Name
        email:
          type: string
          title: Email
        role:
          $ref: '#/components/schemas/OrgRole'
        invited_by:
          type: string
          title: Invited By
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - org_id
        - org_slug
        - org_name
        - email
        - role
        - invited_by
        - created_at
      title: OrgInviteResponse
      description: A pending invite to an org for an email that has no Lyceum user yet.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````