Spring BME Subscriptions API

Base URL: /platform/api/v1/spring_bme/subscriptions

Authentication

All requests require a Platform App API token in the header:

api_access_token: <platform_app_token>

Endpoints

1. Create Subscription

POST /platform/api/v1/spring_bme/subscriptions

Creates a new account, reactivates a suspended one, or updates an existing active account based on partner_id lookup.

Behavior:

Scenario Action Sync Event
No account with partner_id Creates new account + user account_created
Suspended account with partner_id Reactivates, updates plan/limits account_reactivated
Active account with partner_id Updates limits (clamped to current usage) account_updated

Limit clamping (active account): agent_limit will never be set below the current number of account users, and inbox_limit will never be set below the current number of inboxes. This prevents breaking existing resources.

Required params:

Param Type Description
account_name string Account display name
user_name string Admin user name
user_email string Admin user email
partner_id string Unique BME partner identifier
plan string One of: personal, startup, team, business
agent_limit integer Max agents allowed
inbox_limit integer Max inboxes allowed

Optional params:

Param Type Description
password string User password. Auto-generated if not provided. If provided for existing user, updates their password.

Response (200):

{
  "account": {
    "id": 1,
    "name": "BME Test Account",
    "plan": "startup",
    "status": "active",
    "partner_id": "bme-partner-123",
    "limits": { "agents": 5, "inboxes": 10 },
    "features": { "help_center": true, "macros": false, "team_management": false }
  },
  "user": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "password": "generated_or_provided_password"
  },
  "reactivated": false
}
  • reactivated: true when a suspended account was reactivated, false otherwise.
  • password: The plaintext password (auto-generated or the one you provided). Only returned on create/reactivate calls.

Error (422):

{ "error": "Missing required params: partner_id, plan" }

2. Show Subscription

GET /platform/api/v1/spring_bme/subscriptions/:id

Returns account details and admin user. Only works for BME-managed accounts (those with a partner_id).

Response (200):

{
  "account": {
    "id": 1,
    "name": "BME Test Account",
    "plan": "startup",
    "status": "active",
    "partner_id": "bme-partner-123",
    "limits": { "agents": 5, "inboxes": 10 },
    "features": { "help_center": true }
  },
  "user": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com"
  }
}

Error (403):

{ "error": "Not a BME-managed account" }

3. Update Subscription

PATCH /platform/api/v1/spring_bme/subscriptions/:id

Updates account attributes. All params are optional. Only works for BME-managed accounts.

Optional params:

Param Type Description
account_name string New account name
plan string New plan (personal, startup, team, business). Changing plan re-applies features.
status string active or suspended
agent_limit integer New agent limit
inbox_limit integer New inbox limit

Response (200):

{
  "account": {
    "id": 1,
    "name": "Updated Name",
    "plan": "team",
    "status": "active",
    "partner_id": "bme-partner-123",
    "limits": { "agents": 20, "inboxes": 50 },
    "features": { "help_center": true, "macros": true, "team_management": true }
  }
}

Sync events emitted:

Status change Event
Active -> Suspended account_suspended
Suspended -> Active account_reactivated
Other account_updated

4. Delete (Suspend) Subscription

DELETE /platform/api/v1/spring_bme/subscriptions/:id

Suspends the account. Does not delete data. Only works for BME-managed accounts.

Response: 200 OK (empty body)

Sync event: account_suspended


Plan Features Matrix

Feature Personal Startup Team Business
help_center - + + +
macros - - + +
team_management - - + +
agent_management - - + +
channel_website - - + +
custom_reply_email - - - -
custom_reply_domain - - - -
channel_call - - - -