Create User
Create a new user account in the organization.
POST
/api/v1/usersCreate a new user within your organization. The new user will receive a welcome email (unless sendInvite is set to false).
Note
Email addresses must be unique per organization. If you try to create a user with an existing email, you will receive a
409 Conflict response.Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization* | string | ✓ | Bearer token with users:write scope. |
| Content-Type* | string | ✓ | Must be application/json. |
Request Body
Content-Type: application/json
User creation payload.
{
"name": "Bob Johnson",
"email": "bob@example.com",
"roles": ["editor"],
"sendInvite": true
}
| Field | Type | Required | Description |
|---|---|---|---|
| name* | string | ✓ | Full name of the user. |
| email* | string | ✓ | Valid email address. Must be unique within the organization. |
| roles | array[string] | — | Initial roles to assign. Defaults to ["viewer"]. |
| sendInvite | boolean | — | Whether to send a welcome email. Default: true. |
Responses
| Status | Description |
|---|---|
| 201 | User created successfully. |
| 400 | Validation error — check errors in response body. |
| 409 | A user with this email already exists. |
Examples
curl -X POST "https://api.example.com/v1/users" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Bob Johnson",
"email": "bob@example.com",
"roles": ["editor"]
}'
const res = await fetch('/api/v1/users', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Bob Johnson',
email: 'bob@example.com',
roles: ['editor']
})
});
const newUser = await res.json();
import requests
r = requests.post(
'https://api.example.com/v1/users',
headers={'Authorization': 'Bearer YOUR_TOKEN'},
json={
'name': 'Bob Johnson',
'email': 'bob@example.com',
'roles': ['editor']
}
)
new_user = r.json()