Customer organizations
GET /orgs/{orgId}/api/v1/admin/organizations
POST /orgs/{orgId}/api/v1/admin/organizations
GET /orgs/{orgId}/api/v1/admin/organizations/{organizationId}
PUT /orgs/{orgId}/api/v1/admin/organizations/{organizationId}
PATCH /orgs/{orgId}/api/v1/admin/organizations/{organizationId}
DELETE /orgs/{orgId}/api/v1/admin/organizations/{organizationId}
GET /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/members
POST /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/members
PUT /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/members/{userId}
PATCH /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/members/{userId}
DELETE /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/members/{userId}
GET /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/roles
POST /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/roles
PUT /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/roles/{roleId}
PATCH /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/roles/{roleId}
DELETE /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/roles/{roleId}
GET /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/invitations
POST /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/invitations
DELETE /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/invitations/{invId}
POST /orgs/{orgId}/api/v1/admin/organizations/{organizationId}/invitations/{invId}/resend
A customer organization is a company whose people sign in to your application: a named group of users inside your LumoAuth organization, with its own members, roles and invitations. Read Customer organizations for what they are and what they share, and the B2B track for a complete setup.
These routes take two different path parameters:
{orgId}is the slug of your LumoAuth organization (acme-corp).{organizationId}names the customer organization: itsid(a UUID) or itsslug.
Authentication
The routes need an API key or a Bearer token with an admin:users:* scope, except the role
routes, which need admin:roles:*. Each route also needs a permission. A session or Bearer caller
must hold the permission; for an API key its creator must still hold it. A missing permission
returns 403 forbidden. See Required permissions.
| Method | Endpoint | Permission | API-key / token scope |
|---|---|---|---|
| GET | /admin/organizations | organizations.view | admin:users:read |
| POST | /admin/organizations | organizations.create | admin:users:write |
| GET | /admin/organizations/{organizationId} | organizations.view | admin:users:read |
| PUT PATCH | /admin/organizations/{organizationId} | organizations.edit | admin:users:write |
| DELETE | /admin/organizations/{organizationId} | organizations.delete | admin:users:write |
| GET | /admin/organizations/{organizationId}/members | organizations.view | admin:users:read |
| POST | /admin/organizations/{organizationId}/members | organizations.members.manage | admin:users:write |
| PUT PATCH | /admin/organizations/{organizationId}/members/{userId} | organizations.members.manage | admin:users:write |
| DELETE | /admin/organizations/{organizationId}/members/{userId} | organizations.members.manage | admin:users:write |
| GET | /admin/organizations/{organizationId}/roles | organizations.view | admin:roles:read |
| POST | /admin/organizations/{organizationId}/roles | organizations.edit | admin:roles:write |
| PUT PATCH | /admin/organizations/{organizationId}/roles/{roleId} | organizations.edit | admin:roles:write |
| DELETE | /admin/organizations/{organizationId}/roles/{roleId} | organizations.edit | admin:roles:write |
| GET | /admin/organizations/{organizationId}/invitations | organizations.view | admin:users:read |
| POST | /admin/organizations/{organizationId}/invitations | organizations.invitations.manage | admin:users:write |
| DELETE | /admin/organizations/{organizationId}/invitations/{invId} | organizations.invitations.manage | admin:users:write |
| POST | /admin/organizations/{organizationId}/invitations/{invId}/resend | organizations.invitations.manage | admin:users:write |
Giving someone the owner role (as a member or in an invitation) needs more than
organizations.members.manage or organizations.invitations.manage: the caller must also hold
organizations.edit or be an owner of that customer organization. Otherwise the answer is 403.
The Customer organizations pages of the portal work on every plan. To call these routes from your own code with an API key or an access token, you need a plan that includes the Admin API. Your plan also sets how many customer organizations you can have. See the pricing matrix.
The Organization Object
{
"data": {
"id": "019d6190-c4f1-7a52-9e0b-3d8f6a2b1c77",
"slug": "globex",
"name": "Globex",
"displayName": "Globex Corporation",
"description": "Enterprise customer since 2026",
"logoUrl": "https://cdn.globex.example/logo.png",
"isActive": true,
"memberCount": 42,
"metadata": { "crmId": "0017Q00000abc" },
"createdAt": "2026-03-02T09:15:00+00:00",
"updatedAt": "2026-06-11T14:02:31+00:00"
}
}
| Field | Type | Notes |
|---|---|---|
id | string (UUID) | Set by LumoAuth |
slug | string | 2 to 80 characters: lowercase letters, digits and hyphens, not starting with a hyphen. Unique in your organization. It appears in the customer portal address (/b2b/{orgId}/{slug}) and is accepted as {organizationId} |
name | string | 1 to 100 characters |
displayName | string or null | Up to 255 characters. Shown instead of name where set, for example in invitation emails |
description | string or null | Free text |
logoUrl | string or null | An absolute https:// address |
isActive | boolean | false deactivates the organization: see Deactivating an organization |
memberCount | integer | Read only |
metadata | object or null | Your own JSON data. LumoAuth stores it and does not read it |
createdAt, updatedAt | string (ISO 8601) | updatedAt is null until the first change |
List Organizations
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations?search=glob&isActive=true" \
-H "Authorization: ApiKey lmk_abc123"
| Query parameter | Notes |
|---|---|
page, limit | See Pagination. limit is at most 100 (default 25) |
search | Only organizations whose name or slug contains this text, in upper or lower case |
isActive | true or false |
The answer is the shared list envelope (data, meta, pagination, resourceType: "organizations"), newest first.
Create an Organization
curl -X POST "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{
"name": "Globex",
"slug": "globex",
"displayName": "Globex Corporation",
"metadata": { "crmId": "0017Q00000abc" }
}'
name is required. slug, displayName, description, logoUrl, metadata and isActive
(default true) are optional. Without a slug, one is made from the name. Every new organization
gets three built-in roles: Owner, Admin and Member (the default role).
Answers 201 with the organization object.
| Status | When |
|---|---|
400 invalid_request | name missing, empty or longer than 100 characters; a slug that does not fit the rule; a displayName longer than 255 characters; a logoUrl that is not an absolute https:// address |
403 plan_limit_reached | Your plan does not allow another customer organization |
409 conflict | The slug is taken |
Get an Organization
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex" \
-H "Authorization: ApiKey lmk_abc123"
Answers 404 not_found when no customer organization of your organization has this id or slug.
Update an Organization
curl -X PATCH "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{ "displayName": "Globex Inc.", "isActive": false }'
PUT and PATCH behave the same way: only the fields that you send change. The fields are those
of Create. Setting isActive to false signs the members out of the
applications that they use through this organization. The errors are those of Create, and 404
for an unknown organization. An empty slug is refused with 400 invalid_request; leave the field
out to keep the current slug.
Delete an Organization
curl -X DELETE "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex" \
-H "Authorization: ApiKey lmk_abc123"
Deletes the organization with its memberships, roles and invitations. The user accounts stay.
The members are signed out of it as on deactivation: the access and refresh tokens that were
issued through the organization stop working at once. Answers 200 with
{"message": "Organization deleted"}.
Members
The Member Object
{
"id": 311,
"user": { "id": "019d6190-9bba-7b5f-a0a5-07a6d10184d2", "email": "jane@globex.example", "name": "Jane Doe" },
"role": { "id": 87, "slug": "admin", "name": "Admin" },
"status": "active",
"joinedAt": "2026-03-02T09:20:00+00:00"
}
status is active or suspended. {userId} in a member address is the user's id (a UUID).
List Members
GET …/organizations/{organizationId}/members returns the shared list envelope
(resourceType: "members"), oldest member first. Query parameters: page, limit, search
(email or name contains the text, in upper or lower case) and status (active or suspended).
Add a Member
curl -X POST "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex/members" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{ "userId": "019d6190-9bba-7b5f-a0a5-07a6d10184d2", "roleId": 87 }'
Adds an existing user of your organization directly, without an invitation. userId is required.
roleId is optional: without it the organization's default role applies. Answers 201 with the
member object.
| Status | When |
|---|---|
400 invalid_request | userId missing |
403 forbidden | The role is the owner role and the caller may not grant it |
404 not_found | No such organization, no user with this id in your organization, or no such role in this customer organization |
409 conflict | The user is already a member |
Update a Member
curl -X PATCH "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex/members/019d6190-9bba-7b5f-a0a5-07a6d10184d2" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{ "roleId": 86, "status": "active" }'
Send roleId, status (active or suspended) or both. Suspending a member signs them out of
the applications that they use through this organization. Answers 200 with the member object.
A member who holds the owner role is changed only by a caller who may grant that role: an owner
of this customer organization, or a holder of organizations.edit. The same rule applies to
removing an owner and to resending or revoking an invitation to become owner.
| Status | When |
|---|---|
400 invalid_request | status is not active or suspended |
403 forbidden | The new role is the owner role, or the member holds the owner role now, and the caller may not grant it |
404 not_found | No such organization, member or role |
422 validation_error | The change would leave the organization without an active owner (demoting or suspending the last owner) |
Remove a Member
DELETE …/organizations/{organizationId}/members/{userId} ends the membership and signs the user
out of the applications that they used through this organization. The account stays. Answers
200, 404 for an unknown organization or user, and 422 when the user is not a member or is
the last owner. Removing an owner answers 403 for a caller who may not grant the owner role.
Roles
An organization role is a name. LumoAuth attaches no permissions to it: the role's slug reaches
your application as the org_role claim, and your application decides what each role allows.
The Role Object
{
"id": 87,
"slug": "billing_admin",
"name": "Billing admin",
"description": "Manages invoices",
"isDefault": false,
"isOwner": false,
"isSystem": false
}
id is an integer and {roleId} takes that number only. The three built-in roles (owner,
admin, member) have isSystem: true and cannot be changed or deleted. Exactly one role is the
default role for new members and invitations.
List Roles
GET …/organizations/{organizationId}/roles returns every role of the organization, built-in
roles first, then by name. The answer has data and a pagination object for one page; it takes
no page or limit.
Create a Role
curl -X POST "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex/roles" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{ "name": "Billing admin", "slug": "billing_admin", "description": "Manages invoices" }'
name (1 to 100 characters) and slug are required. The slug has 2 to 40 characters: lowercase
letters, digits, hyphens and underscores. It cannot be changed later. description (up to 1,000
characters) and isDefault are optional; isDefault: true makes this role the default role.
Answers 201 with the role object.
| Status | When |
|---|---|
400 invalid_request | A missing field, a slug that does not fit the rule, a name or description that is too long |
404 not_found | No such organization |
409 conflict | The organization already has a role with this slug (this includes owner, admin and member) |
Update a Role
PUT or PATCH …/organizations/{organizationId}/roles/{roleId} with any of name,
description and isDefault. isDefault: false on the default role gives the default back to
the built-in Member role. Answers 200 with the role object, 404 for an unknown organization
or role, and 422 for a built-in role or a value that does not fit.
Delete a Role
DELETE …/organizations/{organizationId}/roles/{roleId} deletes a custom role. Its members get the
built-in Member role. Answers 200, 404 for an unknown organization or role, and 422 for a
built-in role.
Invitations
The Invitation Object
{
"id": 1290,
"email": "new.person@globex.example",
"role": { "id": 88, "slug": "member" },
"status": "pending",
"invitedBy": "019d6190-a2c4-7d10-8f3e-5b9c2e7f4a61",
"createdAt": "2026-06-11T14:05:00+00:00",
"expiresAt": "2026-06-18T14:05:00+00:00"
}
status is pending, accepted or revoked. A pending invitation can be accepted until
expiresAt, 7 days after it was sent. After that date it keeps the status pending, so compare
expiresAt with the current time. role is null when the invitation was sent without one:
the default role then applies when it is accepted. invitedBy is the id of the user who sent it.
List Invitations
GET …/organizations/{organizationId}/invitations returns every invitation of the organization,
newest first, with data and a pagination object for one page. Add ?status=pending (or
another status) to filter.
Send an Invitation
curl -X POST "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/organizations/globex/invitations" \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{ "email": "new.person@globex.example", "roleId": 88, "message": "Welcome to the Globex workspace" }'
| Field | Notes |
|---|---|
email | Required. The address is stored in lower case. A pending invitation to the same address in this organization is replaced |
roleId | Optional. A role of this customer organization |
message | Optional. A personal note for the email, up to 500 characters |
skipEmail | Optional, default false. true stores the invitation without sending the email. The link is sent only by email, so send it later with Resend |
The invited person accepts from the link in the email, with an existing account or by creating
one in your organization. Answers 201 with the invitation object.
| Status | When |
|---|---|
400 invalid_request | email missing or not an email address, a roleId that names no role of this organization, a message longer than 500 characters |
403 forbidden | The role is the owner role and the caller may not grant it |
403 plan_limit_reached | limit: mau: the address has no account in your organization, and on the Developer plan every monthly-active-user place of the month is used |
404 not_found | No such organization |
429 | Your organization sent too many invitations in the last hour, or this address was invited too many times. Wait and try again |
Resend or Revoke an Invitation
POST …/organizations/{organizationId}/invitations/{invId}/resendsends a new link (the old one stops working) and starts a new 7-day period. Only apendinginvitation can be resent (422otherwise). For an address without an account, the resend answers403 plan_limit_reached(limit: mau) while every monthly-active-user place of the Developer plan is used.DELETE …/organizations/{organizationId}/invitations/{invId}revokes the invitation: its link stops working.
{invId} is the invitation's integer id. Both answer 404 when the invitation does not belong
to this customer organization, and 403 when the invitation carries the owner role and the caller
may not grant it.
Errors
Errors use the Admin API envelope {"error": "…", "message": "…", "status": …}; see
Errors. An {organizationId}, {roleId} or {invId} that cannot be an id of its
type answers 404 not_found, like an unknown one.
Events
Changes reach your webhooks as organization.created, organization.updated,
organization.deleted, organization.member.added, organization.member.removed,
organization.member.updated and organization.invitation.accepted. The
audit log records them too, together with role changes
(organization.role_created, organization.role_updated, organization.role_deleted).