Skip to content

Start a recurring invoice

POST
/api/v1/invoice-schedules
curl --request POST \
--url https://digize.com/api/v1/invoice-schedules \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "example", "contactId": "example", "company": "example", "interval": "week", "lines": [ { "id": "example", "productId": "example", "variantId": "example", "description": "example", "quantity": 1, "unitPrice": 1, "taxRateId": "example" } ], "discount": 1, "notes": "example", "termsDays": 1, "autoSend": true, "autoCharge": true, "startsAt": "2026-04-15T12:00:00Z", "endsAt": "2026-04-15T12:00:00Z", "maxCount": 1 }'

Makes an invoice from these lines every interval, from startsAt (today by default) until endsAt or maxCount. autoSend sends each; autoCharge charges the contact’s saved card once it’s sent.

Needs the crm:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
name
string
<= 80 characters
contactId
required
string
>= 1 characters <= 64 characters
company
Any of:
string
<= 120 characters
interval
required
string
Allowed values: week two_weeks month quarter year
lines
required
Array<object>
>= 1 items <= 100 items
object
id
string
<= 64 characters
productId
Any of:
string
<= 64 characters
variantId
Any of:
string
<= 64 characters
description
required
string
<= 500 characters
quantity
required
number
> 0 <= 100000
unitPrice
required

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
taxRateId
Any of:
string
<= 64 characters
discount

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
notes
Any of:
string
<= 2000 characters
termsDays
integer
<= 365
autoSend
boolean
autoCharge
boolean
startsAt
string format: date-time
endsAt
Any of:
string format: date-time
maxCount
Any of:
integer
>= 1 <= 1000

Done

Media typeapplication/json
object
id
required
string
name
required
string
contact
required
object
id
required

The contact’s id.

string
name
required
string
email
required
string
company
required
string | null
interval
required
string
Allowed values: week two_weeks month quarter year
lines
required
Array<object>
object
id
required
string
productId
required
string | null
variantId
required
string | null
description
required
string
quantity
required
number
unitPrice
required

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
taxRateId
required
string | null
optional
required
boolean
selected
required
boolean
amount
required

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
discount
required

In the workspace currency’s minor unit: 2000 is $20.00.

integer
<= 100000000
notes
required
string | null
termsDays
required

Days after each is made that it’s due.

number
autoSend
required
boolean
autoCharge
required
boolean
status
required
string
Allowed values: active paused ended
nextAt
required
Any of:
string format: date-time
endsAt
required
Any of:
string format: date-time
maxCount
required
number | null
count
required

Invoices made so far.

number
total
required

What each comes to at today’s rates.

integer
<= 100000000
lastInvoiceId
required
string | null
createdAt
required
string format: date-time

Example

{
"interval": "week",
"status": "active"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}