> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a recurrence



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json patch /finops/v1/recurrences/{recurrence_id}
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2025-06-23'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart VAT IDs
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Documents
  - name: Entities
  - name: Entity users
  - name: Events
  - name: Files
  - name: Identity
  - name: Ledger accounts
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: Overdue reminders
  - name: PDF templates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: VAT rates
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /finops/v1/recurrences/{recurrence_id}:
    patch:
      tags:
        - Recurrences
      summary: Update a recurrence
      operationId: patch_recurrences_id
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - required: true
          schema:
            type: string
            format: uuid
          name: recurrence_id
          in: path
        - description: The ID of the entity that owns the requested resource.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          name: x-organization-id
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRecurrencePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecurrenceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateRecurrencePayload:
      properties:
        automation_level:
          allOf:
            - $ref: '#/components/schemas/AutomationLevel'
          description: >
            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.
        body_text:
          type: string
          minLength: 1
          description: >-
            The body text for the email that will be sent with the recurring
            invoice.
        day_of_month:
          allOf:
            - $ref: '#/components/schemas/DayOfMonth'
          description: Deprecated, use `start_date` instead
          deprecated: true
        end_date:
          type: string
          format: date
          description: >-
            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:
          type: integer
          maximum: 12
          minimum: 1
          description: Deprecated, use `end_date` instead
          deprecated: true
        end_year:
          type: integer
          maximum: 2077
          description: Deprecated, use `end_date` instead
          deprecated: true
        frequency:
          allOf:
            - $ref: '#/components/schemas/RecurrenceFrequency'
          description: How often the invoice will be created.
        interval:
          type: integer
          maximum: 100
          minimum: 1
          description: >-
            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.
        max_occurrences:
          type: integer
          maximum: 1000
          minimum: 1
          description: >-
            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.
        recipients:
          allOf:
            - $ref: '#/components/schemas/Recipients'
          description: >-
            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:
          type: string
          format: date
          description: >-
            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:
          type: string
          minLength: 1
          description: >-
            The subject for the email that will be sent with the recurring
            invoice.
      additionalProperties: false
      type: object
    RecurrenceResponse:
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
          description: >-
            Time at which the recurrence was created. Timestamps follow the ISO
            8601 standard.
        updated_at:
          type: string
          format: date-time
          description: >-
            Time at which the recurrence was last updated. Timestamps follow the
            ISO 8601 standard.
        automation_level:
          allOf:
            - $ref: '#/components/schemas/AutomationLevel'
          description: >
            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.
        body_text:
          type: string
          description: >-
            The body text for the email that will be sent with the recurring
            invoice.
        current_iteration:
          type: integer
          minimum: 1
          description: Current iteration number
        day_of_month:
          allOf:
            - $ref: '#/components/schemas/DayOfMonth'
          description: Deprecated, use `start_date` instead
          deprecated: true
        end_date:
          type: string
          format: date
          description: >-
            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:
          type: integer
          maximum: 12
          minimum: 1
          description: Deprecated, use `end_date` instead
          deprecated: true
        end_year:
          type: integer
          maximum: 2077
          description: Deprecated, use `end_date` instead
          deprecated: true
        frequency:
          allOf:
            - $ref: '#/components/schemas/RecurrenceFrequency'
          description: How often the invoice will be created.
        interval:
          type: integer
          maximum: 100
          minimum: 1
          description: >-
            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.
        invoice_id:
          type: string
          format: uuid
          description: >-
            ID of the base invoice that will be used as a template for creating
            recurring invoices.
        iterations:
          items:
            $ref: '#/components/schemas/RecurrenceIteration'
          type: array
          minItems: 1
          description: List of iterations for the recurrence
        max_occurrences:
          type: integer
          maximum: 1000
          minimum: 1
          description: >-
            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.
        recipients:
          allOf:
            - $ref: '#/components/schemas/Recipients'
          description: >-
            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:
          type: string
          format: date
          description: >-
            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:
          type: integer
          maximum: 12
          minimum: 1
          description: Deprecated, use `start_date` instead
          deprecated: true
        start_year:
          type: integer
          maximum: 2077
          description: Deprecated, use `start_date` instead
          deprecated: true
        status:
          allOf:
            - $ref: '#/components/schemas/RecurrenceStatus'
          description: Status of the recurrence
          examples:
            - active
            - canceled
            - completed
        subject_text:
          type: string
          description: >-
            The subject for the email that will be sent with the recurring
            invoice.
      type: object
      required:
        - id
        - created_at
        - updated_at
        - automation_level
        - current_iteration
        - day_of_month
        - frequency
        - interval
        - invoice_id
        - iterations
        - start_date
        - start_month
        - start_year
        - status
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    AutomationLevel:
      type: string
      enum:
        - draft
        - issue
        - issue_and_send
      description: Automation level for recurrence
    DayOfMonth:
      type: string
      enum:
        - first_day
        - last_day
    RecurrenceFrequency:
      type: string
      enum:
        - day
        - week
        - month
        - quarter
        - year
    Recipients:
      properties:
        bcc:
          items:
            type: string
            format: email
          type: array
        cc:
          items:
            type: string
            format: email
          type: array
        to:
          items:
            type: string
            format: email
          type: array
      additionalProperties: false
      type: object
    RecurrenceIteration:
      properties:
        issue_at:
          type: string
          format: date
        issued_invoice_id:
          type: string
          format: uuid
        iteration:
          type: integer
          default: 1
        status:
          $ref: '#/components/schemas/IterationStatus'
      additionalProperties: false
      type: object
      required:
        - issue_at
        - status
    RecurrenceStatus:
      type: string
      enum:
        - active
        - paused
        - canceled
        - completed
      description: |-
        Represents the status of a recurrence

        Allowed transitions:
        - active -> paused
        - active -> canceled
        - active -> completed
        - paused -> active
        - paused -> canceled
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
    IterationStatus:
      type: string
      enum:
        - pending
        - completed
        - canceled
        - skipped
        - issue_failed
        - send_failed
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````