> ## Documentation Index
> Fetch the complete documentation index at: https://scorecard-d65b5e8a-docs-attachment-api-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Attachment

> Deletes an attachment: both the stored file and its metadata.



## OpenAPI

````yaml delete /attachments/{attachmentId}
openapi: 3.1.0
info:
  title: Scorecard API
  description: REST API for Scorecard
  version: 1.0.0
servers:
  - url: https://api2.scorecard.io/api/v2
security:
  - ApiKeyAuth: []
paths:
  /attachments/{attachmentId}:
    delete:
      summary: Delete Attachment
      description: 'Deletes an attachment: both the stored file and its metadata.'
      operationId: deleteAttachment
      parameters:
        - in: path
          name: attachmentId
          description: The ID of the Attachment to delete.
          schema:
            type: string
            format: uuid
            example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          required: true
      responses:
        '200':
          description: Attachment deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the deletion was successful.
                required:
                  - success
              examples:
                Deleted:
                  value:
                    success: true
                  summary: Deleted
                  description: The attachment was deleted.
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '500':
          $ref: '#/components/responses/ServiceError'
components:
  responses:
    UnauthenticatedError:
      description: Error indicating that the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Authentication failure:
              value:
                code: UNAUTHORIZED
                message: Invalid or missing authentication token
                details: {}
              summary: Authentication failure
              description: >-
                Error returned when authentication credentials are invalid or
                missing.
    ServiceError:
      description: >-
        An internal service error indicating an issue with the Scorecard
        service.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Internal error:
              value:
                code: INTERNAL_ERROR
                message: An unexpected error occurred while processing your request.
                details: {}
              summary: Internal error
              description: Generic error when an unexpected internal issue occurs.
  schemas:
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
          x-stainless-any: true
      required:
        - code
        - message
        - details
      description: An API error.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: starts with ak_

````