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

# Create team invitation

> Invite a new team member to your organization. Requires admin or owner role.



## OpenAPI

````yaml /openapi.json post /v1/invitations
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/invitations:
    post:
      tags:
        - invitations
      summary: Create team invitation
      description: >-
        Invite a new team member to your organization. Requires admin or owner
        role.
      operationId: createInvitation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvitationRequest'
      responses:
        '201':
          description: Invitation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invitation'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - requires admin or owner role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateInvitationRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address of the person to invite
          example: colleague@example.com
        role:
          allOf:
            - $ref: '#/components/schemas/InvitationRole'
            - default: member
              description: Role to assign to the invited user
              example: member
      required:
        - email
    Invitation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        organization_id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        role:
          $ref: '#/components/schemas/InvitationRole'
        status:
          $ref: '#/components/schemas/InvitationStatus'
        invited_by:
          type: string
          format: uuid
        inviter_name:
          type: string
          nullable: true
          description: Full name of the person who sent the invitation
          example: John Doe
        inviter_email:
          type: string
          format: email
          description: Email of the person who sent the invitation
          example: john@example.com
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - organization_id
        - email
        - role
        - status
        - invited_by
        - inviter_name
        - inviter_email
        - expires_at
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
    InvitationRole:
      type: string
      enum:
        - member
        - admin
    InvitationStatus:
      type: string
      enum:
        - pending
        - accepted
        - expired
        - cancelled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````