---
title: "Attach a file to an asset · Fixed Assets · COUNT Partner API"
description: "Attaches an invoice, photo or warranty, uploaded as multipart `file` or downloaded from a public URL. POST /partners/fixed-assets/{uuid}/attachments"
canonical: "https://developers.getcount.com/reference/fixed-assets/add-fixed-asset-attachment"
source: "https://developers.getcount.com/reference/fixed-assets/add-fixed-asset-attachment"
---
[Fixed Assets](https://developers.getcount.com/reference/fixed-assets) / Attach a file to an asset

# Attach a file to an asset

POST `/partners/fixed-assets/{uuid}/attachments`

Attaches an invoice, photo or warranty, uploaded as multipart `file` or downloaded from a public URL.

Send a `multipart/form-data` body with one `file`, or a JSON body with `url` (http or https) and an optional `fileName`; COUNT downloads the URL, virus-scans the file and stores a copy. Accepts PDF, Office documents, CSV, text and images, up to 20 MB each and 50 files per asset. A file served by a download endpoint keeps the name you give it, or gets an extension its type allows.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Ffixed-assets%2F%7Buuid%7D%2Fattachments&body=%7B%0A++%22url%22%3A+%22https%3A%2F%2Fexample.com%2Finvoices%2Fmacbook-invoice.pdf%22%2C%0A++%22fileName%22%3A+%22macbook-invoice.pdf%22%0A%7D)

[Reports API](https://developers.getcount.com/reference/reports) [Bills API](https://developers.getcount.com/reference/bills) [Transactions API](https://developers.getcount.com/reference/transactions) [Chart of Accounts API](https://developers.getcount.com/reference/chart-of-accounts)

#### Headers

`Idempotency-Key` string optional

Client-generated key that makes the call safely retryable. Repeating a key replays the original response; reusing one with a different body is refused.

#### Path parameters

`uuid` uuid required

The fixed asset UUID (`id` from List fixed assets).

#### Request body

`file` string

Multipart only: the file.

`url` string

JSON only: public http(s) URL COUNT downloads.

`fileName` string

JSON only: name to store the file under, 1–255 characters. Defaults to the name in the URL.

#### Responses

`201` The stored attachment.

`400` Neither a file nor a URL, a URL that is not http(s) or cannot be downloaded, a file type that is not allowed, a file over 20 MB, a file that fails the virus scan, or an asset already holding 50 files.

`404` No asset with that UUID in this workspace.

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per user of each app, or 10,000 per minute per app). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous GET List an asset's attachments](https://developers.getcount.com/reference/fixed-assets/list-fixed-asset-attachments) [Next DELETE Delete an asset's attachment](https://developers.getcount.com/reference/fixed-assets/delete-fixed-asset-attachment)

POST `https://api.getcount.com/partners/fixed-assets/{uuid}/attachments`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/fixed-assets/3fa85f64-5717-4562-b3fc-2c963f66afa6/attachments';
const timestamp = Math.floor(Date.now() / 1000).toString();
const body = {
  "url": "https://example.com/invoices/macbook-invoice.pdf",
  "fileName": "macbook-invoice.pdf"
};
const bodyString = JSON.stringify(body);

const bodyHash = crypto.createHash('sha256').update(bodyString).digest('hex');
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/fixed-assets/3fa85f64-5717-4562-b3fc-2c963f66afa6/attachments`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    'Content-Type': 'application/json',
    Authorization: `Bearer ${ACCESS_TOKEN}`,
    'Idempotency-Key': '3fa85f64-5717-4562-b3fc-2c963f66afa6',
  },
  body: bodyString,
});

console.log(await response.json());
```

Response · 201

```json
{
  "status": "success",
  "message": "Success on adding fixed asset attachment",
  "data": {
    "attachment": {
      "id": "0194c1d2-3e4f-7a5b-8c6d-7e8f9a0b3a01",
      "fileName": "macbook-invoice.pdf",
      "fileType": "application/pdf",
      "fileSize": 184320,
      "fileUrl": "https://countstorage.blob.core.windows.net/fixed-assets/macbook-invoice.pdf?sv=2024-11-04&se=2026-11-19T11%3A00%3A00Z&sig=...",
      "uploadedBy": {
        "firstName": "Ana",
        "lastName": "Reyes"
      },
      "createdAt": "2026-01-15T10:30:00.000Z"
    }
  }
}
```
