Skip to main content
This service is not yet available in v3. Available in v2 only.

What is the Attachments API?

The Attachments API v2 allows you to retrieve files that have been uploaded and associated with Clara entities, such as transactions, invoices, or reimbursement requests. Attachments may include receipts, invoices, approval files, or any supporting documentation. With this API, you can:
  • List all uploaded files
  • Retrieve metadata for a specific attachment
  • Download the attachment as a base64-encoded file

Available Endpoints

OperationEndpointMethod
Get a list of attachments/v2/attachmentsGET
Get attachment metadata by UUID/v2/attachments/{uuid}GET
Get attachment file as base64/v2/attachments/{uuid}/base64GET

Get a list of attachments

Use this endpoint to list all attachments available to your company. You can optionally filter by entity type or related ID.

Endpoint

GET /v2/attachments

cURL Request

cURL
curl -X GET \
"https://public-api.mx.clara.com/api/v2/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Sample JSON Response

JSON
[
  {
    "uuid": "attachment-001",
    "fileName": "receipt_q2.jpg",
    "entityUuid": "txn-123",
    "entityType": "TRANSACTION",
    "mimeType": "image/jpeg",
    "createdAt": "2025-06-10T18:22:00Z"
  }
]


Get Single Attachment information with the pre signed URL

Use this to retrieve detailed metadata for a specific attachment by its UUID. This includes file name, type, entity association, and creation date.

Endpoint

GET /v2/attachments/{uuid}

cURL Request

cURL
curl -X GET \
"https://public-api.mx.clara.com/api/v2/attachments/attachment-001" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Get Attachment File as Base64

Use this endpoint to download the file in base64 format, allowing you to render or store the file securely in your system

Endpoint

GET /v2/attachments/{uuid}/base64

cURL Request

cURL
curl -X GET \
"https://public-api.mx.clara.com/api/v2/attachments/attachment-001/base64" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Sample JSON Response

JSON
{
  "fileName": "receipt_q2.jpg",
  "mimeType": "image/jpeg",
  "base64": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
}

💡 Tip: You can use the base64 content to display the file inline in web or mobile apps, or decode and store it in your system. **⚠️ Note: **Attachments can be large. Avoid retrieving large batches unless necessary. Use pagination and lazy-loading in UIs where possible.

Endpoint Reference

GET /api/v2/attachments

Get a list of attachments and it’s respective transactions

GET /api/v2/attachments/{uuid}

Get a single attachment information with the pre signed URL Parameters:
ParameterInTypeRequiredDescription
uuidpathstringUUID of the attachment

GET /api/v2/attachments/{uuid}/base64

Get a single attachment in base 64 Parameters:
ParameterInTypeRequiredDescription
uuidpathstringUUID of the attachment