SMAO API Documentation
Distributor API v1

Distributor API v1

Manage partners, customer organizations, plans, usage, and billing.

Distributor API v1 lets distributors manage the partners (MSPs) they resell SMAO through, those partners' customer organizations, their plans, and the usage you invoice. Base path: /api/distributor/v1.

The provisioning model

Distributor
  -> Partner (MSP)
      -> Customer organization
  • Create partners through /partners. Each partner gets its own SMAO organization, returned as partner.organizationId, and can onboard customers from the dashboard.
  • Customer organizations link to their MSP with partnerId and carry your externalCustomerId for reconciliation.
  • Assign plans per organization with PATCH /organizations/{organizationId}/plan.

Authentication and behavior

Send the SMAO-issued key as Authorization: Bearer <key>. Errors use the flat { "status": "error", "errorCode", "message" } envelope. Each key has a per-minute limit, 60 requests by default. See Authentication and Errors.

There are no Distributor webhooks; poll for changes.

Things to know

  • /organizations covers customer organizations only. The MSP's own organization is not reachable there; assign its plan with PATCH /partners/{partnerId}/plan.
  • Creating a partner also tries to start a trial and, when contactEmail is given, to send an invitation. Neither is guaranteed, so check dashboard access afterwards.
  • A partner cannot be deleted while it has customer organizations or its MSP organization. There is no cascade delete.

API reference

Start with the quickstart. The reference below is generated from the OpenAPI spec, which is served at SMAO_API_URL/api/distributor-docs/v1/openapi.yaml.

On this page