Create print session
create_print_sessionCreate a temporary Preesy session so a person can print a document from a public computer.
Any place with a computer, a browser and internet can print it: library, bookshop, print or copy shop, internet cafe, hotel, office. No Preesy app or partnership is needed. The person opens preesy.com, or tells the staff "Preesy" plus the label (and the PIN, if set); the staff enter it on the site and print. The document expires automatically.
A label is the name the person types on the Preesy website to find the document. Labels are not unique: anyone who types the same label can find the document. A 4-digit PIN keeps out anyone who does not know it. Set one when the document is sensitive.
Choose pin and lifetime_hours from the person's situation before you upload. Use what they already said. Ask one short question only when you cannot tell a pin or lifetime that matters, then upload. If you already know, upload without asking. Set lifetime_hours for when they will print. It must be from 1 to 168 hours. The document is deleted automatically, so a shorter time keeps less data. Omitting lifetime_hours stores the default, which is only a fallback. print_only defaults to false, so the page allows print and download. If the person already said whether they want print only, set print_only on create. If they did not say, create the session with print_only false, then ask the person once whether they want it print only, and if yes call set_print_only. One session can hold several files, as on the website, up to 10 files and 50 MB in total. Send files for more than one document, file for one, or text for plain text.
Send file, files, or text, one of them. Each field is described in the input schema.
one_time_access: If true, this is a single-use label. As soon as a file or the zip is printed or downloaded, it is removed from the system. Default false.
Keep the manage_token in this conversation and use it for later get_print_session, set_print_only, and expire_print_session requests until the session expires. Each session has its own manage_token. If the conversation has several sessions, keep each token with its label and use the one that matches the session the person means. Share the token with the person only if they ask, and never post it anywhere else. The label and PIN cannot manage the session.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"label": "<label>"
},
"name": "create_print_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pin | No | Optional 4-digit code. Labels are not unique, so anyone who types the same label can find the document. A PIN keeps out anyone who does not know it. No default. | |
| file | No | One document as a public HTTPS download link, such as a ChatGPT file. Send file, files or text, only one of them. Allowed types: doc, docx, jpeg, jpg, pdf, png, txt. | |
| text | No | The document as plain text, instead of a file. Preesy saves it as a .txt file the person can print. Send file, files, or text, one of them. No default. | |
| files | No | Several documents in one session, as on the website. At most 10 files and 50 MB in total. Each item is the same object as file. Each file type must be one of: doc, docx, jpeg, jpg, pdf, png, txt. Send file, files, or text, one of them. No default. | |
| label | Yes | The name the person types on the Preesy website to find this document. Stored exactly as sent. Required. Not unique. 1 to 20 characters, uppercase A-Z and digits 0-9 only. No default. | |
| print_only | No | Whether the person can only print (true) or also download the file (false, the default). Set true on create when the person already said they want print only. | |
| lifetime_hours | No | How many hours the document stays available. From 1 to 168. Default 1 only when this field is omitted. The document is deleted automatically, so a shorter time keeps less data. | |
| schema_version | No | Which version of these inputs you are sending. The only version is 1. Leave it out, or send 1. | |
| one_time_access | No | If true, this is a single-use label. As soon as a file or the zip is printed or downloaded, it is removed from the system. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| label | Yes | ||
| status | Yes | ||
| pin_set | Yes | ||
| site_url | Yes | ||
| expires_at | Yes | ||
| print_only | Yes | ||
| manage_token | Yes | ||
| allowed_actions | Yes |