Fixed AssetsAttach a file to an asset

Attach a file to an asset

POST/firm-partners/workspace/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 only

Headers

count-workspace-iduuidrequired

UUID of the client workspace to act on. It must be one of your firm's client workspaces (or the firm's own workspace) and within the API key's client workspaces.

Idempotency-Keystringoptional

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

uuiduuidrequired

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

Request body

filestring

Multipart only: the file.

urlstring

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

fileNamestring

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

Responses

201The stored attachment.
400Neither 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.
401Missing signing headers, an invalid HMAC signature, or a timestamp more than 5 minutes off. Troubleshoot
403The key is inactive or its scope does not allow this request, the workspace is not managed by your firm or is outside the key's client workspaces, the workspace has no active subscription, or it is portal-only and the route needs bookkeeping. Troubleshoot
404No asset with that UUID in this workspace.
429Rate limit exceeded (100 requests per minute per firm user of each app, or 10,000 per minute per app). Troubleshoot
POSThttps://api.getcount.com/firm-partners/workspace/fixed-assets/{uuid}/attachments
Request
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 method = 'POST';
const signingPath = '/workspace/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}/firm-partners/workspace/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',
    'count-workspace-id': '5e4d3c2b-1a09-4f8e-8d7c-6b5a49382716',
    'Idempotency-Key': '3fa85f64-5717-4562-b3fc-2c963f66afa6',
  },
  body: bodyString,
});

console.log(await response.json());
Response · 201
{
  "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"
    }
  }
}