Upload a preview image
const url = 'https://api.gampeon.com/v1/resources/example/image';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/png'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.gampeon.com/v1/resources/example/image \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: image/png' \ --data binaryPNG, JPEG or WebP up to 2 MB. The type is checked against the first bytes of the file. No SVG.
Not available with access tokens.
Rate limit: 30 per hour per account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Resource name
Request Bodyrequired
Section titled “Request Bodyrequired”The image
Responses
Section titled “Responses”Stored
object
Path relative to the API
Example generated
{ "image": "example"}Error codes: invalid_image
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed, forbidden
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: file_too_large
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unsupported_media_type, invalid_image
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 30 per hour per account. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: storage_disabled
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}