On this page
mintWizardMaterialUpload
mutation · in the family Work and notes
What it does
Get a short-lived, pre-authorized upload slot for a wizard material (a PDF, image, text, or CSV you want the assistant to read).
Mint a short-TTL presigned UPLOAD for one wizard material: gates BEFORE any byte moves — the MATERIAL registry row must resolve (ext AND declared MIME agree; the scan-free subset: pdf/md/txt/png/jpg/jpeg/gif/webp/csv — archives never mint here) · bytes ≤ 8388608 (8 MiB) · the group wallet must exist (billed custody). The object lands PRE-TAGGED pending=true (the 7-day lifecycle reaps never-confirmed orphans) with the sha256 checksum + the mint metadata (incl. the wizard word — the walk-scope binding) SIGNED IN. wizardType is the wizard's kind word (the fill lanes' type, 1..64). Requires authentication (user sessions). Template class (universal staff work).
What happens
The file type and size are checked BEFORE any bytes move; the material binds to the wizard you named and is kept and billed as storage once confirmed.
Who may call it
Capability area: Work and notes — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:mintWizardMaterialUpload
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | MintWizardMaterialUploadInput MintWizardMaterialUploadInput! | yes | No further notes. |
Returns
WizardMaterialUploadTicket WizardMaterialUploadTicket! — The material upload ticket (the NoteAttachmentUploadTicket law): PUT to uploadUrl sending EVERY requiredHeader verbatim, then confirmWizardMaterial(id) before the pending lifecycle's window closes.
Example request
mutation ExampleMintWizardMaterialUpload($input: MintWizardMaterialUploadInput!) {
mintWizardMaterialUpload(input: $input) {
materialId
key
uploadUrl
expiresAt
}
}
Variables:
{
"input": {
"wizardType": "<wizard type>",
"filename": "<filename>",
"declaredContentType": "<declared content type>",
"bytes": 1,
"sha256": "<sha256>"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"mintWizardMaterialUpload": {
"materialId": "01900000-0000-7000-8000-a55f883d0000",
"key": "<key>",
"uploadUrl": "https://example.com/hook",
"expiresAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. (VALIDATION)