Skip to main content
POST
Create a usage module

Authorizations

Authorization
string
header
required

A Custral secret API key (sk_…), created in Settings → Applications. Sent as Authorization: Bearer sk_…. The X-Api-Key: sk_… header is also accepted and takes precedence. Never expose a secret key in a browser.

Body

application/json
name
string
required
Example:

"Compression"

productObjectId
string
required
Example:

"obj_3Ab9xK2mQ7"

customerObjectId
string
required
Example:

"obj_5Bc0xJ1kP4"

productIdentifierPropertyId
string
customerIdentifierPropertyId
string

Response

The created usage module.

data
object

A metered-product setup: the object holding what you sell, joined to the object holding who consumes it.

reqId
string

A per-request id (req_…). Quote it to support when reporting a problem.

Example:

"req_2a1f9c8e7b6d5"