Create a render job
const url = 'https://api.pressjs.dev/v1/render-jobs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"deployId":"example","deployVersionId":"example","businessKey":"example","payload":"example","payloadMime":"example","payloadBase64":"example","outputMode":"transient"}'};
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.pressjs.dev/v1/render-jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "deployId": "example", "deployVersionId": "example", "businessKey": "example", "payload": "example", "payloadMime": "example", "payloadBase64": "example", "outputMode": "transient" }'Accepts a JSON request envelope and enqueues asynchronous rendering. Render metadata and payload settings are passed in the request body. payloadMime defaults to application/json; charset=utf-8. JSON payloads are serialized as canonical JSON and exposed at https://p.press.internal/__payload. Non-JSON payloads must explicitly set payloadMime and provide either a UTF-8 string payload or raw bytes through payloadBase64.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Optional request idempotency key for retry-safe creation requests. Use a unique key for each user action and reuse it only when retrying the same request.
Request Body required
Section titled “Request Body required ”object
A concrete deploy version id or the virtual pointer latest. URL deploys only accept latest.
Render payload content. When payloadMime is omitted or resolves to JSON, this value is canonicalized as JSON. When payloadMime is a non-JSON MIME, this field must be a UTF-8 string payload.
Explicit MIME type for the render payload. Defaults to application/json; charset=utf-8.
Optional raw payload bytes encoded as base64. Use this instead of payload for non-JSON binary payloads.
Responses
Section titled “ Responses ”Render job accepted and queued.
object
object
Example
{ "accepted": true, "job": { "status": "queued", "outputMode": "transient" }}Invalid request payload or parameters.
object
Example generated
{ "error": "example", "message": "example"}Requested resource was not found.
object
Example generated
{ "error": "example", "message": "example"}Requested operation conflicts with the current resource state.
object
Example generated
{ "error": "example", "message": "example"}