Scratchpad
Promote scratchpad item
Promotes a scrap into a permanent, org-shared knowledge base asset (same ownership convention as add-knowledge). Deletes the scrap on success; leaves it untouched on failure.
POST
/api/public/scratchpad/:id/promotecURLPOST /api/public/scratchpad/:id/promote
curl -X POST https://postiv.ai/api/public/scratchpad/ID_ID/promote \
-H "Authorization: Bearer pk_postiv_..." \
-H "Content-Type: application/json" \
-d '{}'200Response
{
"success": true,
"assetId": "b1c2...",
"kind": "document"
}Authorization
Requires an organization API key with the scratchpad:write, knowledge:write scope, sent as Authorization: Bearer or x-api-key.
Path parameters
idstringrequiredResource id from the corresponding list or create endpoint.
Response
The new knowledge asset reference.
assetIduuidkindstringErrors
| 404 | scratchpad_item_not_found |
| 422 | not_promotable: e.g. an empty note, or a file type without a promotion path yet |
Good to know
- Requires BOTH scratchpad:write (for the delete) and knowledge:write (for the asset/chunk writes) scopes on the same key.