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

# Invite Team Member

> Invite a team member by email

Invite someone to your team. If the email belongs to an existing Sequenzy user, they are added to the team immediately and the response includes `member`. Otherwise an invitation email is sent and the response includes `invitation`. Invitations expire after 7 days.

Requires owner or admin access. Only the company owner can grant billing access.

## Request

<ParamField body="email" type="string" required>
  Email address to invite.
</ParamField>

<ParamField body="role" type="string" required>
  Role for the new member: `admin`, `viewer`, or `restricted`. Restricted
  members can open direct campaign links only.
</ParamField>

<ParamField body="canManageBilling" type="boolean">
  Whether the member can manage billing. Defaults to `false`. Only the company
  owner can set this to `true`. Restricted members cannot manage billing.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/team/invitations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "newhire@example.com", "role": "viewer"}'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "invitation": {
      "id": "inv_abc123",
      "email": "newhire@example.com",
      "role": "viewer",
      "canManageBilling": false,
      "status": "pending",
      "invitedAt": "2026-06-11T10:00:00.000Z",
      "expiresAt": "2026-06-18T10:00:00.000Z"
    }
  }
  ```

  ```json 200 theme={null}
  {
    "success": true,
    "member": {
      "id": "member_abc123",
      "kind": "member",
      "userId": "user_abc123",
      "role": "admin",
      "canManageBilling": false,
      "user": {
        "id": "user_abc123",
        "name": "John Marketer",
        "email": "john@example.com",
        "image": null
      },
      "status": "joined",
      "createdAt": "2026-06-11T10:00:00.000Z",
      "invitedAt": "2026-06-11T10:00:00.000Z",
      "expiresAt": null,
      "invitedBy": {
        "id": "user_owner123",
        "name": "Jane Founder",
        "email": "jane@example.com"
      }
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Invalid email address"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Cannot add the company owner as a team member."
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "You need admin access to manage team members."
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "Only the company owner can grant billing access."
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Limited team members cannot manage billing."
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "This user is already a member of your team."
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "An invitation is already pending for this email."
  }
  ```

  ```json 500 theme={null}
  {
    "success": false,
    "error": "Failed to send invitation email"
  }
  ```
</ResponseExample>
