Images

Retrieve image

get
https://api.typeform.com/images/{image_id}

Retrieves the JSON description or the binary of the original image for the specified image_id.

NOTE: Default is to return the binary of the original image. Use the Accept header to specify application/json to return the JSON description of the image instead.

Request

Path Parameters

image_id
string, required

Unique ID for the image to retrieve.

Response

Status

200 OK

Schema

Image resource with associated metadata.

id
string

Unique ID for the image.

src
string

URL for the image.

file_name
string

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

width
integer

Width of the image in pixels.

height
integer

Height of the image in pixels.

media_type
string
Valid values:image/gifimage/jpegimage/png

The MIME type of the image.

has_alpha
boolean

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

avg_color
string

Average color of the image in hexadecimal format.

Example

{
  "id": "XcXx",
  "src": "https://api.typeform.com/images/{image_id}/background/{size}",
  "file_name": "newimage.gif",
  "width": 100,
  "height": 100,
  "media_type": "image/gif",
  "has_alpha": true,
  "avg_color": "ff00ff"
}