SubscriberAPI.io

Api

API Documentation

The SubscriberAPI.io API lets you manage subscribers, plans, licenses, meters, and custom fields through a secure JSON interface. All requests must be made over HTTPS and include a Bearer token.

Authentication

Include Authorization: Bearer YOUR_API_KEY on every request.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://subscriberapi.io/api/subscribers

Subscribers

  • POST /api/subscribers — Create a subscriber
  • GET /api/subscribers — List subscribers
  • GET /api/subscribers/{id} — Get subscriber
  • PATCH /api/subscribers/{id} — Update subscriber
  • DELETE /api/subscribers/{id} — Delete subscriber

Supports metadata for arbitrary key/value pairs and references to custom fields.

Plans

  • POST /api/plans — Create a plan
  • GET /api/plans — List plans
  • GET /api/plans/{id} — Get plan
  • PATCH /api/plans/{id} — Update plan
  • DELETE /api/plans/{id} — Delete plan

Include features arrays or attach custom field definitions for plan-specific data.

Licenses

  • POST /api/licenses — Issue a license
  • GET /api/licenses/{key} — Get license
  • POST /api/licenses/activate — Activate license

Store notes, seats, and optional device_id.

Meters

  • POST /api/meters/record — Record usage
  • GET /api/meters/summary — Usage summary

Ideal for actions like projects.create or exports.run—drive quota UI and billing.

Custom Fields

Define reusable schema fields to attach to subscribers or plans. Great for storing structured business data without schema changes.

Endpoints

  • POST /api/custom-fields — Create a field
  • GET /api/custom-fields — List fields
  • GET /api/custom-fields/{key} — Get field
  • PATCH /api/custom-fields/{key} — Update field
  • DELETE /api/custom-fields/{key} — Delete field

Field model

  • key (string, unique)
  • label (string)
  • type (string: string | number | boolean | json)
  • scope (string: subscriber | plan)
  • required (boolean)
  • default (optional)

Create a field

POST /api/custom-fields
{
  "key": "team_size",
  "label": "Team Size",
  "type": "number",
  "scope": "subscriber",
  "required": false,
  "default": 1
}

Using the field

PATCH /api/subscribers/sub_123
{
  "metadata": {
    "team_size": 12
  }
}

Response Format

Responses are JSON objects. Example (subscriber):

{
  "id": "sub_ab12cd34ef56",
  "email": "customer@example.com",
  "name": "Jane Doe",
  "plan_id": "plan_basic",
  "metadata": { "team_size": 12 },
  "created_at": 1713027842
}