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

# Register Transaction Attachment API

> Register an uploaded file as an attachment on a Breezing transaction, the final step after uploading through a signed upload link.



## OpenAPI

````yaml POST /transactions/{id}/attachments
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /transactions/{id}/attachments:
    post:
      tags:
        - Transactions
      summary: Register an uploaded attachment on a transaction
      description: >-
        Step 3 of attaching a file: record the object uploaded through the link
        from POST /transactions/{id}/attachments/upload-link as an attachment of
        the transaction. The storagePath must be one that link call minted for
        this exact transaction (400 otherwise), and the object must still be
        there: an upload that was never registered is deleted after a day. The
        object is checked before the row is created: it must exist, be under 20
        MB, carry the content type the link was signed for and start with the
        bytes of its extension (a file renamed to another type is refused with a
        400 and deleted). A transaction holds up to 20 attachments (409 beyond).
        Answers 202 with the task id of the file pass: images (PNG, JPEG, WebP,
        HEIC, HEIF) are re-encoded by a worker and stored as JPEG (quality 85,
        long edge at most 3000 pixels, metadata stripped), documents (PDF, CSV,
        XLSX) are scanned for malware, and the attachment row lands once the
        file passed (poll GET /tasks with the task id; an infected or unreadable
        file is refused, the task error names it, and nothing is stored). Files
        attached this way appear on the transaction in the dashboard and can be
        pushed to the Xero journal with POST /xero/journal-attachments.
      parameters:
        - schema:
            type: string
            description: Transaction ID
            example: '1'
          required: true
          description: Transaction ID
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterAttachmentBody'
      responses:
        '202':
          description: >-
            File accepted: it is being re-encoded (an image) or scanned (a
            document) and the attachment is listed once it passed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      taskId:
                        type: number
                    required:
                      - taskId
                required:
                  - success
                  - data
        '400':
          description: Invalid body or a storagePath not minted for this transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    RegisterAttachmentBody:
      type: object
      properties:
        storagePath:
          type: string
          minLength: 1
          maxLength: 512
          description: The storagePath returned by the upload-link call.
        contentType:
          type: string
          minLength: 1
          maxLength: 120
          description: >-
            Ignored since 2026-10-23: the stored type is read off the object
            itself.
        extension:
          type: string
          pattern: ^[A-Za-z0-9]{1,10}$
          description: 'Ignored: taken from the storagePath.'
        name:
          type: string
          maxLength: 255
          description: Original file name, shown on the attachment card.
      required:
        - storagePath

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.