1) Base URL
The API is hosted at:
All endpoints below are relative to that server.
2) Authentication
The API uses an API key in the Authorization header:
Security scheme:
AccessTokentype: apiKeyin: headername: Authorization
Example header
-H "Authorization: Bearer $ENTERPRISE_TOKEN"
(If your token format does not use Bearer, send it in the exact format required by your environment—the spec only requires the Authorization header.)
3) Key Resources
Enterprise
An Enterprise groups multiple platform Accounts (child orgs). It includes an array of accounts.
Account (child org)
Accounts have core fields like:
account_id,enterprise_idcompany,owneremailplan.typeretentionand/orquota.retentionstatus(active,deactivated,pending)plus newer fields such as
external_id,created,meta, andowner(an account-owner object).
4) Endpoints
A) Get an Enterprise and all child Accounts
GET /v3/enterprise
Use case: Load enterprise profile + list of child accounts.
curl:
curl -sS \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ "https://api.eu.mezmo.com/v3/enterprise"
B) Retrieve a specific child account (by account_id)
GET /v3/enterprise/account/{account_id}
Use case: Fetch a single account record (useful after creates/updates, or for audits).
curl:
curl -sS \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ "https://api.eu.mezmo.com/v3/enterprise/account/$ACCOUNT_ID"
C) Create a new Enterprise child account (single create)
POST /v3/enterprise/account
Use case: Create one new child account.
Body fields (common):
company(string)owneremail(email)external_id(string, optional)plan.type(string)retention(0–90)enable_syslog(boolean; default false)
curl:
curl -sS -X POST \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ -H "Content-Type: application/json" \ "https://api.eu.mezmo.com/v3/enterprise/account" \ -d '{ "company": "Example Inc.", "owneremail": "[email protected]", "external_id": "crm-12345", "plan": { "type": "enterprise" }, "retention": 30, "enable_syslog": false }'D) Bulk account operations (CREATE / UPDATE / DELETE)
PATCH /v3/enterprise/account
Use case: Perform up to 100 account operations in one request.
Content-Type
This endpoint uses a bulk media type:
Content-Type: application/x-bulk+json
Request body shape
{ "operations": [ ... ] }operationsmust contain 1–100 items.
Each operation includes:
operation_id(string) andaction(enumCREATE|UPDATE|DELETE)
Response shape
Overall
data.status:SUCCEEDED,FAILED, orPARTIALdata.operations[]contains per-operation results including:operation_id,action, optionalentity_id, optionalentity, andresultwithstatus,detail,context[].
Example: bulk create + update + delete
curl -sS -X PATCH \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ -H "Content-Type: application/x-bulk+json" \ "https://api.eu.mezmo.com/v3/enterprise/account" \ -d '{ "operations": [ { "operation_id": "op-1", "action": "CREATE", "entity": { "company": "Acme Co", "owneremail": "[email protected]", "external_id": "crm-acme-01", "plan": { "type": "enterprise" }, "retention": 14, "enable_syslog": true } }, { "operation_id": "op-2", "action": "UPDATE", "entity_id": "98855cc6ff2b8c63001a9eb0", "entity": { "retention": 30 } }, { "operation_id": "op-3", "action": "DELETE", "entity_id": "0abd6cc9d7885e6a2632bddf" } ] }'E) Attach (link) an existing account under the enterprise
PATCH /v3/enterprise/account/{account_id}/attach
Use case: “Move” an existing standalone customer account under the enterprise, optionally changing plan/owner.
Body
plan(string; defaults to"enterprise"in the schema)owner(email string)
curl:
curl -sS -X PATCH \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ -H "Content-Type: application/json" \ "https://api.eu.mezmo.com/v3/enterprise/account/$ACCOUNT_ID/attach" \ -d '{ "plan": "enterprise", "owner": "[email protected]" }'F) Detach (unlink) a child account from the enterprise
PATCH /v3/enterprise/account/{account_id}/detach
Use case: Remove a specific account from the enterprise; the spec notes it will become an independent account and be downgraded to a trial account once complete.
curl:
curl -sS -X PATCH \ -H "Authorization: Bearer $ENTERPRISE_TOKEN" \ "https://api.eu.mezmo.com/v3/enterprise/account/$ACCOUNT_ID/detach"
5) Error Handling (All Endpoints)
Responses include normalized error types such as:
validation-errorfor input validation failures (400)http-errorfor auth/rate limit/server errors (401/429/5XX/4XX)
Practical guidance
400: look for validation details (field-level issues).
401: verify the
Authorizationtoken.429: retry with backoff.
5XX: retry with backoff and capture error
code/messagefor support.
6) Common Usage Flows
Flow 1: Inventory enterprise accounts
GET /v3/enterprise→ readdata.accounts[]
Flow 2: Create many accounts (fast provisioning)
PATCH /v3/enterprise/accountwithContent-Type: application/x-bulk+jsonand multipleCREATEopsCheck overall
statusand per-op results for failures/partials
Flow 3: M&A / consolidation (attach existing accounts)
PATCH /v3/enterprise/account/{account_id}/attachwith newownerand/orplan
Flow 4: Spin-out (detach)
PATCH /v3/enterprise/account/{account_id}/detach
If you want, I can also turn this into a “developer quickstart” format (Auth + 6 copy/paste curl commands + sample bulk request/response) or a customer-facing admin guide.
