Documentation

Guides and API reference for uploads, image transforms and video.

npm install @cd2/fileboy-react
API https://api.fileboy.io

Transform presets API reference

The transform presets endpoints, generated from the OpenAPI document you can download for code generators and API clients: openapi.json or openapi.yaml. See every endpoint for the rest of the API.

Base URLhttps://api.fileboy.io

Named transformations: save a chain of image transforms under a name and use it in URLs as preset:NAME. Editing a preset changes what every URL that uses it returns. Needs your private key.

GET/transform-presets

List transform presets

Your app's transform presets, by name.

Authorization: public key or signed token

Parameters

NameInTypeDescription
X-Fileboy-Appheaderstring (uuid)With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys.

Responses

200All presets.
application/json
401No key was sent.
application/json
403An error. error is a short code and message says what went wrong.
application/json
POST/transform-presets

Create a transform preset

Saves a chain under a name, for image URLs to use as ?transform=preset:NAME. Names are 1 to 64 lower case letters, digits, - and _, starting with a letter or digit, and unique in the app. The chain is written like the transform query parameter and checked with the same limits (400 invalid_transform); it cannot use another preset. An app can have 100 presets.

Authorization: public key or signed token

Parameters

NameInTypeDescription
X-Fileboy-Appheaderstring (uuid)With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys.

Request body

application/json
name *string
transform *string
descriptionstring

Responses

201The new preset, at version 1.
application/json
400invalid_preset_name, invalid_transform or validation_error.
application/json
401No key was sent.
application/json
403Not the private key, or transform_preset_limit_reached.
application/json
409transform_preset_exists.
application/json
GET/transform-presets/{name}

Get a transform preset

Authorization: public key or signed token

Parameters

NameInTypeDescription
name *pathstringThe preset's name.
X-Fileboy-Appheaderstring (uuid)With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys.

Responses

200The preset.
application/json
400An error. error is a short code and message says what went wrong.
application/json
401No key was sent.
application/json
403An error. error is a short code and message says what went wrong.
application/json
404transform_preset_not_found.
application/json
PATCH/transform-presets/{name}

Change a transform preset

Changes the chain or the description (null removes it). A new chain raises the preset's version and goes live at once: every URL that uses the preset returns the new result. A preset cannot be renamed, because its name is in URLs: create a new one instead.

Authorization: public key or signed token

Parameters

NameInTypeDescription
name *pathstringThe preset's name.
X-Fileboy-Appheaderstring (uuid)With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys.

Request body

application/json
transformstring
descriptionstring | null

Responses

200The preset.
application/json
400An error. error is a short code and message says what went wrong.
application/json
401No key was sent.
application/json
403An error. error is a short code and message says what went wrong.
application/json
404An error. error is a short code and message says what went wrong.
application/json
DELETE/transform-presets/{name}

Delete a transform preset

URLs that use it answer 400 invalid_transform from then on.

Authorization: public key or signed token

Parameters

NameInTypeDescription
name *pathstringThe preset's name.
X-Fileboy-Appheaderstring (uuid)With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys.

Responses

204Deleted.
400An error. error is a short code and message says what went wrong.
application/json
401No key was sent.
application/json
403An error. error is a short code and message says what went wrong.
application/json
404An error. error is a short code and message says what went wrong.
application/json