All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
CreateEmailCampaign | Post /emailCampaigns | Create an email campaign |
DeleteEmailCampaign | Delete /emailCampaigns/{campaignId} | Delete an email campaign |
EmailExportRecipients | Post /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign |
GetAbTestCampaignResult | Get /emailCampaigns/{campaignId}/abTestCampaignResult | Get an A/B test email campaign results |
GetEmailCampaign | Get /emailCampaigns/{campaignId} | Get an email campaign report |
GetEmailCampaigns | Get /emailCampaigns | Return all your created email campaigns |
GetSharedTemplateUrl | Get /emailCampaigns/{campaignId}/sharedUrl | Get a shared template url |
SendEmailCampaignNow | Post /emailCampaigns/{campaignId}/sendNow | Send an email campaign immediately, based on campaignId |
SendReport | Post /emailCampaigns/{campaignId}/sendReport | Send the report of a campaign |
SendTestEmail | Post /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list |
UpdateCampaignStatus | Put /emailCampaigns/{campaignId}/status | Update an email campaign status |
UpdateEmailCampaign | Put /emailCampaigns/{campaignId} | Update an email campaign |
UploadImageToGallery | Post /emailCampaigns/images | Upload an image to your account's image gallery |
CreateModel CreateEmailCampaign(ctx, emailCampaigns) Create an email campaign
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
emailCampaigns | CreateEmailCampaign | Values to create a campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteEmailCampaign(ctx, campaignId) Delete an email campaign
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | id of the campaign |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId EmailExportRecipients(ctx, campaignId, optional) Export the recipients of an email campaign
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
optional | *EmailExportRecipientsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a EmailExportRecipientsOpts struct
Name | Type | Description | Notes |
---|
recipientExport | optional.Interface of EmailExportRecipients| Values to send for a recipient export request |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AbTestCampaignResult GetAbTestCampaignResult(ctx, campaignId) Get an A/B test email campaign results
Obtain winning version of an A/B test email campaign
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the A/B test campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEmailCampaign GetEmailCampaign(ctx, campaignId, optional) Get an email campaign report
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
optional | *GetEmailCampaignOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetEmailCampaignOpts struct
Name | Type | Description | Notes |
---|
statistics | optional.String| Filter on the type of statistics required. Example globalStats value will only fetch globalStats info of the campaign in returned response. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEmailCampaigns GetEmailCampaigns(ctx, optional) Return all your created email campaigns
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *GetEmailCampaignsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a GetEmailCampaignsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
type_ | optional.String | Filter on the type of the campaigns | |
status | optional.String | Filter on the status of the campaign | |
statistics | optional.String | Filter on the type of statistics required. Example globalStats value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the Get Campaign Report endpoint. | |
startDate | optional.String | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | |
endDate | optional.String | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | |
limit | optional.Int64 | Number of documents 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] |
excludeHtmlContent | optional.Bool | Use this flag to exclude htmlContent from the response body. If set to true, htmlContent field will be returned as empty string in the response body |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSharedTemplateUrl GetSharedTemplateUrl(ctx, campaignId) Get a shared template url
Get a unique URL to share & import an email template from one Brevo account to another.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign or template |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendEmailCampaignNow(ctx, campaignId) Send an email campaign immediately, based on campaignId
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendReport(ctx, campaignId, sendReport) Send the report of a campaign
A PDF will be sent to the specified email addresses
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
sendReport | SendReport | Values for send a report |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SendTestEmail(ctx, campaignId, emailTo) Send an email campaign to your test list
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
emailTo | 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]
UpdateCampaignStatus(ctx, campaignId, status) Update an email campaign status
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
status | UpdateCampaignStatus | Status of the campaign |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateEmailCampaign(ctx, campaignId, emailCampaign) Update an email campaign
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
campaignId | int64 | Id of the campaign | |
emailCampaign | UpdateEmailCampaign | Values to update a campaign |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadImageModel UploadImageToGallery(ctx, uploadImage) Upload an image to your account's image gallery
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
uploadImage | UploadImageToGallery | Parameters to upload an image |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]