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

name string required

Name/description of this recurring template

currency string

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

frequency FrequencyEnum requiredFrequencyEnum

How often to generate

days_until_due integer

Days from generation until due date

day_of_month integer

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_week integer

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_date string · date

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

max_occurrences integer

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

notes string

Optional notes about this recurring template

recurrence_type app__api__v1__schemas__recurring__recurring__RecurrenceTypeEnum requiredapp__api__v1__schemas__recurring__recurring__RecurrenceTypeEnum

Type of document to generate

start_date string · date required

When to start generating

customer_id string

Customer ID (required for invoice type)

auto_send boolean

Automatically send invoices to customer on generation

vendor_id string

Vendor ID (required for bill type)

template_data object required

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

Responses

201 Successful Response

id string required
business_id string required
name string required
recurrence_type RecurrenceTypeEnum-Output requiredRecurrenceTypeEnum-Output
status RecurringStatusEnum requiredRecurringStatusEnum
frequency FrequencyEnum requiredFrequencyEnum
start_date string · date required
end_date string · date
next_occurrence string · date required
last_generated string · date-time
day_of_month integer
day_of_week integer
max_occurrences integer
occurrences_generated integer required
template_data object required
days_until_due integer required
auto_send boolean required
notes string
customer CustomerSummary
vendor VendorSummary
created_at string · date-time required
updated_at string · date-time required
amount_in_dollars number
frequency_display string required
days_until_next integer
is_due boolean required
should_generate boolean required

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

404 Not Found - Resource does not exist

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object