All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
BlockNewDomain | Post /smtp/blockedDomains | Add a new domain to the list of blocked domains |
CreateSmtpTemplate | Post /smtp/templates | Create an email template |
DeleteBlockedDomain | Delete /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains |
DeleteHardbounces | Post /smtp/deleteHardbounces | Delete hardbounces |
DeleteScheduledEmailById | Delete /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId |
DeleteSmtpTemplate | Delete /smtp/templates/{templateId} | Delete an inactive email template |
GetAggregatedSmtpReport | Get /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time |
GetBlockedDomains | Get /smtp/blockedDomains | Get the list of blocked domains |
GetEmailEventReport | Get /smtp/statistics/events | Get all your transactional email activity (unaggregated events) |
GetScheduledEmailByBatchId | Get /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId |
GetScheduledEmailByMessageId | Get /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId |
GetSmtpReport | Get /smtp/statistics/reports | Get your transactional email activity aggregated per day |
GetSmtpTemplate | Get /smtp/templates/{templateId} | Returns the template information |
GetSmtpTemplates | Get /smtp/templates | Get the list of email templates |
GetTransacBlockedContacts | Get /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts |
GetTransacEmailContent | Get /smtp/emails/{uuid} | Get the personalized content of a sent transactional email |
GetTransacEmailsList | Get /smtp/emails | Get the list of transactional emails on the basis of allowed filters |
SendTestTemplate | Post /smtp/templates/{templateId}/sendTest | Send a template to your test list |
SendTransacEmail | Post /smtp/email | Send a transactional email |
SmtpBlockedContactsEmailDelete | Delete /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact |
SmtpLogIdentifierDelete | Delete /smtp/log/{identifier} | Delete an SMTP transactional log |
UpdateSmtpTemplate | Put /smtp/templates/{templateId} | Update an email template |
BlockNewDomain(ctx, blockDomain) Add a new domain to the list of blocked domains
Blocks a new domain in order to avoid messages being sent to the same
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
blockDomain | BlockDomain |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateModel CreateSmtpTemplate(ctx, smtpTemplate) Create an email template
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
smtpTemplate | CreateSmtpTemplate | values to update in transactional email template |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteBlockedDomain(ctx, domain) Unblock an existing domain from the list of blocked domains
Unblocks an existing domain from the list of blocked domains
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domain | string | The name of the domain to be deleted |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteHardbounces(ctx, optional) Delete hardbounces
Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *DeleteHardbouncesOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a DeleteHardbouncesOpts struct
Name | Type | Description | Notes |
---|---|---|---|
deleteHardbounces | optional.Interface of DeleteHardbounces | values to delete hardbounces |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteScheduledEmailById(ctx, identifier) Delete scheduled emails by batchId or messageId
Delete scheduled batch of emails by batchId or single scheduled email by messageId
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
identifier | string | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSmtpTemplate(ctx, templateId) Delete an inactive email template
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
templateId | int64 | id of the template |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAggregatedReport GetAggregatedSmtpReport(ctx, optional) Get your transactional email activity aggregated over a period of time
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
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetAggregatedSmtpReportOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetAggregatedSmtpReportOpts struct
Name | Type | Description | Notes |
---|---|---|---|
startDate | optional.String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | |
endDate | optional.String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | |
days | optional.Int64 | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | |
tag | optional.String | Tag of the emails |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetBlockedDomains GetBlockedDomains(ctx, ) Get the list of blocked domains
Get the list of blocked domains
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEmailEventReport GetEmailEventReport(ctx, optional) Get all your transactional email activity (unaggregated events)
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
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetEmailEventReportOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetEmailEventReportOpts struct
Name | Type | Description | Notes |
---|---|---|---|
limit | optional.Int64 | Number limitation for the result returned | [default to 2500] |
offset | optional.Int64 | Beginning point in the list to retrieve from. | [default to 0] |
startDate | optional.String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | |
endDate | optional.String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | |
days | optional.Int64 | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | |
optional.String | Filter the report for a specific email addresses | ||
event | optional.String | Filter the report for a specific event type | |
tags | optional.String | Filter the report for tags (serialized and urlencoded array) | |
messageId | optional.String | Filter on a specific message id | |
templateId | optional.Int64 | Filter on a specific template id | |
sort | optional.String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetScheduledEmailByBatchId GetScheduledEmailByBatchId(ctx, batchId, optional) Fetch scheduled emails by batchId
Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
batchId | string | The batchId of scheduled emails batch (Should be a valid UUIDv4) | |
optional | *GetScheduledEmailByBatchIdOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetScheduledEmailByBatchIdOpts struct
Name | Type | Description | Notes |
---|
startDate | optional.String| Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | endDate | optional.String| 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. | sort | optional.String| Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] status | optional.String| Filter the records by `status` of the scheduled email batch or message. | limit | optional.Int64| Number of documents returned per page | [default to 100] offset | optional.Int64| Index of the first document on the page | [default to 0]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetScheduledEmailByMessageId GetScheduledEmailByMessageId(ctx, messageId, optional) Fetch scheduled email by messageId
Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
messageId | string | The messageId of scheduled email | |
optional | *GetScheduledEmailByMessageIdOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetScheduledEmailByMessageIdOpts struct
Name | Type | Description | Notes |
---|
startDate | optional.String| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | endDate | optional.String| 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. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReports GetSmtpReport(ctx, optional) Get your transactional email activity aggregated per day
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetSmtpReportOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetSmtpReportOpts struct
Name | Type | Description | Notes |
---|---|---|---|
limit | optional.Int64 | Number of documents returned per page | [default to 10] |
offset | optional.Int64 | Index of the first document on the page | [default to 0] |
startDate | optional.String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | |
endDate | optional.String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | |
days | optional.Int64 | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | |
tag | optional.String | Tag of the emails | |
sort | optional.String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSmtpTemplateOverview GetSmtpTemplate(ctx, templateId) Returns the template information
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
templateId | int64 | id of the template |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSmtpTemplates GetSmtpTemplates(ctx, optional) Get the list of email templates
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetSmtpTemplatesOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetSmtpTemplatesOpts struct
Name | Type | Description | Notes |
---|---|---|---|
templateStatus | optional.Bool | Filter on the status of the template. Active = true, inactive = false | |
limit | optional.Int64 | Number of documents returned per page | [default to 50] |
offset | optional.Int64 | Index of the first document in the page | [default to 0] |
sort | optional.String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTransacBlockedContacts GetTransacBlockedContacts(ctx, optional) Get the list of blocked or unsubscribed transactional contacts
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetTransacBlockedContactsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetTransacBlockedContactsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
startDate | optional.String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts | |
endDate | optional.String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts | |
limit | optional.Int64 | Number of documents returned per page | [default to 50] |
offset | optional.Int64 | Index of the first document on the page | [default to 0] |
senders | optional.Interface of []string | Comma separated list of emails of the senders from which contacts are blocked or unsubscribed | |
sort | optional.String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTransacEmailContent GetTransacEmailContent(ctx, uuid) Get the personalized content of a sent transactional email
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
uuid | string | Unique id of the transactional email that has been sent to a particular contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTransacEmailsList GetTransacEmailsList(ctx, optional) Get the list of transactional emails on the basis of allowed filters
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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetTransacEmailsListOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetTransacEmailsListOpts struct
Name | Type | Description | Notes |
---|---|---|---|
optional.String | Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. | ||
templateId | optional.Int64 | Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. | |
messageId | optional.String | Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. | |
startDate | optional.String | 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. | |
endDate | optional.String | 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. | |
sort | optional.String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc] |
limit | optional.Int64 | Number of documents returned per page | [default to 500] |
offset | optional.Int64 | Index of the first document in the page | [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendTestTemplate(ctx, templateId, sendTestEmail) Send a template to your test list
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
templateId | int64 | Id of the template | |
sendTestEmail | SendTestEmail |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateSmtpEmail SendTransacEmail(ctx, sendSmtpEmail) Send a transactional email
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sendSmtpEmail | SendSmtpEmail | Values to send a transactional email |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmtpBlockedContactsEmailDelete(ctx, email) Unblock or resubscribe a transactional contact
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
string | contact email (urlencoded) to unblock. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmtpLogIdentifierDelete(ctx, identifier) Delete an SMTP transactional log
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
identifier | string | MessageId or Email of the transactional log(s) to delete |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateSmtpTemplate(ctx, templateId, smtpTemplate) Update an email template
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
templateId | int64 | id of the template | |
smtpTemplate | UpdateSmtpTemplate | values to update in transactional email template |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]