Add a picture to the given campaign's id

Adds image to a campaign. These types are valid: 'image/jpeg', 'image/gif', 'image/png'. Image aspect ratio should be 2:1. If not, autocrop of image's center will be done. You can select the type of crop (cropType - 0 -> 512 x 256, 1 -> 512 x 512) and a specific platform ( platform - ios, android, webpush, safari) for which the image will be used. In the case of a gif image, which is composed of 3 frames, you can select the frame that will be used as a preview with the parameter defaultImg.

Path Params
integer
required

Campaign's id

Query Params
number

The frame's number of a gif image that will be used as the default image. By default is 0 (Options:0-2)

string

Type plaform (android, ios, webpush or safari)

number

Type crop for image (0 -> 512 x 256, 1 -> 512 x 512). By default is 0.

Body Params
file
required

The image to upload (2MB max)

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json