Create recurring template

POST/api/v1/recurring

Create a new recurring invoice or bill template.

Operation ID: create_recurring_template_api_v1_recurring_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

namestringrequired

Name/description of this recurring template

currencystring

Currency for generated documents (USD, CAD, AUD, EUR, or GBP)

frequencyFrequencyEnumrequiredFrequencyEnum

How often to generate

days_until_dueinteger

Days from generation until due date

day_of_monthinteger

Day of month (1-31). Only applies to monthly/quarterly/annually frequencies; ignored for daily/weekly/biweekly. If the day doesn't exist in a month (e.g., 31 in February), generates on the last day instead. If omitted, uses the day from start_date.

day_of_weekinteger

Day of week (0=Monday, 6=Sunday). Only applies to weekly/biweekly frequencies; ignored for other frequencies. If omitted, uses the weekday from start_date.

end_datestring · date

Stop generating after this date (null = indefinite). If both end_date and max_occurrences are set, whichever is reached first stops generation.

max_occurrencesinteger

Stop after generating this many documents (null = unlimited). If both end_date and max_occurrences are set, whichever is reached first stops generation.

notesstring

Optional notes about this recurring template

recurrence_typeapp__api__v1__schemas__recurring__recurring__RecurrenceTypeEnumrequiredapp__api__v1__schemas__recurring__recurring__RecurrenceTypeEnum

Type of document to generate

start_datestring · daterequired

When to start generating

customer_idstring

Customer ID (required for invoice type)

auto_sendboolean

Automatically send invoices to customer on generation

vendor_idstring

Vendor ID (required for bill type)

template_dataobjectrequired

Document template data (amount, description, line_items, etc.)

Responses

201Successful Response

successboolean
messagestring
codestring
dataRecurringTemplateResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject