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

# Replay Order

> Submit a copy of a previously placed order as a brand-new order. The same creative is charged and mailed again, and the original order is left untouched. By default the replay is sent to the recipients the original actually reached (failed items are excluded). Supply a `recipients` array to send the same creative to a different audience instead.

Only settled, non-cancelled orders can be replayed. The replay is a fresh order that runs through the normal fulfillment pipeline, including Address Verification, Duplicate Prevention and suppression lists.



## OpenAPI

````yaml post /orders/{orderId}/replay
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://www.thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
  - name: Webhooks
  - name: Webhook Events
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /orders/{orderId}/replay:
    post:
      tags:
        - Orders
      summary: Replay Order
      description: >-
        Submit a copy of a previously placed order as a brand-new order. The
        same creative is charged and mailed again, and the original order is
        left untouched. By default the replay is sent to the recipients the
        original actually reached (failed items are excluded). Supply a
        `recipients` array to send the same creative to a different audience
        instead.


        Only settled, non-cancelled orders can be replayed. The replay is a
        fresh order that runs through the normal fulfillment pipeline, including
        Address Verification, Duplicate Prevention and suppression lists.
      parameters:
        - name: orderId
          in: path
          schema:
            type: integer
          required: true
          description: ID of the order to replay.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                recipients:
                  type: array
                  description: >-
                    Optional override. When supplied, the replay mails the
                    original's creative to these recipients instead of the ones
                    the original reached. Each recipient requires an `address`;
                    unlike the send endpoints, an address-less recipient is not
                    accepted.
                  minItems: 1
                  items:
                    type: object
                    required:
                      - address
                    properties:
                      name:
                        type: string
                        example: Tobias Example
                      company:
                        type: string
                        example: www.thanks.io
                      address:
                        type: string
                        example: 123 Main Street
                      address2:
                        type: string
                        example: Apartment 1
                      city:
                        type: string
                        example: Any Town
                      province:
                        type: string
                        description: State or Province
                        example: KS
                      postal_code:
                        type: string
                        example: '12345'
                      country:
                        type: string
                        example: US
                schedule_for:
                  type: string
                  format: date
                  description: >-
                    Optional send date for the replay. Any format Carbon can
                    parse is accepted; the date-only portion is stored.
                  example: '2025-09-15'
                metadata:
                  type:
                    - object
                    - 'null'
                  description: >-
                    Optional metadata for the replay. Same shape and limits as
                    the send endpoints — returned unchanged by the order
                    endpoints and included in every webhook event for the order
                    as `order.metadata`. When omitted, the original order's
                    metadata is carried over.
                  additionalProperties: true
                  example:
                    crm_deal_id: D-1042
                    campaign: spring-winback
            examples:
              Replay to Original Recipients:
                summary: Replay with no body
                description: >-
                  Submit a copy of the order and mail it to the same recipients
                  the original reached. Failed recipients are excluded.
                value: {}
              Replay to New Recipients:
                summary: Send the same creative to a different audience
                description: >-
                  Reuse the original order's creative but supply a fresh
                  recipient list.
                value:
                  recipients:
                    - name: Grace Hopper
                      address: 1 Navy Yard
                      city: Phoenix
                      province: AZ
                      postal_code: '85001'
                      country: US
                    - name: Alan Turing
                      address: 2 Bletchley Park
                      city: Phoenix
                      province: AZ
                      postal_code: '85001'
                      country: US
              Replay Scheduled with Metadata:
                summary: Schedule the replay and attach metadata
                description: >-
                  Schedule the replay for a future send date and attach your own
                  key/value data.
                value:
                  schedule_for: '2025-09-15'
                  metadata:
                    crm_deal_id: D-1042
                    campaign: spring-winback
      responses:
        '200':
          description: >-
            Replay submitted. The response body mirrors the send endpoints'
            order-submitted shape, with an added `replayed_from_order_id`
            pointing back to the source order.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/send-mailer-order-response'
                  - type: object
                    properties:
                      replayed_from_order_id:
                        type: integer
                        description: ID of the source order this replay was copied from.
                        example: 42708
              example:
                id: 42709
                user_id: 2
                replayed_from_order_id: 42708
                type: postcard
                size: 4x6
                message: >-
                  Hey %FIRST_NAME%!,


                  THANK YOU for allowing us the opportunity to HELP you with
                  your plan!
                front_image: https://cdn.thanks.io/letter-backgrounds/bg0.png
                total_estimated_recipients: 1
                authorization_total: 73
                status: reviewing
                method: api
                display_status: Reviewing
                display_trigger: API
                display_type: Postcard-4x6
                metadata:
                  crm_deal_id: D-1042
        '400':
          description: >-
            The order cannot be replayed. This includes a cancelled order, an
            order that has not settled yet, an order with no successfully mailed
            recipients (when `recipients` is not supplied), a charge failure, or
            a concurrent replay of the same order.
          content:
            application/json:
              examples:
                Not Settled:
                  summary: Order Still Fulfilling
                  value:
                    status: >-
                      Order #42708 is still being fulfilled and cannot be
                      replayed until it has settled.
                    message: >-
                      Order #42708 is still being fulfilled and cannot be
                      replayed until it has settled.
                    failure: true
                Charge Failed:
                  summary: Charge Failed During Replay
                  value:
                    status: >-
                      Charge failed during order replay - Please verify your
                      payment information in your thanks.io dashboard
                    message: >-
                      Charge failed during order replay - Please verify your
                      payment information in your thanks.io dashboard
        '401':
          description: The authenticated account does not own this order.
        '402':
          description: >-
            API access has been temporarily disabled due to repeated payment
            failures.
          content:
            application/json:
              example:
                status: >-
                  API access has been temporarily disabled due to repeated
                  payment failures. Please update your payment method.
                message: >-
                  API access has been temporarily disabled due to repeated
                  payment failures. Please update your payment method.
                code: api_disabled_payment_failures
        '422':
          description: >-
            Validation failed on the request body — most commonly a recipient
            without an `address`, or an empty `recipients` array.
components:
  schemas:
    send-mailer-order-response:
      type: object
      title: Send Mailer Order Submitted Response
      description: Response when an Order is successfully submitted to Send Mailer
      properties:
        id:
          type: integer
          description: Unique identifier for the order
          example: 42664
        user_id:
          type: integer
          description: User ID for the order
          example: 2
        sub_account:
          description: Sub-account Info For Order.  Can be null
          allOf:
            - $ref: '#/components/schemas/sub-account'
          type:
            - object
            - 'null'
        sub_account_id:
          type:
            - integer
            - 'null'
          description: Sub account ID for the order
          example: 12345
        total_estimated_recipients:
          type: integer
          description: Total estimated recipients for the order
          example: 1
        authorization_total:
          type: integer
          description: Total authorization amount for the order in cents
          example: 58
        leads_fee:
          type: integer
          description: Total leads fee for the order in cents
          example: 99
        mailing_list_ids_used:
          type: string
          description: >-
            Mailing lists used for the order.  Can be null if recipients or
            radius search is used.
          example: 3046,3020
        recipients:
          type: array
          description: List of recipients for the order
          items:
            $ref: '#/components/schemas/recipient-no-mailinglist'
        front_image:
          type: string
          description: Front image URL for the order
          example: >-
            https://s3.amazonaws.com/cdn.thanks.io/user_image_library/1533645532.png
        image_template_id:
          type:
            - integer
            - 'null'
          description: Image template ID for the order
          example: 6
        custom_background_url:
          type:
            - string
            - 'null'
          description: >-
            Custom background URL for the order. Only valid for postcard backs
            and the interior background of notecards and giftcards.
          example: >-
            https://s3.amazonaws.com/content.thanks.io/templates/branding-builder-images/c09d39aadfc-3701d4467b8/4524cce0-78cb-11f0-b937-17570cbedaf4.png
        message:
          type: string
          description: Message content for the order
          example: >-
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
            eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
            ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
            aliquip ex ea commodo consequat. Duis aute irure dolor in
            reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
            pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
            culpa qui officia deserunt mollit anim id est laborum.
        message_template_id:
          type:
            - integer
            - 'null'
          description: Message template ID for the order
          example: 12345
        handwriting_color:
          type: string
          description: Handwriting color to use
          example: rgba(31,0,113,0.80)
        font_size:
          type: string
          description: Font size for the order
          enum:
            - auto
            - small
            - medium
            - large
          example: auto
        style:
          type: integer
          description: Handwriting style ID for the order
          example: 4
        append_or_current_resident:
          type: boolean
          description: >-
            Appended "Or Current Resident" for the order.  This is helpful if
            you want to ensure delivery.
          example: false
        return_name:
          type:
            - string
            - 'null'
          description: Return name for the order
          example: John Doe
        return_address:
          type:
            - string
            - 'null'
          description: Return address line 1 for the order
          example: 123 Main Street
        return_address2:
          type:
            - string
            - 'null'
          description: Return address line 2 for the order
          example: null
        return_city:
          type:
            - string
            - 'null'
          description: Return city for the order
          example: Anytown
        return_province:
          type:
            - string
            - 'null'
          description: Return state/province for the order
          example: NY
        return_postal_code:
          type:
            - string
            - 'null'
          description: Return postal code for the order
          example: '12345'
        type:
          type: string
          description: Type of the order
          enum:
            - postcard
            - postcard6x11
            - letter
            - notecard
            - giftcard
            - windowlessletter
          example: postcard
        size:
          type: string
          description: Size of the order (valid for postcards only)
          enum:
            - 4x6
            - 6x9
            - 6x11
          example: 4x6
        method:
          type: string
          description: Method for the order
          enum:
            - api
            - cardbuilder
            - drip
            - email
            - zapier
        status:
          type: string
          description: Status of the order
          enum:
            - reviewing
            - processing
            - fulfilled
            - cancelled
            - printed
            - shipped
            - paused
            - delivered
        display_status:
          type: string
          description: Display status for the order
          example: Reviewing
        display_trigger:
          type: string
          description: Display trigger for the order
          example: API
        display_type:
          type: string
          description: Display type for the order
          example: Postcard-4x6
        addons:
          type:
            - object
            - 'null'
          description: Add-ons for the order
          properties:
            standardmail:
              type: string
              description: Standard mail add-on status
              enum:
                - 'on'
                - 'off'
              example: 'on'
        qrcode_url:
          type:
            - string
            - 'null'
          description: QR code URL for the order
          example: >-
            https://www.google.com?name=~FULL_NAME~&custom_field_1=~CUSTOM1~&custom_field2=~CUSTOM2~
        giftcard_brand:
          type:
            - string
            - 'null'
          description: Gift card brand for the order (valid for Giftcard orders only)
          example: null
        giftcard_image:
          type:
            - string
            - 'null'
          description: Gift card image URL for the order (valid for Giftcard orders only)
          example: null
        giftcard_amount:
          type:
            - integer
            - 'null'
          description: >-
            Gift card amount for the order in cents (valid for Giftcard orders
            only)
          example: null
        giftcard_brand_longname:
          type: string
          description: >-
            Gift card brand long name for the order (valid for Giftcard orders
            only)
          example: Amazon.com
        metadata:
          type:
            - object
            - 'null'
          description: >-
            The metadata object submitted with the order, returned exactly as it
            was sent. Null when the order was created without metadata.
          additionalProperties: true
          example:
            crm_deal_id: D-1042
            campaign: spring-winback
            source: hubspot
        updated_at:
          type: string
          format: date-time
          description: Last updated timestamp for the order
          example: '2025-08-14 16:42:44'
        created_at:
          type: string
          format: date-time
          description: Creation timestamp for the order
          example: '2025-08-14 16:42:44'
    sub-account:
      type: object
      properties:
        id:
          type: integer
          example: 1
        user_id:
          type: integer
          example: 2
        title:
          type: string
          example: My Sub Account
        return_name:
          type: string
          example: John Smith
        return_address:
          type: string
          example: 123 Smith Street
        return_address2:
          type: string
          example: Apartment 2
        return_city:
          type: string
          example: Denver
        return_state:
          type: string
          example: CO
        return_postal_code:
          type: string
          example: '12345'
    recipient-no-mailinglist:
      type: object
      properties:
        name:
          type: string
          example: Tobias Example
        company:
          type: string
          example: www.thanks.io
        address:
          type: string
          example: 123 Main Street
        address2:
          type: string
          example: Apartment 1
        city:
          type: string
          example: Any Town
        province:
          type: string
          description: State or Province
          example: KS
        postal_code:
          type: string
          example: '12345'
        country:
          type: string
          example: US
        dob:
          type: string
          description: >-
            Date of Birth in ISO 8601 format (YYYY-MM-DD) or null if not set. If
            provided as MM/DD/YYYY in requests, it will be converted to ISO 8601
            format.
          example: '1981-04-23'
        anniversary:
          type: string
          description: >-
            Can be used for house purchase anniversaries, move-in dates, or any
            recurring annual milestone.  Anniversary date in ISO 8601 format
            (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in
            requests, it will be converted to ISO 8601 format.
          example: '2025-07-21'
        email:
          type: string
          example: tobias@example.com
        phone:
          type: string
          example: +1 (555) 123-4567
        custom1:
          type: string
          description: Custom field for additional information about the recipient
          example: Unique Info
        custom2:
          type: string
          description: Custom field for additional information about the recipient
          example: For example a product code or customer ID
        custom3:
          type: string
          description: Custom field for additional information about the recipient
          example: Any Extra Info
        custom4:
          type: string
          description: Custom field for additional information about the recipient
          example: Any Extra Info
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````