SMAO API Documentation
Partners

Create partner

Creates a new partner (MSP) and automatically provisions a SMAO organization for them.

Side effects:

  • A new internal SMAO organization is created with the partner's name and billing managed by the distributor.
  • A free trial is attempted when a trial plan is available; trial setup is best-effort.
  • If contactEmail is provided, invitation creation and email delivery are attempted as best-effort side effects.
  • The partner's organizationId in the response references this auto-created organization.

After dashboard access is established, the MSP can create customer organizations from the UI.

POST
/partners
AuthorizationBearer <token>

Long-lived distributor API key scoped to a channel partner on the shared smao instance.

In: header

namestring

Display name of the partner (MSP).

Length1 <= length <= 255
externalPartnerIdstring

Your unique identifier for this partner. Must be unique within your distributor scope.

Length1 <= length <= 255
contactEmail?string

Primary contact email for this partner.

Formatemail
Lengthlength <= 255
contactName?string

Primary contact name.

Length1 <= length <= 255
notes?string|null

Internal notes about this partner.

Lengthlength <= 1000
timezone?string

IANA timezone for the partner's internal MSP organization. Defaults to Europe/Berlin.

Lengthlength <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.smao.ai/api/distributor/v1/partners" \  -H "Content-Type: application/json" \  -d '{    "name": "MSP Hamburg GmbH",    "externalPartnerId": "MSP-001"  }'
{
  "status": "success",
  "partner": {
    "id": "665abc123def456789012345",
    "name": "MSP Hamburg GmbH",
    "externalPartnerId": "MSP-001",
    "contactEmail": "[email protected]",
    "contactName": "Hans Mueller",
    "isActive": true,
    "notes": null,
    "organizationId": "665abc123def456789012346",
    "organizationCount": 12,
    "createdAt": "2026-03-20T10:41:14.553Z"
  }
}
{
  "status": "error",
  "errorCode": "INVALID_DATE_RANGE",
  "message": "from and to must be valid YYYY-MM-DD values"
}
{
  "status": "error",
  "errorCode": "INVALID_DATE_RANGE",
  "message": "from and to must be valid YYYY-MM-DD values"
}
{
  "status": "error",
  "errorCode": "INVALID_DATE_RANGE",
  "message": "from and to must be valid YYYY-MM-DD values"
}
{
  "status": "error",
  "errorCode": "INVALID_DATE_RANGE",
  "message": "from and to must be valid YYYY-MM-DD values"
}

{
  "status": "error",
  "errorCode": "RATE_LIMITED",
  "message": "Too many requests for this API key."
}
{
  "status": "error",
  "errorCode": "INVALID_DATE_RANGE",
  "message": "from and to must be valid YYYY-MM-DD values"
}

{
  "status": "error",
  "errorCode": "RATE_LIMIT_UNAVAILABLE",
  "message": "Rate limit storage is unavailable. Try again shortly."
}