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

# Delete attachment

> Permanently delete an attachment. This removes the file and its record and can't be undone.



## OpenAPI

````yaml /api-reference/specs/incentives-applications.json delete /applications/attachments/{id}
openapi: 3.0.3
info:
  title: Leap Incentives — Applications
  description: >-
    The Leap Energy API provides a unified interface for managing rebate
    incentives and applications.


    ## Incentives API

    Search for and calculate incentive amounts across multiple utility programs.
    Given a customer

    address and building type, the API identifies applicable utility programs
    and calculates potential

    incentive amounts for various device and tier combinations. When your
    organization has a webhook URL

    configured (Webhook Config API), each successful lookup triggers a POST to
    your URL with the response

    and optional custom fields (`webhook_custom_fields`).


    ## Applications API

    Manage rebate applications on behalf of customers. Applications represent a
    customer's request

    for a rebate under a specific utility program, including customer
    information, device details,

    and application metadata.
  version: 2.0.0
  contact:
    name: Leap Energy
    url: https://leap.energy
servers:
  - url: https://api.incentives.leap.energy/alpha
    description: Production
  - url: https://api.staging.incentives.leap.energy/alpha
    description: Staging
security:
  - ApiKeyAuth: []
tags:
  - name: applications
paths:
  /applications/attachments/{id}:
    delete:
      tags:
        - applications
      summary: Delete attachment
      description: >-
        Permanently delete an attachment. This removes the file and its record
        and can't be undone.
      operationId: deleteAttachment
      parameters:
        - name: id
          in: path
          description: Attachment ID to delete
          required: true
          schema:
            type: integer
          example: 456
        - name: application_id
          in: query
          description: Application ID that the attachment belongs to.
          required: false
          schema:
            type: integer
          example: 123
      responses:
        '204':
          description: Successfully deleted attachment
          content: {}
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: Attachment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - message
        - requestId
      properties:
        code:
          type: string
          description: Error code identifying the type of error
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Application 123 not found
        details:
          description: Additional error details (optional)
          example: Additional context about the error
        requestId:
          type: string
          description: Unique request identifier for tracking and debugging
          example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ForbiddenError:
      description: >-
        Access forbidden - resource does not belong to your organization or
        insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Leap API key. Send it in the `x-api-key` header: `x-api-key:
        leap_live_...`.

````