# Upload an image

Upload an image along with its metadata to the Mailjet image gallery. The maximum upload size for a single image is 2MB. Image files used in emails should not exceed 200KB to optimize loading times.

Endpoint: POST /v1/data/images
Version: 1.0.0
Security: basicAuth, bearerAuth

## Request fields (multipart/mixed):

  - `file` (string, required)
    The binary data of the image. Supported content types: image/jpeg, image/png, image/svg, image/gif, image/webp. Maximum size: 2MB.

  - `Metadata` (object, required)
    A JSON object containing image metadata.

  - `Metadata.Name` (string, required)
    Required. The name of the image.

  - `Metadata.Status` (string, required)
    Required. Whether the image is open for editing or locked.
    Enum: "open", "locked"

  - `Metadata.LabelIDs` (array)
    An array of IDs representing labels associated with the image.

  - `Metadata.IsStarred` (boolean)
    Indicates whether the image is marked as a favorite.

## Response 201 fields (application/json):

  - `Count` (integer)
    Number of items in this response

  - `Data` (array)

  - `Data.ID` (string)
    The ID of the image (UUID).

  - `Data.Name` (string)
    The name of the image.

  - `Data.Status` (string)
    Indicates whether the image is open or locked. Values: open, locked.

  - `Data.TargetContent` (string)
    Indicates the purpose of the image. Values: image, background, video, social.

  - `Data.ImageSize` (integer)
    The size of the image file in bytes.

  - `Data.LabelIDs` (array)
    An array of IDs representing labels associated with the image.

  - `Data.IsStarred` (boolean)
    Indicates whether the image is marked as a favorite.

  - `Data.ImageUrl` (string)
    The URL where the image is stored.

  - `Data.ThumbnailUrl` (string)
    The URL where the thumbnail is stored.

  - `Data.CreatedAt` (string)
    The date and time when the image was created (RFC3339).

  - `Data.UpdatedAt` (string)
    The date and time when the image was last updated (RFC3339).

  - `Data.ExpiresAt` (string)
    The date and time when the image will expire (RFC3339).

  - `Total` (integer)
    Total number of items available


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 429 fields

## Response 500 fields
