Invite a new member to the organization
POST /api/v1/members/invitations
Creates a pending invitation for an email with the given role. Admin only. Fails if the email already belongs to a member or already has a pending invitation.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | |
role | string | yes | Organization role. admin: manage members and billing, plus everything readwrite can do. readwrite: start sessions, create API keys, delete sessions. readonly: view sessions, API keys, and test results only. |
Example request
curl https://api.mobilenexthq.com/api/v1/members/invitations \
-X POST \
-H 'Authorization: Bearer mob_...' \
-H 'Content-Type: application/json' \
-d '{"email":"string","role":"admin"}'
Responses
201 — Invitation created
{
"id": "string",
"email": "string",
"role": "admin",
"status": "pending",
"invitedByUserId": "string",
"createdAt": "2026-01-01T00:00:00Z",
"expiresAt": "2026-01-01T00:00:00Z"
}
400 — Invalid request body
{
"error": {
"code": "string",
"message": "string"
}
}
401 — Missing or invalid Bearer token
{
"error": {
"code": "string",
"message": "string"
}
}
403 — Caller lacks permission for this action (e.g. not an admin)
{
"error": {
"code": "string",
"message": "string"
}
}
409 — Request conflicts with current state (e.g. already a member or already invited)
{
"error": {
"code": "string",
"message": "string"
}
}