Skip to main content
PATCH
/
recurrences
/
{recurrence_id}
Update a recurrence
curl --request PATCH \
  --url https://api.sandbox.monite.com/v1/recurrences/{recurrence_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-monite-entity-id: <x-monite-entity-id>' \
  --header 'x-monite-version: <x-monite-version>' \
  --data '
{
  "automation_level": "draft",
  "body_text": "<string>",
  "day_of_month": "first_day",
  "end_date": "2023-12-25",
  "end_month": 6,
  "end_year": 123,
  "frequency": "day",
  "interval": 50,
  "max_occurrences": 500,
  "recipients": {
    "bcc": [
      "jsmith@example.com"
    ],
    "cc": [
      "jsmith@example.com"
    ],
    "to": [
      "jsmith@example.com"
    ]
  },
  "start_date": "2023-12-25",
  "subject_text": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "automation_level": "draft",
  "current_iteration": 2,
  "day_of_month": "first_day",
  "frequency": "day",
  "interval": 50,
  "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "iterations": [
    {
      "issue_at": "2023-12-25",
      "status": "pending",
      "issued_invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "iteration": 1
    }
  ],
  "start_date": "2023-12-25",
  "start_month": 6,
  "start_year": 123,
  "status": "active",
  "body_text": "<string>",
  "end_date": "2023-12-25",
  "end_month": 6,
  "end_year": 123,
  "max_occurrences": 500,
  "recipients": {
    "bcc": [
      "jsmith@example.com"
    ],
    "cc": [
      "jsmith@example.com"
    ],
    "to": [
      "jsmith@example.com"
    ]
  },
  "subject_text": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-monite-version
string<date>
required
x-monite-entity-id
string<uuid>
required

The ID of the entity that owns the requested resource.

Example:

"9d2b4c8f-2087-4738-ba91-7359683c49a4"

Path Parameters

recurrence_id
string<uuid>
required

Body

application/json
automation_level
enum<string>

Controls how invoices are processed when generated:

  • "draft": Creates invoices in draft status, requiring manual review, issuing, and sending
  • "issue": Automatically issues invoices but requires manual sending
  • "issue_and_send": Fully automates the process (creates, issues, and sends invoices)

Default: "issue" (or "issue_and_send" if subject_text and body_text are provided)

Note: When using "issue_and_send", both subject_text and body_text must be provided.

Available options:
draft,
issue,
issue_and_send
body_text
string

The body text for the email that will be sent with the recurring invoice.

Minimum string length: 1
day_of_month
enum<string>
deprecated

Deprecated, use start_date instead

Available options:
first_day,
last_day
end_date
string<date>

The end date of the recurring invoice, in the yyyy-mm-dd format. The end date is inclusive, that is, the last invoice will be created on this date if the last occurrence falls on this date. end_date is mutually exclusive with max_occurrences. Either end_date or max_occurrences must be specified.

end_month
integer
deprecated

Deprecated, use end_date instead

Required range: 1 <= x <= 12
end_year
integer
deprecated

Deprecated, use end_date instead

Required range: x <= 2077
frequency
enum<string>

How often the invoice will be created.

Available options:
day,
week,
month,
quarter,
year
interval
integer

The interval between each occurrence of the invoice. For example, when using monthly frequency, an interval of 1 means invoices will be created every month, an interval of 2 means invoices will be created every 2 months.

Required range: 1 <= x <= 100
max_occurrences
integer

How many times the recurring invoice will be created. The recurrence will stop after this number is reached. max_occurrences is mutually exclusive with end_date. Either max_occurrences or end_date must be specified.

Required range: 1 <= x <= 1000
recipients
object

An object containing the recipients (To, CC, BCC) of the recurring invoices. Can be omitted if the base invoice has the counterpart contact email specified in the counterpart_contact.email field.

start_date
string<date>

The date when the first invoice will be created, in the yyyy-mm-dd format. Cannot be a past date. Subsequent invoice dates will be calculated based on start_date, frequency, and interval.

subject_text
string

The subject for the email that will be sent with the recurring invoice.

Minimum string length: 1

Response

Successful Response

id
string<uuid>
required
created_at
string<date-time>
required

Time at which the recurrence was created. Timestamps follow the ISO 8601 standard.

updated_at
string<date-time>
required

Time at which the recurrence was last updated. Timestamps follow the ISO 8601 standard.

automation_level
enum<string>
required

Controls how invoices are processed when generated:

  • "draft": Creates invoices in draft status, requiring manual review, issuing, and sending
  • "issue": Automatically issues invoices but requires manual sending
  • "issue_and_send": Fully automates the process (creates, issues, and sends invoices)

Default: "issue" (or "issue_and_send" if subject_text and body_text are provided)

Note: When using "issue_and_send", both subject_text and body_text must be provided.

Available options:
draft,
issue,
issue_and_send
current_iteration
integer
required

Current iteration number

Required range: x >= 1
day_of_month
enum<string>
required
deprecated

Deprecated, use start_date instead

Available options:
first_day,
last_day
frequency
enum<string>
required

How often the invoice will be created.

Available options:
day,
week,
month,
quarter,
year
interval
integer
required

The interval between each occurrence of the invoice. For example, when using monthly frequency, an interval of 1 means invoices will be created every month, an interval of 2 means invoices will be created every 2 months.

Required range: 1 <= x <= 100
invoice_id
string<uuid>
required

ID of the base invoice that will be used as a template for creating recurring invoices.

iterations
object[]
required

List of iterations for the recurrence

Minimum array length: 1
start_date
string<date>
required

The date when the first invoice will be created, in the yyyy-mm-dd format. Cannot be a past date. Subsequent invoice dates will be calculated based on start_date, frequency, and interval.

start_month
integer
required
deprecated

Deprecated, use start_date instead

Required range: 1 <= x <= 12
start_year
integer
required
deprecated

Deprecated, use start_date instead

Required range: x <= 2077
status
enum<string>
required

Status of the recurrence

Available options:
active,
paused,
canceled,
completed
Example:

"active"

body_text
string

The body text for the email that will be sent with the recurring invoice.

end_date
string<date>

The end date of the recurring invoice, in the yyyy-mm-dd format. The end date is inclusive, that is, the last invoice will be created on this date if the last occurrence falls on this date. end_date is mutually exclusive with max_occurrences. Either end_date or max_occurrences must be specified.

end_month
integer
deprecated

Deprecated, use end_date instead

Required range: 1 <= x <= 12
end_year
integer
deprecated

Deprecated, use end_date instead

Required range: x <= 2077
max_occurrences
integer

How many times the recurring invoice will be created. The recurrence will stop after this number is reached. max_occurrences is mutually exclusive with end_date. Either max_occurrences or end_date must be specified.

Required range: 1 <= x <= 1000
recipients
object

An object containing the recipients (To, CC, BCC) of the recurring invoices. Can be omitted if the base invoice has the counterpart contact email specified in the counterpart_contact.email field.

subject_text
string

The subject for the email that will be sent with the recurring invoice.