Skip to content

Use the Library

Goal: show the firm’s Library in your document system, or pull client files into your own records. Scope: read. Uploading, new versions, folders, tags, sharing with clients and deleting happen in Console.

Reading the LibraryYour document systemIDEALX APIRegional store1GET /v1/firms/{firmId}/library?clientId=…2GET …/library/items/{id}3versions and shares4GET …/library/items/{id}/file5302 to a short-lived address6GET the file
Reading the Library
  1. Your document system to IDEALX API: GET /v1/firms/{firmId}/library?clientId=…
  2. Your document system to IDEALX API: GET …/library/items/{id}
  3. IDEALX API to Your document system: versions and shares
  4. Your document system to IDEALX API: GET …/library/items/{id}/file
  5. IDEALX API to Your document system: 302 to a short-lived address
  6. Your document system to Regional store: GET the file
GET /v1/firms/{firmId}/libraryThe firm's Library: files and AgentX's outputs you can see, and the folders

Filters: q (name), type (pdf, image, sheet, doc, text), clientId, tag, folderId, by (who kept it), origin (upload, agentx_chat, agentx_output, research_memo) and deleted=true for recently deleted items.

Terminal window
curl "$IDEALX_API/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/library?clientId=crl_01937d0a5b6c7d8e9f0a1b2c3d4e5f60&type=pdf" \
-H "Authorization: Bearer $IDEALX_API_KEY"
{
"items": [
{
"id": "lib_01937f50a1b2c3d4e5f6a7b8c9d0e1f2",
"name": "Morgan review November 2026.pdf",
"origin": "upload",
"contentType": "application/pdf",
"type": "pdf",
"size": 284311,
"sha256": "5f2b9c…",
"version": 2,
"folderId": "lbf_01937f4fa1b2c3d4e5f6a7b8c9d0e1f2",
"tags": ["review", "2026"],
"client": { "id": "crl_01937d0a5b6c7d8e9f0a1b2c3d4e5f60", "name": "Alex Morgan" },
"account": { "id": "acc_01937f00f1e2d3c4b5a6978877665544", "name": "Morgan Family Trust" },
"proposalId": null,
"strategyId": null,
"threadId": null,
"region": "AU",
"createdBy": { "teamMemberId": "tmm_01937a2b3c4d5e6f7a8b9c0d1e2f3a4b", "name": "Jordan Lee" },
"mine": false,
"shared": true,
"createdAt": "2026-11-18T04:02:00.000Z",
"updatedAt": "2026-11-20T01:15:00.000Z",
"deletedAt": null,
"restorableUntil": null
}
],
"folders": [{ "id": "lbf_01937f4fa1b2c3d4e5f6a7b8c9d0e1f2", "name": "Client reviews", "parentId": null }]
}

What a key sees follows the admin who made it: items not linked to a client are the whole firm’s; items linked to a client are visible to team members who see that client.

GET /v1/firms/{firmId}/library/items/{id}One item with its versions and shares

Returns the item, every version (each with its own sha256, size, region, where it is stored — regional or database — and its malware scan: clean, not_scanned or infected) and its shares with clients (the account, the version shared, when, and revokedAt if withdrawn).

GET /v1/firms/{firmId}/library/items/{id}/previewA spreadsheet's first rows, or a document's text, to show in the Library
{ "sheets": [{ "name": "Holdings", "rows": [["Symbol", "Units", "Value"], ["EXS", "200", "20256.00"]] }], "text": null }

Spreadsheets return their first rows per sheet; documents and text return text.

GET /v1/firms/{firmId}/library/items/{id}/fileDownload the current version (or versionId); a file kept in a regional store answers with a short-lived address

The current version, or versionId for an earlier one. Files kept in the firm’s regional store answer 302 with a short-lived address in that region; follow the redirect promptly and do not store the address. Files kept in the database answer 200 with the bytes.

Terminal window
curl -fsSL -o review.pdf \
"$IDEALX_API/v1/firms/frm_01937a1b2c3d4e5f6a7b8c9d0e1f2a3b/library/items/lib_01937f50a1b2c3d4e5f6a7b8c9d0e1f2/file" \
-H "Authorization: Bearer $IDEALX_API_KEY"