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

# Invite Team Member

> Sends an invitation to a new team member via email.

Send an invitation to a new team member via email. If the user already has a Rolla account, they will be added directly. New users will receive a registration link.

## Example Request

```bash theme={null}
curl -X POST "https://api.rolla.xyz/api/v1/external/teams/invite" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "fullname": "Jane Doe",
    "roleId": "e5f6a7b8-c9d0-1234-efgh-567890123456"
  }'
```

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Invitation sent successfully",
  "data": {
    "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "jane@example.com",
    "fullname": "Jane Doe",
    "isNewUser": true
  }
}
```

<Info>
  The `roleId` is optional and defaults to the **Initiator** role when omitted. Use [`/teams/roles`](/api-reference/endpoint/teams/roles) to get available role IDs — the assignable set is `initiator`, `approver`, and `business_admin` (the `approver` and `business_admin` roles can only be assigned by Business Owners and Business Admins). The `roleId` UUID model itself is unchanged.
</Info>


## OpenAPI

````yaml POST /teams/invite
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /teams/invite:
    post:
      summary: Invite Team Member
      description: Sends an invitation to a new team member via email.
      operationId: inviteTeamMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamInviteRequest'
      responses:
        '200':
          description: Invitation sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Invitation sent successfully
                  data:
                    type: object
                    properties:
                      userId:
                        type: string
                        format: uuid
                      email:
                        type: string
                        format: email
                      fullname:
                        type: string
                      isNewUser:
                        type: boolean
        '400':
          description: Bad request - Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TeamInviteRequest:
      type: object
      required:
        - email
        - fullname
      properties:
        email:
          type: string
          format: email
          description: Email address of the person to invite
          example: jane@example.com
        fullname:
          type: string
          description: Full name of the person to invite
          minLength: 1
          maxLength: 100
          example: Jane Doe
        roleId:
          type: string
          format: uuid
          description: >-
            Role to assign (from /teams/roles). Optional — defaults to the
            initiator role when omitted.
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````