Skip to Content
End-user Organizations

End-user Organizations

End-user organizations (end-user orgs) give your application’s users a way to collaborate as a team under a shared billing plan. Each org has a seat limit, and usage is metered at the org level rather than per individual user.

Key Concepts

  • Seat-based billing: Organizations are billed by seat count. A billing plan assigns a seat_limit, and active members occupy seats.
  • Seat enforcement: seat_enforcement_mode controls what happens when the seat limit is reached — hard blocks new members, soft allows over-provisioning with a warning.
  • Domain auto-join: When enabled, users who sign up with a matching verified domain are automatically added to the org.
  • Roles: Members have a role (owner, admin, or member) and a status (active, pending, invited, suspended).

Organization Endpoints

Create an organization

POST /v1/end-user-orgs

{ "name": "Acme Corp", "billing_plan_id": "plan-uuid", "seat_limit": 25, "seat_enforcement_mode": "hard", "domain_auto_join_enabled": false, "settings": {} }

All fields except name are optional.

List organizations

GET /v1/end-user-orgs

Returns all organizations the authenticated user belongs to.

Get an organization

GET /v1/end-user-orgs/:id

Update an organization

PATCH /v1/end-user-orgs/:id

Send only the fields you want to change:

{ "name": "Acme Corp (renamed)", "domain_auto_join_enabled": true }

Delete an organization

DELETE /v1/end-user-orgs/:id

Organization fields

FieldTypeDescription
iduuidOrg identifier
organization_iduuidBuilder org this belongs to
application_iduuidApplication this belongs to
namestringDisplay name
slugstringURL-safe identifier
billing_plan_iduuidActive billing plan
stripe_subscription_idstringStripe subscription reference
seat_limitintegerMaximum number of active members
seat_countintegerCurrent active member count
seat_enforcement_modestringhard or soft
domain_auto_join_enabledbooleanAuto-add users by verified domain
settingsobjectArbitrary org-level settings
created_attimestamp
updated_attimestamp

Member Management

Add a member

POST /v1/end-user-orgs/:id/members

{ "user_id": "user-uuid", "role": "member" }

role defaults to member if omitted. Returns 409 if the user is already a member.

List members

GET /v1/end-user-orgs/:id/members

Update a member’s role

PATCH /v1/end-user-orgs/:id/members/:member_id/role

{ "role": "admin" }

Approve a pending member

POST /v1/end-user-orgs/:id/members/:member_id/approve

Moves a member from pending to active status. Requires admin or owner role.

Remove a member

DELETE /v1/end-user-orgs/:id/members/:member_id

Member fields

FieldTypeDescription
iduuidMembership record identifier
end_user_org_iduuidParent org
user_iduuidUser reference
rolestringowner, admin, or member
statusstringactive, pending, invited, or suspended
invited_byuuidUser who created the invitation
created_attimestamp
updated_attimestamp

Domain Management

Verified domains enable automatic org membership for users signing up with a matching email domain.

Add a domain

POST /v1/end-user-orgs/:id/domains

{ "domain": "acme.com" }

Returns a verification_record DNS TXT value that must be published before the domain can be verified.

List domains

GET /v1/end-user-orgs/:id/domains

Verify a domain

POST /v1/end-user-orgs/:id/domains/:domain_id/verify

Triggers a DNS lookup for the verification_record TXT entry. Returns 200 with verified: true on success, or 400 if the record is not found.

Remove a domain

DELETE /v1/end-user-orgs/:id/domains/:domain_id

Domain fields

FieldTypeDescription
iduuidDomain record identifier
end_user_org_iduuidParent org
domainstringDomain name (e.g., acme.com)
verifiedbooleanDNS verification status
verification_recordstringTXT value to publish for verification
created_attimestamp

Seat Management

Adjust seat limit

PATCH /v1/end-user-orgs/:id/seats

{ "seat_limit": 50 }

Increasing seats on a metered plan triggers a Stripe proration. Use the preview endpoint first to show the user the cost.

Get seat usage

GET /v1/end-user-orgs/:id/seats

{ "end_user_org_id": "org-uuid", "seat_limit": 25, "seat_count": 18, "available_seats": 7 }

Preview seat proration

POST /v1/end-user-orgs/:id/seats/preview-proration

{ "seat_limit": 50 }

Returns the prorated charge that would be applied immediately for the current billing period, before any changes are committed.

Last updated on