List Client Documents

Retrieve the long-form documents attached to a specific client, newest first: typed CRM documents and uploaded PDF, DOCX or TXT files. The client's other attachments — images, archives, spreadsheets, anything else on the Files tab — are not documents and are not returned here; use Retrieve Client Files for those. A PDF, DOCX or TXT whose text has not been extracted yet is still listed, with text_status saying why. Metadata only — the text itself comes from Retrieve Client Document. Requires the Files addon.

Example Requests:

Retrieve all documents for a client:

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/documents/" \
    -u <token>: \
    -X GET

Retrieve only typed CRM documents, 50 at a time:

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/documents/?type=document&count=50&offset=0" \
    -u <token>: \
    -X GET

Retrieve only documents of one file type (for example Intake Report):

curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/documents/?document_type=<document_type_id>" \
    -u <token>: \
    -X GET
Request Parameters:

type: (Optional) document for typed CRM documents or file for uploaded PDF, DOCX and TXT files. If not provided, both kinds are returned.

document_type: (Optional) The ID of a file type. Only documents of that type are returned; untyped documents are left out. If not provided, documents of every type and untyped ones are returned.

count: (Optional) The number of results to display in the response. The default is 20.

offset: (Optional) The offset from the beginning of the list. This allows you to paginate through the results.

Note: count and offset in the response echo the values you requested, not the size of the returned page. The last page can contain fewer than count items — compare offset plus the length of objects against total_count to detect the end of the list.

Example Success Response:
{
    "objects": [
        {
            "id": 12,
            "name": "Intake report",
            "kind": "document",
            "folder": {
                "id": 3,
                "name": "Intake"
            },
            "created": "2026-02-20T14:30:00+00:00",
            "created_by": {
                "id": 7,
                "name": "Jane Matchmaker"
            },
            "text_status": null,
            "document_type": {
                "id": 4,
                "name": "Intake Report"
            },
            "stored_chars": 18422
        },
        {
            "id": 11,
            "name": "report.pdf",
            "kind": "file",
            "folder": null,
            "created": "2026-02-18T09:05:00+00:00",
            "created_by": null,
            "text_status": "done",
            "document_type": null,
            "stored_chars": 2140
        }
    ],
    "count": 20,
    "offset": 0,
    "total_count": 2
}

kind is document for a typed CRM document, whose body is rich text written in the CRM, or file for an uploaded PDF, DOCX or TXT file, whose body is the text extracted from the upload.

text_status is the row's extraction status — done, pending, no_text, too_large, unsupported or failed. It only applies to uploaded files, so it is null for a typed document, whose text is always available. Files uploaded before text extraction shipped stay pending until someone re-runs extraction on them.

stored_chars counts the characters stored on the row, which for a typed CRM document includes its HTML markup; it is null when nothing is stored. It is deliberately not called text_chars: that key appears on Retrieve Client Document and counts the text that call actually returns, which is the smaller number once the markup is stripped. created_by is null for rows created without a signed-in agency user, folder is null when the document is not in a folder, and document_type is null when the document carries no file type.

Base Request:

Method: GET

Authentication: Basic Authentication. Requires a valid <token> passed.

Rate Limits:

30 requests within 10 seconds

Error Responses:
400 Bad Request

This error occurs if type is neither document nor file, or document_type is not a number.
Possible errors: "Invalid value"

401 Unauthorized

This error occurs when the <token> is missing, invalid, or the API access is disabled.

Possible errors: "not authenticated" or "token is disabled" or "Agency API is disabled"

404 Not Found

This error occurs if the client with the specified ID does not exist.
Possible errors: "object does not exist"

405 Method Not Allowed

This error occurs if an HTTP method other than GET is used.
Possible errors: "wrong method"

429 Too Many Requests

This error occurs when the client has sent too many requests in a given amount of time, leading to rate limiting by the server.

Possible errors: "too many requests"

500 Server Error

Possible errors: "Internal server error"

A 401 is also returned when the Files addon is disabled for the agency ("Files Addon is disabled").