Ensure standard platform-fee items
Internal bounded repair. Financial fields are resolved from the seller-tenant catalog; the caller supplies only the fee effective timestamp.
Related endpoints
POST /subscriptions— Create a new subscriptionGET /subscriptions— List subscriptionsGET /subscriptions/{id}— Get subscription by IDPATCH /subscriptions/{id}— Update subscription detailsDELETE /subscriptions/{id}— Delete subscriptionPOST /subscriptions/{id}/change-plan— Change subscription planPOST /subscriptions/{id}/change-quantity— Change subscription quantityPOST /subscriptions/{id}/preview-renewal— Preview subscription renewal
Common errors
400 invalid_request— malformed payload or failed validation.401 unauthenticated— missing, malformed, or revoked API key.404 resource_missing— the referenced resource does not exist or is not visible to your key.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
x-api-key<token>
Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.
In: header
Path Parameters
subscriptionId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X POST "https://api.revkeen.com/v2/subscriptions/00000000-0000-0000-0000-000000000000/items/ensure-platform-fee-items" \
-H "x-api-key: $REVKEEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"effective_at": "2026-01-01T00:00:00Z"
}'{
"data": {
"subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",
"added": [
{
"item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
"price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c",
"meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8"
}
],
"retained": [
{
"item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
"price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c",
"meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8"
}
]
}
}{
"error": "Bad request"
}{
"error": "Unauthorized"
}{
"error": "Not found"
}