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

# Create invites

> Create up to 50 invites in one batch, each with team assignments that may carry a custom role. Validation is strict: a team or custom role that cannot be assigned refuses the batch rather than silently granting less than was asked. emailNotSent reports, per invite, whether the invite email could be delivered.



## OpenAPI

````yaml POST /api/organization/invites
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/organization/invites:
    post:
      tags:
        - Invites
      description: >-
        Create up to 50 invites in one batch, each with team assignments that
        may carry a custom role. Validation is strict: a team or custom role
        that cannot be assigned refuses the batch rather than silently granting
        less than was asked. emailNotSent reports, per invite, whether the
        invite email could be delivered.
      operationId: createOrganizationInvites
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                invites:
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                        minLength: 1
                      role:
                        type: string
                        enum:
                          - ADMIN
                          - MEMBER
                          - EXTERNAL
                      teams:
                        type: array
                        items:
                          type: object
                          properties:
                            teamId:
                              type: string
                              minLength: 1
                            role:
                              type: string
                              enum:
                                - ADMIN
                                - MEMBER
                                - VIEWER
                                - CUSTOM
                            customRoleId:
                              type: string
                              minLength: 1
                          required:
                            - teamId
                            - role
                        minItems: 1
                    required:
                      - email
                      - role
                      - teams
                  minItems: 1
                  maxItems: 50
              required:
                - invites
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  invites:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        email:
                          type: string
                        role:
                          type: string
                          enum:
                            - ADMIN
                            - MEMBER
                            - EXTERNAL
                        status:
                          type: string
                        expiration:
                          type:
                            - string
                            - 'null'
                        inviteCode:
                          type: string
                        inviteUrl:
                          type: string
                        teams:
                          type: array
                          items:
                            type: object
                            properties:
                              teamId:
                                type: string
                              role:
                                type: string
                              customRoleId:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - teamId
                              - role
                              - customRoleId
                        createdAt:
                          type: string
                        emailNotSent:
                          type: boolean
                      required:
                        - id
                        - email
                        - role
                        - status
                        - expiration
                        - inviteCode
                        - inviteUrl
                        - teams
                        - createdAt
                        - emailNotSent
                required:
                  - invites
      security:
        - admin_api_key: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.
    admin_api_key:
      type: http
      scheme: bearer
      description: >-
        Admin API key for organization-level operations (managing projects, API
        keys). Create one in Settings > API Keys or via POST /api/api-keys.
        Format: sk-lw-{id}_{secret}.

````