Skip to main content

Mezmo Enterprise Service API Guide (v3)

This article explains how to authenticate and call the endpoints defined in the attached OpenAPI spec for Mezmo’s enterprise-service (an HTTP service for managing Enterprise operations, including Enterprise details and child Accounts).


1) Base URL

The API is hosted at:

  • https://api.eon.mezmo.com

All endpoints below are relative to that server.


2) Authentication

The API uses an API key in the Authorization header:

  • Security scheme: AccessToken

  • type: apiKey

  • in: header

  • name: Authorization

Example header

-H "Authorization: Token $ENTERPRISE_TOKEN"

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_id

  • company, owneremail

  • plan.type

  • retention and/or quota.retention

  • status (active, deactivated, pending)

  • plus newer fields such as external_id, created, meta, and owner (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: Token $ENTERPRISE_TOKEN" \   "https://api.eon.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: Token $ENTERPRISE_TOKEN" \   "https://api.eon.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: Token $ENTERPRISE_TOKEN" \   -H "Content-Type: application/json" \   "https://api.eon.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": [ ... ] }
  • operations must contain 1–100 items.

Each operation includes:

  • operation_id (string) and action (enum CREATE|UPDATE|DELETE)

Response shape

  • Overall data.status: SUCCEEDED, FAILED, or PARTIAL

  • data.operations[] contains per-operation results including:

    • operation_id, action, optional entity_id, optional entity, and result with status, detail, context[].

Example: bulk create + update + delete

curl -sS -X PATCH \   -H "Authorization: Token $ENTERPRISE_TOKEN" \   -H "Content-Type: application/x-bulk+json" \   "https://api.eon.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: Token $ENTERPRISE_TOKEN" \   
-H "Content-Type: application/json" \ "https://api.eon.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: Token $ENTERPRISE_TOKEN" \   "https://api.eon.mezmo.com/v3/enterprise/account/$ACCOUNT_ID/detach"

5) Error Handling (All Endpoints)

Responses include normalized error types such as:

  • validation-error for input validation failures (400)

  • http-error for auth/rate limit/server errors (401/429/5XX/4XX)

Practical guidance

  • 400: look for validation details (field-level issues).

  • 401: verify the Authorization token.

  • 429: retry with backoff.

  • 5XX: retry with backoff and capture error code/message for support.


6) Common Usage Flows

Flow 1: Inventory enterprise accounts

  1. GET /v3/enterprise → read data.accounts[]

Flow 2: Create many accounts (fast provisioning)

  1. PATCH /v3/enterprise/account with Content-Type: application/x-bulk+json and multiple CREATE ops

  2. Check overall status and per-op results for failures/partials

Flow 3: M&A / consolidation (attach existing accounts)

  1. PATCH /v3/enterprise/account/{account_id}/attach with new owner and/or plan

Flow 4: Spin-out (detach)

  1. PATCH /v3/enterprise/account/{account_id}/detach


Did this answer your question?