Organizations
All resources (agents, chats, tools) are scoped to an organization. A user can belong to multiple organizations.
List organizations
GET /api/orgs
Authorization: Bearer nxr_...Create organization
POST /api/orgs
Authorization: Bearer nxr_...
Content-Type: application/json
{ "name": "Engineering", "icon": "🛠️", "color": "#6366f1" }Update organization
PATCH /api/orgs/{org_id}
Authorization: Bearer nxr_...
Content-Type: application/json
{ "name": "Platform Engineering" }Delete organization
DELETE /api/orgs/{org_id}
Authorization: Bearer nxr_...Owner only.
Members
List members
GET /api/orgs/{org_id}/members
Authorization: Bearer nxr_...Response:
[
{
"user_id": "uuid",
"email": "user@example.com",
"full_name": "Alice",
"role": "owner | admin | member",
"joined_at": "2026-01-01T00:00:00Z"
}
]Update member role
PATCH /api/orgs/{org_id}/members/{user_id}
Authorization: Bearer nxr_...
Content-Type: application/json
{ "role": "admin" }Roles: owner, admin, member.
Remove member
DELETE /api/orgs/{org_id}/members/{user_id}
Authorization: Bearer nxr_...Leave organization
POST /api/orgs/{org_id}/leave
Authorization: Bearer nxr_...Invitations
Create invite
POST /api/orgs/{org_id}/invites
Authorization: Bearer nxr_...
Content-Type: application/json
{
"email": "newuser@example.com",
"role": "member"
}Returns an invite token that can be sent to the recipient.
Accept invite
POST /api/orgs/accept-invite
Authorization: Bearer nxr_...
Content-Type: application/json
{ "token": "invite-token" }Validate invite (unauthenticated)
GET /api/orgs/invite/{token}Returns org name and role — useful to show users what they are joining before they register.