{"openapi":"3.0.0","info":{"description":"Brevo API v3 (formerly Sendinblue) — transactional email/SMS/WhatsApp, marketing campaigns, contact management (lists, attributes, consent), ecommerce orders/products, Sales CRM (companies, deals, tasks), events, webhooks and account settings. 13 per-domain OpenAPI specs; MCP server available. Auth: api-key header (OAuth 2.0 also supported).","version":"v3"},"servers":[{"description":"Brevo API v3 (formerly Sendinblue) — transactional email/SMS/WhatsApp, marketing campaigns, contact management (lists, attributes, consent), ecommerce orders/products, Sales CRM (companies, deals, tasks), events, webhooks and account settings. 13 per-domain OpenAPI specs; MCP server available. Auth: api-key header (OAuth 2.0 also supported).","url":"https://api.apirails.com/brevo"}],"paths":{"/smtp/email":{"post":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/email"},"summary":"Send a transactional email","description":"Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"params":{"type":"object","description":"Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format."},"attachment":{"type":"array","description":"Array of attachment objects. Each attachment must include either an absolute URL (no local file paths) or base64-encoded content, along with the attachment filename. The `name` field is required when `content` is provided. Supported file extensions: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass, xlsm. When `templateId` is specified: if the template uses the New Template Language format, both `url` and `content` attachment types are supported; if the template uses the Old Template Language format, the `attachment` parameter is ignored.","items":{"type":"object","properties":{"content":{"type":"string","description":"Base64-encoded attachment data"},"name":{"type":"string","description":"Attachment filename. Required when `content` is provided."},"url":{"type":"string","description":"Absolute URL of the attachment. Local file paths are not supported."}}}},"batchId":{"type":"string","description":"UUIDv4 identifier for the scheduled batch of transactional emails. If omitted, a valid UUIDv4 batch identifier is automatically generated."},"bcc":{"type":"array","description":"Array of BCC recipient objects. Each object contains an email address and an optional name.","items":{"type":"object","properties":{"contactPixelTrackingConsent":{"type":"boolean","description":"Consent of the recipient in bcc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account."},"email":{"type":"string","description":"BCC recipient email address","required":true},"name":{"type":"string","description":"Display name of the BCC recipient. Maximum length is 70 characters."}}}},"cc":{"type":"array","description":"Array of CC recipient objects. Each object contains an email address and an optional name.","items":{"type":"object","properties":{"contactPixelTrackingConsent":{"type":"boolean","description":"Consent of the recipient in cc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account."},"email":{"type":"string","description":"CC recipient email address","required":true},"name":{"type":"string","description":"Display name of the CC recipient. Maximum length is 70 characters."}}}},"headers":{"type":"object","description":"Custom email headers (non-standard headers) to include in the email. The `sender.ip` header can be set to specify the IP address used for sending transactional emails (dedicated IP users only). Header names must use Title-Case-Format (words separated by hyphens with the first letter of each word capitalized). Headers not in this format are automatically converted. Standard email headers are not supported. Example: `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_value\", \"Idempotency-Key\":\"abc-123\"}`"},"htmlContent":{"type":"string","description":"HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided."},"messageVersions":{"type":"array","description":"Array of message version objects for sending customized email variants. The `templateId` can be customized per version only if a global `templateId` is provided. The `htmlContent` and `textContent` can be customized per version only if at least one of these is present in the global parameters. Global parameters such as `to` (required), `bcc`, `cc`, `replyTo`, and `subject` can be customized per version. Maximum total recipients per API request is 2000. Maximum recipients per message version is 99. Individual `params` objects must not exceed 100 KB. Cumulative `params` across all versions must not exceed 1000 KB. See https://developers.brevo.com/docs/batch-send-transactional-emails for detailed usage instructions.","items":{"type":"object","properties":{"params":{"type":"object","description":"Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format."},"bcc":{"type":"array","description":"Array of BCC recipient objects. Each object contains an email address and an optional name."},"cc":{"type":"array","description":"Array of CC recipient objects. Each object contains an email address and an optional name."},"htmlContent":{"type":"string","description":"HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided."},"replyTo":{"type":"object","description":"Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email."},"subject":{"type":"string","description":"Email subject line for this message version"},"textContent":{"type":"string","description":"Plain text body content of the email. Ignored when `templateId` is provided."},"to":{"type":"array","description":"Array of recipient objects. Each object contains an email address and an optional display name.","required":true}}}},"replyTo":{"type":"object","description":"Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email.","properties":{"email":{"type":"string","description":"Email address in reply to","required":true},"name":{"type":"string","description":"Display name for the reply-to address. Maximum length is 70 characters."}}},"scheduledAt":{"type":"string","description":"UTC date-time when the email should be sent (format: YYYY-MM-DDTHH:mm:ss.SSSZ). Include timezone information in the date-time value. Scheduled emails may be delayed by up to 5 minutes."},"sender":{"type":"object","description":"Sender information. Required when `templateId` is not provided. Specify either an email address (with optional name) or a sender ID. The `name` field is ignored when `id` is provided.","properties":{"email":{"type":"string","description":"Sender email address. Required when `id` is not provided."},"id":{"type":"number","description":"Sender identifier. Required when `email` is not provided. Use this field to select a sender with a specific IP pool (dedicated IP users only)."},"name":{"type":"string","description":"Display name of the sender. Maximum length is 70 characters. Only applicable when `email` is provided."}}},"subject":{"type":"string","description":"Email subject line. Required when `templateId` is not provided."},"tags":{"type":"array","description":"Array of tags for categorizing and filtering emails","items":{"type":"string"}},"templateId":{"type":"number","description":"Template identifier"},"textContent":{"type":"string","description":"Plain text body content of the email. Ignored when `templateId` is provided."},"to":{"type":"array","description":"Array of recipient objects. Each object contains an email address and an optional display name. Required when `messageVersions` is not provided. Ignored when `messageVersions` is provided. Example: `[{\"name\":\"Jimmy\", \"email\":\"jimmy@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]`","items":{"type":"object","properties":{"contactPixelTrackingConsent":{"type":"boolean","description":"Consent of the recipient for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account."},"email":{"type":"string","description":"Email address of the recipient","required":true},"name":{"type":"string","description":"Display name of the recipient. Maximum length is 70 characters."}}}}}},"example":{"params":{},"attachment":[],"batchId":"","bcc":[],"cc":[],"headers":{},"htmlContent":"","messageVersions":[],"replyTo":{},"scheduledAt":"","sender":{},"subject":"","tags":[],"templateId":"","textContent":"","to":[]}}}}}},"/smtp/emails":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"email","in":"query","description":"**Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent.","required":false,"schema":{"type":"string","example":""}},{"name":"endDate","in":"query","description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the list. **Maximum time period that can be selected is one month.**","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page","required":false,"schema":{"type":"number","example":""}},{"name":"messageId","in":"query","description":"**Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent.","required":false,"schema":{"type":"string","example":""}},{"name":"offset","in":"query","description":"Index of the first document in the page","required":false,"schema":{"type":"number","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the list. **Maximum time period that can be selected is one month**.","required":false,"schema":{"type":"string","example":""}},{"name":"templateId","in":"query","description":"**Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email.","required":false,"schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/emails"},"summary":"Get the list of transactional emails on the basis of allowed filters","description":"This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.","security":[{"bearerAuth":[]}]}},"/smtp/emails/{uuid}":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"uuid","in":"path","description":"Unique id of the transactional email that has been sent to a particular contact","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/emails/{uuid}"},"summary":"Get the personalized content of a sent transactional email","description":"<Note title=\"How to get uuid\">You can get the uuid using either of the following methods:\nSend a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.\nThe uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.</Note>","security":[{"bearerAuth":[]}]}},"/smtp/email/{identifier}":{"delete":{"tags":["Transactional Emails"],"parameters":[{"name":"identifier","in":"path","description":"The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`).","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/email/{identifier}"},"summary":"Delete scheduled emails by batchId or messageId","description":"Delete scheduled batch of emails by batchId or single scheduled email by messageId","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/smtp/emailStatus/{identifier}":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"identifier","in":"path","description":"The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored.","required":true,"schema":{"type":"string","example":""}},{"name":"endDate","in":"query","description":"Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page. Not valid when identifier is `messageId`.","required":false,"schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Index of the first document on the page.  Not valid when identifier is `messageId`.","required":false,"schema":{"type":"number","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`.","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date.","required":false,"schema":{"type":"string","example":""}},{"name":"status","in":"query","description":"Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/emailStatus/{identifier}"},"summary":"Fetch scheduled emails by batchId or messageId","description":"Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)","security":[{"bearerAuth":[]}]}},"/smtp/deleteHardbounces":{"post":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/deleteHardbounces"},"summary":"Delete hardbounces","description":"Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"contactEmail":{"type":"string","description":"Target a specific email address"},"endDate":{"type":"string","description":"Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate"},"startDate":{"type":"string","description":"Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate"}}},"example":{"contactEmail":"","endDate":"","startDate":""}}}}}},"/smtp/statistics/reports":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"days","in":"query","description":"Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_","required":false,"schema":{"type":"number","example":""}},{"name":"endDate","in":"query","description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD)","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page","required":false,"schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Index of the first document on the page","required":false,"schema":{"type":"number","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD)","required":false,"schema":{"type":"string","example":""}},{"name":"tag","in":"query","description":"Tag of the emails","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/statistics/reports"},"summary":"Get your transactional email activity aggregated per day","description":"This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days.","security":[{"bearerAuth":[]}]}},"/smtp/statistics/events":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"days","in":"query","description":"Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided.","required":false,"schema":{"type":"number","example":""}},{"name":"email","in":"query","description":"Filter the report for a specific email addresses","required":false,"schema":{"type":"string","example":""}},{"name":"endDate","in":"query","description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate","required":false,"schema":{"type":"string","example":""}},{"name":"event","in":"query","description":"Filter the report for a specific event type","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number limitation for the result returned","required":false,"schema":{"type":"number","example":""}},{"name":"messageId","in":"query","description":"Filter on a specific message id","required":false,"schema":{"type":"string","example":""}},{"name":"offset","in":"query","description":"Beginning point in the list to retrieve from.","required":false,"schema":{"type":"number","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate","required":false,"schema":{"type":"string","example":""}},{"name":"tags","in":"query","description":"Filter the report for tags (serialized and urlencoded array)","required":false,"schema":{"type":"string","example":""}},{"name":"templateId","in":"query","description":"Filter on a specific template id","required":false,"schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/statistics/events"},"summary":"Get all your transactional email activity (unaggregated events)","description":"This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days","security":[{"bearerAuth":[]}]}},"/smtp/statistics/aggregatedReport":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"days","in":"query","description":"Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided.","required":false,"schema":{"type":"number","example":""}},{"name":"endDate","in":"query","description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate","required":false,"schema":{"type":"string","example":""}},{"name":"tag","in":"query","description":"Tag of the emails","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/statistics/aggregatedReport"},"summary":"Get your transactional email activity aggregated over a period of time","description":"This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days","security":[{"bearerAuth":[]}]}},"/smtp/log/{identifier}":{"delete":{"tags":["Transactional Emails"],"parameters":[{"name":"identifier","in":"path","description":"MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address.","required":true,"schema":{"type":"string","example":""}},{"name":"from_date","in":"query","description":"Starting date (YYYY-MM-DD) to narrow down logs for deletion","required":false,"schema":{"type":"string","example":""}},{"name":"to_date","in":"query","description":"Ending date (YYYY-MM-DD) to narrow down logs for deletion","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/log/{identifier}"},"summary":"Delete an SMTP transactional log","description":"Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/smtp/templates":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"editorType","in":"query","description":"Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value.","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page","required":false,"schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Index of the first document in the page","required":false,"schema":{"type":"number","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","required":false,"schema":{"type":"string","example":""}},{"name":"templateStatus","in":"query","description":"Filter on the status of the template. Active = true, inactive = false","required":false,"schema":{"type":"boolean","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates"},"summary":"Get the list of email templates","description":"Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported).","security":[{"bearerAuth":[]}]},"post":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates"},"summary":"Create an email template","description":"Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"attachmentUrl":{"type":"string","description":"Absolute url of the attachment (**no local file**). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps'"},"htmlContent":{"type":"string","description":"Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty**"},"htmlUrl":{"type":"string","description":"Url which contents the body of the email message. REQUIRED if htmlContent is empty"},"isActive":{"type":"boolean","description":"Status of template. isActive = true means template is active and isActive = false means template is inactive"},"replyTo":{"type":"string","description":"Email on which campaign recipients will be able to reply to"},"sender":{"type":"object","description":"Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{\"name\":\"xyz\", \"email\":\"example@abc.com\"}** **{\"name\":\"xyz\", \"id\":123}**","required":true,"properties":{"email":{"type":"string","description":"Email of the sender"},"id":{"type":"number","description":"Select the sender for the template on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_."},"name":{"type":"string","description":"Name of the sender. **If not passed, will be set to default**"}}},"subject":{"type":"string","description":"Subject of the template","required":true},"tag":{"type":"string","description":"Tag of the template"},"templateName":{"type":"string","description":"Name of the template","required":true},"toField":{"type":"string","description":"To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization"}}},"example":{"attachmentUrl":"","htmlContent":"","htmlUrl":"","isActive":"","replyTo":"","sender":{},"subject":"","tag":"","templateName":"","toField":""}}}}}},"/smtp/templates/{templateId}":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"templateId","in":"path","description":"ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter).","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates/{templateId}"},"summary":"Returns the template information","description":"Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content).","security":[{"bearerAuth":[]}]},"put":{"tags":["Transactional Emails"],"parameters":[{"name":"templateId","in":"path","description":"ID of the template. Can be a numeric template ID or a custom template identifier string.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates/{templateId}"},"summary":"Update an email template","description":"Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"attachmentUrl":{"type":"string","description":"Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps"},"htmlContent":{"type":"string","description":"**Required if htmlUrl is empty**. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)"},"htmlUrl":{"type":"string","description":"**Required if htmlContent is empty**. URL to the body of the email (HTML)"},"isActive":{"type":"boolean","description":"Status of the template. isActive = false means template is inactive, isActive = true means template is active"},"replyTo":{"type":"string","description":"Email on which campaign recipients will be able to reply to"},"sender":{"type":"object","description":"Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{\"name\":\"xyz\", \"email\":\"example@abc.com\"}** **{\"name\":\"xyz\", \"id\":123}**","properties":{"email":{"type":"string","description":"Email of the sender"},"id":{"type":"number","description":"Select the sender for the template on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_."},"name":{"type":"string","description":"Name of the sender"}}},"subject":{"type":"string","description":"Subject of the email"},"tag":{"type":"string","description":"Tag of the template"},"templateName":{"type":"string","description":"Name of the template"},"toField":{"type":"string","description":"To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization"}}},"example":{"attachmentUrl":"","htmlContent":"","htmlUrl":"","isActive":"","replyTo":"","sender":{},"subject":"","tag":"","templateName":"","toField":""}}}}},"delete":{"tags":["Transactional Emails"],"parameters":[{"name":"templateId","in":"path","description":"id of the template","required":true,"schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates/{templateId}"},"summary":"Delete an inactive email template","description":"Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/smtp/templates/{templateId}/sendTest":{"post":{"tags":["Transactional Emails"],"parameters":[{"name":"templateId","in":"path","description":"Id of the template","required":true,"schema":{"type":"number","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/templates/{templateId}/sendTest"},"summary":"Send a template to your test list","description":"Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"emailTo":{"type":"array","description":"List of the email addresses of the recipients whom you wish to send the test mail. _If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day_.","items":{"type":"string"}}}},"example":{"emailTo":[]}}}}}},"/smtp/template/preview":{"post":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/template/preview"},"summary":"Generate the rendered preview of transactional template","description":"Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/smtp/blockedContacts":{"get":{"tags":["Transactional Emails"],"parameters":[{"name":"endDate","in":"query","description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page","required":false,"schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Index of the first document on the page","required":false,"schema":{"type":"number","example":""}},{"name":"senders","in":"query","description":"Comma separated list of emails of the senders from which contacts are blocked or unsubscribed","required":false,"schema":{"type":"array","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/blockedContacts"},"summary":"Get the list of blocked or unsubscribed transactional contacts","description":"Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter.","security":[{"bearerAuth":[]}]}},"/smtp/blockedContacts/{email}":{"delete":{"tags":["Transactional Emails"],"parameters":[{"name":"email","in":"path","description":"contact email (urlencoded) to unblock.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/blockedContacts/{email}"},"summary":"Unblock or resubscribe a transactional contact","description":"Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/smtp/blockedDomains":{"get":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/blockedDomains"},"summary":"Get the list of blocked domains","description":"Get the list of blocked domains","security":[{"bearerAuth":[]}]},"post":{"tags":["Transactional Emails"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/blockedDomains"},"summary":"Add a new domain to the list of blocked domains","description":"Blocks a new domain in order to avoid messages being sent to the same","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"domain":{"type":"string","description":"name of the domain to be blocked","required":true}}},"example":{"domain":""}}}}}},"/smtp/blockedDomains/{domain}":{"delete":{"tags":["Transactional Emails"],"parameters":[{"name":"domain","in":"path","description":"The name of the domain to be deleted","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/smtp/blockedDomains/{domain}"},"summary":"Unblock an existing domain from the list of blocked domains","description":"Unblocks an existing domain from the list of blocked domains","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/inbound/events":{"get":{"tags":["Inbound Parsing"],"parameters":[{"name":"endDate","in":"query","description":"Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future.","required":false,"schema":{"type":"string","example":""}},{"name":"limit","in":"query","description":"Number of documents returned per page","required":false,"schema":{"type":"number","example":""}},{"name":"offset","in":"query","description":"Index of the first document on the page","required":false,"schema":{"type":"number","example":""}},{"name":"sender","in":"query","description":"Email address of the sender.","required":false,"schema":{"type":"string","example":""}},{"name":"sort","in":"query","description":"Sort the results in the ascending/descending order of record creation","required":false,"schema":{"type":"string","example":""}},{"name":"startDate","in":"query","description":"Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is 30 days. Must not be in the future.","required":false,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/inbound/events"},"summary":"Get the list of all the events for the received emails.","description":"This endpoint will show the list of all the events for the received emails. When no date range is provided, the last 30 days of events are returned by default.","security":[{"bearerAuth":[]}]}},"/inbound/events/{uuid}":{"get":{"tags":["Inbound Parsing"],"parameters":[{"name":"uuid","in":"path","description":"UUID to fetch events specific to received email","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/inbound/events/{uuid}"},"summary":"Fetch all events history for one particular received email.","description":"This endpoint will show the list of all events history for one particular received email.","security":[{"bearerAuth":[]}]}},"/inbound/attachments/{downloadToken}":{"get":{"tags":["Inbound Parsing"],"parameters":[{"name":"downloadToken","in":"path","description":"Token to fetch a particular attachment","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://developers.brevo.com/","api_endpoint":"https://api.brevo.com/v3/inbound/attachments/{downloadToken}"},"summary":"Retrieve inbound attachment with download token.","description":"This endpoint will retrieve inbound attachment with download token.","security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}