Create organization and initial owner invitation
Creates a new customer organization under the specified partner (MSP), creates its owner invitation record, and attempts to send the invitation email.
The organization gets the selected plan and is linked to the partner by partnerId.
SMAO invites owner.email; email delivery is not guaranteed. Once the owner accepts,
they have full product access but cannot manage billing or subscriptions.
externalCustomerId must be unique across all your organizations, not just per partner.
It protects against duplicates: repeating a create with the same value returns
DUPLICATE_EXTERNAL_CUSTOMER_ID instead of a second organization. The literal strings
undefined and null are rejected with VALIDATION_ERROR.
If partnerId does not reference an active partner of yours, the request answers
404 PARTNER_NOT_FOUND.
Authorization
DistributorApiKey Long-lived distributor API key, scoped to your distributor account.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/organizations" \ -H "Content-Type: application/json" \ -d '{ "organization": { "name": "Acme GmbH", "timezone": "Europe/Berlin" }, "owner": { "email": "owner@example.com", "firstName": "Alice", "lastName": "Müller" }, "externalCustomerId": "CUST-4711", "partnerId": "665abc123def456789012345", "plan": { "slug": "advanced", "commitment": "monthly" } }'{ "status": "success", "organization": { "id": "69c175970f3e28310926a1aa", "name": "Acme GmbH", "industry": "IT Services", "timezone": "Europe/Berlin", "channelPartner": "acme", "externalCustomerId": "CUST-4711", "externalContractId": "CON-2026-0001", "partnerId": "665abc123def456789012345", "ownerEmail": "owner@acme.de", "createdAt": "2026-03-23T17:17:11.605Z", "plan": { "id": "6967b1c7138bed3e7f6bf7e6", "slug": "advanced", "name": "Advanced", "commitment": "monthly", "currency": "EUR", "baseFee": 6900 } }, "owner": { "email": "owner@acme.de", "firstName": "Alice", "lastName": "Müller", "role": "admin", "status": "invited", "source": "distributor-api", "invitationId": "69c175970f3e28310926a1bb", "expiresAt": "2026-03-30T17:17:11.814Z" }}