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

# Upload Exemption Certificate

> The Upload Exemption Certificate API allows you
    to upload a file attachment (e.g., exemption certificate) for a specific exemption.
    This is primarily used to associate supporting documents with an exemption record
    to ensure compliance and facilitate verification.



## OpenAPI

````yaml post /v1/exemptions/{exemption_id}/attachments
openapi: 3.0.0
info:
  title: Tax Platform
  version: 1.0.0
servers:
  - url: https://api.trykintsugi.com
    description: Production API server URL
security: []
paths:
  /v1/exemptions/{exemption_id}/attachments:
    post:
      tags:
        - Exemptions
      summary: Upload Exemption Certificate
      description: |-
        The Upload Exemption Certificate API allows you
            to upload a file attachment (e.g., exemption certificate) for a specific exemption.
            This is primarily used to associate supporting documents with an exemption record
            to ensure compliance and facilitate verification.
      operationId: >-
        upload_exemption_certificate_v1_exemptions__exemption_id__attachments_post
      parameters:
        - name: exemption_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              The unique identifier for the exemption to which the attachment
              will be associated.
            title: Exemption Id
          description: >-
            The unique identifier for the exemption to which the attachment will
            be associated.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_exemption_certificate_v1_exemptions__exemption_id__attachments_post
      responses:
        '200':
          description: Successfully retrieved exemption by id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentRead'
              example:
                related_entity_id: exmp_vtWfyrER36irA
                related_entity_type: EXEMPTION
                id: atch_ZgxKo5vffwyBB
        '401':
          description: The request is missing a valid x-api-key or x-organization-id
          content:
            application/json:
              example:
                detail: Unauthenticated request.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Validation issues, such as missing required fields or invalid field
            values.
          content:
            application/json:
              example:
                detail:
                  - type: missing
                    loc:
                      - body
                      - file
                    msg: Field required
              schema:
                $ref: >-
                  #/components/schemas/backend__src__exemptions__responses__ValidationErrorResponse
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                detail: An unexpected error occurred
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - APIKeyHeader: []
          CustomHeader: []
components:
  schemas:
    Body_upload_exemption_certificate_v1_exemptions__exemption_id__attachments_post:
      properties:
        file:
          type: string
          format: binary
          title: File
          description: 'The file to be uploaded. Supported format: PDF. Max size: 10 MB.'
      type: object
      required:
        - file
      title: >-
        Body_upload_exemption_certificate_v1_exemptions__exemption_id__attachments_post
    AttachmentRead:
      properties:
        related_entity_id:
          type: string
          title: Related Entity Id
          description: |-
            The unique identifier of the exemption associated
                    with the attachment.
        related_entity_type:
          $ref: '#/components/schemas/RelatedEntityType'
          description: |-
            The type of entity associated with the attachment.
                    In this case, it will always be EXEMPTION,  REGISTRATION ,FILING,
                    FILING_PAYMENT.
        id:
          type: string
          title: Id
          description: The unique identifier of the uploaded attachment (attachment ID).
      type: object
      required:
        - related_entity_id
        - related_entity_type
        - id
      title: AttachmentRead
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error message
      type: object
      required:
        - detail
      title: ErrorResponse
    backend__src__exemptions__responses__ValidationErrorResponse:
      properties:
        detail:
          items:
            $ref: >-
              #/components/schemas/backend__src__exemptions__responses__ValidationErrorItem
          type: array
          title: Detail
      type: object
      required:
        - detail
      title: ValidationErrorResponse
    RelatedEntityType:
      type: string
      enum:
        - EXEMPTION
        - REGISTRATION
        - FILING
        - FILING_PAYMENT
      title: RelatedEntityType
    backend__src__exemptions__responses__ValidationErrorItem:
      properties:
        type:
          type: string
          title: Type
          description: |-
            Validation issues, such as missing required
                                fields or invalid field values.
        loc:
          items:
            type: string
          type: array
          title: Loc
          description: Location of error
        msg:
          type: string
          title: Msg
          description: Error message
        input:
          title: Input
          description: Invalid input value
        ctx:
          additionalProperties: true
          type: object
          title: Ctx
          description: Additional context
      type: object
      required:
        - type
        - loc
        - msg
        - input
        - ctx
      title: ValidationErrorItem
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY
    CustomHeader:
      type: apiKey
      in: header
      name: x-organization-id

````