Documents
A document is one PDF going to one set of recipients. You build it as a draft, send it, and readyink.ai seals the signed copy when everyone has signed.
Document statuses
| Status | What it means |
|---|---|
draft |
Being prepared. You can change anything. |
sending |
Send was accepted and is being delivered. |
out |
Waiting for signatures. You can change reminders and fix a recipient's email. |
completed |
Everyone signed. The signed PDF and certificate are ready. |
declined |
A signer declined to sign. |
cancelled |
You cancelled it. Signing links no longer work. |
send_failed |
The send didn't go through. send_error explains why. |
Create a draft
POST /documents creates a draft. You can include the PDF and up to 50 recipients in the same call, or add them later.
- With a PDF: send
multipart/form-datawith the PDF asfileand the JSON body as a string indata. - Without a PDF: send plain JSON, then upload the file with
POST /documents/{id}/file.
curl https://api.readyink.ai/v1/documents \
-H "Authorization: Bearer $READYINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Lease agreement",
"signing_mode": "sequential",
"reminder_days": 3,
"recipients": [
{ "name": "Maya Ruiz", "email": "maya@example.com" },
{ "name": "Sam Lee", "email": "sam@example.com" },
{ "name": "Office records", "email": "records@example.com", "role": "copy" }
]
}'| Setting | Values | Default |
|---|---|---|
title |
1–200 characters. Required. | |
signing_mode |
parallel: everyone gets the link at once. sequential: one signer at a time, in recipient order. |
parallel |
reminder_days |
1, 3 or 7 days between automatic reminders, or null for none. |
7 |
Upload the PDF
If you created the draft without a file, upload it once. Send multipart/form-data with a file field, or the raw bytes with Content-Type: application/pdf. The limit is 25 MB.
# multipart
curl https://api.readyink.ai/v1/documents/doc_c9x1q8/file \
-H "Authorization: Bearer $READYINK_API_KEY" -F "file=@lease.pdf"
# or raw bytes
curl https://api.readyink.ai/v1/documents/doc_c9x1q8/file \
-H "Authorization: Bearer $READYINK_API_KEY" \
-H "Content-Type: application/pdf" --data-binary @lease.pdfFile status
After an upload, file_status moves from processing to ready within seconds. Wait for ready before you add fields; adding them earlier returns 409 file_not_ready. Once the file is ready, page_count tells you how many pages it has.
file_status |
Meaning |
|---|---|
awaiting_upload |
No PDF yet. |
processing |
The PDF is being prepared. |
ready |
You can place fields. |
failed |
The PDF couldn't be used. See file_error. |
Upload errors: 413 file_too_large, 422 empty_file, 422 not_a_pdf, 422 missing_file, 415 for the wrong content type, and 409 bad_state if a PDF was already uploaded.
Change settings
PATCH /documents/{id} changes title and signing_mode on drafts. You can change reminder_days on drafts and on documents that are out.
curl -X PATCH https://api.readyink.ai/v1/documents/doc_c9x1q8 \
-H "Authorization: Bearer $READYINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reminder_days": 1}'List and filter
GET /documents lists documents newest first. Filter with status and created_after, and page with limit and starting_after. See pagination.
Delete or cancel
Only drafts can be deleted, with DELETE /documents/{id}. A document that has been sent returns 409 not_editable; cancel it instead.
Document fields worth knowing
| Field | What it's for |
|---|---|
test_mode |
true for documents created with a test key. |
cost |
signers and tokens for this document. |
version_hash |
SHA-256 of what was sent. |
final_hash |
SHA-256 of the sealed, signed PDF. |
readyink_id |
The ID stamped on the signed copy, set when it's sealed. |
sent_at, completed_at |
When it went out and when the last person signed. |
delete_after |
When the document is scheduled to be deleted, if set. |
