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

# Invite a member



## OpenAPI

````yaml /api-reference/openapi.personal.json post /v1/orgs/{slug}/invites
openapi: 3.1.0
info:
  title: Personal token API
  description: User-scoped API for account and organization management.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - bearer: []
paths:
  /v1/orgs/{slug}/invites:
    post:
      tags:
        - Invites
      summary: Invite a member
      operationId: create_invite
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInviteRequest'
        required: true
      responses:
        '200':
          description: Invite created or refreshed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgInvite'
        '400':
          description: Invalid email
        '401':
          description: Unauthorized
        '403':
          description: Insufficient permissions
        '409':
          description: User already a member
      security:
        - bearer: []
components:
  schemas:
    CreateInviteRequest:
      type: object
      description: Request body for `POST /v1/orgs/:slug/invites`.
      required:
        - email
        - role
      properties:
        email:
          type: string
        role:
          $ref: '#/components/schemas/OrgRole'
    OrgInvite:
      type: object
      description: An email-based invitation to join an organization.
      required:
        - id
        - org_id
        - email
        - role
        - invited_by
        - expires_at
        - created_at
      properties:
        accepted_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        declined_at:
          type:
            - string
            - 'null'
          format: date-time
        email:
          type: string
        expires_at:
          type: string
          format: date-time
        id:
          type: string
          format: uuid
        invited_by:
          type: string
          format: uuid
        org_id:
          type: string
          format: uuid
        role:
          $ref: '#/components/schemas/OrgRole'
    OrgRole:
      type: string
      description: Organization membership role.
      enum:
        - owner
        - admin
        - member
        - viewer
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Personal access token (msb_pat_…) or session JWT - the credential an
        agent acts with on a user's behalf.

````