A handoff for your workflow

A small API.
A lot of possibility.

Create a document, get a code, and let Petaes take care of the recipient’s next step.

Send requests to the same website origin. Base URL: http://127.0.0.1:4173/end

1. Create an API key

Sign in to your workspace, open API keys, and create a key. Save the secret when it appears. Send it in an X-API-Key header or as a Bearer token.

2. Create a sharing code

Send JSON to POST /end/delivery. The example shares a link; the recipient sees the destination before continuing.

curl http://127.0.0.1:4173/end/delivery \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{
    "name": "Project handoff",
    "redirectUrl": "https://example.com/document",
    "recipientEmail": "reader@example.com",
    "expiresInDays": 7
  }'

For a file, replace redirectUrl with fileData containing a base64 data URL, and add fileName. Example: data:text/plain;base64,SGVsbG8=. The decoded file limit is 8 MB. Each account can store 64 MB and 500 documents.

3. Pass it along

The 201 response includes code, shareUrl, downloadUrl, and expiresAt. Copy the code or link into your own message. Petaes does not send email.

The useful endpoints

MethodEndpointPurpose
POST/end/user/signupCreate account and session
POST/end/user/loginStart a session with email/password
POST/end/user/logoutEnd the current session
GET/end/auth/sessionGet the signed-in user, or null
POST/end/deliveryCreate file or HTTPS-link delivery
GET/end/delivery/:codeLook up an active code
GET/end/delivery/:code/fileDownload a shared file
GET/end/deliveries/mineList your deliveries
DELETE/end/delivery/:codeRevoke a delivery you own
GET / POST/end/keysList / create your API keys (session)
DELETE/end/keys/:idRevoke your API key (session)

A few details

Open your workspace