Skip to navigation

Retrieve background by size

Retrieve the JSON description or the binary of the requested background format.

Use the Accept header to specify the response format. If you use application/json, the JSON representation of the resource will be returned. Otherwise, the image as a binary will be returned (if the MIME type matches with the stored one).

Authentication

AuthorizationBearer
Bearer token authentication. Tokens can be generated from the user account. Privileges needed may vary.
OR
Authorizationstring

A string representation of JWT containing at least two parameters:

ctx.user_id — user’s id

ctx.account_id — user’s default account id ctx.account_uid — user’s default account uid The usage of account_(u)id from JWT is discouraged, user can have access to multiple accounts, every endpoint has to be account aware if it’s needed.

This JWT must be signed by the appropriate authority.

Path parameters

image_idstringRequired
Unique ID for the image to retrieve.
sizeenumRequired

Image size to retrieve.

default is scaled to fit within a width of 1680px and a height of 1050px.

tablet is scaled to fit within a width of 1024px and a height of 768px.

mobile is scaled to fit within a width of 460px and a height of 320px.

thumbnail is scaled to fit within a width of 80px and a height of 50px.

NOTE: Images used for typeform backgrounds are scaled and cropped from a top-left alignment to make sure they fill the screen properly.

Allowed values:

Response

OK
idstringOptional
Unique ID for the image.
srcstringOptional
URL for the image.
file_namestringOptional

File name for the image (specified when image is created).

widthintegerOptional
Width of the image in pixels.
heightintegerOptional
Height of the image in pixels.
media_typeenumOptional
The MIME type of the image.
Allowed values:
has_alphabooleanOptional

True if image has alpha channel (some degree of transparency). Otherwise, false.

avg_colorstringOptional
Average color of the image in hexadecimal format.