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

# Invite a member

> Invites a user to an organization by email and role. Creates a pending user when the email does not belong to an existing user, reactivates deactivated memberships, and sends the same invitation email as the app. Requires admin access to the organization.



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi post /api/public/organizations/{orgId}/members
openapi: 3.1.0
info:
  title: Basedash Public API
  version: 0.0.0
  description: >-
    API for programmatic access to Basedash features. Use API keys for
    authentication.
  contact:
    name: Basedash Support
    url: https://basedash.com
    email: support@basedash.com
servers:
  - url: https://charts.basedash.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Manage organizations
  - name: Groups
    description: Manage organization groups and memberships
  - name: Data Sources
    description: Manage database connections and data sources
  - name: MCP servers
    description: Manage MCP server data sources
  - name: Insights
    description: Manage generated insights
  - name: Automations
    description: Manage automations and automation runs
  - name: Skills
    description: Manage organization skills
  - name: Definitions
    description: Manage reusable SQL definitions
paths:
  /api/public/organizations/{orgId}/members:
    post:
      tags:
        - Members
      summary: Invite a member
      description: >-
        Invites a user to an organization by email and role. Creates a pending
        user when the email does not belong to an existing user, reactivates
        deactivated memberships, and sends the same invitation email as the app.
        Requires admin access to the organization.
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: orgId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteMemberInput'
      responses:
        '201':
          description: Member invited successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MemberResponse'
                required:
                  - data
        '400':
          description: Bad request - Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - Organization not found or no admin access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict - User is already a member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    InviteMemberInput:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address of the user to invite
        role:
          anyOf:
            - type: string
              enum:
                - MEMBER
            - type: string
              enum:
                - ADMIN
          default: MEMBER
          description: Role to assign to the invited member
      required:
        - email
    MemberResponse:
      type: object
      properties:
        id:
          type: string
          description: Member ID
        createdAt:
          type: string
          format: date-time
          description: Member creation timestamp
        deactivatedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the member was deactivated, if applicable
        role:
          anyOf:
            - type: string
              enum:
                - MEMBER
            - type: string
              enum:
                - ADMIN
          description: Role of the member in the organization
        userId:
          type: string
          description: ID of the associated user
        organizationId:
          type: string
          description: ID of the organization
        user:
          $ref: '#/components/schemas/UserResponse'
      required:
        - id
        - createdAt
        - deactivatedAt
        - role
        - userId
        - organizationId
        - user
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    UserResponse:
      type: object
      properties:
        id:
          type: string
          description: User ID
        fullName:
          type: string
          description: Full name of the user
        avatarUrl:
          type:
            - string
            - 'null'
          description: URL to the user avatar image
        email:
          type: string
          description: Email address of the user
        isEmailVerified:
          type: boolean
          description: Whether the user has verified their email
        createdAt:
          type: string
          format: date-time
          description: User creation timestamp
        firstName:
          type:
            - string
            - 'null'
          description: First name of the user
        title:
          type:
            - string
            - 'null'
          description: Job title of the user
      required:
        - id
        - fullName
        - avatarUrl
        - email
        - isEmailVerified
        - createdAt
        - firstName
        - title
      description: User information for this member
    ApiError:
      type: object
      properties:
        title:
          type: string
          description: Error type identifier
        detail:
          type: string
          description: Human-readable error description
      required:
        - title
        - detail
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/ApiError'
        - type: object
          properties:
            title:
              type: string
              enum:
                - RateLimitExceeded
            retryAfterMs:
              type: number
              description: Milliseconds until the rate limit window resets
          required:
            - retryAfterMs
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication using Bearer token format: `Bearer
        <basedash_api_key>`

````