Overview / People & HR / Add a document

Add a document

post https://api.flactrum.com/v1/employee-documents

Send as multipart/form-data to attach the file itself; JSON works too when you only need the metadata. To renew a document, add a new record of the same type rather than editing the old one: the older record stays as history and the newest one decides eligibility.

Required scope employees.write
Success status201
Returns One EmployeeDocument object

Request body

FieldTypeDescription
employee_id * string —
type * string —
issued_at string|null —
valid_until string|null —
note string|null —
file string|null Optional PDF or image, up to 8 MB. Send the request as multipart/form-data to include it.

Response fields

FieldTypeDescription
id string —
employee_id string —
type string —
issued_at string|null —
valid_until string|null —
is_expired boolean An expired document blocks shift assignment.
expires_soon boolean Expires within 30 days.
has_file boolean The file itself is private and never linked directly; download it from its own endpoint.
note string|null —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X POST 'https://api.flactrum.com/v1/employee-documents' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "employee_id": "01m43mzeat1pf150w4bsz88r15",
    "type": "hygiene",
    "issued_at": "2026-08-04",
    "valid_until": "2027-10-04"
}'

HTTP 201 · application/json

{
    "data": {
        "id": "01m43mzebhcqp0xwvcb9a2vp8h",
        "employee_id": "01m43mzeat1pf150w4bsz88r15",
        "type": "hygiene",
        "issued_at": "2026-08-04",
        "valid_until": "2027-10-04",
        "is_expired": false,
        "expires_soon": false,
        "has_file": false,
        "note": null,
        "created_at": "2026-10-04T14:27:07+00:00",
        "updated_at": "2026-10-04T14:27:07+00:00"
    }
}