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 subscriberGET /api/subscribers— List subscribersGET /api/subscribers/{id}— Get subscriberPATCH /api/subscribers/{id}— Update subscriberDELETE /api/subscribers/{id}— Delete subscriber
Supports metadata for arbitrary key/value pairs and references to custom fields.
Plans
POST /api/plans— Create a planGET /api/plans— List plansGET /api/plans/{id}— Get planPATCH /api/plans/{id}— Update planDELETE /api/plans/{id}— Delete plan
Include features arrays or attach custom field definitions for plan-specific data.
Licenses
POST /api/licenses— Issue a licenseGET /api/licenses/{key}— Get licensePOST /api/licenses/activate— Activate license
Store notes, seats, and optional device_id.
Meters
POST /api/meters/record— Record usageGET /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 fieldGET /api/custom-fields— List fieldsGET /api/custom-fields/{key}— Get fieldPATCH /api/custom-fields/{key}— Update fieldDELETE /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
}