Organizations
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
Organizations
Organizations model B2B tenancy: a set of members with roles, optional email-domain auto-join, a security policy, and (for B2B2B) a parent/child hierarchy.
{
"object": "organization",
"id": "org_9f…",
"name": "Acme",
"slug": "acme",
"image_url": null,
"public_metadata": {},
"max_allowed_memberships": 100,
"created_by": "user_2a…",
"created_at": 1757000000000,
"updated_at": 1757600000000
}Core endpoints
Method & path | Scope | Notes |
|---|---|---|
|
| List, cursor-paginated |
|
| Create + seat the creator as admin |
|
| Never includes |
|
| Update name/slug/image/seat cap/metadata. Emits |
|
| Delete; memberships + invitations cascade. idempotent |
|
| Replace metadata bags wholesale. idempotent |
|
| Set |
|
| Set/clear parent (B2B2B); refuses a cycle |
|
| Ancestor chain + direct children |
|
| Resolved plan + feature keys |
Memberships
Method & path | Scope | Notes |
|---|---|---|
|
| Members with roles |
|
| Add an existing user with a role (seat cap enforced). idempotent |
|
| Change a role. Demoting the last admin → |
|
| Remove a member. Removing the last admin → |
Invitations
Method & path | Scope | Notes |
|---|---|---|
|
| Invitations with roles + status |
|
| Invite an email to an org (expires in 7 days) |
|
| Revoke a pending invitation |
Email domains (auto-join)
Method & path | Scope | Notes |
|---|---|---|
|
| Claimed domains + verification state |
|
| Claim a domain; returns the DNS TXT record to publish. idempotent |
|
| Check the TXT record now, mark verified |
|
| Remove a claimed domain |
Group → role grants
Directory groups (from SCIM) can be granted an org role; members inherit its permissions (augment-only).
Method & path | Scope |
|---|---|
|
|
|
|
Examples
curl https://api.atlas.dev/v1/organizations \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"Acme","slug":"acme","created_by":"user_2a"}'const org = await atlas.organizations.create({ name: 'Acme', slug: 'acme', created_by: 'user_2a' });
await atlas.organizations.memberships.add(org.id, { user_id: 'user_zoe', role: 'org:member' });
await atlas.organizations.memberships.update(org.id, 'user_zoe', { role: 'org:admin' });
// Claim a domain for auto-join, then verify after publishing the TXT record
const domain = await atlas.organizations.domains.create(org.id, { domain: 'acme.com', auto_join: true });
console.log(domain.verification); // { record_name, record_type: 'TXT', record_value }
await atlas.organizations.domains.verify(org.id, domain.id);
// Enforce MFA + SSO for the org
await atlas.organizations.updatePolicy(org.id, { requireMfa: true, ssoRequired: true });