Subscription CRUD
Subscription API payloads use camelCase. Server-managed fields are returned in responses but rejected in write requests.Operation semantics
For AI integrations, list subscriptions before updating or deleting unless the user already supplied a subscription UUID. Write operations require an API key with the
write scope; read-only keys receive 403 insufficient_scope.
Pagination
GET /api/v1/subscriptions returns results newest first and accepts two optional query parameters:
The response includes a
pagination object. Fetch the next page with offset + limit while hasMore is true.
400 invalid_pagination.
Filtering and sorting
GET /api/v1/subscriptions accepts optional filters and a sort order alongside pagination:
Combine
status=active with expiringBefore to answer “what renews soon”. Invalid values return 400 invalid_query with a field and suggestedFix.
Subscription object
Writable fields
idcreatedAtupdatedAt
POST or PATCH requests.
Field rules
nextPaymentDate is the authoritative schedule date. For monthly billing, billingAnchorDay preserves the original calendar day across short months: January 31 → February 28/29 → March 31. If a charge repeats every 30 days rather than on a fixed day of each month, use period: "custom" with customDate: "30". lastPaymentDate remains in responses as a derived compatibility field and should not be used for new integrations.
Lifecycle: cancel, pause, resume vs delete
A subscription has astatus: active (billing), paused (temporarily stopped), or cancelled (no longer billing, kept for history). Changing status is a soft operation — the record and its audit history survive and can be reactivated. DELETE is permanent and removes the record and its audit history.
Prefer a status change when the user says they stopped using a service but might come back:
active subscriptions count toward active spend in the analytics endpoints. Use DELETE only when the user wants the record gone permanently.
Natural language examples
Add a subscription
User intent:Change billing period
User intent:- Call
GET /api/v1/subscriptionsto identify the Netflix record. - Ask the user to confirm the exact record and change.
- Call
PATCH /api/v1/subscriptions/{id}.
Remove a duplicate
User intent:- Call
GET /api/v1/subscriptionsand find duplicate candidates. - Ask the user to confirm the exact subscription name and id.
- Call
DELETE /api/v1/subscriptions/{id}.
Custom billing period
For non-monthly/non-yearly intervals, setperiod to custom and send customDate as a positive whole-number string of days.
customDate to "30"; do not use monthly.
When patching from custom back to monthly or yearly, omit customDate. The server clears stale custom billing data.