Skip to content

Latest commit

 

History

History
388 lines (249 loc) · 14.9 KB

EmailCampaignsApi.md

File metadata and controls

388 lines (249 loc) · 14.9 KB

sib_api_v3_sdk.EmailCampaignsApi

All URIs are relative to https://api.sendinblue.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

CreateEmailCampaign

CreateModel CreateEmailCampaign(ctx, body) Create an email campaign

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateEmailCampaign Values to create a campaign

Return type

CreateModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteEmailCampaign

DeleteEmailCampaign(ctx, campaignId) Delete an email campaign

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EmailExportRecipients

CreatedProcessId EmailExportRecipients(ctx, campaignId, optional) Export the recipients of an email campaign

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Id of the campaign
optional *EmailCampaignsApiEmailExportRecipientsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EmailCampaignsApiEmailExportRecipientsOpts struct

Name Type Description Notes

body | optional.Interface of EmailExportRecipients| Values to send for a recipient export request |

Return type

CreatedProcessId

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAbTestCampaignResult

AbTestCampaignResult GetAbTestCampaignResult(ctx, campaignId) Get an A/B test email campaign results

Obtain winning version of an A/B test email campaign

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Id of the A/B test campaign

Return type

AbTestCampaignResult

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetEmailCampaign

GetEmailCampaign GetEmailCampaign(ctx, campaignId) Get an email campaign report

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Id of the campaign

Return type

GetEmailCampaign

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetEmailCampaigns

GetEmailCampaigns GetEmailCampaigns(ctx, optional) Return all your created email campaigns

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *EmailCampaignsApiGetEmailCampaignsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EmailCampaignsApiGetEmailCampaignsOpts 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
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 500]
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]

Return type

GetEmailCampaigns

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, applications/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSharedTemplateUrl

GetSharedTemplateUrl GetSharedTemplateUrl(ctx, campaignId) Get a shared template url

Get a unique URL to share & import an email template from one Sendinblue account to another.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Id of the campaign or template

Return type

GetSharedTemplateUrl

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendEmailCampaignNow

SendEmailCampaignNow(ctx, campaignId) Send an email campaign immediately, based on campaignId

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendReport

SendReport(ctx, body, campaignId) Send the report of a campaign

A PDF will be sent to the specified email addresses

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SendReport Values for send a report
campaignId int64 Id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendTestEmail

SendTestEmail(ctx, body, campaignId) Send an email campaign to your test list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SendTestEmail
campaignId int64 Id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateCampaignStatus

UpdateCampaignStatus(ctx, body, campaignId) Update an email campaign status

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UpdateCampaignStatus Status of the campaign
campaignId int64 Id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateEmailCampaign

UpdateEmailCampaign(ctx, body, campaignId) Update an email campaign

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UpdateEmailCampaign Values to update a campaign
campaignId int64 Id of the campaign

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UploadImageToGallery

UploadImageToGallery(ctx, body) Upload an image to your account's image gallery

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UploadImageToGallery Parameters to upload an image

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]