Attachments
Reserve an upload
POST/v1/attachments
Reserves a presigned upload slot for one PDF.
API key · or dashboard session.
Request
SLOT=$(curl -fsS "$API/v1/attachments" \
-H "Authorization: Bearer $PAYDAY_API_KEY" -H "Content-Type: application/json" \
-d '{ "filename": "INV-1042.pdf" }')
curl -fsS -X PUT "$(echo "$SLOT" | jq -r .upload_url)" \
$(echo "$SLOT" | jq -r '.headers | to_entries[] | "-H \"\(.key): \(.value)\""' | xargs) \
--data-binary @INV-1042.pdfResponse
{
"id": "att_0198f80c-8d2f-7dc1-a369-90556a64f700",
"upload_url": "https://…",
"headers": { "Content-Type": "application/pdf", "If-None-Match": "*", "…": "…" },
"expires_at": "2026-09-06T12:15:00Z"
}PUT the bytes to upload_url with headers verbatim. The headers include If-None-Match: *: the object is write-once. The API never receives the bytes. Slots expire; reserve again.
Body
filenamestringrequired
Response
idatt_ idupload_urlstring- Presigned PUT target.
headersobject- Send verbatim.
expires_attimestamp