For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
      • GETReturn all your created email campaigns
      • POSTCreate an email campaign
      • PUTUpdate an email campaign
      • DELDelete an email campaign
      • POSTSend an email campaign immediately, based on campaignId
      • POSTSend an email campaign to your test list
      • PUTUpdate an email campaign status
      • GETGet a shared template url
      • POSTExport the recipients of an email campaign
        • POSTUpload an image to your account's image gallery
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Marketing CampaignsEmail CampaignsContent & Gallery

Upload an image to your account's image gallery

POST
https://api.brevo.com/v3/emailCampaigns/images
POST
/v3/emailCampaigns/images
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.emailCampaigns.uploadImageToGallery({
8 imageUrl: "https://somedomain.com/image1.jpg",
9 });
10}
11main();
1{
2 "url": "https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg"
3}

Upload an image to your account”s image gallery by providing an absolute URL to the image. The maximum allowed image size is 2MB and supported formats are jpeg, jpg, png, bmp, and gif; local file uploads are not supported.

Was this page helpful?
Previous

Returns the information for all your created SMS campaigns

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Parameters to upload an image
imageUrlstringRequired

The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are: #### jpeg, jpg, png, bmp, gif.

namestringOptional
Name of the image.

Response

Image has been successfully uploaded
urlstring
URL of the image uploaded

Errors

400
Bad Request Error