---
title: "Create invitation token for a new user."
method: POST
path: "/api/invite"
tags: ["Users"]
---

# Create invitation token for a new user.

`POST /api/invite`

## Request body

- object
  - `scope` 'admin' | 'install' | 'update' | 'read'

## Response `201`

Data of the newly created invitation token.

- TokenResponse
  - `id` string, required
  - `token` string, required — Only available if the token was freshly created.
  - `username` string — Username of the token, if grant_type is not "invitation".
  - `client_id` string — Client ID of the token, if grant_type is not "invitation".
  - `scope` 'admin' | 'install' | 'update' | 'read', required — Permission scope of the token.
  - `grant_type` 'one-time' | 'invitation' — Grant type of the token
  - `expires` integer — Timestamp when the one-time token expires.
  - `url` string — Login URL for passwordless authentication tokens.

## Changes

- **2024-11-06** `e06d9f9dee25` — 2 breaking, 1 warning
  - the response property `client_id` became optional for the status `201`
  - the response property `username` became optional for the status `201`
  - added the new `invitation` enum value to the `grant_type` response property for the response status `201`
- **2024-11-06** `1c940c868914` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/contao/apis/contao-manager-api/changes/api/invite/post.md)

---

[API](https://skmtc.dev/contao/apis/contao-manager-api.md) · [All operations](https://skmtc.dev/contao/apis/contao-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contao/contao-manager-api/revisions/f3f0ed40c70a/schema)
