Retrieve Client Document
Retrieve one document attached to a specific client, with its full text — a typed CRM document or an uploaded PDF, DOCX or TXT file. Requires the Files addon.
Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/<client_id>/documents/<document_id>/" \
-u <token>: \
-X GET
Example Success Response:
{
"id": 11,
"name": "report.pdf",
"kind": "file",
"folder": null,
"created": "2026-02-18T09:05:00+00:00",
"created_by": {
"id": 7,
"name": "Jane Matchmaker"
},
"text_status": "done",
"document_type": {
"id": 4,
"name": "Intake Report"
},
"text_chars": 2140,
"body": "Intake interview\n\nAnna is looking for …",
"text_reason": null,
"body_extracted": "2026-02-18T09:05:12+00:00"
}
text_chars is the length of the body returned here. It is not the stored_chars of List Client Documents, which counts what is stored on the row: for a typed CRM document the stored value still has its HTML markup, so the two numbers differ.
body is the document's text: the typed rich text converted to plain text for kind document — HTML tags removed, entities decoded, and paragraph, list-item and <br> boundaries kept as newlines — or the extracted text for kind file. It can be long — extraction stores up to 200 000 characters.
When an upload has no extracted text, body and text_chars are null and text_reason says why in plain words (for example "Not extracted yet" or "No text layer found"); text_status carries the matching machine value, and is null for typed documents. body_extracted is the time the stored text was extracted, and null for typed documents and for uploads that have none. document_type is the document's file type, null when it carries none.
Base Request:
Method: GET
Authentication: Basic Authentication. Requires a valid <token> passed.
Rate Limits:
10 requests within 10 seconds
Error Responses:
| 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 or the document with the specified ID does not exist. |
| 405 | Method Not Allowed |
This error occurs if an HTTP method other than GET is used. |
| 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").