Skip to content

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
curl --request POST \
--url https://example.com/v1/buyer/page-assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data binary

Who: a workspace’s buyer, or its key. API keys with the buyer:write scope.

Idempotency-Key
string
<= 64 characters

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

name
string
string format: binary
<= 5243904 characters

Created

Media typeapplication/json
object
created_at
required
string format: date-time
created_by
required
Any of:
object
account
string
id
string
kind
required
string | null
Allowed values: user api_key service system postback rule tuner schedule
name
string
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
Allowed values: png jpeg gif webp
width
required
integer format: int32
workspace_id
required
integer format: int64

Example

{
"created_by": {
"kind": "user"
},
"type": "png"
}

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"
}
}