API reference/Client billing
Change monthly invoice settings
Try itTurns automatic monthly invoices off, to drafts, or to made-and-sent (emailed to each client), and sets the day (1–28) and days to pay. Only the fields you send change.
PATCH
/api/v1/monthly-invoicesAuthentication
An API key as Authorization: Bearer or x-api-key. It needs the invoices:write scope — write, send, mark paid and void client invoices; run monthly invoices; start and stop card autopay.
invoices:writeChanges the draft or a recordIdempotency-Key optionalMCP tool: update_monthly_invoices
Parameters
Named placeholders go in the path; the rest in a JSON body.
modestringBody · optional- One of: off, draft, send
dayintegerBody · optional- 1 to 28
due_daysintegerBody · optional- 0 to 90
Response
200 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).
curl -X PATCH 'https://websites.workflowcorp.com/api/v1/monthly-invoices' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"send","day":1,"due_days":14}'{
"mode": "send",
"day": 1,
"due_days": 14
}{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"off",
"draft",
"send"
],
"description": "off = none · draft = made as drafts to check and send · send = made, sent and emailed to the client."
},
"day": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Day of the month (1–28, the account's time zone) the run makes them."
},
"due_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Days the client has to pay."
},
"card_payments": {
"type": "boolean",
"description": "The account takes cards (Stripe connected): sent invoices get a pay link and autopay can start."
},
"period": {
"type": "string",
"description": "This month, YYYY-MM."
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"site_name": {
"type": "string"
},
"client_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"state": {
"type": "string",
"enum": [
"will-invoice",
"has-invoice",
"no-client",
"no-price",
"excluded"
],
"description": "will-invoice = the next run makes one · has-invoice = this month has one · no-client / no-price / excluded (left out on the site page) = skipped."
},
"invoice_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"autopay": {
"anyOf": [
{
"type": "string",
"enum": [
"pending",
"active",
"past_due",
"canceled"
]
},
{
"type": "null"
}
]
},
"is_sample": {
"type": "boolean"
}
},
"required": [
"site_id",
"site_name",
"client_name",
"amount_cents",
"state",
"invoice_id",
"autopay",
"is_sample"
],
"additionalProperties": false
},
"description": "Every live site and what this month's run does with it."
}
},
"required": [
"mode",
"day",
"due_days",
"card_payments",
"period",
"sites"
],
"additionalProperties": false
}