DocsOpen Moon AI
Browse the docs

Organizations API

Connect a directory, HR software or script to a Moon AI organization: admin API, webhooks, SCIM 2.0, single sign-on and workspace keys.

On this page

An organization can also be run from code. Five tools are available, each with its own key and URL. They all apply to a team workspace; a personal workspace has none of them.

Which tool for which needLink to the Which tool for which need section

NeedToolAuthentication
Manage members, invitations, groups, roles, labels, rules, models, licenses and resources; read usage and the audit logAdmin APIAdmin key moai_adm_…
Get notified when a member joins or leaves, a license pool is full, the rules change or the contract nears its endWebhooksHMAC signature with a whsec_… secret
Create, suspend and remove accounts from your directory, and keep groups in sync thereSCIM 2.0moai_scim_… token
Let members sign in with your organization’s credentialsSingle sign-onOpenID Connect application from your identity provider
Use Moon AI chat on behalf of a workspaceWorkspace keysmoai_org_… key

The SCIM directory only adds addresses from a verified domain, and single sign-on can only be made mandatory once at least one domain is verified. To call the models from your own programs, with a wallet and pay-as-you-go billing, use the developer API instead.

URLsLink to the URLs section

ServiceURL
Admin API and webhookshttps://chat.realmoon.ai/api/v1/orgs/{org_id}/
OpenAPI description of the admin APIhttps://chat.realmoon.ai/api/v1/orgs/openapi.json
SCIM 2.0https://chat.realmoon.ai/api/v1/orgs/scim/v2
Single sign-on redirect URLhttps://chat.realmoon.ai/api/v1/orgs/sso/callback
Chat with a workspace keyhttps://chat.realmoon.ai/api/chat/completions

The organization ID (org_id) is in the admin console › “API and keys”, on the “Getting started” card, in the “First call” example.

Get started with the admin APILink to the Get started with the admin API section

  1. Create an admin key with only the scopes your program needs.
  2. Check it with GET /me.
  3. Call the routes for the area you need, for example list members or invite people.
  4. Subscribe your server to webhooks instead of polling the API.

Shared securityLink to the Shared security section

  • Each key and each token only acts on its own organization. A request to another organization gets the same response as a resource that does not exist.
  • An admin key never has more rights than the person who created it, and stops working when that person leaves the organization.
  • Keys, tokens and secrets are shown only once, when they are created. Treat them like passwords and keep them server-side only.
  • Every action taken by a key or by the directory is recorded in the organization’s audit log, under the name of the key or the directory.

In this section

Admin API

Directory and sign-in

Workspace keys

Moon AI

Moon AI in action

0:00

Explore

Screenshots of chat.realmoon.ai taken on October 29, 2026, with fictional data.

Moon AI

Your preferences

Visits counted without cookies.

Our server counts visits without cookies or trackers. Your theme and your answer about ad measurement are remembered on this device.

Ad measurement

With your consent, our ad networks’ trackers (Google) measure our ads, from the visit to the sign-up and then to the first subscription and its amount, and may show you our ads. Your answer is valid for 13 months; you can change it here at any time.

No answer saved on this device.

After you decline, no tag is loaded anymore and the site deletes the cookies they had set on realmoon.ai. Those on the ad networks’ own domains are managed with them or in your browser.

The Moon AI app has its own privacy settings.