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

# Create an offer with payment plans + assets in one atomic call.



## OpenAPI

````yaml https://api.offerclub.io/public-swagger-json post /v1.0/offers
openapi: 3.0.0
info:
  title: Offerclub.io Public API
  description: >-
    External API for integrations. Authenticate every request with the
    `x-api-key` header.
  version: '1.0'
  contact: {}
  license:
    name: Legal Terms
    url: https://offerclub.io/legal/terms
servers:
  - url: https://api.offerclub.io
security: []
tags: []
paths:
  /v1.0/offers:
    post:
      tags:
        - Public API — Offers
      summary: Create an offer with payment plans + assets in one atomic call.
      operationId: publicApiCreateOffer
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublicOfferRequestDto'
      responses:
        '201':
          description: Offer created — returns the full envelope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOfferDetailsResponseDto'
        '400':
          description: >-
            `OFFER_PAYMENT_PLAN_VALIDATION_FAILED` — Payment plan validation
            failed


            `OFFER_ASSETS_VALIDATION_FAILED` — One or more asset sections failed
            pre-flight validation. `details.issues` lists every violation.


            `FILE_ALREADY_COMMITTED` — File has already been committed


            `FILE_TYPE_NOT_ALLOWED_FOR_CONTEXT` — File type is not allowed for
            this context


            `VALIDATION_ERROR` — Validation error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponseDto'
                  - type: object
                    properties:
                      details:
                        oneOf:
                          - $ref: >-
                              #/components/schemas/OfferPaymentPlanValidationDetailsResponseDto
                          - $ref: >-
                              #/components/schemas/OfferAssetsValidationDetailsResponseDto
                          - $ref: >-
                              #/components/schemas/FileTypeNotAllowedDetailsResponseDto
                          - $ref: >-
                              #/components/schemas/ValidationErrorDetailsResponseDto
                          - type: object
                            nullable: true
        '401':
          description: '`UNAUTHORIZED` — Unauthorized — missing or invalid API key'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: >-
            `ONBOARDING_USER_NEEDS_REGISTRATION` — User bound to the API key no
            longer exists


            `ONBOARDING_USER_NEEDS_ORGANIZATION` — The user behind the API key
            no longer belongs to any organization


            `ORGANIZATION_NOT_FOUND` — Organization bound to the API key no
            longer exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: '`FILE_NOT_FOUND` — File not found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '409':
          description: >-
            `OFFER_OFFER_NUMBER_TAKEN` — Offer number is already taken in this
            organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: '`INTERNAL_ERROR` — An unexpected error occurred'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - ApiKey: []
components:
  schemas:
    CreatePublicOfferRequestDto:
      type: object
      properties:
        offer:
          description: Offer core fields (title, price, client info, document, ...).
          allOf:
            - $ref: '#/components/schemas/CreateOfferRequestDto'
        paymentPlans:
          description: Payment plans snapshot (all four plan types).
          allOf:
            - $ref: '#/components/schemas/PublicSetOfferPaymentPlansRequestDto'
        assets:
          description: Assets snapshot (all asset sections).
          allOf:
            - $ref: '#/components/schemas/PublicOfferAssetsRequestDto'
      required:
        - offer
        - paymentPlans
        - assets
    PublicOfferDetailsResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The ID of the element
        createdAt:
          format: date-time
          type: string
          description: The created at date of the element
        updatedAt:
          format: date-time
          type: string
          description: The updated at date of the element
        publicId:
          type: string
          description: Short URL-safe identifier used in the public share link
        offerNumber:
          type: string
          nullable: true
          description: User-set business reference number
        status:
          enum:
            - DRAFT
            - SENT
            - WON
            - LOST
          type: string
          description: Current offer status
        title:
          type: string
          nullable: true
          description: Offer title shown to the client
        subtitle:
          type: string
          nullable: true
          description: Subtitle shown beneath the title
        introduction:
          type: string
          nullable: true
          description: Introductory text shown at the top of the offer page
        price:
          type: number
          nullable: true
          description: Total offer price in the smallest currency unit (cents)
        validUntil:
          format: date-time
          type: string
          nullable: true
          description: Date until which the offer is valid
        clientFirstName:
          type: string
          nullable: true
          description: Client first name
        clientLastName:
          type: string
          nullable: true
          description: Client last name
        clientEmail:
          type: string
          nullable: true
          description: Client email address
        clientPhone:
          type: string
          nullable: true
          description: Client phone number
        clientCompanyName:
          type: string
          nullable: true
          description: Client company name
        sentToEmail:
          type: string
          nullable: true
          description: Email address the offer was actually sent to (snapshot at send-time)
        sentAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the offer was sent
        wonAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the offer was marked as won
        lostAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the offer was marked as lost
        archivedAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the offer was archived
        acceptedByFirstName:
          type: string
          nullable: true
          description: >-
            First name of the person who accepted the offer via the public
            surface
        acceptedByLastName:
          type: string
          nullable: true
          description: >-
            Last name of the person who accepted the offer via the public
            surface
        acceptedByEmail:
          type: string
          nullable: true
          description: Email of the person who accepted the offer
        acceptedByPhone:
          type: string
          nullable: true
          description: Phone number of the person who accepted the offer
        signatureFileId:
          type: string
          nullable: true
          description: File ID of the captured signature image
        declineReason:
          nullable: true
          enum:
            - NONE
            - TOO_EXPENSIVE
            - OTHER_PRIORITIES
            - TIMELINE
            - MISSING_EXPERTISE
            - PERSONAL_FIT
          type: string
          description: >-
            Reason given by the recipient when declining the offer (NONE if no
            reason provided)
        documentFileId:
          type: string
          nullable: true
          description: File ID of the attached PDF document
        availableActions:
          description: >-
            Server-computed map of dashboard actions the caller may currently
            perform on this offer
          allOf:
            - $ref: '#/components/schemas/OfferAvailableActionsResponseDto'
        publicUrl:
          type: string
          nullable: true
          description: >-
            Fully constructed public share URL (includes the auth token) - null
            if the offer is not sent yet
        signatureFileThumbnail:
          nullable: true
          description: >-
            Thumbnail of the captured signature — null when no signature is
            attached (offer not yet accepted via the public surface)
          type: object
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
        acceptedPaymentPlan:
          nullable: true
          description: >-
            The plan the recipient chose at accept-time — null until the offer
            is accepted (WON). All other plans are fetched via `GET
            /offers/:offerId/payment-plans`.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferAcceptedPaymentPlanResponseDto'
        paymentPlans:
          description: >-
            Grouped payment-plans snapshot for the offer. Same shape as `GET
            /offers/:offerId/payment-plans`.
          allOf:
            - $ref: '#/components/schemas/OfferPaymentPlansResponseDto'
        assets:
          description: >-
            Grouped assets snapshot for the offer. Same shape as `GET
            /offers/:offerId/assets`.
          allOf:
            - $ref: '#/components/schemas/OfferAssetsResponseDto'
      required:
        - id
        - createdAt
        - updatedAt
        - publicId
        - offerNumber
        - status
        - title
        - subtitle
        - introduction
        - price
        - validUntil
        - clientFirstName
        - clientLastName
        - clientEmail
        - clientPhone
        - clientCompanyName
        - sentToEmail
        - sentAt
        - wonAt
        - lostAt
        - archivedAt
        - acceptedByFirstName
        - acceptedByLastName
        - acceptedByEmail
        - acceptedByPhone
        - signatureFileId
        - declineReason
        - documentFileId
        - availableActions
        - publicUrl
        - signatureFileThumbnail
        - acceptedPaymentPlan
        - paymentPlans
        - assets
    ErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        code:
          enum:
            - INTERNAL_ERROR
            - VALIDATION_ERROR
            - ONBOARDING_USER_NEEDS_REGISTRATION
            - ONBOARDING_USER_NEEDS_ORGANIZATION
            - ORGANIZATION_NOT_FOUND
            - UNAUTHORIZED
            - FILE_NOT_FOUND
            - FILE_TYPE_NOT_ALLOWED
            - FILE_TYPE_NOT_ALLOWED_FOR_CONTEXT
            - FILE_ALREADY_COMMITTED
            - FILE_UPLOAD_FAILED
            - OFFER_OFFER_NUMBER_TAKEN
            - OFFER_INVALID_TRANSITION
            - OFFER_NOT_SENDABLE
            - OFFER_PAYMENT_PLAN_INVALID
            - OFFER_PAYMENT_PLAN_VALIDATION_FAILED
            - OFFER_ASSETS_VALIDATION_FAILED
            - ENTITY_NOT_FOUND
          type: string
          description: Machine-readable error code
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message
          example: Validation failed
        details:
          type: object
          additionalProperties: true
          nullable: true
          description: Additional error details (e.g. validation errors, missing fields)
          example:
            errors:
              - email must be a string
      required:
        - statusCode
        - code
        - message
    OfferPaymentPlanValidationDetailsResponseDto:
      type: object
      properties:
        errors:
          description: >-
            Every save-time violation collected on the aggregate payment-plans
            PUT. Empty on the happy path (error is not thrown then).
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanCustomViolationResponseDto'
      required:
        - errors
    OfferAssetsValidationDetailsResponseDto:
      type: object
      properties:
        errors:
          description: >-
            Every validation issue collected across all six asset sections.
            Empty on the happy path (error is not thrown then).
          type: array
          items:
            $ref: '#/components/schemas/OfferAssetValidationIssueResponseDto'
      required:
        - errors
    FileTypeNotAllowedDetailsResponseDto:
      type: object
      properties:
        allowedFileTypes:
          description: The allowed file type groups for this context
          type: array
          items:
            type: string
        allowedMimeTypes:
          description: The concrete allowed MIME types for this context
          type: array
          items:
            type: string
      required:
        - allowedFileTypes
        - allowedMimeTypes
    ValidationErrorDetailsResponseDto:
      type: object
      properties:
        errors:
          description: The validation errors
          type: array
          items:
            $ref: '#/components/schemas/FlatValidationErrorDetailsResponseDto'
      required:
        - errors
    CreateOfferRequestDto:
      type: object
      properties:
        offerNumber:
          type: string
          nullable: true
          description: User-set business reference number (unique per organization)
        title:
          type: string
          nullable: true
          description: Offer title shown to the client
        subtitle:
          type: string
          nullable: true
          description: Subtitle shown beneath the offer title
        introduction:
          type: string
          nullable: true
          description: Introductory text shown at the top of the offer page
        price:
          type: number
          nullable: true
          minimum: 0
          description: Total offer price in the smallest currency unit (cents)
        validUntil:
          format: date-time
          type: string
          nullable: true
          description: Date until which the offer is valid (ISO 8601)
        clientFirstName:
          type: string
          nullable: true
          description: Client first name
        clientLastName:
          type: string
          nullable: true
          description: Client last name
        clientEmail:
          type: string
          nullable: true
          format: email
          description: Client email address (where the offer link will be sent)
        clientPhone:
          type: string
          nullable: true
          description: Client phone number
        clientCompanyName:
          type: string
          nullable: true
          description: Client company name
        documentFileId:
          type: string
          format: uuid
          description: >-
            Attached PDF document file ID (must be a draft previously uploaded
            via /files)
          nullable: true
    PublicSetOfferPaymentPlansRequestDto:
      type: object
      properties:
        upfront:
          description: UPFRONT plan slice.
          allOf:
            - $ref: '#/components/schemas/SetOfferUpfrontPaymentPlanRequestDto'
        split5050:
          description: SPLIT_50_50 plan slice.
          allOf:
            - $ref: '#/components/schemas/SetOfferSplit5050PaymentPlanRequestDto'
        installments:
          description: INSTALLMENT plans slice (flat counts or object items).
          allOf:
            - $ref: >-
                #/components/schemas/PublicSetOfferInstallmentsPaymentPlansRequestDto
        custom:
          description: CUSTOM plan slice (position-optional items).
          allOf:
            - $ref: '#/components/schemas/PublicSetOfferCustomPaymentPlanRequestDto'
      required:
        - upfront
        - split5050
        - installments
        - custom
    PublicOfferAssetsRequestDto:
      type: object
      properties:
        faqs:
          description: FAQ section state.
          allOf:
            - $ref: '#/components/schemas/PublicOfferFaqSectionRequestDto'
        banner:
          description: Banner section state.
          allOf:
            - $ref: '#/components/schemas/OfferSingleAssetSectionRequestDto'
        reviews:
          description: Review section state.
          allOf:
            - $ref: '#/components/schemas/PublicOfferReviewSectionRequestDto'
        location:
          description: Location section state.
          allOf:
            - $ref: '#/components/schemas/OfferSingleAssetSectionRequestDto'
        process:
          description: Process section state.
          allOf:
            - $ref: '#/components/schemas/OfferSingleAssetSectionRequestDto'
        media:
          description: Media section state.
          allOf:
            - $ref: '#/components/schemas/OfferSingleAssetSectionRequestDto'
        logos:
          description: Logo section state.
          allOf:
            - $ref: '#/components/schemas/PublicOfferLogoSectionRequestDto'
        callRecording:
          description: Call-recording section state (sources from Media library).
          allOf:
            - $ref: '#/components/schemas/OfferSingleAssetSectionRequestDto'
      required:
        - faqs
        - banner
        - reviews
        - location
        - process
        - media
        - logos
        - callRecording
    OfferAvailableActionsResponseDto:
      type: object
      properties:
        canUpdate:
          type: boolean
          description: Whether the offer can currently be updated via PATCH
        canDelete:
          type: boolean
          description: Whether the offer can currently be deleted
        canSend:
          type: boolean
          description: Whether the offer can currently be sent (via EMAIL or LINK_ONLY)
        canMarkWon:
          type: boolean
          description: Whether the offer can currently be manually marked as won
        canMarkLost:
          type: boolean
          description: Whether the offer can currently be manually marked as lost
        canArchive:
          type: boolean
          description: Whether the offer can currently be archived
        canUnarchive:
          type: boolean
          description: Whether the offer can currently be unarchived
        canManagePaymentPlans:
          type: boolean
          description: >-
            Whether payment plans can currently be added/removed (DRAFT + price
            >= 100 + not archived)
        canManageAssets:
          type: boolean
          description: Whether offer assets can currently be managed.
      required:
        - canUpdate
        - canDelete
        - canSend
        - canMarkWon
        - canMarkLost
        - canArchive
        - canUnarchive
        - canManagePaymentPlans
        - canManageAssets
    FileImageThumbnailResponseDto:
      type: object
      properties:
        thumbnailWidth:
          type: number
          nullable: true
          description: The width of the thumbnail
        thumbnailHeight:
          type: number
          nullable: true
          description: The height of the thumbnail
        thumbnailUrl:
          type: string
          nullable: true
          description: The (signed) URL for the thumbnail, null if the file is not an image
        thumbnailUrlExpiresAt:
          format: date-time
          type: string
          nullable: true
          description: >-
            The expiration date for the (signed) URL for the thumbnail, null if
            the file is not an image or the file is public accessible
      required:
        - thumbnailWidth
        - thumbnailHeight
        - thumbnailUrl
        - thumbnailUrlExpiresAt
    OfferAcceptedPaymentPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Plan ID. Same value the FE originally sent via `paymentPlanId` on
            mark-won.
        type:
          enum:
            - UPFRONT
            - SPLIT_50_50
            - INSTALLMENT
            - CUSTOM
          type: string
          description: Plan type — discriminator for the four supported payment structures.
        installmentCount:
          type: number
          nullable: true
          description: >-
            Number of installments for type=INSTALLMENT (3, 4, 6, 8, 10, 12).
            Null for UPFRONT/SPLIT_50_50/CUSTOM.
        computedSchedule:
          description: >-
            Server-computed payment schedule as of the current offer price. See
            the schedule-item DTO for full null-semantics per field.
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanScheduleItemResponseDto'
      required:
        - id
        - type
        - installmentCount
        - computedSchedule
    OfferPaymentPlansResponseDto:
      type: object
      properties:
        upfront:
          nullable: true
          description: UPFRONT plan slice. Null when no row has been saved yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferUpfrontPaymentPlanResponseDto'
        split5050:
          nullable: true
          description: SPLIT_50_50 plan slice. Null when no row has been saved yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferSplit5050PaymentPlanResponseDto'
        installments:
          description: >-
            INSTALLMENT plans slice (multi-count). Always present; `items` may
            be empty.
          allOf:
            - $ref: '#/components/schemas/OfferInstallmentsPaymentPlansResponseDto'
        custom:
          nullable: true
          description: CUSTOM plan slice. Null when no row has been saved yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferCustomPaymentPlanResponseDto'
      required:
        - upfront
        - split5050
        - installments
        - custom
    OfferAssetsResponseDto:
      type: object
      properties:
        faqs:
          nullable: true
          description: >-
            FAQ section + items. Null when no section row exists yet for the
            offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferFaqSectionResponseDto'
        banner:
          nullable: true
          description: >-
            Banner section + picked content. Null when no section row exists yet
            for the offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferBannerSectionResponseDto'
        reviews:
          nullable: true
          description: >-
            Review section + items. Null when no section row exists yet for the
            offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferReviewSectionResponseDto'
        location:
          nullable: true
          description: >-
            Location section + picked content. Null when no section row exists
            yet for the offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferLocationSectionResponseDto'
        process:
          nullable: true
          description: >-
            Process section + picked content. Null when no section row exists
            yet for the offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferProcessSectionResponseDto'
        media:
          nullable: true
          description: >-
            Media section + picked content (video embed). Null when no section
            row exists yet for the offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferMediaSectionResponseDto'
        logos:
          nullable: true
          description: >-
            Logo section + items. Null when no section row exists yet for the
            offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferLogoSectionResponseDto'
        callRecording:
          nullable: true
          description: >-
            Call-recording section + picked content (from Media library). Null
            when no section row exists yet for the offer.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferCallRecordingSectionResponseDto'
      required:
        - faqs
        - banner
        - reviews
        - location
        - process
        - media
        - logos
        - callRecording
    OfferPaymentPlanCustomViolationResponseDto:
      type: object
      properties:
        rule:
          enum:
            - AMOUNT_SUM_MISMATCH
            - ITEMS_BELOW_MIN
            - ITEMS_ABOVE_MAX
            - POSITION_NON_CONTIGUOUS
            - DUE_DATE_PARTIAL_FILL
            - DUE_DATE_NOT_ASCENDING
            - ITEM_VALUE_MISSING
            - ITEM_VALUE_AMBIGUOUS
            - ITEM_INVALID_VALUE
          type: string
          description: >-
            Machine-readable rule code — FE matches on this to render a targeted
            hint.
        diff:
          type: number
          nullable: true
          description: >-
            For sum / count violations: signed delta in the canonical unit.
            AMOUNT_SUM_MISMATCH → cent delta (positive = over budget, negative =
            under). ITEMS_BELOW_MIN / ITEMS_ABOVE_MAX → count delta. Null for
            rules where a numeric delta makes no sense.
        itemPosition:
          type: number
          nullable: true
          description: >-
            Position of the offending item (1-based), if the rule applies to a
            single item. Null for plan-wide rules.
      required:
        - rule
        - diff
        - itemPosition
    OfferAssetValidationIssueResponseDto:
      type: object
      properties:
        assetType:
          enum:
            - FAQ
            - BANNER
            - REVIEW
            - LOCATION
            - PROCESS
            - MEDIA
            - LOGO
            - CALL_RECORDING
          type: string
          description: Which asset section the issue belongs to.
        reason:
          enum:
            - POSITIONS_NOT_GAPLESS
            - DUPLICATE_REFERENCES
            - ASSET_NOT_FOUND
          type: string
          description: >-
            Machine-readable reason for the issue (closed set — FE branches on
            this without parsing text).
        field:
          type: string
          description: >-
            Dot-path from the aggregate PUT request root (e.g. `faqs.items`,
            `banner.assetId`) so the FE can highlight the exact input.
        message:
          type: string
          description: >-
            Human-readable explanation, safe to render inline as a fallback. FE
            should prefer branching on `reason` for its own UX copy.
        assetId:
          type: string
          nullable: true
          description: >-
            The specific asset id the issue is about — only set for
            `ASSET_NOT_FOUND`; absent otherwise.
      required:
        - assetType
        - reason
        - field
        - message
        - assetId
    FlatValidationErrorDetailsResponseDto:
      type: object
      properties:
        field:
          type: string
          description: The field that failed validation
        message:
          type: string
          description: The message that explains the validation failure
      required:
        - field
        - message
    SetOfferUpfrontPaymentPlanRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the UPFRONT plan is offered to the recipient. Disabled plans
            persist so config survives across toggles.
      required:
        - enabled
    SetOfferSplit5050PaymentPlanRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the SPLIT_50_50 plan is offered to the recipient. Disabled
            plans persist so config survives across toggles.
      required:
        - enabled
    PublicSetOfferInstallmentsPaymentPlansRequestDto:
      type: object
      properties:
        counts:
          items:
            type: number
            enum:
              - 3
              - 4
              - 6
              - 8
              - 10
              - 12
          description: >-
            Flat list of installment counts to enable (e.g. [3, 6]). Each must
            be one of the allowed counts (3, 4, 6, 8, 10, 12).
          type: array
        items:
          description: >-
            Object-shape list of installment counts to enable. Equivalent to
            `counts` — merged + deduped when both are present.
          type: array
          items:
            $ref: '#/components/schemas/SetOfferInstallmentPaymentPlanRequestDto'
    PublicSetOfferCustomPaymentPlanRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the CUSTOM plan is offered to the recipient. Items are
            persisted regardless — disabled plans keep their config for later
            re-enable.
        items:
          minItems: 0
          description: >-
            Plan items. `position` optional — omit to order by array index. XOR
            percentage|amount + dueDate rules are validated live and at
            send-time. Max 50.
          type: array
          items:
            $ref: '#/components/schemas/PublicCustomPaymentPlanItemRequestDto'
      required:
        - enabled
        - items
    PublicOfferFaqSectionRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the section is visible to the recipient. Disabled sections
            keep their items but are hidden + excluded from sendability.
        items:
          description: >-
            FAQ items to save. `position` optional — omit to order by array
            index. faqIds unique within the section. Max 20 items. Empty array
            clears the items.
          type: array
          items:
            $ref: '#/components/schemas/PublicOfferAssetItemRequestDto'
      required:
        - enabled
        - items
    OfferSingleAssetSectionRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the section is visible to the recipient. Disabled sections
            keep their content but are hidden + excluded from sendability.
        assetId:
          type: string
          nullable: true
          format: uuid
          description: >-
            ID of the library asset to link. `null` clears the picked content.
            Must belong to the same organization as the offer.
      required:
        - enabled
        - assetId
    PublicOfferReviewSectionRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the section is visible to the recipient. Disabled sections
            keep their items but are hidden + excluded from sendability.
        items:
          description: >-
            Review items to save. `position` optional — omit to order by array
            index. reviewIds unique within the section. Max 12 items. Empty
            array clears the items.
          type: array
          items:
            $ref: '#/components/schemas/PublicOfferAssetItemRequestDto'
      required:
        - enabled
        - items
    PublicOfferLogoSectionRequestDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Whether the section is visible to the recipient. Disabled sections
            keep their items but are hidden + excluded from sendability.
        items:
          description: >-
            Logo items to save. `position` optional — omit to order by array
            index. logoIds unique within the section. Max 20 items. Empty array
            clears the items.
          type: array
          items:
            $ref: '#/components/schemas/PublicOfferAssetItemRequestDto'
      required:
        - enabled
        - items
    OfferPaymentPlanScheduleItemResponseDto:
      type: object
      properties:
        position:
          type: number
          description: Position within the plan (1..N)
        source:
          enum:
            - PERCENTAGE
            - AMOUNT
          type: string
          description: >-
            Derived discriminator telling the FE which value field was the
            user-supplied source-of-truth (only meaningful for CUSTOM; always
            PERCENTAGE for UPFRONT/SPLIT_50_50/INSTALLMENT). Used by the editor
            to focus the right input field.
        percentage:
          type: number
          nullable: true
          description: >-
            Percentage of the offer total, as Int × 100 (e.g. 3333 = 33.33%).
            Null in two cases: a CUSTOM AMOUNT-source item on a null/zero-price
            offer (cannot derive), or a CUSTOM item with neither value stored
            (broken state).
        amount:
          type: number
          nullable: true
          description: >-
            Amount in cents. Null when the offer price is null (no derivation
            possible) or a CUSTOM item has neither value stored.
        dueDate:
          format: date-time
          type: string
          nullable: true
          description: >-
            Optional milestone date. Always null for UPFRONT, SPLIT_50_50 and
            INSTALLMENT; only set on CUSTOM items that carry a date.
      required:
        - position
        - source
        - percentage
        - amount
        - dueDate
    OfferUpfrontPaymentPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Plan ID. Used as `paymentPlanId` in mark-won / accept flows and as
            the React-key for list rendering.
        enabled:
          type: boolean
          description: >-
            Whether the plan is currently offered to the recipient. Disabled
            plans persist so config survives across toggles.
        computedSchedule:
          description: >-
            Server-computed payment schedule. `amount` fields may be null when
            the offer has no price set yet — see the schedule-item DTO for full
            null-semantics.
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanScheduleItemResponseDto'
      required:
        - id
        - enabled
        - computedSchedule
    OfferSplit5050PaymentPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Plan ID. Used as `paymentPlanId` in mark-won / accept flows and as
            the React-key for list rendering.
        enabled:
          type: boolean
          description: >-
            Whether the plan is currently offered to the recipient. Disabled
            plans persist so config survives across toggles.
        computedSchedule:
          description: >-
            Server-computed payment schedule. `amount` fields may be null when
            the offer has no price set yet — see the schedule-item DTO for full
            null-semantics.
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanScheduleItemResponseDto'
      required:
        - id
        - enabled
        - computedSchedule
    OfferInstallmentsPaymentPlansResponseDto:
      type: object
      properties:
        items:
          description: >-
            All installment counts configured on the offer (enabled + disabled),
            sorted ascending by count.
          type: array
          items:
            $ref: '#/components/schemas/OfferInstallmentPaymentPlanResponseDto'
      required:
        - items
    OfferCustomPaymentPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Plan ID. Used as `paymentPlanId` in mark-won / accept flows and as
            the React-key for list rendering.
        enabled:
          type: boolean
          description: >-
            Whether the plan is currently offered to the recipient. Items are
            persisted regardless — disabled plans keep their config for later
            re-enable.
        computedSchedule:
          description: >-
            Server-computed payment schedule (also serves as the edit source of
            truth — each item carries `source` for the canonical input field).
            May be an empty array when no items have been saved yet.
            `amount`/`percentage` fields may be null on a price-less offer.
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanScheduleItemResponseDto'
      required:
        - id
        - enabled
        - computedSchedule
    OfferFaqSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: >-
            True after the offer has been sent. False pre-SEND — all Assets are
            from the live library.
        enabled:
          type: boolean
          description: >-
            Whether the FAQ section is currently active. Disabled sections
            persist items but are hidden from the recipient and excluded from
            sendability.
        items:
          description: >-
            FAQ items in display order. Broken rows (source FAQ deleted, no
            snapshot yet) are filtered out — they never reach the FE.
          type: array
          items:
            $ref: '#/components/schemas/OfferFaqItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - items
    OfferBannerSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: >-
            True after the offer has been sent (item content is from snapshot).
            False pre-SEND (item content from live library).
        enabled:
          type: boolean
          description: >-
            Whether the banner section is currently active. Disabled sections
            persist content but are hidden from the recipient and excluded from
            sendability.
        item:
          nullable: true
          description: >-
            Picked banner content. Null when the section is toggled on but no
            banner has been linked yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferBannerItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - item
    OfferReviewSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: >-
            True after the offer has been sent (items content is from snapshot).
            False pre-SEND (items content from live library).
        enabled:
          type: boolean
          description: >-
            Whether the review section is currently active. Disabled sections
            persist items but are hidden from the recipient and excluded from
            sendability.
        items:
          description: >-
            Review items in display order. Broken rows (source Review deleted,
            no snapshot yet) are filtered out — they never reach the FE.
          type: array
          items:
            $ref: '#/components/schemas/OfferReviewItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - items
    OfferLocationSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: True after the offer has been sent — item content is from snapshot.
        enabled:
          type: boolean
          description: >-
            Whether the location section is currently active. Disabled sections
            persist content but are hidden from the recipient and excluded from
            sendability.
        item:
          nullable: true
          description: >-
            Picked location content. Null when the section is toggled on but no
            location has been linked yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferLocationItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - item
    OfferProcessSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: True after SEND — item content from snapshot.
        enabled:
          type: boolean
          description: >-
            Whether the process section is currently active. Disabled sections
            persist content but are hidden from the recipient and excluded from
            sendability.
        item:
          nullable: true
          description: >-
            Picked process content. Null when the section is toggled on but no
            process has been linked yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferProcessItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - item
    OfferMediaSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: True after SEND — item content is from snapshot.
        enabled:
          type: boolean
          description: >-
            Whether the media section is currently active. Disabled sections
            persist content but are hidden from the recipient and excluded from
            sendability.
        item:
          nullable: true
          description: >-
            Picked media content. Null when the section is toggled on but no
            media has been linked yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferMediaItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - item
    OfferLogoSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: >-
            True after the offer has been sent (items content is from snapshot).
            False pre-SEND (items content from live library).
        enabled:
          type: boolean
          description: >-
            Whether the logo section is currently active. Disabled sections
            persist items but are hidden from the recipient and excluded from
            sendability.
        items:
          description: >-
            Logo items in display order. Broken rows (source Logo deleted, no
            snapshot yet) are filtered out — they never reach the FE.
          type: array
          items:
            $ref: '#/components/schemas/OfferLogoItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - items
    OfferCallRecordingSectionResponseDto:
      type: object
      properties:
        isSnapshot:
          type: boolean
          description: True after SEND — item content is from snapshot.
        enabled:
          type: boolean
          description: >-
            Whether the call-recording section is currently active. Disabled
            sections persist content but are hidden from the recipient and
            excluded from sendability.
        item:
          nullable: true
          description: >-
            Picked call-recording content. Null when the section is toggled on
            but no media has been linked yet.
          type: object
          allOf:
            - $ref: '#/components/schemas/OfferCallRecordingItemResponseDto'
      required:
        - isSnapshot
        - enabled
        - item
    SetOfferInstallmentPaymentPlanRequestDto:
      type: object
      properties:
        count:
          enum:
            - 3
            - 4
            - 6
            - 8
            - 10
            - 12
          type: number
          description: >-
            Number of installments. Must be one of the allowed counts (3, 4, 6,
            8, 10, 12).
      required:
        - count
    PublicCustomPaymentPlanItemRequestDto:
      type: object
      properties:
        position:
          type: number
          minimum: 1
          description: >-
            Optional position (1-based). Omit to derive from array order;
            provide on every item to control ordering explicitly.
        percentage:
          type: number
          nullable: true
          minimum: 1
          description: >-
            Percentage of the offer total, as Int × 100 (e.g. 3333 = 33.33%).
            Provide this OR `amount`, not both.
        amount:
          type: number
          nullable: true
          minimum: 1
          description: Amount in cents. Provide this OR `percentage`, not both.
        dueDate:
          format: date-time
          type: string
          nullable: true
          description: >-
            Optional milestone date. All-or-nothing per plan; strictly ascending
            by position when set.
    PublicOfferAssetItemRequestDto:
      type: object
      properties:
        assetId:
          type: string
          format: uuid
          description: >-
            ID of the asset to link. Must belong to the same organization as the
            offer.
        position:
          type: number
          minimum: 1
          description: >-
            Optional display position (1-based). Omit to derive from array
            order; provide on every item to control ordering explicitly.
      required:
        - assetId
    OfferInstallmentPaymentPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Plan ID. Used as `paymentPlanId` in mark-won / accept flows and as
            the React-key for list rendering.
        count:
          type: number
          description: Number of installments (3, 4, 6, 8, 10, 12).
          enum:
            - 3
            - 4
            - 6
            - 8
            - 10
            - 12
        enabled:
          type: boolean
          description: >-
            Whether this count is currently offered to the recipient. Disabled
            counts persist for potential re-enable.
        computedSchedule:
          description: >-
            Server-computed payment schedule for this count. `amount` fields may
            be null when the offer has no price set yet.
          type: array
          items:
            $ref: '#/components/schemas/OfferPaymentPlanScheduleItemResponseDto'
      required:
        - id
        - count
        - enabled
        - computedSchedule
    OfferFaqItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library FAQ this item references. Null when the source FAQ has been
            deleted (post-SEND only — pre-SEND broken rows are filtered out
            before this response).
        question:
          type: string
          description: Display question. Live (pre-SEND) or snapshot (post-SEND).
        answer:
          type: string
          description: Display answer. Live (pre-SEND) or snapshot (post-SEND).
        position:
          type: number
          description: Display position within the section (1..N).
      required:
        - sourceId
        - question
        - answer
        - position
    OfferBannerItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Banner this item references. Null when the source Banner has
            been deleted post-SEND (snapshot still drives the displayed
            content).
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        title:
          type: string
          description: Banner title. Live (pre-SEND) or snapshot (post-SEND).
        description:
          type: string
          nullable: true
          description: Banner description. Optional on the source — may be null.
        buttonText:
          type: string
          nullable: true
          description: Banner CTA button text. Optional — may be null.
        buttonLink:
          type: string
          nullable: true
          description: Banner CTA button link. Optional — may be null.
        imageFileThumbnail:
          description: >-
            Resolved banner image thumbnail (signed URL + filename). Always
            present — the item is only emitted when the thumbnail resolves
            successfully (otherwise the whole section returns null instead of
            exposing a broken item).
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
      required:
        - sourceId
        - name
        - title
        - description
        - buttonText
        - buttonLink
        - imageFileThumbnail
    OfferReviewItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Review this item references. Null when the source Review has
            been deleted post-SEND (snapshot drives the displayed content).
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        clientName:
          type: string
          description: Client name (snapshot at SEND, or live pre-SEND).
        clientRole:
          type: string
          nullable: true
          description: Client role / title. Optional on the source review — may be null.
        title:
          type: string
          description: Review title.
        content:
          type: string
          description: Review body.
        stars:
          type: number
          description: Star rating (1-5).
        profilePictureFileThumbnail:
          nullable: true
          description: >-
            Resolved profile-picture thumbnail. Null when no profile picture is
            set.
          type: object
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
        imageFileThumbnail:
          nullable: true
          description: >-
            Resolved image thumbnail (context / product image). Null when no
            image is set.
          type: object
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
        position:
          type: number
          description: Display position within the section (1..N).
      required:
        - sourceId
        - name
        - clientName
        - clientRole
        - title
        - content
        - stars
        - profilePictureFileThumbnail
        - imageFileThumbnail
        - position
    OfferLocationItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Location this item references. Null when the source has been
            deleted post-SEND.
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        title:
          type: string
          description: Location title.
        description:
          type: string
          nullable: true
          description: Optional description.
        companyName:
          type: string
          description: Company name.
        street:
          type: string
          description: Street.
        houseNumber:
          type: string
          description: House number.
        postalCode:
          type: string
          description: Postal code.
        city:
          type: string
          description: City.
        country:
          type: string
          description: Country.
        imageFileThumbnail:
          description: >-
            Resolved image thumbnail. Always present — item only emitted when
            image resolves.
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
        iconFileThumbnail:
          nullable: true
          description: >-
            Resolved icon thumbnail. Optional — null when no icon set on the
            source.
          type: object
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
      required:
        - sourceId
        - name
        - title
        - description
        - companyName
        - street
        - houseNumber
        - postalCode
        - city
        - country
        - imageFileThumbnail
        - iconFileThumbnail
    OfferProcessItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Process this item references. Null when the source has been
            deleted post-SEND.
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        title:
          type: string
          description: Process title.
        steps:
          description: Process steps in order.
          type: array
          items:
            $ref: '#/components/schemas/OfferProcessStepResponseDto'
      required:
        - sourceId
        - name
        - title
        - steps
    OfferMediaItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Media this item references. Null when the source has been
            deleted post-SEND (snapshot drives the displayed content).
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        url:
          type: string
          description: Embed / share URL.
        videoProvider:
          enum:
            - YOUTUBE
            - VIMEO
            - WISTIA
            - LOOM
            - OTHER
          type: string
          description: Video provider. `OTHER` for unrecognised providers.
      required:
        - sourceId
        - name
        - url
        - videoProvider
    OfferLogoItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Logo this item references. Null when the source Logo has
            been deleted post-SEND (snapshot drives the displayed content).
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        imageFileThumbnail:
          description: >-
            Resolved image thumbnail. Always present — the item is only emitted
            when the image resolves successfully (broken items are filtered
            out).
          allOf:
            - $ref: '#/components/schemas/FileImageThumbnailResponseDto'
        position:
          type: number
          description: Display position within the section (1..N).
      required:
        - sourceId
        - name
        - imageFileThumbnail
        - position
    OfferCallRecordingItemResponseDto:
      type: object
      properties:
        sourceId:
          type: string
          nullable: true
          description: >-
            Library Media this item references. Null when the source has been
            deleted post-SEND (snapshot drives the displayed content).
        name:
          type: string
          description: >-
            Internal display name (dashboard-only). Live (pre-SEND) or snapshot
            (post-SEND).
        url:
          type: string
          description: Embed / share URL.
        videoProvider:
          enum:
            - YOUTUBE
            - VIMEO
            - WISTIA
            - LOOM
            - OTHER
          type: string
          description: Video provider. `OTHER` for unrecognised providers.
      required:
        - sourceId
        - name
        - url
        - videoProvider
    OfferProcessStepResponseDto:
      type: object
      properties:
        index:
          type: number
          description: Display order within the process (0-based).
        title:
          type: string
          description: Step title.
        description:
          type: string
          nullable: true
          description: Optional description.
        state:
          enum:
            - DONE
            - CTA
            - FUTURE
          type: string
          description: Step state (DONE / CTA / FUTURE).
        buttonText:
          type: string
          nullable: true
          description: Optional button label.
      required:
        - index
        - title
        - description
        - state
        - buttonText
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication (can be generated in the settings)

````