Hey, human!
HTTP/2 200 OK content-type: text/markdown; charset=utf-8 vary: accept, user-agent x-agent: [ai_agent]
Loading the agent response…
Page tools on a PDF, saved as a new PDF (merge, keep or remove, reorder, rotate, crop, blank pages, page numbers, watermark, title and author)
Makes a NEW PDF from this one with the page tools in the body; the source is never changed. Send at least one of merge_file_ids, keep or remove (pages like 1-3,5), order, rotate, crop (millimetres; the cut-off part is hidden, not deleted), blank_after, blank_at_start, page_numbers, watermark (a text drawn over every page, which hides nothing underneath), title, author. They apply in that order. name and folder_id choose the new file (default: '<name> (edited).pdf' next to the source). The same limits as the chat (40 MB a PDF, up to 2,000 pages, up to 10 PDFs merged). A password-protected PDF is 422 unprocessable_file; a taken name is 409 name_taken; plan limits apply (413). Needs files:write; 20 calls a minute per token.
What you provide
- Merge file idsoptional: Ids of other PDFs (digits) to append, in order; up to 9
- Keepoptional: Keep only these pages, like 1-3,5,8-
- Removeoptional: Remove these pages. Use keep or remove, not both
- Orderoptional: A new page order, like [3, 1, 2]
- Rotateoptional: Rotate pages clockwise
- Cropoptional
- Blank afteroptional: Add a blank page after these pages
- Blank at startoptional
- Page numbersoptional
- Watermarkoptional: Text drawn over every page (hides nothing underneath)
- Titleoptional
- Authoroptional
- Nameoptional: The new file's name (the .pdf extension is added or corrected)
- Folder idoptional: The folder for the new file; null for the library root; omitted keeps the source's folder
Do this with AI
I want to page tools on a PDF, saved as a new PDF (merge, keep or remove, reorder, rotate, crop, blank pages, page numbers, watermark, title and author). Use the Tarkle API. Read the reference for this operation and follow it exactly: https://project-03b42162.restlessdocs.com/endpoint/editpdf.md Authenticate with your API key as a Bearer token in the Authorization header. Then make the request for me and tell me what came back.
Paste this into Claude, Cursor, or any AI assistant and it will do it for you.
https://tarkle.com/api/v1/files/{id}/pdf-editcurl --request POST \
--url https://tarkle.com/api/v1/files/id/pdf-edit \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Key: X-Workspace-Key' \
--data '
{
"merge_file_ids": [
"string"
],
"keep": "keep",
"remove": "remove",
"order": [
0
],
"rotate": [
{
"pages": "pages",
"degrees": 90
}
],
"crop": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0,
"pages": "pages"
},
"blank_after": "blank_after",
"blank_at_start": true,
"page_numbers": true,
"watermark": "watermark",
"title": "title",
"author": "author",
"name": "name",
"folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'Path parameters
idstringrequiredA file id (digits) or a folder id (uuid)
Query parameters
workspace_keystringThe same key as the X-Workspace-Key header, for clients that cannot set headers. Send one of the two, or both with the same value (different values are 400 conflicting_workspace)
Header parameters
X-Workspace-KeystringrequiredThe 8-character key of the workspace this call acts on; GET /workspaces lists the keys a token can use. A workspace id is refused (400 workspace_key_required)
Idempotency-KeystringMakes a write safe to repeat. Send a random value (a UUID is fine) of up to 255 visible characters. A repeat of the same request gets the first answer again, with the header `Idempotent-Replayed: true`, and does nothing twice. The same key for a different request is 422 `idempotency_key_reused`; the same request while the first one is still running is 409 `idempotency_in_progress`. A 5xx or 429 is not remembered, so retrying it runs the request again. Keys last 24 hours and belong to the account that created the token.
Body
application/jsonrequiredmerge_file_idsstring[]Ids of other PDFs (digits) to append, in order; up to 9
keepstringKeep only these pages, like 1-3,5,8-
removestringRemove these pages. Use keep or remove, not both
orderinteger[]A new page order, like [3, 1, 2]
Rotate pages clockwise
pagesstringdegreesintegerrequiredtopnumberrightnumberbottomnumberleftnumberpagesstringblank_afterstringAdd a blank page after these pages
blank_at_startbooleanbooleanbooleanpositionstringstartintegerwatermarkstringText drawn over every page (hides nothing underneath)
titlestringauthorstringnamestringThe new file's name (the .pdf extension is added or corrected)
folder_idstring · uuid | nullThe folder for the new file; null for the library root; omitted keeps the source's folder