Skip to main content
The Crevio API is Stripe-shaped, with a few rules that trip up every new integration on day one. Learn them here and the rest of the API is predictable. These conventions hold across all of https://api.crevio.co/v1. Read this page before writing more than a quickstart call — most 400/404/422 errors come from breaking one of the rules below.

Parameters are unwrapped (top-level)

Send request fields at the top level of the JSON body. There is no resource wrapper key. A nested wrapper like {"product": {...}} is silently dropped, leaving the real fields missing — you’ll get a parameter_missing error.

Associations are a bare name + a prefixed id

To link a resource, use the bare resource name as the key and pass the prefixed id string as the value. Do not append _id.
Exceptions exist — match the schema field name exactly. A few fields keep the _id suffix because they take ids directly: site_id (e.g. on Tasks), tag_ids (an array, e.g. on Customers and Forms), account_ids, and upload_ids. The rule of thumb is “bare name”, but check the API reference for the endpoint you’re calling.

Creation order matters

Some resources have prerequisites. The big one: a product can’t be published without at least one price variant. Creating a product with status: "active" in a single call fails with 422.
1

Create the product as a draft

POST /products with status: "draft".
2

Create one or more price variants

POST /price_variants with product: "prod_...".
3

Publish

PATCH /products/{id} with status: "active".

Money is in cents; currency is lowercase

All monetary amounts are integers in the smallest currency unit (cents for USD). Currency codes are lowercase ISO 4217.

List responses vs single objects

List endpoints return a consistent envelope. The items are in data.
Single-resource endpoints return the object directly (no envelope):

Pagination

Cursor-based. Pass limit (1–100, default 20) and starting_after (the id of the last item you received). When has_more is false, you’re on the last page.

Slug lookup

Products, blog posts, experiences, and legal pages accept either an id or a slug in the {id_or_slug} path position.
By default, related resources appear as bare id strings. Pass expand to inline them. Multiple fields are comma-separated.

Delete responses

Delete endpoints return a confirmation object, not an empty body:

The object discriminator

Every resource carries an object field identifying its type. Use it to branch on heterogeneous responses.

ID prefixes

Every id is a prefixed string encoding its type. Use these — never raw database ids.
ResourcePrefixobject value
Accountacct_account
Productprod_product
Price variantprice_price_variant
Experienceexp_experience
Orderord_order
Order itemordi_order_item
Chargech_charge
Customercus_customer
Checkoutco_checkout
Checkout linkcl_checkout_link
Invoiceinv_invoice
Subscriptionsub_subscription
Discountdisc_discount
Blog postpost_blog_post
Reviewrev_review
Filefile_file
Formform_form
Tagtag_tag
Tasktask_task
Task runtrun_task_run
Sitesite_site
Webhook endpointwh_webhook_endpoint
Webhook eventwhev_webhook_event
Courses and other content live under /experiences, not /products. A product bundles experiences through its price variants. The Experiences API is read-only (list + retrieve).

Next steps

Errors

Every status code, what it means, and how to debug it.

Quickstart

Apply these rules in a real product creation.

API reference

Per-endpoint parameters and schemas.

TypeScript SDK

The SDK enforces most of these conventions for you.