Upload an image to the library, under a name
The bytes travel in the body as base64 (content_base64), up to 512 KB. The type is read from the bytes: PNG, JPEG, WebP or SVG; an SVG is sanitized (scripts, events, external references and unknown elements are removed, and removed says what). Uploading under a name that exists replaces it for new documents; published template versions keep the image they pinned. The same image twice changes nothing.
PUT
https://api.invox.page/v1/assets/{name}Authorization
Path parameters
Header parameters
Request body JSON required
Returns
200
The image replaced the one under the name (or was already it).
JSON
201
The image, under a name that did not exist.
JSON
400
organization_required: This credential needs to say which organization it acts on · validation_failed: The request is not valid · malformed_request: The request body is not valid JSON
JSON
401
unauthenticated: No credential was sent · invalid_credential: The credential is not valid
JSON
403
missing_scope: The credential lacks the permission this operation requires · organization_mismatch: The X-Organization header names another organization than the key's · organization_archived: The organization is archived
JSON
404
not_found: The resource does not exist in this organization
JSON
413
asset_too_large: The image is too large
JSON
415
asset_type_not_allowed: The image is not a PNG, JPEG, WebP or SVG
JSON
429
rate_limited: Too many requests
JSON
500
internal_error: The service failed
JSON
503
service_unavailable: The service cannot answer right now
JSON