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

# Generate pre-signed URL for transaction attachment

> Generate a pre-signed URL for accessing a transaction attachment. The URL is valid for 60 seconds and allows secure temporary access to the attachment file.



## OpenAPI

````yaml post /transactions/{transactionId}/attachments/{attachmentId}/presigned-url
openapi: 3.1.0
info:
  version: 0.0.1
  title: Abacus API
  description: Abacus is the operating system for Merchant Cash Advance businesses.
  contact:
    name: Abacus Support
    email: support@abacuslabs.co
    url: https://abacuslabs.co
  license:
    name: AGPL-3.0 license
    url: https://github.com/Suphian/abacus/blob/main/LICENSE
servers:
  - url: https://api.abacuslabs.co
    description: Production API
security:
  - oauth2: []
  - token: []
paths:
  /transactions/{transactionId}/attachments/{attachmentId}/presigned-url:
    post:
      tags:
        - Transactions
      summary: Generate pre-signed URL for transaction attachment
      description: >-
        Generate a pre-signed URL for accessing a transaction attachment. The
        URL is valid for 60 seconds and allows secure temporary access to the
        attachment file.
      operationId: getTransactionAttachmentPreSignedUrl
      parameters:
        - schema:
            type: string
            format: uuid
            description: Unique identifier of the transaction
            example: b3b7c1e2-4c2a-4e7a-9c1a-2b7c1e24c2a4
          required: true
          description: Unique identifier of the transaction
          in: path
          name: transactionId
        - schema:
            type: string
            format: uuid
            description: >-
              Unique identifier of the attachment to generate a pre-signed URL
              for
            example: a43dc3a5-6925-4d91-ac9c-4c1a34bdb388
          required: true
          description: Unique identifier of the attachment to generate a pre-signed URL for
          in: path
          name: attachmentId
        - schema:
            type: boolean
            nullable: true
            description: >-
              Whether to force download the file. If true, the file will be
              downloaded. If false or omitted, the file will be displayed in the
              browser if possible.
            example: true
          required: false
          description: >-
            Whether to force download the file. If true, the file will be
            downloaded. If false or omitted, the file will be displayed in the
            browser if possible.
          in: query
          name: download
      responses:
        '200':
          description: Pre-signed URL generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: >-
                      Pre-signed URL for accessing the attachment, valid for 60
                      seconds
                    example: >-
                      https://example.supabase.co/storage/v1/object/sign/vault/transactions/receipt.pdf?token=abc123&expires=1640995200
                  expiresAt:
                    type: string
                    format: date-time
                    description: ISO 8601 timestamp when the URL expires
                    example: '2024-04-15T10:01:00.000Z'
                  fileName:
                    type: string
                    nullable: true
                    description: Original filename of the attachment
                    example: receipt.pdf
                required:
                  - url
                  - expiresAt
                  - fileName
        '400':
          description: Bad request - Attachment file path not available
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Transaction or attachment not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error - Failed to generate pre-signed URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer
      description: Default authentication mechanism
      x-speakeasy-example: ABACUS_API_KEY

````

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