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

# Invite a team member

> Creates a seven-day invitation and sends the same invitation email as the Felan web app. Accepts only a team API key belonging to the team in the path. Only the member role is allowed and it is the default. Requests for admin or owner return 403 with the message 'invite admins from the Felan web app'; other role values return 400. Existing members and unexpired pending invitations return 409. The team's seat limit is enforced. If email delivery fails, the invitation remains created and the 201 response includes emailSent: false and emailError when available.



## OpenAPI

````yaml /openapi/v1.json post /teams/{teamSlug}/invitations
openapi: 3.1.0
info:
  title: Felan API
  description: >-
    Team-scoped access to Felan sessions, members, invitations, integrations,
    environments, environment variables, automations, skills, custom subagents,
    and inbound events.
  version: 1.0.0
  contact:
    name: Felan Support
    url: https://felan.ai
servers:
  - url: https://app.felan.ai/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Hosts
  - name: Teams
  - name: Integrations
  - name: Environments
  - name: Environment Variables
  - name: Automations
  - name: Skills
  - name: Subagents
  - name: Sessions
  - name: Events
  - name: OpenAPI
paths:
  /teams/{teamSlug}/invitations:
    post:
      tags:
        - Teams
      summary: Invite a team member
      description: >-
        Creates a seven-day invitation and sends the same invitation email as
        the Felan web app. Accepts only a team API key belonging to the team in
        the path. Only the member role is allowed and it is the default.
        Requests for admin or owner return 403 with the message 'invite admins
        from the Felan web app'; other role values return 400. Existing members
        and unexpired pending invitations return 409. The team's seat limit is
        enforced. If email delivery fails, the invitation remains created and
        the 201 response includes emailSent: false and emailError when
        available.
      operationId: inviteTeamMember
      parameters:
        - $ref: '#/components/parameters/TeamSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: Invitee email address; trimmed and normalized to lowercase.
                role:
                  type: string
                  enum:
                    - member
                  default: member
            example:
              email: teammate@example.com
      responses:
        '201':
          description: Invitation created; check emailSent for email delivery status
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/CreatedTeamInvitation'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Admin/owner invitations must use the Felan web app, or the team's
            seat limit has been reached (cap_reached)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: FORBIDDEN
                  message: invite admins from the Felan web app
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The invitee is already a member or has an unexpired pending
            invitation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    TeamSlug:
      name: teamSlug
      in: path
      required: true
      description: Felan team slug shown in dashboard URLs and Team Settings
      schema:
        type: string
        minLength: 1
  schemas:
    CreatedTeamInvitation:
      allOf:
        - $ref: '#/components/schemas/TeamInvitation'
        - type: object
          required:
            - inviteUrl
            - emailSent
          properties:
            inviteUrl:
              type: string
              format: uri
              description: Invitation acceptance link. Expires after seven days.
            emailSent:
              type: boolean
              description: >-
                Whether the invitation email was sent. A false value does not
                undo invitation creation.
            emailError:
              type: string
              description: Delivery error, when available, if emailSent is false.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              examples:
                - VALIDATION_ERROR
                - UNAUTHORIZED
                - NOT_FOUND
                - SKILL_SOURCE_UNAVAILABLE
                - EXECUTION_DENIED
                - CONFLICT
                - RATE_LIMITED
                - SESSION_START_FAILED
                - SESSION_PUBLISH_FAILED
                - MESSAGE_PUBLISH_FAILED
                - INTERNAL_ERROR
            message:
              type: string
    TeamInvitation:
      type: object
      required:
        - id
        - email
        - role
        - expiresAt
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        role:
          type: string
          enum:
            - admin
            - member
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type:
            - string
            - 'null'
          format: date-time
  responses:
    ValidationError:
      description: The request body or source reference is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: Invalid subagent fields
    Unauthorized:
      description: Missing or invalid team API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource missing or outside the authenticated team
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Team API key rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: The server could not complete the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Team API key. Current keys retain the bzy_team_ compatibility prefix.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.