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

# Create Invitation

> Create an email or copyable-link invitation to a workspace, returning its one-time token. Owner or Admin with a verified email only; email invites are mailed out.



## OpenAPI

````yaml /openapi.json post /api/v1/workspaces/{workspace_id}/invitations
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.3
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/invitations:
    post:
      tags:
        - invitations
      summary: Create Invitation
      description: >-
        Create an email or copyable-link invitation to a workspace, returning
        its one-time token. Owner or Admin with a verified email only; email
        invites are mailed out.
      operationId: create_invitation_api_v1_workspaces__workspace_id__invitations_post
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            format: uuid
            title: Workspace Id
            type: string
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvitationBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    CreateInvitationBody:
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        expires_in_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expires In Days
        kind:
          title: Kind
          type: string
        max_uses:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Uses
        role:
          default: member
          title: Role
          type: string
      required:
        - kind
      title: CreateInvitationBody
      type: object
    InvitationResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Expires At
        id:
          format: uuid
          title: Id
          type: string
        kind:
          title: Kind
          type: string
        max_uses:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Uses
        role:
          title: Role
          type: string
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
        use_count:
          title: Use Count
          type: integer
        workspace_id:
          format: uuid
          title: Workspace Id
          type: string
      required:
        - id
        - workspace_id
        - email
        - role
        - kind
        - use_count
        - max_uses
        - expires_at
        - created_at
      title: InvitationResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````