Start an upload
POST
/cms/print/v2/subpages/{id}/uploads
const url = 'https://api.example.com/cms/print/v2/subpages/1/uploads';const options = { method: 'POST', headers: { 'API-Key': '<API-Key>', 'Token-User': '<Token-User>', 'Content-Type': 'application/json' }, body: '{"filename":"example","length":1,"sha256":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/print/v2/subpages/1/uploads \ --header 'API-Key: <API-Key>' \ --header 'Content-Type: application/json' \ --header 'Token-User: <Token-User>' \ --data '{ "filename": "example", "length": 1, "sha256": "example" }'Then send the bytes with PATCH /cms/print/v2/uploads/{uploadId}. With sha256, the finished file is checked against it. Unused uploads are deleted after a day.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
filename
required
string
length
required
integer
sha256
string
Example generated
{ "filename": "example", "length": 1, "sha256": "example"}Responses
Section titled “Responses”Upload created