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 or reactivates a subscription for the given partner_id.

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

Optional params:

Param Type Description
plan string One of: personal, startup, team, business. Defaults to startup.
agent_limit integer Max agents. Defaults to plan value.

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"
  }
}

Error (422):

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

2. Show Subscription

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

Returns account details and admin user. The URL identifier is the BME 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 (404):

{ "error": "Subscription not found" }

3. Update Subscription

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

Updates account attributes. The URL identifier is the BME partner_id. All body params are optional.

Optional params:

Param Type Description
account_name string New account name
plan string New plan (personal, startup, team, business)
status string active or suspended
agent_limit integer New agent 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 }
  }
}

4. Delete (Suspend) Subscription

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

Suspends the account. Does not delete data. The URL identifier is the BME partner_id.

Response: 200 OK (empty body)