Skip to main content
POST
Create a quote

Authorizations

Authorization
string
header
required

A Custral API key, created in Settings → Developers → Applications, sent as Authorization: Bearer sk_…. The X-Api-Key header is also accepted and takes precedence. Use a secret key (sk_…) from your server; a publishable key (pk_…) may hold only objects:read and usage:write. Never expose a secret key in a browser.

Body

application/json
customer
string
required

Your app's customer id (the customer key) or a record id. A deal's record id bills the customer it links to.

Example:

"acct_8812"

products
object[]
required
Required array length: 1 - 100 elements
createCustomer
object

Creates the customer when customer matches none.

discount
object
collectionMethod
enum<string>

autopay charges a saved card or bank; invoice sends a pay link.

Available options:
autopay,
invoice
contactName
string
Maximum string length: 200
contactEmail
string<email>
Maximum string length: 320
billingEvery
integer

Bill the recurring products every N months (or years, for a yearly price): 3 is quarterly. Each bill charges N periods' price.

Required range: 1 <= x <= 12
billingAnchorDay
integer

The day of the month bills land on, 1–31; the first bill is prorated. 0 bills from the day the customer accepts.

Required range: 0 <= x <= 31
requireSignature
boolean

Ask the customer to sign a contract on the quote page before accepting.

contractTemplate
string

The contract to sign: a template's id or exact name, from GET /v1/contract-templates. Empty or default is the workspace's default. A name that matches none is contract_template_not_found; one that matches two is contract_template_ambiguous.

Maximum string length: 200
expiresAt
string

The last day the quote can be accepted, YYYY-MM-DD.

Pattern: ^\d{4}-\d{2}-\d{2}$
returnUrl
string<uri>

Where the customer lands after accepting. Its host must be in Settings → Quotes and invoicing → allowed return domains.

send
boolean

Also mark it sent, so the returned url opens right away.

Response

200 - application/json

The quote.

data
object

A quote. Amounts are in minor units (cents).

reqId
string

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

Example:

"req_2a1f9c8e7b6d5"