SMAO API Documentation
Partners

Delete partner

Deletes a partner only when it has no linked customer organizations and no internal MSP organization. Partners created through v1 normally have an internal organization, so this operation returns 409 PARTNER_HAS_ORGANIZATIONS until that organization has been removed outside this endpoint. There is no cascade delete.

DELETE
/partners/{partnerId}
AuthorizationBearer <token>

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

In: header

Path Parameters

partnerIdstring

MongoDB ObjectId of the partner (MSP).

Match^[a-fA-F0-9]{24}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://api.smao.ai/api/distributor/v1/partners/string"
{
  "status": "success",
  "message": "Partner deleted."
}
{
  "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": "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."
}