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

# Send or resend secure CFPB EcoLetters

> Process the secure EcoLetter payment, record the YouNegotiate EcoLetter transaction, queue CFPB EcoLetters for active consumers, and update CFPB Communication History. The same endpoint backs Send Secure EcoLetters from pending rows and Resend Secure EcoLetters from history rows.



## OpenAPI

````yaml /api/creditor.openapi.yaml post /communications/cfpb-validation-letter/{fileUploadHistory}/secure-ecoletters
openapi: 3.1.0
info:
  title: YouNegotiate Creditor API
  version: '2.0'
  description: >-
    Stateless API endpoints for creditor portal authentication and account
    access.
servers:
  - url: https://api.creditor.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public creditor domain system and health endpoints.
  - name: Authentication
    description: Creditor registration, login, password, and email verification endpoints.
  - name: Account Settings
    description: >-
      Authenticated creditor profile, contact, operating-hours, and
      profile-image endpoints.
  - name: Account Profile
    description: >-
      Creditor onboarding profile, membership, billing, and setup status
      endpoints.
  - name: Setup Wizard
    description: >-
      Creditor setup wizard status, required-step completion, and optional-step
      completion.
  - name: Dashboard
    description: Creditor dashboard work queues and performance widgets.
  - name: Import / Export
    description: >-
      Creditor consumer import upload sessions, queued imports, history,
      downloads, and failed-row files.
  - name: Membership Settings
    description: >-
      Creditor membership dashboard, plan changes, payment method, cancellation,
      special-plan inquiry, and over-limit retry endpoints.
  - name: Merchant Account
    description: >-
      Existing merchant processor credentials, Tilled onboarding, and merchant
      application endpoints.
  - name: Header Profiles
    description: >-
      CSV header profile upload, mapping, download, and setup wizard completion
      endpoints.
  - name: SFTP Connections
    description: >-
      Creditor-managed SFTP connection profiles for imports, exports, and setup
      wizard completion.
  - name: Sub Accounts
    description: >-
      Creditor-managed sub account list, export, create, update, and delete
      endpoints.
  - name: Pay Terms Offers
    description: >-
      Creditor-managed master, sub-account, group, and group-sub-account Pay
      Terms endpoints.
  - name: Individual Custom Offers
    description: Creditor individual custom offer list endpoints.
  - name: Negotiations
    description: >-
      Creditor negotiation work queues, including notice responses and offer
      review counts.
  - name: Communications / CFPB Validation Letter
    description: >-
      CFPB Validation Letter tables, secure EcoLetter send/resend, CSV export,
      and print/download actions.
  - name: Communications / EcoLetter Template
    description: >-
      Creditor EcoLetter template management for secure eLetter communications
      and campaigns.
  - name: Communications / Groups
    description: >-
      Creditor communication group management for dynamic consumer targeting and
      campaign selection.
  - name: Communications / Schedule Campaign
    description: >-
      Creditor EcoLetter campaign scheduling, quote, immediate send, and
      delivery queue endpoints.
  - name: Communications / Campaign Tracker
    description: >-
      Creditor campaign tracker reporting, refresh, and consumer export
      endpoints.
  - name: Consumer Profiles
    description: Creditor Consumer Profiles list, filter options, and CSV export endpoints.
  - name: Terms & Conditions
    description: Creditor-managed master and sub-account Terms & Conditions templates.
  - name: About Us & Contact
    description: Creditor-managed company About Us content shown to consumers.
  - name: Logo & Links
    description: >-
      Creditor-managed master and sub-account personalized logo colors, size,
      and consumer link metadata.
  - name: Users
    description: >-
      Master creditor user management, invitations, and account deletion
      endpoints.
paths:
  /communications/cfpb-validation-letter/{fileUploadHistory}/secure-ecoletters:
    post:
      tags:
        - Communications / CFPB Validation Letter
      summary: Send or resend secure CFPB EcoLetters
      description: >-
        Process the secure EcoLetter payment, record the YouNegotiate EcoLetter
        transaction, queue CFPB EcoLetters for active consumers, and update CFPB
        Communication History. The same endpoint backs Send Secure EcoLetters
        from pending rows and Resend Secure EcoLetters from history rows.
      operationId: creditorSendCfpbValidationLetterSecureEcoLetters
      parameters:
        - $ref: '#/components/parameters/CfpbFileUploadHistoryId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CfpbValidationLetterActionRequest'
            example:
              with_qr_code: true
      responses:
        '200':
          description: Secure CFPB EcoLetters queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CfpbValidationLetterMutationResponse'
              example:
                message: >-
                  All secure EcoLetters are being processed. You will receive a
                  notification when complete.
                data:
                  id: 42
                  filename: cfpb-add-accounts.csv
                  active_consumers_count: 10
                  cfpb:
                    last_action_type: eco_letter_send
                    last_action_label: EcoLetter Sent
                    last_action_with_qr: true
                    last_action_cost: '5.00'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/ActiveMembershipRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  parameters:
    CfpbFileUploadHistoryId:
      name: fileUploadHistory
      in: path
      required: true
      description: CFPB import file upload history ID.
      schema:
        type: integer
  schemas:
    CfpbValidationLetterActionRequest:
      type: object
      additionalProperties: false
      properties:
        with_qr_code:
          type: boolean
          default: true
          description: >-
            Whether the generated CFPB validation letter should include the
            personalized QR code.
    CfpbValidationLetterMutationResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
        data:
          $ref: '#/components/schemas/CfpbValidationLetterRow'
    CfpbValidationLetterRow:
      type: object
      additionalProperties: false
      required:
        - id
        - filename
        - upload_type
        - active_consumers_count
        - cfpb
        - actions
        - action_items
        - created_at
      properties:
        id:
          type: integer
        filename:
          type: string
        upload_type:
          type: object
          additionalProperties: false
          required:
            - value
            - label
          properties:
            value:
              type: string
              enum:
                - manual
                - sftp
            label:
              type: string
              enum:
                - Manual
                - SFTP
        active_consumers_count:
          type: integer
        cfpb:
          $ref: '#/components/schemas/CfpbValidationLetterSnapshot'
        uploaded_by:
          anyOf:
            - $ref: '#/components/schemas/CfpbValidationLetterUploadedBy'
            - type: 'null'
        actions:
          $ref: '#/components/schemas/CfpbValidationLetterActions'
        action_items:
          type: array
          items:
            $ref: '#/components/schemas/CfpbValidationLetterActionItem'
        created_at:
          type: string
          format: date-time
          nullable: true
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    CfpbValidationLetterSnapshot:
      type: object
      additionalProperties: false
      required:
        - hidden
        - last_action_type
        - last_action_label
        - last_action_at
        - last_action_consumer_count
        - last_action_with_qr
        - last_action_cost
      properties:
        hidden:
          type: boolean
        last_action_type:
          type: string
          nullable: true
          enum:
            - download
            - eco_letter_send
        last_action_label:
          type: string
          nullable: true
          enum:
            - Download
            - EcoLetter Sent
        last_action_at:
          type: string
          format: date-time
          nullable: true
        last_action_consumer_count:
          type: integer
          nullable: true
        last_action_with_qr:
          type: boolean
          nullable: true
        last_action_cost:
          type: string
          nullable: true
          example: '5.00'
    CfpbValidationLetterUploadedBy:
      type: object
      additionalProperties: false
      required:
        - id
        - name
      properties:
        id:
          type: integer
        name:
          type: string
    CfpbValidationLetterActions:
      type: object
      additionalProperties: false
      required:
        - can_download_csv
        - can_send_secure_ecoletters
        - can_resend_secure_ecoletters
        - can_download_print_letters
        - can_delete
      properties:
        can_download_csv:
          type: boolean
        can_send_secure_ecoletters:
          type: boolean
        can_resend_secure_ecoletters:
          type: boolean
        can_download_print_letters:
          type: boolean
        can_delete:
          type: boolean
    CfpbValidationLetterActionItem:
      type: object
      additionalProperties: false
      required:
        - key
        - label
        - available
      properties:
        key:
          type: string
          enum:
            - download_csv
            - send_secure_ecoletters
            - resend_secure_ecoletters
            - download_print_letters
            - delete
        label:
          type: string
          enum:
            - Download CSV
            - Send Secure EcoLetters
            - Resend Secure EcoLetters
            - Download & Print Letters
            - Delete
        available:
          type: boolean
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ActiveMembershipRequired:
      description: Authenticated creditor does not have an active membership.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            message: An active membership is required.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````