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

# Upload file attachments

> Upload file attachments for a lead. Only allowed when the post-acceptance status is `JOB_WON` or `LEAD_WON`.
Accepted file types: PDF, JPG, PNG. Maximum 10MB per file, 10 files per request.




## OpenAPI

````yaml /openapi.yaml post /general-leads/{id}/attachments
openapi: 3.0.3
info:
  title: RenovationFind API
  description: >
    Public REST API for RenovationFind vendor integrations.


    ## Authentication

    All endpoints require a Bearer token in the `Authorization` header.

    Tokens are issued from the RenovationFind Manager Portal.


    ```

    Authorization: Bearer <your_jwt_token>

    ```


    ## Rate Limiting

    API requests are rate-limited to **250 requests per 5 minutes** per vendor.

    When exceeded, the API returns `429 Too Many Requests` with a `Retry-After`
    header.


    ## Response Format

    All responses follow a consistent envelope:

    ```json

    {
      "success": true,
      "data": { ... },
      "message": "Optional message"
    }

    ```

    On error:

    ```json

    {
      "success": false,
      "error": "Error description"
    }

    ```
  version: 1.0.0
  contact:
    name: RenovationFind
    url: https://www.renovationfind.com
servers:
  - url: https://www.renovationfind.com/rest-api-v1
    description: Production
security:
  - BearerAuth: []
paths:
  /general-leads/{id}/attachments:
    post:
      tags:
        - General Leads
      summary: Upload file attachments
      description: >
        Upload file attachments for a lead. Only allowed when the
        post-acceptance status is `JOB_WON` or `LEAD_WON`.

        Accepted file types: PDF, JPG, PNG. Maximum 10MB per file, 10 files per
        request.
      operationId: uploadGeneralLeadAttachments
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  maxItems: 10
      responses:
        '201':
          description: Files uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      type: object
                      description: File attachment metadata
                      properties:
                        id:
                          type: integer
                          format: int64
                        displayFilename:
                          type: string
                        contentType:
                          type: string
                          description: MIME type (application/pdf, image/jpeg, image/png)
                        uploadDate:
                          type: string
                          format: date-time
                  message:
                    type: string
        '400':
          description: Status not JOB_WON, no valid files, or lead not accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
        '404':
          description: Lead not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
        '429':
          description: Rate limit exceeded (250 requests per 5 minutes)
          headers:
            Retry-After:
              schema:
                type: integer
                example: 300
              description: Seconds to wait before retrying
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
              example:
                success: false
                error: >-
                  Rate limit exceeded. Maximum 250 requests per 5 minutes.
                  Please retry later.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token issued from the RenovationFind Manager Portal

````