Upload image
Stores an image file and answers with the address it is served at, which is the address to write in an email. It takes a PNG, JPEG, GIF or WebP file of 5 MB at most, sent as Base64, and reads the kind from the file itself. The same file twice answers with the image that is there.
/v1/images/uploadBody parameters
namestringRequiredThe name of the file, such as
logo.png. The image is listed and found by it. What kind of image it is, is read from the file itself, never from the name. Up to 255 characters.contentstringRequiredThe file itself, encoded as Base64 with no
data:prefix: a PNG, JPEG, GIF or WebP image of 5 MB at most.
Returns
object"image"Always
image.idstringThe id of the image.
urlstring | nullThe address the image is served at. Emails link it in place of
sourcewhen the image was copied, and it is the address to write in an email when the image was uploaded.nulluntil the image isready.sourcestringWhere the image came from: the address it was copied from, as it is written in your emails, or the name of the file that was uploaded.
originstringHow the image got here:
addresswhen it was copied from an address,uploadwhen it was sent as a file.One of
addressuploadstatusstringpendingwhile it waits to be copied,readyonce it is served,failedwhen it could not be copied. An uploaded image isreadyat once.One of
pendingreadyfailedtypestring | nullThe media type of the image:
image/png,image/jpeg,image/giforimage/webp.nulluntil it isready.One of
image/pngimage/jpegimage/gifimage/webpsizeinteger | nullThe size of the image in bytes, or
nulluntil it isready.reasonstring | nullWhy the last try to copy it did not work, in words, or
null.createdAtstringWhen the image was first seen.
updatedAtstringWhen it was last copied or tried.