Scratchpad
Create scratchpad upload URL
Issues a signed S3 upload URL for a kind='image' or kind='file' scratchpad item, to be used before create-scratchpad-item with the returned s3Key.
POST
/api/public/scratchpad/upload-urlcURLPOST /api/public/scratchpad/upload-url
curl -X POST https://postiv.ai/api/public/scratchpad/upload-url \
-H "Authorization: Bearer pk_postiv_..." \
-H "Content-Type: application/json" \
-d '{
"contentType": "..."
}'200Response
{
"success": true,
"uploadUrl": "https://postiv-user-media.s3.eu-central-1.amazonaws.com/...",
"s3Key": "scratchpad/9e6397ad-.../a1b2.../original.png"
}Authorization
Requires an organization API key with the scratchpad:write scope, sent as Authorization: Bearer or x-api-key.
Body parameters
contentTypestringrequiredImage types (jpeg/png/gif/webp/svg+xml) or document types (pdf, docx, pptx, xlsx: legacy .doc/.ppt/.xls are NOT supported here).
Response
A signed upload target.
uploadUrlstringSigned S3 PUT URL.
s3Keystringscratchpad/{orgId}/{uuid}/original.{ext}: pass to create-scratchpad-item.
Errors
| 400 | invalid_kind: unsupported contentType for either the image or document allowlist |
Good to know
- MCP has no direct equivalent: file/image uploads via s3Key are REST-only (the MCP create_scratchpad_item tool only supports kind='image' via a public imageUrl, not direct upload).