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

# Create Invitation

> Invite a user to join the team by email.

**Required Role:** ADMIN or OWNER

**Tier Limits:**
- Free Tier: Maximum 1 team member (no invites allowed)
- Pro Tier: Maximum 20 team members (including pending invites)

**Invitation Behavior:**
- New users: Will receive magic link email to sign up
- Existing users: Will receive notification email (TODO)
- Both must explicitly accept the invitation

The invitation expires in 7 days.



## OpenAPI

````yaml POST /v1/teams/{team_id}/invitations
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/invitations:
    post:
      tags:
        - Invitations
      summary: Create Invitation
      description: >-
        Invite a user to join the team by email.


        **Required Role:** ADMIN or OWNER


        **Tier Limits:**

        - Free Tier: Maximum 1 team member (no invites allowed)

        - Pro Tier: Maximum 20 team members (including pending invites)


        **Invitation Behavior:**

        - New users: Will receive an invitation email; they sign in via email
        OTP and auto-register

        - Existing users: Will receive notification email (TODO)

        - Both must explicitly accept the invitation


        The invitation expires in 7 days.
      operationId: create_invitation_v1_teams__team_id__invitations_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvitationCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationCreateResponse'
        '409':
          description: User already a member or has pending invitation
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      security:
        - HTTPBearer: []
components:
  schemas:
    InvitationCreate:
      properties:
        email:
          type: string
          format: email
          title: Email
        role:
          $ref: '#/components/schemas/UserRole'
          default: operator
      type: object
      required:
        - email
      title: InvitationCreate
      description: Schema for creating a new team invitation.
    InvitationCreateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        role:
          $ref: '#/components/schemas/UserRole'
        status:
          $ref: '#/components/schemas/InvitationStatus'
        invited_by:
          type: string
          format: uuid
          title: Invited By
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - id
        - email
        - role
        - status
        - invited_by
        - created_at
        - expires_at
      title: InvitationCreateResponse
      description: Response after creating an invitation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserRole:
      type: string
      enum:
        - viewer
        - operator
        - admin
        - owner
      title: UserRole
      description: >-
        User roles within teams (hierarchical).


        - OWNER (4): Full control including team deletion

        - ADMIN (3): All operations except team deletion

        - OPERATOR (2): Day-to-day operations (run jobs, view logs), no
        setup/config

        - VIEWER (1): Read-only audit access
    InvitationStatus:
      type: string
      enum:
        - pending
        - accepted
        - declined
        - expired
        - revoked
      title: InvitationStatus
      description: Team invitation status values.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````