Upload an image, its bytes the body, named by name: pages checks it by its bytes (PNG, JPEG, GIF or WebP, 5 MiB and 4 096 pixels a side at most) and keeps it less what no decoder reads
POST
/v1/buyer/page-assets
const url = 'https://example.com/v1/buyer/page-assets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'}, body: 'binary'};
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://example.com/v1/buyer/page-assets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/octet-stream' \ --data binaryWho: a workspace’s buyer, or its key. API keys with the buyer:write scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Made once per action and sent again on every retry of it, so the service acts once: the request_id of the create or money-moving call; a new one when left out
Query Parameters
Section titled “Query Parameters”name
string
Request Bodyrequired
Section titled “Request Bodyrequired”string format: binary
string format: binary
string format: binary
string format: binary
string format: binary
Responses
Section titled “Responses”Created
Media typeapplication/json
object
created_at
required
string format: date-time
created_by
required
height
required
integer format: int32
id
required
integer format: int64
name
required
string
preview
required
string
sha256
required
string
size
required
integer format: int64
type
required
string | null
width
required
integer format: int32
workspace_id
required
integer format: int64
Example
{ "created_by": { "kind": "user" }, "type": "png"}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}