UtilitayDevelopers
Ravenraven
Get an API key
API reference

Subscriptions

/subjects

A subscription is what events are about. Customers are subscribed to subscriptions through /links. In the Subscription business pack a subscription is, for example, “Raven Tier 2” with reference SUB-2026-001.

POSTCreate a subscription

Requires subjects:write. Unknown keys inside attributes are refused with 400: schemas are closed. There is no segment field here; segments that follow an attribute are kept in step by Raven.

Body parameters
display_namestring · required · max 200
“Raven Tier 2”.
external_refstring · optional · max 200
Your own identifier. “SUB-2026-001”. Trimmed as it is stored, and it is what ?external_ref= looks up exactly.
attributesobject · optionalVaries by pack
Generated from the Subscription business pack's subject_schema. PATCH replaces the whole object; it does not merge.
KeyLabelKindAllowed valuesRequired
planPlantextNo
regionRegiontextNo
statusStatuschoiceTrial · Active · Past due · PausedNo
productProducttextNo
billing_cycleBilling cyclechoiceMonthly · AnnualNo
Returns

201 with the subscription. 400 for a bad or unknown attribute; the sentence names it. 409 if the reference is already on file — “That reference is already used by another record. Find it with ?external_ref= and update that record instead.”

Response body

One subscription: the same fields in every pack. Press Response on the sample to see one whole.

FieldTypeDescription
iduuid
tenant_iduuidThe instance.
external_refstring | nullYour own id, as you sent it.
display_namestring
attributesobjectShaped by the Subscription business pack's subject_schema.Varies by pack
statusactive | inactive
created_atdatetime
updated_atdatetime

On failure the body is { error, code } instead.