lib

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 21 Imported by: 7

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions ¶

func CacheExpires ¶

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types ¶

type APIClient ¶

type APIClient struct {
	AccountApi *AccountApiService

	CompaniesApi *CompaniesApiService

	ContactsApi *ContactsApiService

	ConversationsApi *ConversationsApiService

	DealsApi *DealsApiService

	DomainsApi *DomainsApiService

	EcommerceApi *EcommerceApiService

	EmailCampaignsApi *EmailCampaignsApiService

	ExternalFeedsApi *ExternalFeedsApiService

	FilesApi *FilesApiService

	InboundParsingApi *InboundParsingApiService

	MasterAccountApi *MasterAccountApiService

	NotesApi *NotesApiService

	ProcessApi *ProcessApiService

	ResellerApi *ResellerApiService

	SMSCampaignsApi *SMSCampaignsApiService

	SendersApi *SendersApiService

	TasksApi *TasksApiService

	TransactionalEmailsApi *TransactionalEmailsApiService

	TransactionalSMSApi *TransactionalSMSApiService

	TransactionalWhatsAppApi *TransactionalWhatsAppApiService

	WebhooksApi *WebhooksApiService

	WhatsAppCampaignsApi *WhatsAppCampaignsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Brevo API API v3.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient ¶

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath ¶

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey ¶

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse ¶

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse ¶

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError ¶

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AbTestCampaignResult ¶

type AbTestCampaignResult struct {
	// Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending.
	WinningVersion string `json:"winningVersion,omitempty"`
	// Criteria choosen for winning version (Open/Click)
	WinningCriteria string `json:"winningCriteria,omitempty"`
	// Subject Line of current winning version
	WinningSubjectLine string `json:"winningSubjectLine,omitempty"`
	// Open rate for current winning version
	OpenRate string `json:"openRate,omitempty"`
	// Click rate for current winning version
	ClickRate string `json:"clickRate,omitempty"`
	// Open/Click rate for the winner version
	WinningVersionRate string                            `json:"winningVersionRate,omitempty"`
	Statistics         *AbTestCampaignResultStatistics   `json:"statistics,omitempty"`
	ClickedLinks       *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"`
}
type AbTestCampaignResultClickedLinks struct {
	VersionA *AbTestVersionClicks `json:"Version A"`
	VersionB *AbTestVersionClicks `json:"Version B"`
}

type AbTestCampaignResultStatistics ¶

type AbTestCampaignResultStatistics struct {
	Openers      *AbTestVersionStats `json:"openers"`
	Clicks       *AbTestVersionStats `json:"clicks"`
	Unsubscribed *AbTestVersionStats `json:"unsubscribed"`
	HardBounces  *AbTestVersionStats `json:"hardBounces"`
	SoftBounces  *AbTestVersionStats `json:"softBounces"`
	Complaints   *AbTestVersionStats `json:"complaints"`
}

type AbTestVersionClicks ¶

type AbTestVersionClicks struct {
}

Information on clicked links for a particular version

type AbTestVersionClicksInner ¶

type AbTestVersionClicksInner struct {
	// URL of the link
	Link string `json:"link"`
	// Number of times a link is clicked
	ClicksCount int64 `json:"clicksCount"`
	// Percentage of clicks of link with respect to total clicks
	ClickRate string `json:"clickRate"`
}

type AbTestVersionStats ¶

type AbTestVersionStats struct {
	// percentage of an event for version A
	VersionA string `json:"Version A"`
	// percentage of an event for version B
	VersionB string `json:"Version B"`
}

Percentage of a particular event for both versions

type AccountApiService ¶

type AccountApiService service

func (*AccountApiService) GetAccount ¶

func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.Response, error)

AccountApiService Get your account information, plan and credits details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetAccount

func (*AccountApiService) GetAccountActivity ¶

func (a *AccountApiService) GetAccountActivity(ctx context.Context, localVarOptionals *GetAccountActivityOpts) (GetAccountActivity, *http.Response, error)

type AddChildDomain ¶

type AddChildDomain struct {
	// Sender domain to add for a specific child account
	Domain string `json:"domain,omitempty"`
}

type AddContactToList ¶

type AddContactToList struct {
	// Mandatory if IDs are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
	Emails []string `json:"emails,omitempty"`
	// Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
	Ids []int64 `json:"ids,omitempty"`
}

type AddCredits ¶

type AddCredits struct {
	// Required if email credits are empty. SMS credits to be added to the child account
	Sms int64 `json:"sms,omitempty"`
	// Required if sms credits are empty. Email credits to be added to the child account
	Email int64 `json:"email,omitempty"`
}

type AuthenticateDomainModel ¶

type AuthenticateDomainModel struct {
	// Domain
	DomainName string `json:"domain_name"`
	// Success message
	Message string `json:"message"`
}

type BasicAuth ¶

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BlockDomain ¶

type BlockDomain struct {
	// name of the domain to be blocked
	Domain string `json:"domain"`
}

type Body ¶

type Body struct {
	// Name of company
	Name string `json:"name"`
	// Attributes for company creation
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Country code if phone_number is passed in attributes.
	CountryCode int64 `json:"countryCode,omitempty"`
}

type Body1 ¶

type Body1 struct {
	// Name of company
	Name string `json:"name,omitempty"`
	// Attributes for company update
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Country code if phone_number is passed in attributes.
	CountryCode int64 `json:"countryCode,omitempty"`
}

type Body10 ¶

type Body10 struct {
	// visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
	VisitorId string `json:"visitorId"`
	// message text
	Text string `json:"text"`
	// agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set.
	AgentId string `json:"agentId,omitempty"`
	// group ID. It can be found on group’s page. Optional if `agentId` is set.
	GroupId string `json:"groupId,omitempty"`
}

type Body11 ¶

type Body11 struct {
	// edited message text
	Text string `json:"text"`
}

type Body12 ¶

type Body12 struct {
	// agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
	AgentId string `json:"agentId,omitempty"`
	// mark your messages to distinguish messages created by you from the others.
	ReceivedFrom string `json:"receivedFrom,omitempty"`
	// agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically.
	AgentEmail string `json:"agentEmail,omitempty"`
	// agent name.
	AgentName string `json:"agentName,omitempty"`
}

type Body2 ¶

type Body2 struct {
	// Contact ids for contacts to be linked with company
	LinkContactIds []int64 `json:"linkContactIds,omitempty"`
	// Contact ids for contacts to be unlinked from company
	UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"`
	// Deals ids for deals to be linked with company
	LinkDealsIds []string `json:"linkDealsIds,omitempty"`
	// Deals ids for deals to be unlinked from company
	UnlinkDealsIds []string `json:"unlinkDealsIds,omitempty"`
}

type Body3 ¶

type Body3 struct {
	// Name of deal
	Name string `json:"name"`
	// Attributes fo\\r deal creation
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

type Body4 ¶

type Body4 struct {
	// Name of deal
	Name string `json:"name,omitempty"`
	// Attributes for deal update
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

type Body5 ¶

type Body5 struct {
	// Contact ids for contacts to be linked with deal
	LinkContactIds []int64 `json:"linkContactIds,omitempty"`
	// Contact ids for contacts to be unlinked from deal
	UnlinkContactIds []int64 `json:"unlinkContactIds,omitempty"`
	// Company ids to be linked with deal
	LinkCompanyIds []string `json:"linkCompanyIds,omitempty"`
	// Company ids to be unlinked from deal
	UnlinkCompanyIds []string `json:"unlinkCompanyIds,omitempty"`
}

type Body6 ¶

type Body6 struct {
	// Name of task
	Name string `json:"name"`
	// Duration of task in milliseconds [1 minute = 60000 ms]
	Duration int64 `json:"duration,omitempty"`
	// Id for type of task e.g Call / Email / Meeting etc.
	TaskTypeId string `json:"taskTypeId"`
	// Task due date and time
	Date time.Time `json:"date"`
	// Notes added to a task
	Notes string `json:"notes,omitempty"`
	// Task marked as done
	Done bool `json:"done,omitempty"`
	// User id to whom task is assigned
	AssignToId string `json:"assignToId,omitempty"`
	// Contact ids for contacts linked to this task
	ContactsIds []int32 `json:"contactsIds,omitempty"`
	// Deal ids for deals a task is linked to
	DealsIds []string `json:"dealsIds,omitempty"`
	// Companies ids for companies a task is linked to
	CompaniesIds []string      `json:"companiesIds,omitempty"`
	Reminder     *TaskReminder `json:"reminder,omitempty"`
}

type Body7 ¶

type Body7 struct {
	// Name of task
	Name string `json:"name,omitempty"`
	// Duration of task in milliseconds [1 minute = 60000 ms]
	Duration int32 `json:"duration,omitempty"`
	// Id for type of task e.g Call / Email / Meeting etc.
	TaskTypeId string `json:"taskTypeId,omitempty"`
	// Task date/time
	Date time.Time `json:"date,omitempty"`
	// Notes added to a task
	Notes string `json:"notes,omitempty"`
	// Task marked as done
	Done bool `json:"done,omitempty"`
	// User id to whom task is assigned
	AssignToId string `json:"assignToId,omitempty"`
	// Contact ids for contacts linked to this task
	ContactsIds []int32 `json:"contactsIds,omitempty"`
	// Deal ids for deals a task is linked to
	DealsIds []string `json:"dealsIds,omitempty"`
	// Companies ids for companies a task is linked to
	CompaniesIds []string `json:"companiesIds,omitempty"`
}

type Body8 ¶

type Body8 struct {
	// visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
	VisitorId string `json:"visitorId"`
	// message text
	Text string `json:"text"`
	// agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
	AgentId string `json:"agentId,omitempty"`
	// mark your messages to distinguish messages created by you from the others.
	ReceivedFrom string `json:"receivedFrom,omitempty"`
	// agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
	AgentEmail string `json:"agentEmail,omitempty"`
	// agent name
	AgentName string `json:"agentName,omitempty"`
}

type Body9 ¶

type Body9 struct {
	// edited message text
	Text string `json:"text"`
}

type BodyVariablesItems ¶

type BodyVariablesItems struct {
}

type CompaniesApiService ¶

type CompaniesApiService service

func (*CompaniesApiService) CompaniesAttributesGet ¶

func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (CompanyAttributes, *http.Response, error)

CompaniesApiService Get company attributes

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return CompanyAttributes

func (*CompaniesApiService) CompaniesGet ¶

func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptionals *CompaniesGetOpts) (CompaniesList, *http.Response, error)

func (*CompaniesApiService) CompaniesIdDelete ¶

func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) (*http.Response, error)

CompaniesApiService Delete a company

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

func (*CompaniesApiService) CompaniesIdGet ¶

func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Company, *http.Response, error)

CompaniesApiService Get a company

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

@return Company

func (*CompaniesApiService) CompaniesIdPatch ¶

func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body1) (Company, *http.Response, error)

CompaniesApiService Update a company

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id
  • @param body Updated company details.

@return Company

func (*CompaniesApiService) CompaniesLinkUnlinkIdPatch ¶

func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body2) (*http.Response, error)

CompaniesApiService Link and Unlink company with contacts and deals

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id
  • @param body Linked / Unlinked contacts and deals ids.

func (*CompaniesApiService) CompaniesPost ¶

func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body) (InlineResponse200, *http.Response, error)

CompaniesApiService Create a company

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Company create data.

@return InlineResponse200

type CompaniesGetOpts ¶

type CompaniesGetOpts struct {
	Filters           optional.String
	LinkedContactsIds optional.Int64
	LinkedDealsIds    optional.String
	Page              optional.Int64
	Limit             optional.Int64
	Sort              optional.String
	SortBy            optional.String
}

type CompaniesList ¶

type CompaniesList struct {
	// List of compaies
	Items []Company `json:"items,omitempty"`
}

List of companies

type Company ¶

type Company struct {
	// Unique company id
	Id string `json:"id,omitempty"`
	// Company attributes with values
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Contact ids for contacts linked to this company
	LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"`
	// Deals ids for companies linked to this company
	LinkedDealsIds []string `json:"linkedDealsIds,omitempty"`
}

Company Details

type CompanyAttributes ¶

type CompanyAttributes struct {
}

List of company attributes

type CompanyAttributesInner ¶

type CompanyAttributesInner struct {
	InternalName      string        `json:"internalName,omitempty"`
	Label             string        `json:"label,omitempty"`
	AttributeTypeName string        `json:"attributeTypeName,omitempty"`
	AttributeOptions  []interface{} `json:"attributeOptions,omitempty"`
	IsRequired        bool          `json:"isRequired,omitempty"`
}

List of attributes

type ComponentItems ¶

type ComponentItems struct {
	Type_ string `json:"type,omitempty"`
	Text  string `json:"text,omitempty"`
}

type Configuration ¶

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration ¶

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader ¶

func (c *Configuration) AddDefaultHeader(key string, value string)

type ContactsApiService ¶

type ContactsApiService service

func (*ContactsApiService) AddContactToList ¶

func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error)

ContactsApiService Add existing contacts to a list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param listId Id of the list
  • @param contactEmails Emails addresses OR IDs of the contacts

@return PostContactInfo

func (*ContactsApiService) CreateAttribute ¶

func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error)

ContactsApiService Create contact attribute

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param attributeCategory Category of the attribute
  • @param attributeName Name of the attribute
  • @param createAttribute Values to create an attribute

func (*ContactsApiService) CreateContact ¶

func (a *ContactsApiService) CreateContact(ctx context.Context, createContact CreateContact) (CreateUpdateContactModel, *http.Response, error)

ContactsApiService Create a contact

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createContact Values to create a contact

@return CreateUpdateContactModel

func (*ContactsApiService) CreateDoiContact ¶

func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiContact CreateDoiContact) (*http.Response, error)

ContactsApiService Create Contact via DOI (Double-Opt-In) Flow

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createDoiContact Values to create the Double opt-in (DOI) contact

func (*ContactsApiService) CreateFolder ¶

func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error)

ContactsApiService Create a folder

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createFolder Name of the folder

@return CreateModel

func (*ContactsApiService) CreateList ¶

func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error)

ContactsApiService Create a list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createList Values to create a list

@return CreateModel

func (*ContactsApiService) DeleteAttribute ¶

func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error)

ContactsApiService Delete an attribute

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param attributeCategory Category of the attribute
  • @param attributeName Name of the existing attribute

func (*ContactsApiService) DeleteContact ¶

func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier string) (*http.Response, error)

ContactsApiService Delete a contact

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param identifier Email (urlencoded) OR ID of the contact

func (*ContactsApiService) DeleteFolder ¶

func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error)

ContactsApiService Delete a folder (and all its lists)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param folderId Id of the folder

func (*ContactsApiService) DeleteList ¶

func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error)

ContactsApiService Delete a list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param listId Id of the list

func (*ContactsApiService) GetAttributes ¶

func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error)

ContactsApiService List all attributes

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetAttributes

func (*ContactsApiService) GetContactInfo ¶

func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string, localVarOptionals *GetContactInfoOpts) (GetExtendedContactDetails, *http.Response, error)

func (*ContactsApiService) GetContactStats ¶

func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *GetContactStatsOpts) (GetContactCampaignStats, *http.Response, error)

func (*ContactsApiService) GetContacts ¶

func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *GetContactsOpts) (GetContacts, *http.Response, error)

func (*ContactsApiService) GetContactsFromList ¶

func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error)

func (*ContactsApiService) GetFolder ¶

func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error)

ContactsApiService Returns a folder&#39;s details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param folderId id of the folder

@return GetFolder

func (*ContactsApiService) GetFolderLists ¶

func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error)

func (*ContactsApiService) GetFolders ¶

func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error)

func (*ContactsApiService) GetList ¶

ContactsApiService Get a list&#39;s details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param listId Id of the list

@return GetExtendedList

func (*ContactsApiService) GetLists ¶

func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error)

func (*ContactsApiService) GetSegments ¶

func (a *ContactsApiService) GetSegments(ctx context.Context, limit int64, offset int64, localVarOptionals *GetSegmentsOpts) (GetSegments, *http.Response, error)

func (*ContactsApiService) ImportContacts ¶

func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactImport RequestContactImport) (CreatedProcessId, *http.Response, error)

ContactsApiService Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input.

@return CreatedProcessId

func (*ContactsApiService) RemoveContactFromList ¶

func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error)

ContactsApiService Delete a contact from a list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param listId Id of the list
  • @param contactEmails Emails addresses OR IDs of the contacts

@return PostContactInfo

func (*ContactsApiService) RequestContactExport ¶

func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestContactExport RequestContactExport) (CreatedProcessId, *http.Response, error)

ContactsApiService Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param requestContactExport Values to request a contact export

@return CreatedProcessId

func (*ContactsApiService) UpdateAttribute ¶

func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error)

ContactsApiService Update contact attribute

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param attributeCategory Category of the attribute
  • @param attributeName Name of the existing attribute
  • @param updateAttribute Values to update an attribute

func (*ContactsApiService) UpdateBatchContacts ¶

func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatchContacts UpdateBatchContacts) (*http.Response, error)

ContactsApiService Update multiple contacts

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param updateBatchContacts Values to update multiple contacts

func (*ContactsApiService) UpdateContact ¶

func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier string, updateContact UpdateContact) (*http.Response, error)

ContactsApiService Update a contact

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param identifier Email (urlencoded) OR ID of the contact
  • @param updateContact Values to update a contact

func (*ContactsApiService) UpdateFolder ¶

func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error)

ContactsApiService Update a folder

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param folderId Id of the folder
  • @param updateFolder Name of the folder

func (*ContactsApiService) UpdateList ¶

func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error)

ContactsApiService Update a list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param listId Id of the list
  • @param updateList Values to update a list

type ConversationsApiService ¶

type ConversationsApiService service

func (*ConversationsApiService) ConversationsAgentOnlinePingPost ¶

func (a *ConversationsApiService) ConversationsAgentOnlinePingPost(ctx context.Context, body Body12) (*http.Response, error)

ConversationsApiService Sets agent’s status to online for 2-3 minutes We recommend pinging this endpoint every minute for as long as the agent has to be considered online.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Agent fields.

func (*ConversationsApiService) ConversationsMessagesIdDelete ¶

func (a *ConversationsApiService) ConversationsMessagesIdDelete(ctx context.Context, id string) (*http.Response, error)

ConversationsApiService Delete a message sent by an agent Only agents’ messages can be deleted.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the message

func (*ConversationsApiService) ConversationsMessagesIdGet ¶

func (a *ConversationsApiService) ConversationsMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error)

ConversationsApiService Get a message

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the message

@return ConversationsMessage

func (*ConversationsApiService) ConversationsMessagesIdPut ¶

func (a *ConversationsApiService) ConversationsMessagesIdPut(ctx context.Context, id string, localVarOptionals *ConversationsMessagesIdPutOpts) (ConversationsMessage, *http.Response, error)

func (*ConversationsApiService) ConversationsMessagesPost ¶

func (a *ConversationsApiService) ConversationsMessagesPost(ctx context.Context, body Body8) (ConversationsMessage, *http.Response, error)

ConversationsApiService Send a message as an agent

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Message fields.

@return ConversationsMessage

func (*ConversationsApiService) ConversationsPushedMessagesIdDelete ¶

func (a *ConversationsApiService) ConversationsPushedMessagesIdDelete(ctx context.Context, id string) (*http.Response, error)

ConversationsApiService Delete an automated message

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the message

func (*ConversationsApiService) ConversationsPushedMessagesIdGet ¶

func (a *ConversationsApiService) ConversationsPushedMessagesIdGet(ctx context.Context, id string) (ConversationsMessage, *http.Response, error)

ConversationsApiService Get an automated message

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the message sent previously

@return ConversationsMessage

func (*ConversationsApiService) ConversationsPushedMessagesIdPut ¶

func (a *ConversationsApiService) ConversationsPushedMessagesIdPut(ctx context.Context, id string, body Body11) (ConversationsMessage, *http.Response, error)

ConversationsApiService Update an automated message

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the message
  • @param body

@return ConversationsMessage

func (*ConversationsApiService) ConversationsPushedMessagesPost ¶

func (a *ConversationsApiService) ConversationsPushedMessagesPost(ctx context.Context, body Body10) (ConversationsMessage, *http.Response, error)

ConversationsApiService Send an automated message to a visitor Example of automated messages: order status, announce new features in your web app, etc.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body

@return ConversationsMessage

type ConversationsMessage ¶

type ConversationsMessage struct {
	// Message ID. It can be used for further manipulations with the message.
	Id string `json:"id,omitempty"`
	// `\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages.
	Type_ string `json:"type,omitempty"`
	// Message text or name of the attached file
	Text string `json:"text,omitempty"`
	// visitor’s ID
	VisitorId string `json:"visitorId,omitempty"`
	// ID of the agent on whose behalf the message was sent (only in messages sent by an agent).
	AgentId string `json:"agentId,omitempty"`
	// Agent’s name as displayed to the visitor. Only in the messages sent by an agent.
	AgentName string `json:"agentName,omitempty"`
	// Timestamp in milliseconds.
	CreatedAt int64 `json:"createdAt,omitempty"`
	// `true` for pushed messages
	IsPushed bool `json:"isPushed,omitempty"`
	// In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop.
	ReceivedFrom string                    `json:"receivedFrom,omitempty"`
	File         *ConversationsMessageFile `json:"file,omitempty"`
}

a Conversations message

type ConversationsMessageFile ¶

type ConversationsMessageFile struct {
	// Name of the file
	Filename string `json:"filename,omitempty"`
	// Size in bytes
	Size int64 `json:"size,omitempty"`
	// Whether the file is an image
	IsImage bool `json:"isImage,omitempty"`
	// URL of the file
	Url       string                             `json:"url,omitempty"`
	ImageInfo *ConversationsMessageFileImageInfo `json:"imageInfo,omitempty"`
}

type ConversationsMessageFileImageInfo ¶

type ConversationsMessageFileImageInfo struct {
	// Width of the image
	Width int64 `json:"width,omitempty"`
	// height of the image
	Height int64 `json:"height,omitempty"`
	// URL of the preview
	PreviewUrl string `json:"previewUrl,omitempty"`
}

image info is passed in case the file is an image

type ConversationsMessagesIdPutOpts ¶

type ConversationsMessagesIdPutOpts struct {
	Body optional.Interface
}

type CreateApiKeyRequest ¶

type CreateApiKeyRequest struct {
	// Id of the sub-account organization
	Id int64 `json:"id"`
	// Name of the API key
	Name string `json:"name,omitempty"`
}

type CreateApiKeyResponse ¶

type CreateApiKeyResponse struct {
	// Status of the API operation.
	Status string `json:"status,omitempty"`
	// API Key
	Key string `json:"key,omitempty"`
}

type CreateAttribute ¶

type CreateAttribute struct {
	// Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'
	Value string `json:"value,omitempty"`
	// Type of the attribute. Use only if the attribute's category is 'calculated' or 'global'
	IsRecurring bool `json:"isRecurring,omitempty"`
	// List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
	Enumeration []CreateAttributeEnumeration `json:"enumeration,omitempty"`
	// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
	Type_ string `json:"type,omitempty"`
}

type CreateAttributeEnumeration ¶

type CreateAttributeEnumeration struct {
	// Id of the value
	Value int32 `json:"value"`
	// Label of the value
	Label string `json:"label"`
}

type CreateCategoryModel ¶

type CreateCategoryModel struct {
	// ID of the category when a new category is created
	Id string `json:"id,omitempty"`
}

type CreateChild ¶

type CreateChild struct {
	// Email address to create the child account
	Email string `json:"email"`
	// First name to use to create the child account
	FirstName string `json:"firstName"`
	// Last name to use to create the child account
	LastName string `json:"lastName"`
	// Company name to use to create the child account
	CompanyName string `json:"companyName"`
	// Password for the child account to login
	Password string `json:"password"`
	// Language of the child account
	Language string `json:"language,omitempty"`
}

type CreateContact ¶

type CreateContact struct {
	// Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
	Email string `json:"email,omitempty"`
	// Pass your own Id to create a contact.
	ExtId string `json:"ext_id,omitempty"`
	// Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your Brevo account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"}
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Set this field to blacklist the contact for emails (emailBlacklisted = true)
	EmailBlacklisted bool `json:"emailBlacklisted"`
	// Set this field to blacklist the contact for SMS (smsBlacklisted = true)
	SmsBlacklisted bool `json:"smsBlacklisted"`
	// Ids of the lists to add the contact to
	ListIds []int64 `json:"listIds,omitempty"`
	// Facilitate to update the existing contact in the same request (updateEnabled = true)
	UpdateEnabled bool `json:"updateEnabled,omitempty"`
	// transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )
	SmtpBlacklistSender []string `json:"smtpBlacklistSender,omitempty"`
}

type CreateDoiContact ¶

type CreateDoiContact struct {
	// Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
	Email string `json:"email"`
	// Pass the set of attributes and their values. These attributes must be present in your Brevo account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Lists under user account where contact should be added
	IncludeListIds []int64 `json:"includeListIds"`
	// Lists under user account where contact should not be added
	ExcludeListIds []int64 `json:"excludeListIds,omitempty"`
	// Id of the Double opt-in (DOI) template
	TemplateId int64 `json:"templateId"`
	// URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}.
	RedirectionUrl string `json:"redirectionUrl"`
}

type CreateDomain ¶

type CreateDomain struct {
	// Domain name
	Name string `json:"name"`
}

type CreateDomainModel ¶

type CreateDomainModel struct {
	// ID of the Domain created
	Id int64 `json:"id"`
	// Domain
	DomainName string `json:"domain_name,omitempty"`
	// Success message
	Message    string                       `json:"message,omitempty"`
	DnsRecords *CreateDomainModelDnsRecords `json:"dns_records,omitempty"`
}

type CreateDomainModelDnsRecords ¶

type CreateDomainModelDnsRecords struct {
	DkimRecord *CreateDomainModelDnsRecordsDkimRecord `json:"dkim_record,omitempty"`
	BrevoCode  *CreateDomainModelDnsRecordsDkimRecord `json:"brevo_code,omitempty"`
}

type CreateDomainModelDnsRecordsDkimRecord ¶

type CreateDomainModelDnsRecordsDkimRecord struct {
	Type_    string `json:"type,omitempty"`
	Value    string `json:"value,omitempty"`
	HostName string `json:"host_name,omitempty"`
	Status   bool   `json:"status,omitempty"`
}

type CreateDomainOpts ¶

type CreateDomainOpts struct {
	DomainName optional.Interface
}

type CreateEmailCampaign ¶

type CreateEmailCampaign struct {
	// Tag of the campaign
	Tag    string                     `json:"tag,omitempty"`
	Sender *CreateEmailCampaignSender `json:"sender"`
	// Name of the campaign
	Name string `json:"name"`
	// Mandatory if htmlUrl and templateId are empty. Body of the message (HTML)
	HtmlContent string `json:"htmlContent,omitempty"`
	// Mandatory if htmlContent and templateId are empty. Url to the message (HTML)
	HtmlUrl string `json:"htmlUrl,omitempty"`
	// Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
	TemplateId int64 `json:"templateId,omitempty"`
	// Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true.
	Subject string `json:"subject,omitempty"`
	// Email on which the campaign recipients will be able to reply to
	ReplyTo string `json:"replyTo,omitempty"`
	// 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
	ToField    string                         `json:"toField,omitempty"`
	Recipients *CreateEmailCampaignRecipients `json:"recipients,omitempty"`
	// 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
	AttachmentUrl string `json:"attachmentUrl,omitempty"`
	// Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts
	InlineImageActivation bool `json:"inlineImageActivation,omitempty"`
	// Use true to enable the mirror link
	MirrorActive bool `json:"mirrorActive,omitempty"`
	// Footer of the email campaign
	Footer string `json:"footer,omitempty"`
	// Header of the email campaign
	Header string `json:"header,omitempty"`
	// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
	UtmCampaign string `json:"utmCampaign,omitempty"`
	// Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
	Params map[string]interface{} `json:"params,omitempty"`
	// Set this to true if you want to send your campaign at best time.
	SendAtBestTime bool `json:"sendAtBestTime,omitempty"`
	// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
	AbTesting bool `json:"abTesting,omitempty"`
	// Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
	SubjectA string `json:"subjectA,omitempty"`
	// Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value
	SubjectB string `json:"subjectB,omitempty"`
	// Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
	SplitRule int64 `json:"splitRule,omitempty"`
	// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed
	WinnerCriteria string `json:"winnerCriteria,omitempty"`
	// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed
	WinnerDelay int64 `json:"winnerDelay,omitempty"`
	// Available for dedicated ip clients. Set this to true if you wish to warm up your ip.
	IpWarmupEnable bool `json:"ipWarmupEnable,omitempty"`
	// Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
	InitialQuota int64 `json:"initialQuota,omitempty"`
	// Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
	IncreaseRate int64 `json:"increaseRate,omitempty"`
	// Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.
	UnsubscriptionPageId string `json:"unsubscriptionPageId,omitempty"`
	// Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.
	UpdateFormId string `json:"updateFormId,omitempty"`
}

type CreateEmailCampaignRecipients ¶

type CreateEmailCampaignRecipients struct {
	// List ids to exclude from the campaign
	ExclusionListIds []int64 `json:"exclusionListIds,omitempty"`
	// Mandatory if scheduledAt is not empty. List Ids to send the campaign to
	ListIds []int64 `json:"listIds,omitempty"`
	// Mandatory if listIds are not used. Segment ids to send the campaign to.
	SegmentIds []int64 `json:"segmentIds,omitempty"`
}

Segment ids and List ids to include/exclude from campaign

type CreateEmailCampaignSender ¶

type CreateEmailCampaignSender struct {
	// Sender Name
	Name string `json:"name,omitempty"`
	// Sender email
	Email string `json:"email"`
	// Select the sender for the campaign 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).
	Id int64 `json:"id,omitempty"`
}

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}`

type CreateExternalFeed ¶

type CreateExternalFeed struct {
	// Name of the feed
	Name string `json:"name"`
	// URL of the feed
	Url string `json:"url"`
	// Auth type of the feed:   * `basic`   * `token`   * `noAuth`
	AuthType string `json:"authType,omitempty"`
	// Username for authType `basic`
	Username string `json:"username,omitempty"`
	// Password for authType `basic`
	Password string `json:"password,omitempty"`
	// Token for authType `token`
	Token string `json:"token,omitempty"`
	// Custom headers for the feed
	Headers []GetExternalFeedByUuidHeaders `json:"headers,omitempty"`
	// Maximum number of retries on the feed url
	MaxRetries int32 `json:"maxRetries,omitempty"`
	// Toggle caching of feed url response
	Cache bool `json:"cache,omitempty"`
}

type CreateList ¶

type CreateList struct {
	// Name of the list
	Name string `json:"name"`
	// Id of the parent folder in which this list is to be created
	FolderId int64 `json:"folderId"`
}

type CreateModel ¶

type CreateModel struct {
	// ID of the object created
	Id int64 `json:"id"`
}

type CreateProductModel ¶

type CreateProductModel struct {
	// ID of the Product when a new product is created
	Id string `json:"id,omitempty"`
}

type CreateReseller ¶

type CreateReseller struct {
	// AuthKey of Reseller child created
	AuthKey string `json:"authKey"`
	// Id of Reseller child created
	Id int64 `json:"id,omitempty"`
}

type CreateResellerChildOpts ¶

type CreateResellerChildOpts struct {
	ResellerChild optional.Interface
}

type CreateSender ¶

type CreateSender struct {
	// From Name to use for the sender
	Name string `json:"name"`
	// From email to use for the sender. A verification email will be sent to this address.
	Email string `json:"email"`
	// Mandatory in case of dedicated IP, IPs to associate to the sender
	Ips []CreateSenderIps `json:"ips,omitempty"`
}

type CreateSenderIps ¶

type CreateSenderIps struct {
	// Dedicated IP available in your account
	Ip string `json:"ip"`
	// Domain of the IP
	Domain string `json:"domain"`
	// Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs.
	Weight int64 `json:"weight,omitempty"`
}

type CreateSenderModel ¶

type CreateSenderModel struct {
	// ID of the Sender created
	Id int64 `json:"id"`
	// Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured)
	SpfError bool `json:"spfError,omitempty"`
	// Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured)
	DkimError bool `json:"dkimError,omitempty"`
}

type CreateSenderOpts ¶

type CreateSenderOpts struct {
	Sender optional.Interface
}

type CreateSmsCampaign ¶

type CreateSmsCampaign struct {
	// Name of the campaign
	Name string `json:"name"`
	// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
	Sender string `json:"sender"`
	// Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS
	Content    string                       `json:"content"`
	Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"`
	// UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Format of the message. It indicates whether the content should be treated as unicode or not.
	UnicodeEnabled bool `json:"unicodeEnabled,omitempty"`
	// A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**
	OrganisationPrefix string `json:"organisationPrefix,omitempty"`
	// Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**
	UnsubscribeInstruction string `json:"unsubscribeInstruction,omitempty"`
}

type CreateSmsCampaignRecipients ¶

type CreateSmsCampaignRecipients struct {
	// Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty
	ListIds []int64 `json:"listIds"`
	// List ids which have to be excluded from a campaign
	ExclusionListIds []int64 `json:"exclusionListIds,omitempty"`
}

type CreateSmtpEmail ¶

type CreateSmtpEmail struct {
	// Message ID of the transactional email sent
	MessageId  string   `json:"messageId,omitempty"`
	MessageIds []string `json:"messageIds,omitempty"`
}

type CreateSmtpTemplate ¶

type CreateSmtpTemplate struct {
	// Tag of the template
	Tag    string                    `json:"tag,omitempty"`
	Sender *CreateSmtpTemplateSender `json:"sender"`
	// Name of the template
	TemplateName string `json:"templateName"`
	// Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty
	HtmlContent string `json:"htmlContent,omitempty"`
	// Url which contents the body of the email message. REQUIRED if htmlContent is empty
	HtmlUrl string `json:"htmlUrl,omitempty"`
	// Subject of the template
	Subject string `json:"subject"`
	// Email on which campaign recipients will be able to reply to
	ReplyTo string `json:"replyTo,omitempty"`
	// 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
	ToField string `json:"toField,omitempty"`
	// 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
	AttachmentUrl string `json:"attachmentUrl,omitempty"`
	// Status of template. isActive = true means template is active and isActive = false means template is inactive
	IsActive bool `json:"isActive,omitempty"`
}

type CreateSmtpTemplateSender ¶

type CreateSmtpTemplateSender struct {
	// Name of the sender. If not passed, will be set to default
	Name string `json:"name,omitempty"`
	// Email of the sender
	Email string `json:"email,omitempty"`
	// 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).
	Id int64 `json:"id,omitempty"`
}

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}`

type CreateSubAccount ¶

type CreateSubAccount struct {
	// Set the name of the sub-account company
	CompanyName string `json:"companyName"`
	// Email address for the organization
	Email string `json:"email"`
	// Set the language of the sub-account
	Language string `json:"language,omitempty"`
	// Set the timezone of the sub-account
	Timezone string `json:"timezone,omitempty"`
}

type CreateSubAccountResponse ¶

type CreateSubAccountResponse struct {
	// ID of the sub-account created
	Id int64 `json:"id"`
}

type CreateUpdateBatchCategory ¶

type CreateUpdateBatchCategory struct {
	// array of categories objects
	Categories []CreateUpdateCategories `json:"categories"`
	// Facilitate to update the existing categories in the same request (updateEnabled = true)
	UpdateEnabled bool `json:"updateEnabled,omitempty"`
}

type CreateUpdateBatchCategoryModel ¶

type CreateUpdateBatchCategoryModel struct {
	// Number of the new created categories
	CreatedCount int64 `json:"createdCount,omitempty"`
	// Number of the existing categories updated
	UpdatedCount int64 `json:"updatedCount,omitempty"`
}

type CreateUpdateBatchProducts ¶

type CreateUpdateBatchProducts struct {
	// array of products objects
	Products []CreateUpdateProducts `json:"products"`
	// Facilitate to update the existing categories in the same request (updateEnabled = true)
	UpdateEnabled bool `json:"updateEnabled,omitempty"`
}

type CreateUpdateBatchProductsModel ¶

type CreateUpdateBatchProductsModel struct {
	// Number of the new created products
	CreatedCount int64 `json:"createdCount,omitempty"`
	// Number of the existing products updated
	UpdatedCount int64 `json:"updatedCount,omitempty"`
}

type CreateUpdateCategories ¶

type CreateUpdateCategories struct {
	// Unique Category ID as saved in the shop
	Id string `json:"id"`
	// **Mandatory in case of creation**. Name of the Category, as displayed in the shop
	Name string `json:"name,omitempty"`
	// URL to the category
	Url string `json:"url,omitempty"`
	// UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database
	DeletedAt string `json:"deletedAt,omitempty"`
}

type CreateUpdateCategory ¶

type CreateUpdateCategory struct {
	// Unique Category ID as saved in the shop
	Id string `json:"id"`
	// **Mandatory in case of creation**. Name of the Category, as displayed in the shop
	Name string `json:"name,omitempty"`
	// URL to the category
	Url string `json:"url,omitempty"`
	// Facilitate to update the existing category in the same request (updateEnabled = true)
	UpdateEnabled bool `json:"updateEnabled,omitempty"`
	// UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database
	DeletedAt string `json:"deletedAt,omitempty"`
}

type CreateUpdateContactModel ¶

type CreateUpdateContactModel struct {
	// ID of the contact when a new contact is created
	Id int64 `json:"id,omitempty"`
}

type CreateUpdateFolder ¶

type CreateUpdateFolder struct {
	// Name of the folder
	Name string `json:"name,omitempty"`
}

type CreateUpdateProduct ¶

type CreateUpdateProduct struct {
	// Product ID for which you requested the details
	Id string `json:"id"`
	// Mandatory in case of creation**. Name of the product for which you requested the details
	Name string `json:"name"`
	// URL to the product
	Url string `json:"url,omitempty"`
	// Absolute URL to the cover image of the product
	ImageUrl string `json:"imageUrl,omitempty"`
	// Product identifier from the shop
	Sku string `json:"sku,omitempty"`
	// Price of the product
	Price float32 `json:"price,omitempty"`
	// Category ID-s of the product
	Categories []string `json:"categories,omitempty"`
	// Parent product id of the product
	ParentId string `json:"parentId,omitempty"`
	// Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.
	MetaInfo map[string]string `json:"metaInfo,omitempty"`
	// Facilitate to update the existing category in the same request (updateEnabled = true)
	UpdateEnabled bool `json:"updateEnabled,omitempty"`
	// UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database
	DeletedAt string `json:"deletedAt,omitempty"`
}

type CreateUpdateProducts ¶

type CreateUpdateProducts struct {
	// Product ID for which you requested the details
	Id string `json:"id"`
	// Mandatory in case of creation**. Name of the product for which you requested the details
	Name string `json:"name"`
	// URL to the product
	Url string `json:"url,omitempty"`
	// Absolute URL to the cover image of the product
	ImageUrl string `json:"imageUrl,omitempty"`
	// Product identifier from the shop
	Sku string `json:"sku,omitempty"`
	// Price of the product
	Price float32 `json:"price,omitempty"`
	// Category ID-s of the product
	Categories []string `json:"categories,omitempty"`
	// Parent product id of the product
	ParentId string `json:"parentId,omitempty"`
	// Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.
	MetaInfo map[string]string `json:"metaInfo,omitempty"`
	// UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database
	DeletedAt string `json:"deletedAt,omitempty"`
}

type CreateWebhook ¶

type CreateWebhook struct {
	// URL of the webhook
	Url string `json:"url"`
	// Description of the webhook
	Description string `json:"description,omitempty"`
	// - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
	Events []string `json:"events"`
	// Type of the webhook
	Type_ string `json:"type,omitempty"`
	// Inbound domain of webhook, required in case of event type `inbound`
	Domain string `json:"domain,omitempty"`
}

type CreateWhatsAppCampaign ¶

type CreateWhatsAppCampaign struct {
	// Name of the WhatsApp campaign creation
	Name string `json:"name"`
	// Id of the WhatsApp template in **approved** state
	TemplateId int32 `json:"templateId"`
	// Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**
	ScheduledAt string                            `json:"scheduledAt"`
	Recipients  *CreateWhatsAppCampaignRecipients `json:"recipients"`
}

type CreateWhatsAppCampaignRecipients ¶

type CreateWhatsAppCampaignRecipients struct {
	// List ids to exclude from the campaign
	ExcludedIds []int64 `json:"excludedIds,omitempty"`
	// **Mandatory if scheduledAt is not empty**. List Ids to send the campaign to
	ListIds []int64 `json:"listIds,omitempty"`
	// **Mandatory if listIds are not used**. Segment ids to send the campaign to.
	Segments []int64 `json:"segments,omitempty"`
}

Segment ids and List ids to include/exclude from campaign

type CreateWhatsAppTemplate ¶

type CreateWhatsAppTemplate struct {
	// Name of the template
	Name string `json:"name"`
	// Language of the template
	Language string `json:"language"`
	// Category of the template
	Category string `json:"category"`
	// Absolute url of the media file **(no local file)**
	MediaUrl string `json:"mediaUrl,omitempty"`
	// Body of the template
	Body string `json:"body"`
	// Html content of the header
	HeaderHtml string `json:"headerHtml,omitempty"`
	HeaderType bool   `json:"headerType,omitempty"`
}

type CreatedBatchId ¶

type CreatedBatchId struct {
	// Batch ID of the request
	BatchId float32 `json:"batchId"`
}

type CreatedProcessId ¶

type CreatedProcessId struct {
	// Id of the process created
	ProcessId int64 `json:"processId"`
}

type CrmDealsGetOpts ¶

type CrmDealsGetOpts struct {
	FiltersAttributes         optional.String
	FiltersLinkedCompaniesIds optional.String
	FiltersLinkedContactsIds  optional.String
	Offset                    optional.Int64
	Limit                     optional.Int64
	Sort                      optional.String
	SortBy                    optional.String
}

type CrmFilesGetOpts ¶

type CrmFilesGetOpts struct {
	Entity    optional.String
	EntityIds optional.String
	DateFrom  optional.Int32
	DateTo    optional.Int32
	Offset    optional.Int64
	Limit     optional.Int64
	Sort      optional.String
}

type CrmFilesPostOpts ¶

type CrmFilesPostOpts struct {
	DealId    optional.String
	ContactId optional.Int64
	CompanyId optional.String
}

type CrmNotesGetOpts ¶

type CrmNotesGetOpts struct {
	Entity    optional.String
	EntityIds optional.String
	DateFrom  optional.Int32
	DateTo    optional.Int32
	Offset    optional.Int64
	Limit     optional.Int64
	Sort      optional.String
}

type CrmTasksGetOpts ¶

type CrmTasksGetOpts struct {
	FilterType      optional.String
	FilterStatus    optional.String
	FilterDate      optional.String
	FilterAssignTo  optional.String
	FilterContacts  optional.String
	FilterDeals     optional.String
	FilterCompanies optional.String
	DateFrom        optional.Int32
	DateTo          optional.Int32
	Offset          optional.Int64
	Limit           optional.Int64
	Sort            optional.String
	SortBy          optional.String
}

type Deal ¶

type Deal struct {
	// Unique deal id
	Id string `json:"id,omitempty"`
	// Deal attributes with values
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Contact ids for contacts linked to this deal
	LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"`
	// Companies ids for companies linked to this deal
	LinkedCompaniesIds []string `json:"linkedCompaniesIds,omitempty"`
}

Deal Details

type DealAttributes ¶

type DealAttributes struct {
}

List of deal attributes

type DealAttributesInner ¶

type DealAttributesInner struct {
	InternalName      string        `json:"internalName,omitempty"`
	Label             string        `json:"label,omitempty"`
	AttributeTypeName string        `json:"attributeTypeName,omitempty"`
	AttributeOptions  []interface{} `json:"attributeOptions,omitempty"`
	IsRequired        bool          `json:"isRequired,omitempty"`
}

List of attributes

type DealsApiService ¶

type DealsApiService service

func (*DealsApiService) CrmAttributesDealsGet ¶

func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttributes, *http.Response, error)

DealsApiService Get deal attributes

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return DealAttributes

func (*DealsApiService) CrmDealsGet ¶

func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *CrmDealsGetOpts) (DealsList, *http.Response, error)

func (*DealsApiService) CrmDealsIdDelete ¶

func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*http.Response, error)

DealsApiService Delete a deal

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

func (*DealsApiService) CrmDealsIdGet ¶

func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *http.Response, error)

DealsApiService Get a deal

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

@return Deal

func (*DealsApiService) CrmDealsIdPatch ¶

func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body4) (*http.Response, error)

DealsApiService Update a deal

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id
  • @param body Updated deal details.

func (*DealsApiService) CrmDealsLinkUnlinkIdPatch ¶

func (a *DealsApiService) CrmDealsLinkUnlinkIdPatch(ctx context.Context, id string, body Body5) (*http.Response, error)

DealsApiService Link and Unlink a deal with contacts and companies

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id
  • @param body Linked / Unlinked contacts and companies ids.

func (*DealsApiService) CrmDealsPost ¶

func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body3) (InlineResponse201, *http.Response, error)

DealsApiService Create a deal

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Deal create data.

@return InlineResponse201

func (*DealsApiService) CrmPipelineDetailsGet ¶

func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, *http.Response, error)

DealsApiService Get pipeline stages

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Pipeline

type DealsList ¶

type DealsList struct {
	// List of deals
	Items []Deal `json:"items,omitempty"`
}

List of Deals

type DeleteHardbounces ¶

type DeleteHardbounces struct {
	// 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
	StartDate string `json:"startDate,omitempty"`
	// 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
	EndDate string `json:"endDate,omitempty"`
	// Target a specific email address
	ContactEmail string `json:"contactEmail,omitempty"`
}

type DeleteHardbouncesOpts ¶

type DeleteHardbouncesOpts struct {
	DeleteHardbounces optional.Interface
}

type DomainsApiService ¶

type DomainsApiService service

func (*DomainsApiService) AuthenticateDomain ¶

func (a *DomainsApiService) AuthenticateDomain(ctx context.Context, domainName string) (AuthenticateDomainModel, *http.Response, error)

DomainsApiService Authenticate a domain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domainName Domain name

@return AuthenticateDomainModel

func (*DomainsApiService) CreateDomain ¶

func (a *DomainsApiService) CreateDomain(ctx context.Context, localVarOptionals *CreateDomainOpts) (CreateDomainModel, *http.Response, error)

func (*DomainsApiService) DeleteDomain ¶

func (a *DomainsApiService) DeleteDomain(ctx context.Context, domainName string) (*http.Response, error)

DomainsApiService Delete a domain

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domainName Domain name

func (*DomainsApiService) GetDomainonfiguration ¶

func (a *DomainsApiService) GetDomainonfiguration(ctx context.Context, domainName string) (GetDomainonfigurationModel, *http.Response, error)

DomainsApiService Validate domain configuration

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domainName Domain name

@return GetDomainonfigurationModel

func (*DomainsApiService) GetDomains ¶

DomainsApiService Get the list of all your domains

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetDomainsList

type EcommerceApiService ¶

type EcommerceApiService service

func (*EcommerceApiService) CreateBatchOrder ¶

func (a *EcommerceApiService) CreateBatchOrder(ctx context.Context, orderBatch OrderBatch) (*http.Response, error)

EcommerceApiService Create orders in batch Create multiple orders at one time instead of one order at a time

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param orderBatch

func (*EcommerceApiService) CreateOrder ¶

func (a *EcommerceApiService) CreateOrder(ctx context.Context, order Order) (*http.Response, error)

EcommerceApiService Managing the status of the order Manages the transactional status of the order

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param order

func (*EcommerceApiService) CreateUpdateBatchCategory ¶

func (a *EcommerceApiService) CreateUpdateBatchCategory(ctx context.Context, createUpdateBatchCategory CreateUpdateBatchCategory) (CreateUpdateBatchCategoryModel, *http.Response, error)

EcommerceApiService Create categories in batch

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createUpdateBatchCategory Values to create a batch of categories

@return CreateUpdateBatchCategoryModel

func (*EcommerceApiService) CreateUpdateBatchProducts ¶

func (a *EcommerceApiService) CreateUpdateBatchProducts(ctx context.Context, createUpdateBatchProducts CreateUpdateBatchProducts) (CreateUpdateBatchProductsModel, *http.Response, error)

EcommerceApiService Create products in batch

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createUpdateBatchProducts Values to create a batch of products

@return CreateUpdateBatchProductsModel

func (*EcommerceApiService) CreateUpdateCategory ¶

func (a *EcommerceApiService) CreateUpdateCategory(ctx context.Context, createUpdateCategory CreateUpdateCategory) (CreateCategoryModel, *http.Response, error)

EcommerceApiService Create/Update a category

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createUpdateCategory Values to create/update a category

@return CreateCategoryModel

func (*EcommerceApiService) CreateUpdateProduct ¶

func (a *EcommerceApiService) CreateUpdateProduct(ctx context.Context, createUpdateProduct CreateUpdateProduct) (CreateProductModel, *http.Response, error)

EcommerceApiService Create/Update a product

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createUpdateProduct Values to create/update a product

@return CreateProductModel

func (*EcommerceApiService) EcommerceActivatePost ¶

func (a *EcommerceApiService) EcommerceActivatePost(ctx context.Context) (*http.Response, error)

EcommerceApiService Activate the eCommerce app Getting access to Brevo eCommerce.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

func (*EcommerceApiService) GetCategories ¶

func (a *EcommerceApiService) GetCategories(ctx context.Context, localVarOptionals *GetCategoriesOpts) (GetCategories, *http.Response, error)

func (*EcommerceApiService) GetCategoryInfo ¶

EcommerceApiService Get a category details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Category ID

@return GetCategoryDetails

func (*EcommerceApiService) GetProductInfo ¶

EcommerceApiService Get a product&#39;s details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Product ID

@return GetProductDetails

func (*EcommerceApiService) GetProducts ¶

func (a *EcommerceApiService) GetProducts(ctx context.Context, localVarOptionals *GetProductsOpts) (GetProducts, *http.Response, error)

type EmailCampaignsApiService ¶

type EmailCampaignsApiService service

func (*EmailCampaignsApiService) CreateEmailCampaign ¶

func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emailCampaigns CreateEmailCampaign) (CreateModel, *http.Response, error)

EmailCampaignsApiService Create an email campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param emailCampaigns Values to create a campaign

@return CreateModel

func (*EmailCampaignsApiService) DeleteEmailCampaign ¶

func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, campaignId int64) (*http.Response, error)

EmailCampaignsApiService Delete an email campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the campaign

func (*EmailCampaignsApiService) EmailExportRecipients ¶

func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error)

func (*EmailCampaignsApiService) GetAbTestCampaignResult ¶

func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, campaignId int64) (AbTestCampaignResult, *http.Response, error)

EmailCampaignsApiService Get an A/B test email campaign results Obtain winning version of an A/B test email campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the A/B test campaign

@return AbTestCampaignResult

func (*EmailCampaignsApiService) GetEmailCampaign ¶

func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaignId int64, localVarOptionals *GetEmailCampaignOpts) (GetEmailCampaign, *http.Response, error)

func (*EmailCampaignsApiService) GetEmailCampaigns ¶

func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *GetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error)

func (*EmailCampaignsApiService) GetSharedTemplateUrl ¶

func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, campaignId int64) (GetSharedTemplateUrl, *http.Response, error)

EmailCampaignsApiService Get a shared template url Get a unique URL to share &amp; import an email template from one Brevo account to another.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign or template

@return GetSharedTemplateUrl

func (*EmailCampaignsApiService) SendEmailCampaignNow ¶

func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error)

EmailCampaignsApiService Send an email campaign immediately, based on campaignId

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign

func (*EmailCampaignsApiService) SendReport ¶

func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error)

EmailCampaignsApiService Send the report of a campaign A PDF will be sent to the specified email addresses

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign
  • @param sendReport Values for send a report

func (*EmailCampaignsApiService) SendTestEmail ¶

func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId int64, emailTo SendTestEmail) (*http.Response, error)

EmailCampaignsApiService Send an email campaign to your test list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign
  • @param emailTo

func (*EmailCampaignsApiService) UpdateCampaignStatus ¶

func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error)

EmailCampaignsApiService Update an email campaign status

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign
  • @param status Status of the campaign

func (*EmailCampaignsApiService) UpdateEmailCampaign ¶

func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, campaignId int64, emailCampaign UpdateEmailCampaign) (*http.Response, error)

EmailCampaignsApiService Update an email campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign
  • @param emailCampaign Values to update a campaign

func (*EmailCampaignsApiService) UploadImageToGallery ¶

func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, uploadImage UploadImageToGallery) (UploadImageModel, *http.Response, error)

EmailCampaignsApiService Upload an image to your account&#39;s image gallery

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uploadImage Parameters to upload an image

@return UploadImageModel

type EmailExportRecipients ¶

type EmailExportRecipients struct {
	// Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
	NotifyURL string `json:"notifyURL,omitempty"`
	// Type of recipients to export for a campaign
	RecipientsType string `json:"recipientsType"`
}

type EmailExportRecipientsOpts ¶

type EmailExportRecipientsOpts struct {
	RecipientExport optional.Interface
}

type ErrorModel ¶

type ErrorModel struct {
	// Error code displayed in case of a failure
	Code string `json:"code"`
	// Readable message associated to the failure
	Message string `json:"message"`
}

type ExportWebhooksHistory ¶

type ExportWebhooksHistory struct {
	// Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_
	Days int32 `json:"days,omitempty"`
	// Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate
	StartDate string `json:"startDate,omitempty"`
	// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
	EndDate string `json:"endDate,omitempty"`
	// Sorting order of records (asc or desc)
	Sort string `json:"sort,omitempty"`
	// Filter the history for a specific event type
	Event string `json:"event"`
	// Webhook URL to receive CSV file link
	NotifyURL string `json:"notifyURL"`
	// Filter the history for a specific webhook id
	WebhookId int32 `json:"webhookId,omitempty"`
	// Filter the history for a specific email
	Email string `json:"email,omitempty"`
	// Filter the history for a specific message id
	MessageId int32 `json:"messageId,omitempty"`
}

type ExternalFeedsApiService ¶

type ExternalFeedsApiService service

func (*ExternalFeedsApiService) CreateExternalFeed ¶

func (a *ExternalFeedsApiService) CreateExternalFeed(ctx context.Context, createExternalFeed CreateExternalFeed) (InlineResponse2013, *http.Response, error)

ExternalFeedsApiService Create an external feed This endpoint will create an external feed.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createExternalFeed Values to create a feed

@return InlineResponse2013

func (*ExternalFeedsApiService) DeleteExternalFeed ¶

func (a *ExternalFeedsApiService) DeleteExternalFeed(ctx context.Context, uuid string) (*http.Response, error)

ExternalFeedsApiService Delete an external feed This endpoint will delete an external feed.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the feed to delete

func (*ExternalFeedsApiService) GetAllExternalFeeds ¶

func (a *ExternalFeedsApiService) GetAllExternalFeeds(ctx context.Context, localVarOptionals *GetAllExternalFeedsOpts) (GetAllExternalFeeds, *http.Response, error)

func (*ExternalFeedsApiService) GetExternalFeedByUUID ¶

func (a *ExternalFeedsApiService) GetExternalFeedByUUID(ctx context.Context, uuid string) (GetExternalFeedByUuid, *http.Response, error)

ExternalFeedsApiService Get an external feed by UUID This endpoint will update an external feed.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the feed to fetch

@return GetExternalFeedByUuid

func (*ExternalFeedsApiService) UpdateExternalFeed ¶

func (a *ExternalFeedsApiService) UpdateExternalFeed(ctx context.Context, uuid string, updateExternalFeed UpdateExternalFeed) (*http.Response, error)

ExternalFeedsApiService Update an external feed This endpoint will update an external feed.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID of the feed to update
  • @param updateExternalFeed Values to update a feed

type FileData ¶

type FileData struct {
	// Name of uploaded file
	Name string `json:"name,omitempty"`
	// Account id of user which created the file
	AuthorId string `json:"authorId,omitempty"`
	// Contact id of contact on which file is uploaded
	ContactId int64 `json:"contactId,omitempty"`
	// Deal id linked to a file
	DealId string `json:"dealId,omitempty"`
	// Company id linked to a file
	CompanyId string `json:"companyId,omitempty"`
	// Size of file in bytes
	Size int64 `json:"size,omitempty"`
	// File created date/time
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

File data that is uploaded

type FileDownloadableLink struct {
	// A unique link to download the requested file.
	FileUrl string `json:"fileUrl"`
}

type FileList ¶

type FileList struct {
}

List of files

type FilesApiService ¶

type FilesApiService service

func (*FilesApiService) CrmFilesGet ¶

func (a *FilesApiService) CrmFilesGet(ctx context.Context, localVarOptionals *CrmFilesGetOpts) (FileList, *http.Response, error)

func (*FilesApiService) CrmFilesIdDataGet ¶

func (a *FilesApiService) CrmFilesIdDataGet(ctx context.Context, id string) (FileData, *http.Response, error)

FilesApiService Get file details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id File id to get file data.

@return FileData

func (*FilesApiService) CrmFilesIdDelete ¶

func (a *FilesApiService) CrmFilesIdDelete(ctx context.Context, id string) (*http.Response, error)

FilesApiService Delete a file

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id File id to delete.

func (*FilesApiService) CrmFilesIdGet ¶

FilesApiService Download a file

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id File id to download.

@return FileDownloadableLink

func (*FilesApiService) CrmFilesPost ¶

func (a *FilesApiService) CrmFilesPost(ctx context.Context, file *os.File, localVarOptionals *CrmFilesPostOpts) (FileData, *http.Response, error)

type GenericSwaggerError ¶

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body ¶

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error ¶

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model ¶

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GetAccount ¶

type GetAccount struct {
	// Login Email
	Email string `json:"email"`
	// First Name
	FirstName string `json:"firstName"`
	// Last Name
	LastName string `json:"lastName"`
	// Name of the company
	CompanyName string                    `json:"companyName"`
	Address     *GetExtendedClientAddress `json:"address"`
	// Information about your plans and credits
	Plan                []GetAccountPlan               `json:"plan"`
	Relay               *GetAccountRelay               `json:"relay"`
	MarketingAutomation *GetAccountMarketingAutomation `json:"marketingAutomation,omitempty"`
}

type GetAccountActivity ¶

type GetAccountActivity struct {
	// Get user activity logs
	Logs []GetAccountActivityLogs `json:"logs,omitempty"`
}

type GetAccountActivityLogs ¶

type GetAccountActivityLogs struct {
	// Type of activity in the account.
	Action string `json:"action"`
	// Time of the activity.
	Date string `json:"date"`
	// Email address of the user who performed activity in the account.
	UserEmail string `json:"user_email"`
	// IP address of the user who performed activity in the account.
	UserIp string `json:"user_ip"`
	// Browser details of the user who performed the activity.
	UserAgent string `json:"user_agent"`
}

type GetAccountActivityOpts ¶

type GetAccountActivityOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
}

type GetAccountMarketingAutomation ¶

type GetAccountMarketingAutomation struct {
	// Marketing Automation Tracker ID
	Key string `json:"key,omitempty"`
	// Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled)
	Enabled bool `json:"enabled"`
}

type GetAccountPlan ¶

type GetAccountPlan struct {
	// Displays the plan type of the user
	Type_ string `json:"type"`
	// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account.
	CreditsType string `json:"creditsType"`
	// Remaining credits of the user
	Credits float32 `json:"credits"`
	// Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type)
	StartDate string `json:"startDate,omitempty"`
	// Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type)
	EndDate string `json:"endDate,omitempty"`
	// Only in case of reseller account. It implies the total number of child accounts you can add to your account.
	UserLimit int32 `json:"userLimit,omitempty"`
}

type GetAccountRelay ¶

type GetAccountRelay struct {
	// Status of your transactional email Account (true=Enabled, false=Disabled)
	Enabled bool                 `json:"enabled"`
	Data    *GetAccountRelayData `json:"data"`
}

Information about your transactional email account

type GetAccountRelayData ¶

type GetAccountRelayData struct {
	// Email to use as login on transactional platform
	UserName string `json:"userName"`
	// URL of the SMTP Relay
	Relay string `json:"relay"`
	// Port used for SMTP Relay
	Port int32 `json:"port"`
}

Data regarding the transactional email account

type GetAggregatedReport ¶

type GetAggregatedReport struct {
	// Time frame of the report
	Range_ string `json:"range,omitempty"`
	// Number of requests for the timeframe
	Requests int64 `json:"requests,omitempty"`
	// Number of delivered emails for the timeframe
	Delivered int64 `json:"delivered,omitempty"`
	// Number of hardbounces for the timeframe
	HardBounces int64 `json:"hardBounces,omitempty"`
	// Number of softbounces for the timeframe
	SoftBounces int64 `json:"softBounces,omitempty"`
	// Number of clicks for the timeframe
	Clicks int64 `json:"clicks,omitempty"`
	// Number of unique clicks for the timeframe
	UniqueClicks int64 `json:"uniqueClicks,omitempty"`
	// Number of openings for the timeframe
	Opens int64 `json:"opens,omitempty"`
	// Number of unique openings for the timeframe
	UniqueOpens int64 `json:"uniqueOpens,omitempty"`
	// Number of complaint (spam report) for the timeframe
	SpamReports int64 `json:"spamReports,omitempty"`
	// Number of blocked contact emails for the timeframe
	Blocked int64 `json:"blocked,omitempty"`
	// Number of invalid emails for the timeframe
	Invalid int64 `json:"invalid,omitempty"`
	// Number of unsubscribed emails for the timeframe
	Unsubscribed int64 `json:"unsubscribed,omitempty"`
}

type GetAggregatedSmtpReportOpts ¶

type GetAggregatedSmtpReportOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Days      optional.Int64
	Tag       optional.String
}

type GetAllExternalFeeds ¶

type GetAllExternalFeeds struct {
	// Total number of batches
	Count int32                      `json:"count,omitempty"`
	Feeds []GetAllExternalFeedsFeeds `json:"feeds,omitempty"`
}

type GetAllExternalFeedsFeeds ¶

type GetAllExternalFeedsFeeds struct {
	// ID of the feed
	Id string `json:"id"`
	// Name of the feed
	Name string `json:"name"`
	// URL of the feed
	Url string `json:"url"`
	// Auth type of the feed: * `basic` * `token` * `noAuth`
	AuthType string `json:"authType"`
	// Username for authType `basic`
	Username string `json:"username,omitempty"`
	// Password for authType `basic`
	Password string `json:"password,omitempty"`
	// Token for authType `token`
	Token string `json:"token,omitempty"`
	// Custom headers for the feed
	Headers []GetExternalFeedByUuidHeaders `json:"headers"`
	// Maximum number of retries on the feed url
	MaxRetries int32 `json:"maxRetries"`
	// Toggle caching of feed url response
	Cache bool `json:"cache"`
	// Datetime on which the feed was created
	CreatedAt time.Time `json:"createdAt"`
	// Datetime on which the feed was modified
	ModifiedAt time.Time `json:"modifiedAt"`
}

type GetAllExternalFeedsOpts ¶

type GetAllExternalFeedsOpts struct {
	Search    optional.String
	StartDate optional.String
	EndDate   optional.String
	Sort      optional.String
	AuthType  optional.String
	Limit     optional.Int64
	Offset    optional.Int64
}

type GetAttributes ¶

type GetAttributes struct {
	// Listing of available contact attributes in your account
	Attributes []GetAttributesAttributes `json:"attributes"`
}

type GetAttributesAttributes ¶

type GetAttributesAttributes struct {
	// Name of the attribute
	Name string `json:"name"`
	// Category of the attribute
	Category string `json:"category"`
	// Type of the attribute
	Type_ string `json:"type,omitempty"`
	// Parameter only available for \"category\" type attributes.
	Enumeration []GetAttributesEnumeration `json:"enumeration,omitempty"`
	// Calculated value formula
	CalculatedValue string `json:"calculatedValue,omitempty"`
}

type GetAttributesEnumeration ¶

type GetAttributesEnumeration struct {
	// ID of Value of the \"category\" type attribute
	Value int64 `json:"value"`
	// Label of the \"category\" type attribute
	Label string `json:"label"`
}

type GetBlockedDomains ¶

type GetBlockedDomains struct {
	// List of all blocked domains
	Domains []string `json:"domains"`
}

list of blocked domains

type GetCampaignOverview ¶

type GetCampaignOverview struct {
	// ID of the campaign
	Id int64 `json:"id"`
	// Name of the campaign
	Name string `json:"name"`
	// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
	Subject string `json:"subject,omitempty"`
	// Type of campaign
	Type_ string `json:"type"`
	// Status of the campaign
	Status string `json:"status"`
	// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
	AbTesting bool `json:"abTesting,omitempty"`
	// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectA string `json:"subjectA,omitempty"`
	// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectB string `json:"subjectB,omitempty"`
	// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
	SplitRule int32 `json:"splitRule,omitempty"`
	// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
	WinnerCriteria string `json:"winnerCriteria,omitempty"`
	// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
	WinnerDelay int32 `json:"winnerDelay,omitempty"`
	// It is true if you have chosen to send your campaign at best time, otherwise it is false
	SendAtBestTime bool `json:"sendAtBestTime,omitempty"`
}

type GetCampaignRecipients ¶

type GetCampaignRecipients struct {
	Lists          []int64 `json:"lists"`
	ExclusionLists []int64 `json:"exclusionLists"`
}

type GetCampaignStats ¶

type GetCampaignStats struct {
	// List Id of email campaign (only in case of get email campaign(s)(not for global stats))
	ListId int64 `json:"listId,omitempty"`
	// Number of unique clicks for the campaign
	UniqueClicks int64 `json:"uniqueClicks"`
	// Number of total clicks for the campaign
	Clickers int64 `json:"clickers"`
	// Number of complaints (Spam reports) for the campaign
	Complaints int64 `json:"complaints"`
	// Number of delivered emails for the campaign
	Delivered int64 `json:"delivered"`
	// Number of sent emails for the campaign
	Sent int64 `json:"sent"`
	// Number of softbounce for the campaign
	SoftBounces int64 `json:"softBounces"`
	// Number of harbounce for the campaign
	HardBounces int64 `json:"hardBounces"`
	// Number of unique openings for the campaign
	UniqueViews int64 `json:"uniqueViews"`
	// Recipients without any privacy protection option enabled in their email client
	TrackableViews int64 `json:"trackableViews"`
	// Rate of recipients without any privacy protection option enabled in their email client
	TrackableViewsRate float32 `json:"trackableViewsRate,omitempty"`
	// Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails
	EstimatedViews int64 `json:"estimatedViews,omitempty"`
	// Number of unsubscription for the campaign
	Unsubscriptions int64 `json:"unsubscriptions"`
	// Number of openings for the campaign
	Viewed int64 `json:"viewed"`
	// Number of deferred emails for the campaign
	Deferred int64 `json:"deferred,omitempty"`
	// Total number of non-delivered campaigns for a particular campaign id.
	ReturnBounce int64 `json:"returnBounce,omitempty"`
}

type GetCategories ¶

type GetCategories struct {
	Categories []interface{} `json:"categories"`
	// Number of categories
	Count int64 `json:"count"`
}

type GetCategoriesOpts ¶

type GetCategoriesOpts struct {
	Limit  optional.Int64
	Offset optional.Int64
	Sort   optional.String
	Ids    optional.Interface
	Name   optional.String
}

type GetCategoryDetails ¶

type GetCategoryDetails struct {
	// Category ID for which you requested the details
	Id string `json:"id"`
	// Name of the category for which you requested the details
	Name string `json:"name"`
	// Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
	// URL to the category
	Url string `json:"url,omitempty"`
	// category deleted from the shop's database
	IsDeleted bool `json:"isDeleted,omitempty"`
}

type GetChildAccountCreationStatus ¶

type GetChildAccountCreationStatus struct {
	// Status of child account creation whether it is successfully created (exists) or not.
	ChildAccountCreated bool `json:"childAccountCreated"`
}

type GetChildDomain ¶

type GetChildDomain struct {
	// Sender domain
	Domain string `json:"domain,omitempty"`
	// indicates whether a domain is verified or not
	Active bool `json:"active,omitempty"`
}

type GetChildDomains ¶

type GetChildDomains struct {
}

type GetChildInfo ¶

type GetChildInfo struct {
	// Login Email
	Email string `json:"email"`
	// First Name
	FirstName string `json:"firstName"`
	// Last Name
	LastName string `json:"lastName"`
	// Name of the company
	CompanyName string                  `json:"companyName"`
	Credits     *GetChildInfoCredits    `json:"credits,omitempty"`
	Statistics  *GetChildInfoStatistics `json:"statistics,omitempty"`
	// The encrypted password of child account
	Password string `json:"password"`
	// IP(s) associated to a child account user
	Ips     []string             `json:"ips,omitempty"`
	ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"`
}

type GetChildInfoApiKeys ¶

type GetChildInfoApiKeys struct {
	V2 []GetChildInfoApiKeysV2 `json:"v2"`
	V3 []GetChildInfoApiKeysV3 `json:"v3,omitempty"`
}

API Keys associated to child account

type GetChildInfoApiKeysV2 ¶

type GetChildInfoApiKeysV2 struct {
	// Name of the key for version 2
	Name string `json:"name"`
	// API Key for version 2
	Key string `json:"key"`
}

type GetChildInfoApiKeysV3 ¶

type GetChildInfoApiKeysV3 struct {
	// Name of the key for version 3
	Name string `json:"name"`
	// API Key for version 3
	Key string `json:"key"`
}

type GetChildInfoCredits ¶

type GetChildInfoCredits struct {
	// Email credits available for your child
	EmailCredits int64 `json:"emailCredits,omitempty"`
	// SMS credits available for your child
	SmsCredits int64 `json:"smsCredits,omitempty"`
}

Credits available for your child

type GetChildInfoStatistics ¶

type GetChildInfoStatistics struct {
	// Overall emails sent for the previous month
	PreviousMonthTotalSent int64 `json:"previousMonthTotalSent,omitempty"`
	// Overall emails sent for current month
	CurrentMonthTotalSent int64 `json:"currentMonthTotalSent,omitempty"`
	// Overall emails sent for since the account exists
	TotalSent int64 `json:"totalSent,omitempty"`
}

Statistics about your child account activity

type GetChildrenList ¶

type GetChildrenList struct {
	// Your children's account information
	Children []interface{} `json:"children,omitempty"`
	// Number of child accounts
	Count int64 `json:"count,omitempty"`
}

type GetClient ¶

type GetClient struct {
	// Login Email
	Email string `json:"email"`
	// First Name
	FirstName string `json:"firstName"`
	// Last Name
	LastName string `json:"lastName"`
	// Name of the company
	CompanyName string `json:"companyName"`
}

type GetContactCampaignStats ¶

type GetContactCampaignStats struct {
	MessagesSent      []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"`
	HardBounces       []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"`
	SoftBounces       []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"`
	Complaints        []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"`
	Unsubscriptions   *GetContactCampaignStatsUnsubscriptions           `json:"unsubscriptions,omitempty"`
	Opened            []GetContactCampaignStatsOpened                   `json:"opened,omitempty"`
	Clicked           []GetContactCampaignStatsClicked                  `json:"clicked,omitempty"`
	TransacAttributes []GetContactCampaignStatsTransacAttributes        `json:"transacAttributes,omitempty"`
	Delivered         []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"`
}

Campaign Statistics for the contact

type GetContactCampaignStatsClicked ¶

type GetContactCampaignStatsClicked struct {
	// ID of the campaign which generated the event
	CampaignId int64                                      `json:"campaignId"`
	Links      []GetExtendedContactDetailsStatisticsLinks `json:"links"`
}

type GetContactCampaignStatsOpened ¶

type GetContactCampaignStatsOpened struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// Number of openings of the campaign
	Count int64 `json:"count"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
	// IP from which the user has opened the campaign
	Ip string `json:"ip"`
}

type GetContactCampaignStatsTransacAttributes ¶

type GetContactCampaignStatsTransacAttributes struct {
	// Date of the order
	OrderDate string `json:"orderDate"`
	// Price of the order
	OrderPrice float32 `json:"orderPrice"`
	// ID of the order
	OrderId int64 `json:"orderId"`
}

type GetContactCampaignStatsUnsubscriptions ¶

type GetContactCampaignStatsUnsubscriptions struct {
	// Contact has unsubscribed via the unsubscription link in the email
	UserUnsubscription []GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription `json:"userUnsubscription"`
	// Contact has been unsubscribed from the administrator
	AdminUnsubscription []GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription `json:"adminUnsubscription"`
}

type GetContactDetails ¶

type GetContactDetails struct {
	// Email address of the contact for which you requested the details
	Email string `json:"email"`
	// ID of the contact for which you requested the details
	Id int64 `json:"id"`
	// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)
	EmailBlacklisted bool `json:"emailBlacklisted"`
	// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)
	SmsBlacklisted bool `json:"smsBlacklisted"`
	// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt       string  `json:"modifiedAt"`
	ListIds          []int64 `json:"listIds"`
	ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"`
	// Set of attributes of the contact
	Attributes map[string]interface{} `json:"attributes"`
}

type GetContactInfoOpts ¶

type GetContactInfoOpts struct {
	StartDate optional.String
	EndDate   optional.String
}

type GetContactStatsOpts ¶

type GetContactStatsOpts struct {
	StartDate optional.String
	EndDate   optional.String
}

type GetContacts ¶

type GetContacts struct {
	Contacts []interface{} `json:"contacts"`
	// Number of contacts
	Count int64 `json:"count"`
}

type GetContactsFromListOpts ¶

type GetContactsFromListOpts struct {
	ModifiedSince optional.String
	Limit         optional.Int64
	Offset        optional.Int64
	Sort          optional.String
}

type GetContactsOpts ¶

type GetContactsOpts struct {
	Limit         optional.Int64
	Offset        optional.Int64
	ModifiedSince optional.String
	CreatedSince  optional.String
	Sort          optional.String
}

type GetDeviceBrowserStats ¶

type GetDeviceBrowserStats struct {
	// Number of total clicks for the campaign using the particular browser
	Clickers int64 `json:"clickers"`
	// Number of unique clicks for the campaign using the particular browser
	UniqueClicks int64 `json:"uniqueClicks"`
	// Number of openings for the campaign using the particular browser
	Viewed int64 `json:"viewed"`
	// Number of unique openings for the campaign using the particular browser
	UniqueViews int64 `json:"uniqueViews"`
}

type GetDomainonfigurationModel ¶

type GetDomainonfigurationModel struct {
	// Domain
	Domain string `json:"domain"`
	// Status of domain verification (true=verified, false=non verified)
	Verified bool `json:"verified"`
	// Status of domain authentication (true=authenticated, false=non authenticated)
	Authenticated bool                         `json:"authenticated"`
	DnsRecords    *CreateDomainModelDnsRecords `json:"dns_records"`
}

type GetDomainsList ¶

type GetDomainsList struct {
	// List of the domains available in your account
	Domains []GetDomainsListDomains `json:"domains,omitempty"`
}

type GetDomainsListDomains ¶

type GetDomainsListDomains struct {
	// Id of the domain
	Id int64 `json:"id"`
	// Domain name
	DomainName string `json:"domain_name"`
	// Status of domain authentication (true=authenticated, false=non authenticated)
	Authenticated bool `json:"authenticated"`
	// Status of domain verification (true=verified, false=non verified)
	Verified bool `json:"verified"`
	// Dedicated IP associated with domain
	Ip string `json:"ip,omitempty"`
}

type GetEmailCampaign ¶

type GetEmailCampaign struct {
	// ID of the campaign
	Id int64 `json:"id"`
	// Name of the campaign
	Name string `json:"name"`
	// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
	Subject string `json:"subject,omitempty"`
	// Type of campaign
	Type_ string `json:"type"`
	// Status of the campaign
	Status string `json:"status"`
	// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
	AbTesting bool `json:"abTesting,omitempty"`
	// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectA string `json:"subjectA,omitempty"`
	// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectB string `json:"subjectB,omitempty"`
	// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
	SplitRule int32 `json:"splitRule,omitempty"`
	// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
	WinnerCriteria string `json:"winnerCriteria,omitempty"`
	// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
	WinnerDelay int32 `json:"winnerDelay,omitempty"`
	// It is true if you have chosen to send your campaign at best time, otherwise it is false
	SendAtBestTime bool `json:"sendAtBestTime,omitempty"`
	// Retrieved the status of test email sending. (true=Test email has been sent  false=Test email has not been sent)
	TestSent bool `json:"testSent"`
	// Header of the campaign
	Header string `json:"header"`
	// Footer of the campaign
	Footer string                             `json:"footer"`
	Sender *GetExtendedCampaignOverviewSender `json:"sender"`
	// Email defined as the \"Reply to\" of the campaign
	ReplyTo string `json:"replyTo"`
	// Customisation of the \"to\" field of the campaign
	ToField string `json:"toField,omitempty"`
	// HTML content of the campaign
	HtmlContent string `json:"htmlContent"`
	// Link to share the campaign on social medias
	ShareLink string `json:"shareLink,omitempty"`
	// Tag of the campaign
	Tag string `json:"tag,omitempty"`
	// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
	// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.
	InlineImageActivation bool `json:"inlineImageActivation,omitempty"`
	// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
	MirrorActive bool `json:"mirrorActive,omitempty"`
	// FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
	Recurring bool `json:"recurring,omitempty"`
	// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
	SentDate string `json:"sentDate,omitempty"`
	// Total number of non-delivered campaigns for a particular campaign id.
	ReturnBounce int64                  `json:"returnBounce,omitempty"`
	Recipients   map[string]interface{} `json:"recipients"`
	Statistics   map[string]interface{} `json:"statistics"`
}

type GetEmailCampaignOpts ¶

type GetEmailCampaignOpts struct {
	Statistics optional.String
}

type GetEmailCampaigns ¶

type GetEmailCampaigns struct {
	Campaigns []interface{} `json:"campaigns,omitempty"`
	// Number of Email campaigns retrieved
	Count int64 `json:"count,omitempty"`
}

type GetEmailCampaignsOpts ¶

type GetEmailCampaignsOpts struct {
	Type_              optional.String
	Status             optional.String
	Statistics         optional.String
	StartDate          optional.String
	EndDate            optional.String
	Limit              optional.Int64
	Offset             optional.Int64
	Sort               optional.String
	ExcludeHtmlContent optional.Bool
}

type GetEmailEventReport ¶

type GetEmailEventReport struct {
	Events []GetEmailEventReportEvents `json:"events,omitempty"`
}

type GetEmailEventReportEvents ¶

type GetEmailEventReportEvents struct {
	// Email address which generates the event
	Email string `json:"email"`
	// UTC date-time on which the event has been generated
	Date string `json:"date"`
	// Subject of the event
	Subject string `json:"subject,omitempty"`
	// Message ID which generated the event
	MessageId string `json:"messageId"`
	// Event which occurred
	Event string `json:"event"`
	// Reason of bounce (only available if the event is hardbounce or softbounce)
	Reason string `json:"reason,omitempty"`
	// Tag of the email which generated the event
	Tag string `json:"tag,omitempty"`
	// IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks)
	Ip string `json:"ip,omitempty"`
	// The link which is sent to the user (only available if the event is requests or opened or clicks)
	Link string `json:"link,omitempty"`
	// Sender email from which the emails are sent
	From string `json:"from,omitempty"`
	// ID of the template (only available if the email is template based)
	TemplateId int64 `json:"templateId,omitempty"`
}

type GetEmailEventReportOpts ¶

type GetEmailEventReportOpts struct {
	Limit      optional.Int64
	Offset     optional.Int64
	StartDate  optional.String
	EndDate    optional.String
	Days       optional.Int64
	Email      optional.String
	Event      optional.String
	Tags       optional.String
	MessageId  optional.String
	TemplateId optional.Int64
	Sort       optional.String
}

type GetExtendedCampaignOverview ¶

type GetExtendedCampaignOverview struct {
	// ID of the campaign
	Id int64 `json:"id"`
	// Name of the campaign
	Name string `json:"name"`
	// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`
	Subject string `json:"subject,omitempty"`
	// Type of campaign
	Type_ string `json:"type"`
	// Status of the campaign
	Status string `json:"status"`
	// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.
	AbTesting bool `json:"abTesting,omitempty"`
	// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectA string `json:"subjectA,omitempty"`
	// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`
	SubjectB string `json:"subjectB,omitempty"`
	// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`
	SplitRule int32 `json:"splitRule,omitempty"`
	// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`
	WinnerCriteria string `json:"winnerCriteria,omitempty"`
	// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`
	WinnerDelay int32 `json:"winnerDelay,omitempty"`
	// It is true if you have chosen to send your campaign at best time, otherwise it is false
	SendAtBestTime bool `json:"sendAtBestTime,omitempty"`
	// Retrieved the status of test email sending. (true=Test email has been sent  false=Test email has not been sent)
	TestSent bool `json:"testSent"`
	// Header of the campaign
	Header string `json:"header"`
	// Footer of the campaign
	Footer string                             `json:"footer"`
	Sender *GetExtendedCampaignOverviewSender `json:"sender"`
	// Email defined as the \"Reply to\" of the campaign
	ReplyTo string `json:"replyTo"`
	// Customisation of the \"to\" field of the campaign
	ToField string `json:"toField,omitempty"`
	// HTML content of the campaign
	HtmlContent string `json:"htmlContent"`
	// Link to share the campaign on social medias
	ShareLink string `json:"shareLink,omitempty"`
	// Tag of the campaign
	Tag string `json:"tag,omitempty"`
	// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
	// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.
	InlineImageActivation bool `json:"inlineImageActivation,omitempty"`
	// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
	MirrorActive bool `json:"mirrorActive,omitempty"`
	// FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
	Recurring bool `json:"recurring,omitempty"`
	// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
	SentDate string `json:"sentDate,omitempty"`
	// Total number of non-delivered campaigns for a particular campaign id.
	ReturnBounce int64 `json:"returnBounce,omitempty"`
}

type GetExtendedCampaignOverviewSender ¶

type GetExtendedCampaignOverviewSender struct {
	// Sender name of the campaign
	Name string `json:"name,omitempty"`
	// Sender email of the campaign
	Email string `json:"email,omitempty"`
	// Sender id of the campaign
	Id string `json:"id,omitempty"`
}

type GetExtendedCampaignStats ¶

type GetExtendedCampaignStats struct {
	// Overall statistics of the campaign
	GlobalStats map[string]interface{} `json:"globalStats"`
	// List-wise statistics of the campaign.
	CampaignStats []interface{} `json:"campaignStats"`
	// Number of clicks on mirror link
	MirrorClick int64 `json:"mirrorClick"`
	// Number of remaning emails to send
	Remaining int64 `json:"remaining"`
	// Statistics about the number of clicks for the links
	LinksStats    map[string]interface{} `json:"linksStats"`
	StatsByDomain *GetStatsByDomain      `json:"statsByDomain"`
	// Statistics about the campaign on the basis of various devices
	StatsByDevice *GetStatsByDevice `json:"statsByDevice"`
	// Statistics about the campaign on the basis of various browsers
	StatsByBrowser *GetStatsByBrowser `json:"statsByBrowser"`
}

type GetExtendedClient ¶

type GetExtendedClient struct {
	// Login Email
	Email string `json:"email"`
	// First Name
	FirstName string `json:"firstName"`
	// Last Name
	LastName string `json:"lastName"`
	// Name of the company
	CompanyName string                    `json:"companyName"`
	Address     *GetExtendedClientAddress `json:"address"`
}

type GetExtendedClientAddress ¶

type GetExtendedClientAddress struct {
	// Street information
	Street string `json:"street"`
	// City information
	City string `json:"city"`
	// Zip Code information
	ZipCode string `json:"zipCode"`
	// Country information
	Country string `json:"country"`
}

Address informations

type GetExtendedContactDetails ¶

type GetExtendedContactDetails struct {
	// Email address of the contact for which you requested the details
	Email string `json:"email"`
	// ID of the contact for which you requested the details
	Id int64 `json:"id"`
	// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)
	EmailBlacklisted bool `json:"emailBlacklisted"`
	// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)
	SmsBlacklisted bool `json:"smsBlacklisted"`
	// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt       string  `json:"modifiedAt"`
	ListIds          []int64 `json:"listIds"`
	ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"`
	// Set of attributes of the contact
	Attributes map[string]interface{}               `json:"attributes"`
	Statistics *GetExtendedContactDetailsStatistics `json:"statistics"`
}

type GetExtendedContactDetailsStatistics ¶

type GetExtendedContactDetailsStatistics struct {
	// Listing of the sent campaign for the contact
	MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"`
	// Listing of the hardbounes generated by the contact
	HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"`
	// Listing of the softbounes generated by the contact
	SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"`
	// Listing of the complaints generated by the contact
	Complaints      []GetExtendedContactDetailsStatisticsMessagesSent   `json:"complaints,omitempty"`
	Unsubscriptions *GetExtendedContactDetailsStatisticsUnsubscriptions `json:"unsubscriptions,omitempty"`
	// Listing of the openings generated by the contact
	Opened []GetExtendedContactDetailsStatisticsOpened `json:"opened,omitempty"`
	// Listing of the clicks generated by the contact
	Clicked []GetExtendedContactDetailsStatisticsClicked `json:"clicked,omitempty"`
	// Listing of the transactional attributes for the contact
	TransacAttributes []interface{} `json:"transacAttributes,omitempty"`
	// Listing of the delivered campaign for the contact
	Delivered []GetExtendedContactDetailsStatisticsDelivered `json:"delivered,omitempty"`
}

Campaign statistics of the contact

type GetExtendedContactDetailsStatisticsClicked ¶

type GetExtendedContactDetailsStatisticsClicked struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// Listing of the clicked links for the campaign
	Links []GetExtendedContactDetailsStatisticsLinks `json:"links"`
}

type GetExtendedContactDetailsStatisticsDelivered ¶

type GetExtendedContactDetailsStatisticsDelivered struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
}
type GetExtendedContactDetailsStatisticsLinks struct {
	// Number of clicks on this link for the campaign
	Count int64 `json:"count"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
	// IP from which the user has clicked on the link
	Ip string `json:"ip"`
	// URL of the clicked link
	Url string `json:"url"`
}

type GetExtendedContactDetailsStatisticsMessagesSent ¶

type GetExtendedContactDetailsStatisticsMessagesSent struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
}

type GetExtendedContactDetailsStatisticsOpened ¶

type GetExtendedContactDetailsStatisticsOpened struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// Number of openings for the campaign
	Count int64 `json:"count"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
	// IP from which the user has opened the email
	Ip string `json:"ip"`
}

type GetExtendedContactDetailsStatisticsUnsubscriptions ¶

type GetExtendedContactDetailsStatisticsUnsubscriptions struct {
	// Contact unsubscribe via unsubscription link in a campaign
	UserUnsubscription []GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription `json:"userUnsubscription"`
	// Contact has been unsubscribed from the administrator
	AdminUnsubscription []GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription `json:"adminUnsubscription"`
}

Listing of the unsubscription for the contact

type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription ¶

type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription struct {
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
	// IP from which the user has been unsubscribed
	Ip string `json:"ip,omitempty"`
}

type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription ¶

type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription struct {
	// ID of the campaign which generated the event
	CampaignId int64 `json:"campaignId"`
	// UTC date-time of the event
	EventTime string `json:"eventTime"`
	// IP from which the user has unsubscribed
	Ip string `json:"ip,omitempty"`
}

type GetExtendedList ¶

type GetExtendedList struct {
	// ID of the list
	Id int64 `json:"id"`
	// Name of the list
	Name string `json:"name"`
	// Number of blacklisted contacts in the list
	TotalBlacklisted int64 `json:"totalBlacklisted"`
	// Number of contacts in the list
	TotalSubscribers int64 `json:"totalSubscribers"`
	// Number of unique contacts in the list
	UniqueSubscribers int64 `json:"uniqueSubscribers"`
	// ID of the folder
	FolderId int64 `json:"folderId"`
	// Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt     string                         `json:"createdAt"`
	CampaignStats []GetExtendedListCampaignStats `json:"campaignStats,omitempty"`
	// Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)
	DynamicList bool `json:"dynamicList,omitempty"`
}

type GetExtendedListCampaignStats ¶

type GetExtendedListCampaignStats struct {
	// ID of the campaign
	CampaignId int64             `json:"campaignId"`
	Stats      *GetCampaignStats `json:"stats"`
}

type GetExternalFeedByUuid ¶

type GetExternalFeedByUuid struct {
	// ID of the feed
	Id string `json:"id"`
	// Name of the feed
	Name string `json:"name"`
	// URL of the feed
	Url string `json:"url"`
	// Auth type of the feed: * `basic` * `token` * `noAuth`
	AuthType string `json:"authType"`
	// Username for authType `basic`
	Username string `json:"username,omitempty"`
	// Password for authType `basic`
	Password string `json:"password,omitempty"`
	// Token for authType `token`
	Token string `json:"token,omitempty"`
	// Custom headers for the feed
	Headers []GetExternalFeedByUuidHeaders `json:"headers"`
	// Maximum number of retries on the feed url
	MaxRetries int32 `json:"maxRetries"`
	// Toggle caching of feed url response
	Cache bool `json:"cache"`
	// Datetime on which the feed was created
	CreatedAt time.Time `json:"createdAt"`
	// Datetime on which the feed was modified
	ModifiedAt time.Time `json:"modifiedAt"`
}

type GetExternalFeedByUuidHeaders ¶

type GetExternalFeedByUuidHeaders struct {
	// Name of the header
	Name string `json:"name,omitempty"`
	// Value of the header
	Value string `json:"value,omitempty"`
}

type GetFolder ¶

type GetFolder struct {
	// ID of the folder
	Id int64 `json:"id"`
	// Name of the folder
	Name string `json:"name"`
	// Number of blacklisted contacts in the folder
	TotalBlacklisted int64 `json:"totalBlacklisted"`
	// Number of contacts in the folder
	TotalSubscribers int64 `json:"totalSubscribers"`
	// Number of unique contacts in the folder
	UniqueSubscribers int64 `json:"uniqueSubscribers"`
}

type GetFolderLists ¶

type GetFolderLists struct {
	Lists []interface{} `json:"lists,omitempty"`
	// Number of lists in the folder
	Count int64 `json:"count,omitempty"`
}

type GetFolderListsOpts ¶

type GetFolderListsOpts struct {
	Limit  optional.Int64
	Offset optional.Int64
	Sort   optional.String
}

type GetFolders ¶

type GetFolders struct {
	Folders []interface{} `json:"folders,omitempty"`
	// Number of folders available in your account
	Count int64 `json:"count,omitempty"`
}

type GetFoldersOpts ¶

type GetFoldersOpts struct {
	Sort optional.String
}

type GetInboundEmailEvents ¶

type GetInboundEmailEvents struct {
	Events []GetInboundEmailEventsEvents `json:"events,omitempty"`
}

type GetInboundEmailEventsByUuid ¶

type GetInboundEmailEventsByUuid struct {
	// Date when email was received on SMTP relay
	ReceivedAt time.Time `json:"receivedAt,omitempty"`
	// Date when email was delivered successfully to client’s webhook
	DeliveredAt time.Time `json:"deliveredAt,omitempty"`
	// Recipient’s email address
	Recipient string `json:"recipient,omitempty"`
	// Sender’s email address
	Sender string `json:"sender,omitempty"`
	// Value of the Message-ID header. This will be present only after the processing is done.
	MessageId string `json:"messageId,omitempty"`
	// Value of the Subject header. This will be present only after the processing is done.
	Subject string `json:"subject,omitempty"`
	// List of attachments of the email. This will be present only after the processing is done.
	Attachments []GetInboundEmailEventsByUuidAttachments `json:"attachments,omitempty"`
	// List of events/logs that describe the lifecycle of the email on SIB platform
	Logs []GetInboundEmailEventsByUuidLogs `json:"logs,omitempty"`
}

type GetInboundEmailEventsByUuidAttachments ¶

type GetInboundEmailEventsByUuidAttachments struct {
	// filename specified in the Content-Disposition header of the attachment
	Name string `json:"name,omitempty"`
	// value of the Content-Type header of the attachment
	ContentType string `json:"contentType,omitempty"`
	// value of the Content-ID header of the attachment.
	ContentId string `json:"contentId,omitempty"`
	// size of the attachment in bytes
	ContentLength int32 `json:"contentLength,omitempty"`
}

type GetInboundEmailEventsByUuidLogs ¶

type GetInboundEmailEventsByUuidLogs struct {
	// Date of the event
	Date time.Time `json:"date,omitempty"`
	// Type of the event
	Type_ string `json:"type,omitempty"`
}

type GetInboundEmailEventsEvents ¶

type GetInboundEmailEventsEvents struct {
	// UUID that can be used to fetch additional data
	Uuid string `json:"uuid"`
	// Date when email was received on SMTP relay
	Date time.Time `json:"date"`
	// Sender’s email address
	Sender string `json:"sender"`
	// Recipient’s email address
	Recipient string `json:"recipient"`
}

type GetInboundEmailEventsOpts ¶

type GetInboundEmailEventsOpts struct {
	Sender    optional.String
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
	Sort      optional.String
}

type GetIp ¶

type GetIp struct {
	// ID of the dedicated IP
	Id int64 `json:"id"`
	// Dedicated IP
	Ip string `json:"ip"`
	// Status of the IP (true=active, false=inactive)
	Active bool `json:"active"`
	// Domain associated to the IP
	Domain string `json:"domain"`
}

type GetIpFromSender ¶

type GetIpFromSender struct {
	// ID of the dedicated IP
	Id int64 `json:"id"`
	// Dedicated IP
	Ip string `json:"ip"`
	// Domain associated to the IP
	Domain string `json:"domain"`
	// Weight of the IP
	Weight int64 `json:"weight"`
}

type GetIps ¶

type GetIps struct {
	// Dedicated IP(s) available on your account
	Ips []GetIp `json:"ips"`
}

type GetIpsFromSender ¶

type GetIpsFromSender struct {
	// Dedicated IP(s) linked to a sender
	Ips []GetIpFromSender `json:"ips"`
}

type GetList ¶

type GetList struct {
	// ID of the list
	Id int64 `json:"id"`
	// Name of the list
	Name string `json:"name"`
	// Number of blacklisted contacts in the list
	TotalBlacklisted int64 `json:"totalBlacklisted"`
	// Number of contacts in the list
	TotalSubscribers int64 `json:"totalSubscribers"`
	// Number of unique contacts in the list
	UniqueSubscribers int64 `json:"uniqueSubscribers"`
}

type GetLists ¶

type GetLists struct {
	// Listing of all the lists available in your account
	Lists []interface{} `json:"lists,omitempty"`
	// Number of lists in your account
	Count int64 `json:"count,omitempty"`
}

type GetListsOpts ¶

type GetListsOpts struct {
	Limit  optional.Int64
	Offset optional.Int64
	Sort   optional.String
}

type GetProcess ¶

type GetProcess struct {
	// Id of the process
	Id int64 `json:"id"`
	// Status of the process
	Status string `json:"status"`
	// Process name
	Name string `json:"name"`
	// URL on which send export the of contacts once the process is completed
	ExportUrl string `json:"export_url,omitempty"`
}

type GetProcesses ¶

type GetProcesses struct {
	// List of processes available on your account
	Processes []GetProcess `json:"processes,omitempty"`
	// Number of processes available on your account
	Count int64 `json:"count,omitempty"`
}

type GetProcessesOpts ¶

type GetProcessesOpts struct {
	Limit  optional.Int64
	Offset optional.Int64
	Sort   optional.String
}

type GetProductDetails ¶

type GetProductDetails struct {
	// Product ID for which you requested the details
	Id string `json:"id"`
	// Name of the product for which you requested the details
	Name string `json:"name"`
	// Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
	// URL to the product
	Url string `json:"url,omitempty"`
	// Absolute URL to the cover image of the product
	ImageUrl string `json:"imageUrl,omitempty"`
	// Product identifier from the shop
	Sku string `json:"sku,omitempty"`
	// Price of the product
	Price float32 `json:"price,omitempty"`
	// Category ID-s of the product
	Categories []string `json:"categories,omitempty"`
	// Parent product id of the product
	ParentId string `json:"parentId,omitempty"`
	// S3 url of original image
	S3Original string `json:"s3Original,omitempty"`
	// S3 thumbnail url of original image in 120x120 dimension for analytics section
	S3ThumbAnalytics string `json:"s3ThumbAnalytics"`
	// Meta data of product such as description, vendor, producer, stock level, etc.
	MetaInfo map[string]interface{} `json:"metaInfo,omitempty"`
	// S3 thumbnail url of original image in 600x400 dimension for editor section
	S3ThumbEditor string `json:"s3ThumbEditor"`
	// product deleted from the shop's database
	IsDeleted bool `json:"isDeleted,omitempty"`
}

type GetProducts ¶

type GetProducts struct {
	Products []interface{} `json:"products"`
	// Number of products
	Count int64 `json:"count"`
}

type GetProductsOpts ¶

type GetProductsOpts struct {
	Limit      optional.Int64
	Offset     optional.Int64
	Sort       optional.String
	Ids        optional.Interface
	Name       optional.String
	PriceLte   optional.Float32
	PriceGte   optional.Float32
	PriceLt    optional.Float32
	PriceGt    optional.Float32
	PriceEq    optional.Float32
	PriceNe    optional.Float32
	Categories optional.Interface
}

type GetReports ¶

type GetReports struct {
	Reports []GetReportsReports `json:"reports,omitempty"`
}

type GetReportsReports ¶

type GetReportsReports struct {
	// Date of the statistics
	Date string `json:"date"`
	// Number of requests for the date
	Requests int64 `json:"requests"`
	// Number of delivered emails for the date
	Delivered int64 `json:"delivered"`
	// Number of hardbounces for the date
	HardBounces int64 `json:"hardBounces"`
	// Number of softbounces for the date
	SoftBounces int64 `json:"softBounces"`
	// Number of clicks for the date
	Clicks int64 `json:"clicks"`
	// Number of unique clicks for the date
	UniqueClicks int64 `json:"uniqueClicks"`
	// Number of openings for the date
	Opens int64 `json:"opens"`
	// Number of unique openings for the date
	UniqueOpens int64 `json:"uniqueOpens"`
	// Number of complaints (spam reports) for the date
	SpamReports int64 `json:"spamReports"`
	// Number of blocked emails for the date
	Blocked int64 `json:"blocked"`
	// Number of invalid emails for the date
	Invalid int64 `json:"invalid"`
	// Number of unsubscribed emails for the date
	Unsubscribed int64 `json:"unsubscribed"`
}

type GetResellerChildsOpts ¶

type GetResellerChildsOpts struct {
	Limit  optional.Int64
	Offset optional.Int64
}

type GetScheduledEmailByBatchId ¶

type GetScheduledEmailByBatchId struct {
	// Total number of batches
	Count   int32                               `json:"count,omitempty"`
	Batches []GetScheduledEmailByBatchIdBatches `json:"batches,omitempty"`
}

type GetScheduledEmailByBatchIdBatches ¶

type GetScheduledEmailByBatchIdBatches struct {
	// Datetime for which the batch was scheduled
	ScheduledAt time.Time `json:"scheduledAt"`
	// Datetime on which the batch was scheduled
	CreatedAt time.Time `json:"createdAt"`
	// Current status of the scheduled batch
	Status string `json:"status"`
}

type GetScheduledEmailByBatchIdOpts ¶

type GetScheduledEmailByBatchIdOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Sort      optional.String
	Status    optional.String
	Limit     optional.Int64
	Offset    optional.Int64
}

type GetScheduledEmailByMessageId ¶

type GetScheduledEmailByMessageId struct {
	// Datetime for which the email was scheduled
	ScheduledAt time.Time `json:"scheduledAt"`
	// Datetime on which the email was scheduled
	CreatedAt time.Time `json:"createdAt"`
	// Current status of the scheduled email
	Status string `json:"status"`
}

type GetScheduledEmailByMessageIdOpts ¶

type GetScheduledEmailByMessageIdOpts struct {
	StartDate optional.String
	EndDate   optional.String
}

type GetSegments ¶

type GetSegments struct {
	Segments *GetSegmentsSegments `json:"segments,omitempty"`
	// Number of Segments available in your account
	Count int64 `json:"count,omitempty"`
}

type GetSegmentsOpts ¶

type GetSegmentsOpts struct {
	Sort optional.String
}

type GetSegmentsSegments ¶

type GetSegmentsSegments struct {
	// ID of the list
	Id int64 `json:"id,omitempty"`
	// Name of the Segment
	SegmentName string `json:"segmentName,omitempty"`
	// Name of the Segment Category
	CategoryName string `json:"categoryName,omitempty"`
	// Updation UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ)
	UpdatedAt string `json:"updatedAt,omitempty"`
}

type GetSendersList ¶

type GetSendersList struct {
	// List of the senders available in your account
	Senders []GetSendersListSenders `json:"senders,omitempty"`
}

type GetSendersListIps ¶

type GetSendersListIps struct {
	// Dedicated IP available in your account
	Ip string `json:"ip"`
	// Domain of the IP
	Domain string `json:"domain"`
	// Weight of the IP for this sender
	Weight int64 `json:"weight"`
}

type GetSendersListSenders ¶

type GetSendersListSenders struct {
	// Id of the sender
	Id int64 `json:"id"`
	// From Name associated to the sender
	Name string `json:"name"`
	// From Email associated to the sender
	Email string `json:"email"`
	// Status of sender (true=activated, false=deactivated)
	Active bool `json:"active"`
	// List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs
	Ips []GetSendersListIps `json:"ips,omitempty"`
}

type GetSendersOpts ¶

type GetSendersOpts struct {
	Ip     optional.String
	Domain optional.String
}

type GetSharedTemplateUrl ¶

type GetSharedTemplateUrl struct {
	// A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users.
	SharedUrl string `json:"sharedUrl"`
}

type GetSmsCampaign ¶

type GetSmsCampaign struct {
	// ID of the SMS Campaign
	Id int64 `json:"id"`
	// Name of the SMS Campaign
	Name string `json:"name"`
	// Status of the SMS Campaign
	Status string `json:"status"`
	// Content of the SMS Campaign
	Content string `json:"content"`
	// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Sender of the SMS Campaign
	Sender string `json:"sender"`
	// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string                 `json:"modifiedAt"`
	Recipients map[string]interface{} `json:"recipients"`
	Statistics map[string]interface{} `json:"statistics"`
}

type GetSmsCampaignOverview ¶

type GetSmsCampaignOverview struct {
	// ID of the SMS Campaign
	Id int64 `json:"id"`
	// Name of the SMS Campaign
	Name string `json:"name"`
	// Status of the SMS Campaign
	Status string `json:"status"`
	// Content of the SMS Campaign
	Content string `json:"content"`
	// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Sender of the SMS Campaign
	Sender string `json:"sender"`
	// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
}

type GetSmsCampaignStats ¶

type GetSmsCampaignStats struct {
	// Number of delivered SMS
	Delivered int64 `json:"delivered"`
	// Number of sent SMS
	Sent int64 `json:"sent"`
	// Number of processing SMS
	Processing int64 `json:"processing"`
	// Number of softbounced SMS
	SoftBounces int64 `json:"softBounces"`
	// Number of hardbounced SMS
	HardBounces int64 `json:"hardBounces"`
	// Number of unsubscription SMS
	Unsubscriptions int64 `json:"unsubscriptions"`
	// Number of replies to the SMS
	Answered int64 `json:"answered"`
}

type GetSmsCampaigns ¶

type GetSmsCampaigns struct {
	Campaigns []interface{} `json:"campaigns,omitempty"`
	// Number of SMS campaigns retrieved
	Count int64 `json:"count,omitempty"`
}

type GetSmsCampaignsOpts ¶

type GetSmsCampaignsOpts struct {
	Status    optional.String
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
	Sort      optional.String
}

type GetSmsEventReport ¶

type GetSmsEventReport struct {
	Events []GetSmsEventReportEvents `json:"events,omitempty"`
}

type GetSmsEventReportEvents ¶

type GetSmsEventReportEvents struct {
	// Phone number which has generated the event
	PhoneNumber string `json:"phoneNumber,omitempty"`
	// UTC date-time on which the event has been generated
	Date string `json:"date,omitempty"`
	// Message ID which generated the event
	MessageId string `json:"messageId,omitempty"`
	// Event which occurred
	Event string `json:"event,omitempty"`
	// Reason of bounce (only available if the event is hardbounce or softbounce)
	Reason string `json:"reason,omitempty"`
	Reply  string `json:"reply,omitempty"`
	// Tag of the SMS which generated the event
	Tag string `json:"tag,omitempty"`
}

type GetSmsEventsOpts ¶

type GetSmsEventsOpts struct {
	Limit       optional.Int64
	StartDate   optional.String
	EndDate     optional.String
	Offset      optional.Int64
	Days        optional.Int64
	PhoneNumber optional.String
	Event       optional.String
	Tags        optional.String
	Sort        optional.String
}

type GetSmtpReportOpts ¶

type GetSmtpReportOpts struct {
	Limit     optional.Int64
	Offset    optional.Int64
	StartDate optional.String
	EndDate   optional.String
	Days      optional.Int64
	Tag       optional.String
	Sort      optional.String
}

type GetSmtpTemplateOverview ¶

type GetSmtpTemplateOverview struct {
	// ID of the template
	Id int64 `json:"id"`
	// Name of the template
	Name string `json:"name"`
	// Subject of the template
	Subject string `json:"subject"`
	// Status of template (true=active, false=inactive)
	IsActive bool `json:"isActive"`
	// Status of test sending for the template (true=test email has been sent, false=test email has not been sent)
	TestSent bool                           `json:"testSent"`
	Sender   *GetSmtpTemplateOverviewSender `json:"sender"`
	// Email defined as the \"Reply to\" for the template
	ReplyTo string `json:"replyTo"`
	// Customisation of the \"to\" field for the template
	ToField string `json:"toField"`
	// Tag of the template
	Tag string `json:"tag"`
	// HTML content of the template
	HtmlContent string `json:"htmlContent"`
	// Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
	// It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call.
	DoiTemplate bool `json:"doiTemplate,omitempty"`
}

type GetSmtpTemplateOverviewSender ¶

type GetSmtpTemplateOverviewSender struct {
	// From email for the template
	Name string `json:"name,omitempty"`
	// From email for the template
	Email string `json:"email,omitempty"`
	// Sender id of the template
	Id string `json:"id,omitempty"`
}

type GetSmtpTemplates ¶

type GetSmtpTemplates struct {
	// Count of transactional email templates
	Count     int64                     `json:"count,omitempty"`
	Templates []GetSmtpTemplateOverview `json:"templates,omitempty"`
}

type GetSmtpTemplatesOpts ¶

type GetSmtpTemplatesOpts struct {
	TemplateStatus optional.Bool
	Limit          optional.Int64
	Offset         optional.Int64
	Sort           optional.String
}

type GetSsoToken ¶

type GetSsoToken struct {
	// Session token, it will remain valid for 15 days.
	Token string `json:"token"`
}

type GetStatsByBrowser ¶

type GetStatsByBrowser struct {
}

type GetStatsByDevice ¶

type GetStatsByDevice struct {
	// Statistics of the campaign on the basis of desktop devices
	Desktop map[string]GetDeviceBrowserStats `json:"desktop,omitempty"`
	// Statistics of the campaign on the basis of mobile devices
	Mobile map[string]GetDeviceBrowserStats `json:"mobile,omitempty"`
	// Statistics of the campaign on the basis of tablet devices
	Tablet map[string]GetDeviceBrowserStats `json:"tablet,omitempty"`
	// Statistics of the campaign on the basis of unknown devices
	Unknown map[string]GetDeviceBrowserStats `json:"unknown,omitempty"`
}

type GetStatsByDomain ¶

type GetStatsByDomain struct {
}

type GetTransacAggregatedSmsReport ¶

type GetTransacAggregatedSmsReport struct {
	// Time frame of the report
	Range_ string `json:"range,omitempty"`
	// Number of requests for the timeframe
	Requests int64 `json:"requests,omitempty"`
	// Number of delivered SMS for the timeframe
	Delivered int64 `json:"delivered,omitempty"`
	// Number of hardbounces for the timeframe
	HardBounces int64 `json:"hardBounces,omitempty"`
	// Number of softbounces for the timeframe
	SoftBounces int64 `json:"softBounces,omitempty"`
	// Number of blocked contact for the timeframe
	Blocked int64 `json:"blocked,omitempty"`
	// Number of unsubscription for the timeframe
	Unsubscribed int64 `json:"unsubscribed,omitempty"`
	// Number of answered SMS for the timeframe
	Replied int64 `json:"replied,omitempty"`
	// Number of accepted for the timeframe
	Accepted int64 `json:"accepted,omitempty"`
	// Number of rejected for the timeframe
	Rejected int64 `json:"rejected,omitempty"`
}

type GetTransacAggregatedSmsReportOpts ¶

type GetTransacAggregatedSmsReportOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Days      optional.Int64
	Tag       optional.String
}

type GetTransacBlockedContacts ¶

type GetTransacBlockedContacts struct {
	// Count of blocked or unsubscribed contact
	Count    int64                               `json:"count,omitempty"`
	Contacts []GetTransacBlockedContactsContacts `json:"contacts,omitempty"`
}

type GetTransacBlockedContactsContacts ¶

type GetTransacBlockedContactsContacts struct {
	// Email address of the blocked or unsubscribed contact
	Email string `json:"email"`
	// Sender email address of the blocked or unsubscribed contact
	SenderEmail string                           `json:"senderEmail"`
	Reason      *GetTransacBlockedContactsReason `json:"reason"`
	// Date when the contact was blocked or unsubscribed on
	BlockedAt string `json:"blockedAt"`
}

type GetTransacBlockedContactsOpts ¶

type GetTransacBlockedContactsOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
	Senders   optional.Interface
	Sort      optional.String
}

type GetTransacBlockedContactsReason ¶

type GetTransacBlockedContactsReason struct {
	// Reason code for blocking / unsubscribing (This code is safe for comparison)
	Code string `json:"code,omitempty"`
	// Reason for blocking / unsubscribing (This string is not safe for comparison)
	Message string `json:"message,omitempty"`
}

Reason for blocking / unsubscribing

type GetTransacEmailContent ¶

type GetTransacEmailContent struct {
	// Email address to which transactional email has been sent
	Email string `json:"email"`
	// Subject of the sent email
	Subject string `json:"subject"`
	// Id of the template
	TemplateId int64 `json:"templateId,omitempty"`
	// Date on which transactional email was sent
	Date string `json:"date"`
	// Series of events which occurred on the transactional email
	Events []GetTransacEmailContentEvents `json:"events"`
	// Actual content of the transactional email that has been sent
	Body string `json:"body"`
	// Count of the attachments that were sent in the email
	AttachmentCount int64 `json:"attachmentCount"`
}

type GetTransacEmailContentEvents ¶

type GetTransacEmailContentEvents struct {
	// Name of the event that occurred on the sent email
	Name string `json:"name"`
	// Time at which the event occurred
	Time string `json:"time"`
}

type GetTransacEmailsList ¶

type GetTransacEmailsList struct {
	// Total number of transactional emails available on your account according to the passed filter
	Count               int64                                     `json:"count,omitempty"`
	TransactionalEmails []GetTransacEmailsListTransactionalEmails `json:"transactionalEmails,omitempty"`
}

type GetTransacEmailsListOpts ¶

type GetTransacEmailsListOpts struct {
	Email      optional.String
	TemplateId optional.Int64
	MessageId  optional.String
	StartDate  optional.String
	EndDate    optional.String
	Sort       optional.String
	Limit      optional.Int64
	Offset     optional.Int64
}

type GetTransacEmailsListTransactionalEmails ¶

type GetTransacEmailsListTransactionalEmails struct {
	// Email address to which transactional email has been sent
	Email string `json:"email"`
	// Subject of the sent email
	Subject string `json:"subject"`
	// Id of the template
	TemplateId int64 `json:"templateId,omitempty"`
	// Message Id of the sent email
	MessageId string `json:"messageId"`
	// Unique id of the email sent to a particular contact
	Uuid string `json:"uuid"`
	// Date on which transactional email was sent
	Date string `json:"date"`
	// Email address of the sender from which the email was sent
	From string `json:"from,omitempty"`
	// Tags used for your email
	Tags []string `json:"tags,omitempty"`
}

type GetTransacSmsReport ¶

type GetTransacSmsReport struct {
	Reports []GetTransacSmsReportReports `json:"reports,omitempty"`
}

type GetTransacSmsReportOpts ¶

type GetTransacSmsReportOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Days      optional.Int64
	Tag       optional.String
	Sort      optional.String
}

type GetTransacSmsReportReports ¶

type GetTransacSmsReportReports struct {
	// Date for which statistics are retrieved
	Date string `json:"date,omitempty"`
	// Number of requests for the date
	Requests int64 `json:"requests,omitempty"`
	// Number of delivered SMS for the date
	Delivered int64 `json:"delivered,omitempty"`
	// Number of hardbounces for the date
	HardBounces int64 `json:"hardBounces,omitempty"`
	// Number of softbounces for the date
	SoftBounces int64 `json:"softBounces,omitempty"`
	// Number of blocked contact for the date
	Blocked int64 `json:"blocked,omitempty"`
	// Number of unsubscription for the date
	Unsubscribed int64 `json:"unsubscribed,omitempty"`
	// Number of answered SMS for the date
	Replied int64 `json:"replied,omitempty"`
	// Number of accepted for the date
	Accepted int64 `json:"accepted,omitempty"`
	// Number of rejected for the date
	Rejected int64 `json:"rejected,omitempty"`
}

type GetWaTemplates ¶

type GetWaTemplates struct {
	Templates []GetWaTemplatesTemplates `json:"templates"`
	// Number of whatsApp templates retrived
	Count int64 `json:"count"`
}

type GetWaTemplatesTemplates ¶

type GetWaTemplatesTemplates struct {
	// id of the template
	Id string `json:"id"`
	// Name of the WhatsApp template
	Name string `json:"name"`
	// Status of the WhatsApp template
	Status string `json:"status"`
	// Language in which template exists
	Language string `json:"language"`
	// category of the template
	Category string `json:"category"`
	// Error reason in the template creation
	ErrorReason string `json:"errorReason,omitempty"`
	// Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
}

type GetWebhook ¶

type GetWebhook struct {
	// URL of the webhook
	Url string `json:"url"`
	// ID of the webhook
	Id int64 `json:"id"`
	// Description of the webhook
	Description string   `json:"description"`
	Events      []string `json:"events"`
	// Type of webhook (marketing or transactional)
	Type_ string `json:"type"`
	// Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
}

type GetWebhooks ¶

type GetWebhooks struct {
	Webhooks []interface{} `json:"webhooks"`
}

type GetWebhooksOpts ¶

type GetWebhooksOpts struct {
	Type_ optional.String
	Sort  optional.String
}

type GetWhatsAppCampaignsOpts ¶

type GetWhatsAppCampaignsOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
	Sort      optional.String
}

type GetWhatsAppConfig ¶

type GetWhatsAppConfig struct {
	// Id of the WhatsApp business account
	WhatsappBusinessAccountId string `json:"whatsappBusinessAccountId,omitempty"`
	// Sending limit Information of the WhatsApp API account
	SendingLimit string `json:"sendingLimit,omitempty"`
	// Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)**
	PhoneNumberQuality string `json:"phoneNumberQuality,omitempty"`
	// Status information related to WhatsApp Api account
	WhatsappBusinessAccountStatus string `json:"whatsappBusinessAccountStatus,omitempty"`
	// Verification status information of the Business account
	BusinessStatus string `json:"businessStatus,omitempty"`
	// Status of the name associated with WhatsApp Phone number
	PhoneNumberNameStatus string `json:"phoneNumberNameStatus,omitempty"`
}

type GetWhatsAppTemplatesOpts ¶

type GetWhatsAppTemplatesOpts struct {
	StartDate optional.String
	EndDate   optional.String
	Limit     optional.Int64
	Offset    optional.Int64
	Sort      optional.String
}

type GetWhatsappCampaignOverview ¶

type GetWhatsappCampaignOverview struct {
	// ID of the WhatsApp Campaign
	Id int64 `json:"id"`
	// Name of the WhatsApp Campaign
	CampaignName string `json:"campaignName"`
	// Status of the WhatsApp Campaign
	CampaignStatus string `json:"campaignStatus"`
	// UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Sender of the WhatsApp Campaign
	SenderNumber string                `json:"senderNumber"`
	Stats        *WhatsappCampStats    `json:"stats,omitempty"`
	Template     *WhatsappCampTemplate `json:"template"`
	// Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
}

type GetWhatsappCampaigns ¶

type GetWhatsappCampaigns struct {
	Campaigns []GetWhatsappCampaignsCampaigns `json:"campaigns,omitempty"`
	// Number of WhatsApp campaigns retrived
	Count int64 `json:"count,omitempty"`
}

type GetWhatsappCampaignsCampaigns ¶

type GetWhatsappCampaignsCampaigns struct {
	// ID of the WhatsApp Campaign
	Id int64 `json:"id"`
	// Name of the WhatsApp Campaign
	CampaignName string `json:"campaignName"`
	// Id of the WhatsApp template
	TemplateId string `json:"templateId"`
	// Status of the WhatsApp Campaign
	CampaignStatus string `json:"campaignStatus"`
	// UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format
	ScheduledAt string `json:"scheduledAt"`
	// Error reason in the campaign creation
	ErrorReason string `json:"errorReason,omitempty"`
	// Count of invalidated contacts
	InvalidatedContacts int64 `json:"invalidatedContacts,omitempty"`
	// Read percentage of the the WhatsApp campaign created
	ReadPercentage float32            `json:"readPercentage,omitempty"`
	Stats          *WhatsappCampStats `json:"stats,omitempty"`
	// Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)
	CreatedAt string `json:"createdAt"`
	// UTC date-time of last modification of the whatsapp template (YYYY-MM-DDTHH:mm:ss.SSSZ)
	ModifiedAt string `json:"modifiedAt"`
}

type GetWhatsappEventReport ¶

type GetWhatsappEventReport struct {
	Events []GetWhatsappEventReportEvents `json:"events,omitempty"`
}

type GetWhatsappEventReportEvents ¶

type GetWhatsappEventReportEvents struct {
	// WhatsApp Number with country code. Example, 85264318721
	ContactNumber string `json:"contactNumber"`
	// UTC date-time on which the event has been generated
	Date string `json:"date"`
	// Message ID which generated the event
	MessageId string `json:"messageId"`
	// Event which occurred
	Event string `json:"event"`
	// Reason for the event (will be there in case of `error` and `soft-bounce` events)
	Reason string `json:"reason,omitempty"`
	// Text of the reply (will be there only in case of `reply` event with text)
	Body string `json:"body,omitempty"`
	// Url of the media reply (will be there only in case of `reply` event with media)
	MediaUrl string `json:"mediaUrl,omitempty"`
	// WhatsApp Number with country code. Example, 85264318721
	SenderNumber string `json:"senderNumber"`
}

type GetWhatsappEventReportOpts ¶

type GetWhatsappEventReportOpts struct {
	Limit         optional.Int64
	Offset        optional.Int64
	StartDate     optional.String
	EndDate       optional.String
	Days          optional.Int64
	ContactNumber optional.String
	Event         optional.String
	Sort          optional.String
}

type InboundParsingApiService ¶

type InboundParsingApiService service

func (*InboundParsingApiService) GetInboundEmailAttachment ¶

func (a *InboundParsingApiService) GetInboundEmailAttachment(ctx context.Context, downloadToken string) (*os.File, *http.Response, error)

InboundParsingApiService Retrieve inbound attachment with download token. This endpoint will retrieve inbound attachment with download token.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param downloadToken Token to fetch a particular attachment

@return *os.File

func (*InboundParsingApiService) GetInboundEmailEvents ¶

func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, localVarOptionals *GetInboundEmailEventsOpts) (GetInboundEmailEvents, *http.Response, error)

func (*InboundParsingApiService) GetInboundEmailEventsByUuid ¶

func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Context, uuid string) (GetInboundEmailEventsByUuid, *http.Response, error)

InboundParsingApiService Fetch all events history for one particular received email. This endpoint will show the list of all events history for one particular received email.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid UUID to fetch events specific to recieved email

@return GetInboundEmailEventsByUuid

type InlineResponse200 ¶

type InlineResponse200 struct {
	// Unique company id
	Id string `json:"id"`
}

Created company id

type InlineResponse201 ¶

type InlineResponse201 struct {
	// Unique deal id
	Id string `json:"id"`
}

Created deal id

type InlineResponse2011 ¶

type InlineResponse2011 struct {
	// Unique task id
	Id string `json:"id"`
}

Task Details

type InlineResponse2012 ¶

type InlineResponse2012 struct {
	// messageId of sent message
	MessageId string `json:"messageId"`
}

type InlineResponse2013 ¶

type InlineResponse2013 struct {
	// ID of the object created
	Id string `json:"id"`
}

type ManageIp ¶

type ManageIp struct {
	// Dedicated ID
	Ip string `json:"ip,omitempty"`
}

type MasterAccountApiService ¶

type MasterAccountApiService service

func (*MasterAccountApiService) CorporateMasterAccountGet ¶

func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error)

MasterAccountApiService Get the details of requested master account This endpoint will provide the details of the master account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return MasterDetailsResponse

func (*MasterAccountApiService) CorporateSubAccountGet ¶

func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error)

MasterAccountApiService Get the list of all the sub-accounts of the master account. This endpoint will provide the list all the sub-accounts of the master account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param offset Index of the first sub-account in the page
  • @param limit Number of sub-accounts to be displayed on each page

@return SubAccountsResponse

func (*MasterAccountApiService) CorporateSubAccountIdDelete ¶

func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error)

MasterAccountApiService Delete a sub-account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Id of the sub-account organization to be deleted

func (*MasterAccountApiService) CorporateSubAccountIdGet ¶

func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error)

MasterAccountApiService Get sub-account details This endpoint will provide the details for the specified sub-account company

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Id of the sub-account organization

@return SubAccountDetailsResponse

func (*MasterAccountApiService) CorporateSubAccountIdPlanPut ¶

func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error)

MasterAccountApiService Update sub-account plan This endpoint will update the sub-account plan

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Id of the sub-account organization
  • @param updatePlanDetails Values to update a sub-account plan

func (*MasterAccountApiService) CorporateSubAccountKeyPost ¶

func (a *MasterAccountApiService) CorporateSubAccountKeyPost(ctx context.Context, createApiKeyRequest CreateApiKeyRequest) (CreateApiKeyResponse, *http.Response, error)

MasterAccountApiService Create an API key for a sub-account This endpoint will generate an API v3 key for a sub account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createApiKeyRequest Values to generate API key for sub-account

@return CreateApiKeyResponse

func (*MasterAccountApiService) CorporateSubAccountPost ¶

func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error)

MasterAccountApiService Create a new sub-account under a master account. This endpoint will create a new sub-account under a master account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param subAccountCreate values to create new sub-account

@return CreateSubAccountResponse

func (*MasterAccountApiService) CorporateSubAccountSsoTokenPost ¶

func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error)

MasterAccountApiService Generate SSO token to access Brevo This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ssoTokenRequest Values to generate SSO token for sub-account

@return GetSsoToken

type MasterDetailsResponse ¶

type MasterDetailsResponse struct {
	// Email id of master account
	Email string `json:"email,omitempty"`
	// Company name of master account organization
	CompanyName string `json:"companyName,omitempty"`
	// Unique identifier of the master account organization
	Id int64 `json:"id,omitempty"`
	// Currency code of the master account organization
	CurrencyCode string `json:"currencyCode,omitempty"`
	// Timezone of the master account organization
	Timezone    string                            `json:"timezone,omitempty"`
	BillingInfo *MasterDetailsResponseBillingInfo `json:"billingInfo,omitempty"`
	PlanInfo    *MasterDetailsResponsePlanInfo    `json:"planInfo,omitempty"`
}

type MasterDetailsResponseBillingInfo ¶

type MasterDetailsResponseBillingInfo struct {
	// Billing email id of master account
	Email string `json:"email,omitempty"`
	// Company name of master account
	CompanyName string                                   `json:"companyName,omitempty"`
	Name        *MasterDetailsResponseBillingInfoName    `json:"name,omitempty"`
	Address     *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"`
}

Billing details of the master account organization

type MasterDetailsResponseBillingInfoAddress ¶

type MasterDetailsResponseBillingInfoAddress struct {
	// Street address
	StreetAddress string `json:"streetAddress,omitempty"`
	// Locality
	Locality string `json:"locality,omitempty"`
	// Postal code
	PostalCode string `json:"postalCode,omitempty"`
	// State code
	StateCode string `json:"stateCode,omitempty"`
	// Country code
	CountryCode string `json:"countryCode,omitempty"`
}

Billing address of master account

type MasterDetailsResponseBillingInfoName ¶

type MasterDetailsResponseBillingInfoName struct {
	// First name for billing
	GivenName string `json:"givenName,omitempty"`
	// Last name for billing
	FamilyName string `json:"familyName,omitempty"`
}

Billing name of master account holder

type MasterDetailsResponsePlanInfo ¶

type MasterDetailsResponsePlanInfo struct {
	// Plan currency
	CurrencyCode string `json:"currencyCode,omitempty"`
	// Timestamp of next billing date
	NextBillingAt int64 `json:"nextBillingAt,omitempty"`
	// Plan amount
	Price float32 `json:"price,omitempty"`
	// Plan period type
	PlanPeriod string `json:"planPeriod,omitempty"`
	// Number of sub-accounts
	SubAccounts int32 `json:"subAccounts,omitempty"`
	// List of provided features in the plan
	Features []MasterDetailsResponsePlanInfoFeatures `json:"features,omitempty"`
}

Plan details

type MasterDetailsResponsePlanInfoFeatures ¶

type MasterDetailsResponsePlanInfoFeatures struct {
	// Name of the feature
	Name string `json:"name,omitempty"`
	// Unit value of the feature
	UnitValue string `json:"unitValue,omitempty"`
	// Quantity provided in the plan
	Quantity int64 `json:"quantity,omitempty"`
	// Quantity consumed by master
	Used int64 `json:"used,omitempty"`
	// Quantity remaining in the plan
	Remaining int64 `json:"remaining,omitempty"`
}

type Note ¶

type Note struct {
	// Unique note Id
	Id string `json:"id,omitempty"`
	// Text content of a note
	Text string `json:"text"`
	// Contact ids linked to a note
	ContactIds []int32 `json:"contactIds,omitempty"`
	// Deal ids linked to a note
	DealIds []string `json:"dealIds,omitempty"`
	// Account details of user which created the note
	AuthorId map[string]interface{} `json:"authorId,omitempty"`
	// Note created date/time
	CreatedAt time.Time `json:"createdAt,omitempty"`
	// Note updated date/time
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

Note Details

type NoteData ¶

type NoteData struct {
	// Text content of a note
	Text string `json:"text"`
	// Contact Ids linked to a note
	ContactIds []int32 `json:"contactIds,omitempty"`
	// Deal Ids linked to a note
	DealIds []string `json:"dealIds,omitempty"`
	// Company Ids linked to a note
	CompanyIds []string `json:"companyIds,omitempty"`
}

Note data to be saved

type NoteId ¶

type NoteId struct {
	// Unique note Id
	Id string `json:"id,omitempty"`
}

Updated Note ID

type NoteList ¶

type NoteList struct {
}

List of notes

type NotesApiService ¶

type NotesApiService service

func (*NotesApiService) CrmNotesGet ¶

func (a *NotesApiService) CrmNotesGet(ctx context.Context, localVarOptionals *CrmNotesGetOpts) (NoteList, *http.Response, error)

func (*NotesApiService) CrmNotesIdDelete ¶

func (a *NotesApiService) CrmNotesIdDelete(ctx context.Context, id string) (*http.Response, error)

NotesApiService Delete a note

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Note ID to delete

func (*NotesApiService) CrmNotesIdGet ¶

func (a *NotesApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *http.Response, error)

NotesApiService Get a note

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Note ID to get

@return Note

func (*NotesApiService) CrmNotesIdPatch ¶

func (a *NotesApiService) CrmNotesIdPatch(ctx context.Context, id string, body NoteData) (*http.Response, error)

NotesApiService Update a note

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id Note ID to update
  • @param body Note data to update a note

func (*NotesApiService) CrmNotesPost ¶

func (a *NotesApiService) CrmNotesPost(ctx context.Context, body NoteData) (NoteId, *http.Response, error)

NotesApiService Create a note

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Note data to create a note.

@return NoteId

type Order ¶

type Order struct {
	// Unique ID of the order.
	Id string `json:"id"`
	// Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created.
	CreatedAt string `json:"createdAt"`
	// Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated.
	UpdatedAt string `json:"updatedAt"`
	// State of the order.
	Status string `json:"status"`
	// Total amount of the order, including all shipping expenses, tax and the price of items.
	Amount   float32         `json:"amount"`
	Products []OrderProducts `json:"products"`
	// Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter.
	Email   string        `json:"email,omitempty"`
	Billing *OrderBilling `json:"billing,omitempty"`
	// Coupons applied to the order. Stored case insensitive.
	Coupons []string `json:"coupons,omitempty"`
}

type OrderBatch ¶

type OrderBatch struct {
	// array of order objects
	Orders []Order `json:"orders"`
	// Notify Url provided by client to get the status of batch request
	NotifyUrl string `json:"notifyUrl,omitempty"`
}

type OrderBilling ¶

type OrderBilling struct {
	// Full billing address.
	Address string `json:"address,omitempty"`
	// Exact city of the address.
	City string `json:"city,omitempty"`
	// Billing country 2-letter ISO code.
	CountryCode string `json:"countryCode,omitempty"`
	// Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed.
	Phone string `json:"phone,omitempty"`
	// Postcode for delivery and billing.
	PostCode string `json:"postCode,omitempty"`
	// How the visitor will pay for the item(s), e.g. paypal, check, etc.
	PaymentMethod string `json:"paymentMethod,omitempty"`
	// Exact region (state/province) for delivery and billing.
	Region string `json:"region,omitempty"`
}

Billing details of an order.

type OrderProducts ¶

type OrderProducts struct {
	// ID of the product.
	ProductId string `json:"productId"`
	// How many pieces of the product the visitor has added to the cart.
	Quantity float32 `json:"quantity"`
	// Product ID of the red color shirts.
	VariantId string `json:"variantId,omitempty"`
	// The price of a unit of product
	Price float32 `json:"price"`
}

Details for the Products in an order.

type Otp ¶

type Otp struct {
	// 6 digit OTP received on email
	Name int32 `json:"name,omitempty"`
}

type Pipeline ¶

type Pipeline struct {
	// List of stages
	Stages []PipelineStage `json:"stages,omitempty"`
}

List of stages

type PipelineStage ¶

type PipelineStage struct {
	// Stage id
	Id string `json:"id,omitempty"`
	// Stage name
	Name string `json:"name,omitempty"`
}

List of stages

type PostContactInfo ¶

type PostContactInfo struct {
	Contacts *PostContactInfoContacts `json:"contacts"`
}

type PostContactInfoContacts ¶

type PostContactInfoContacts struct {
	Success []interface{} `json:"success,omitempty"`
	Failure []interface{} `json:"failure,omitempty"`
	// Displays the count of total number of contacts removed from list when user opts for \"all\" option.
	Total int64 `json:"total,omitempty"`
	// Id of the process created to remove contacts from list when user opts for \"all\" option.
	ProcessId int64 `json:"processId,omitempty"`
}

type PostSendFailed ¶

type PostSendFailed struct {
	// Response code
	Code int64 `json:"code"`
	// Response message
	Message           string   `json:"message"`
	UnexistingEmails  []string `json:"unexistingEmails,omitempty"`
	WithoutListEmails []string `json:"withoutListEmails,omitempty"`
	BlackListedEmails []string `json:"blackListedEmails,omitempty"`
}

type PostSendSmsTestFailed ¶

type PostSendSmsTestFailed struct {
	// Response code
	Code int64 `json:"code"`
	// Response message
	Message        string   `json:"message"`
	UnexistingSms  []string `json:"unexistingSms,omitempty"`
	WithoutListSms []string `json:"withoutListSms,omitempty"`
}

type ProcessApiService ¶

type ProcessApiService service

func (*ProcessApiService) GetProcess ¶

func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (GetProcess, *http.Response, error)

ProcessApiService Return the informations for a process

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param processId Id of the process

@return GetProcess

func (*ProcessApiService) GetProcesses ¶

func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *GetProcessesOpts) (GetProcesses, *http.Response, error)

type RemainingCreditModel ¶

type RemainingCreditModel struct {
	Child    *RemainingCreditModelChild    `json:"child"`
	Reseller *RemainingCreditModelReseller `json:"reseller"`
}

type RemainingCreditModelChild ¶

type RemainingCreditModelChild struct {
	// SMS Credits remaining for child account
	Sms float64 `json:"sms"`
	// Email Credits remaining for child account
	Email float64 `json:"email"`
}

Credits remaining for child account

type RemainingCreditModelReseller ¶

type RemainingCreditModelReseller struct {
	// SMS Credits remaining for reseller account
	Sms float64 `json:"sms"`
	// Email Credits remaining for reseller account
	Email float64 `json:"email"`
}

type RemoveContactFromList ¶

type RemoveContactFromList struct {
	// Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request.
	Emails []string `json:"emails,omitempty"`
	// Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api.
	Ids []int64 `json:"ids,omitempty"`
	// Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list.  A process will be created in this scenario. You can fetch the process details to know about the progress
	All bool `json:"all,omitempty"`
}

type RemoveCredits ¶

type RemoveCredits struct {
	// Required if email credits are empty. SMS credits to be removed from the child account
	Sms int64 `json:"sms,omitempty"`
	// Required if sms credits are empty. Email credits to be removed from the child account
	Email int64 `json:"email,omitempty"`
}

type RequestContactExport ¶

type RequestContactExport struct {
	// List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email'].
	ExportAttributes    []string                                 `json:"exportAttributes,omitempty"`
	CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter"`
	// Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
	NotifyUrl string `json:"notifyUrl,omitempty"`
}

type RequestContactExportCustomContactFilter ¶

type RequestContactExportCustomContactFilter struct {
	// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only.
	ActionForContacts string `json:"actionForContacts,omitempty"`
	// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s).
	ActionForEmailCampaigns string `json:"actionForEmailCampaigns,omitempty"`
	// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns.
	ActionForSmsCampaigns string `json:"actionForSmsCampaigns,omitempty"`
	// Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter.
	ListId int64 `json:"listId,omitempty"`
	// Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter.
	EmailCampaignId int64 `json:"emailCampaignId,omitempty"`
	// Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter.
	SmsCampaignId int64 `json:"smsCampaignId,omitempty"`
}

Set the filter for the contacts to be exported.

type RequestContactImport ¶

type RequestContactImport struct {
	// Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json
	FileUrl string `json:"fileUrl,omitempty"`
	// Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
	FileBody string `json:"fileBody,omitempty"`
	// **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.
	JsonBody []map[string]interface{} `json:"jsonBody,omitempty"`
	// Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7].
	ListIds []int64 `json:"listIds,omitempty"`
	// URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
	NotifyUrl string                       `json:"notifyUrl,omitempty"`
	NewList   *RequestContactImportNewList `json:"newList,omitempty"`
	// To blacklist all the contacts for email
	EmailBlacklist bool `json:"emailBlacklist,omitempty"`
	// To blacklist all the contacts for sms
	SmsBlacklist bool `json:"smsBlacklist,omitempty"`
	// To facilitate the choice to update the existing contacts
	UpdateExistingContacts bool `json:"updateExistingContacts,omitempty"`
	// To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true )
	EmptyContactsAttributes bool `json:"emptyContactsAttributes,omitempty"`
	// To disable email notification
	DisableNotification bool `json:"disableNotification,omitempty"`
}

type RequestContactImportNewList ¶

type RequestContactImportNewList struct {
	// List with listName will be created first and users will be imported in it (Mandatory if listIds is empty).
	ListName string `json:"listName,omitempty"`
	// Id of the folder where this new list shall be created (Mandatory if listName is not empty).
	FolderId int64 `json:"folderId,omitempty"`
}

To create a new list and import the contacts into it, pass the listName and an optional folderId.

type RequestSmsRecipientExport ¶

type RequestSmsRecipientExport struct {
	// URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479
	NotifyURL string `json:"notifyURL,omitempty"`
	// Filter the recipients based on how they interacted with the campaign
	RecipientsType string `json:"recipientsType"`
}

type RequestSmsRecipientExportOpts ¶

type RequestSmsRecipientExportOpts struct {
	RecipientExport optional.Interface
}

type ResellerApiService ¶

type ResellerApiService service

func (*ResellerApiService) AddCredits ¶

func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier string, addCredits AddCredits) (RemainingCreditModel, *http.Response, error)

ResellerApiService Add Email and/or SMS credits to a specific child account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param addCredits Values to post to add credit to a specific child account

@return RemainingCreditModel

func (*ResellerApiService) AssociateIpToChild ¶

func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error)

ResellerApiService Associate a dedicated IP to the child

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param ip IP to associate

func (*ResellerApiService) CreateChildDomain ¶

func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentifier string, addChildDomain AddChildDomain) (*http.Response, error)

ResellerApiService Create a domain for a child account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account.

func (*ResellerApiService) CreateResellerChild ¶

func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *CreateResellerChildOpts) (CreateReseller, *http.Response, error)

func (*ResellerApiService) DeleteChildDomain ¶

func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentifier string, domainName string) (*http.Response, error)

ResellerApiService Delete the sender domain of the reseller child based on the childIdentifier and domainName passed

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param domainName Pass the existing domain that needs to be deleted

func (*ResellerApiService) DeleteResellerChild ¶

func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdentifier string) (*http.Response, error)

ResellerApiService Delete a single reseller child based on the child identifier supplied

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or child id of reseller&#39;s child

func (*ResellerApiService) DissociateIpFromChild ¶

func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error)

ResellerApiService Dissociate a dedicated IP to the child

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param ip IP to dissociate

func (*ResellerApiService) GetChildAccountCreationStatus ¶

func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, childIdentifier string) (GetChildAccountCreationStatus, *http.Response, error)

ResellerApiService Get the status of a reseller&#39;s child account creation, whether it is successfully created (exists) or not based on the identifier supplied

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child

@return GetChildAccountCreationStatus

func (*ResellerApiService) GetChildDomains ¶

func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) (GetChildDomains, *http.Response, error)

ResellerApiService Get all sender domains for a specific child account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child

@return GetChildDomains

func (*ResellerApiService) GetChildInfo ¶

func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier string) (GetChildInfo, *http.Response, error)

ResellerApiService Get a child account&#39;s details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child

@return GetChildInfo

func (*ResellerApiService) GetResellerChilds ¶

func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *GetResellerChildsOpts) (GetChildrenList, *http.Response, error)

func (*ResellerApiService) GetSsoToken ¶

func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier string) (GetSsoToken, *http.Response, error)

ResellerApiService Get session token to access Brevo (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern &#x3D;&gt; https:/email.mydomain.com/login/sso?token&#x3D;[token]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child

@return GetSsoToken

func (*ResellerApiService) RemoveCredits ¶

func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier string, removeCredits RemoveCredits) (RemainingCreditModel, *http.Response, error)

ResellerApiService Remove Email and/or SMS credits from a specific child account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param removeCredits Values to post to remove email or SMS credits from a specific child account

@return RemainingCreditModel

func (*ResellerApiService) UpdateChildAccountStatus ¶

func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, childIdentifier string, updateChildAccountStatus UpdateChildAccountStatus) (*http.Response, error)

ResellerApiService Update info of reseller&#39;s child account status based on the childIdentifier supplied

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param updateChildAccountStatus values to update in child account status

func (*ResellerApiService) UpdateChildDomain ¶

func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentifier string, domainName string, updateChildDomain UpdateChildDomain) (*http.Response, error)

ResellerApiService Update the sender domain of reseller&#39;s child based on the childIdentifier and domainName passed

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param domainName Pass the existing domain that needs to be updated
  • @param updateChildDomain value to update for sender domain

func (*ResellerApiService) UpdateResellerChild ¶

func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdentifier string, resellerChild UpdateChild) (*http.Response, error)

ResellerApiService Update info of reseller&#39;s child based on the child identifier supplied

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param childIdentifier Either auth key or id of reseller&#39;s child
  • @param resellerChild values to update in child profile

type SMSCampaignsApiService ¶

type SMSCampaignsApiService service

func (*SMSCampaignsApiService) CreateSmsCampaign ¶

func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSmsCampaign CreateSmsCampaign) (CreateModel, *http.Response, error)

SMSCampaignsApiService Creates an SMS campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createSmsCampaign Values to create an SMS Campaign

@return CreateModel

func (*SMSCampaignsApiService) DeleteSmsCampaign ¶

func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaignId int64) (*http.Response, error)

SMSCampaignsApiService Delete an SMS campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the SMS campaign

func (*SMSCampaignsApiService) GetSmsCampaign ¶

func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId int64) (GetSmsCampaign, *http.Response, error)

SMSCampaignsApiService Get an SMS campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the SMS campaign

@return GetSmsCampaign

func (*SMSCampaignsApiService) GetSmsCampaigns ¶

func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *GetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error)

func (*SMSCampaignsApiService) RequestSmsRecipientExport ¶

func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *RequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error)

func (*SMSCampaignsApiService) SendSmsCampaignNow ¶

func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error)

SMSCampaignsApiService Send your SMS campaign immediately

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the campaign

func (*SMSCampaignsApiService) SendSmsReport ¶

func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error)

SMSCampaignsApiService Send an SMS campaign&#39;s report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the campaign
  • @param sendReport Values for send a report

func (*SMSCampaignsApiService) SendTestSms ¶

func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int64, phoneNumber SendTestSms) (*http.Response, error)

SMSCampaignsApiService Send a test SMS campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the SMS campaign
  • @param phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted

func (*SMSCampaignsApiService) UpdateSmsCampaign ¶

func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaignId int64, updateSmsCampaign UpdateSmsCampaign) (*http.Response, error)

SMSCampaignsApiService Update an SMS campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the SMS campaign
  • @param updateSmsCampaign Values to update an SMS Campaign

func (*SMSCampaignsApiService) UpdateSmsCampaignStatus ¶

func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error)

SMSCampaignsApiService Update a campaign&#39;s status

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the campaign
  • @param status Status of the campaign.

type ScheduleSmtpEmail ¶

type ScheduleSmtpEmail struct {
	// Message ID of the transactional email scheduled
	MessageId  string   `json:"messageId,omitempty"`
	MessageIds []string `json:"messageIds,omitempty"`
	// Batch ID of the batch transactional email scheduled
	BatchId string `json:"batchId,omitempty"`
}

type SendReport ¶

type SendReport struct {
	// Language of email content for campaign report sending.
	Language string           `json:"language,omitempty"`
	Email    *SendReportEmail `json:"email"`
}

type SendReportEmail ¶

type SendReportEmail struct {
	// Email addresses of the recipients
	To []string `json:"to"`
	// Custom text message to be presented in the report email.
	Body string `json:"body"`
}

Custom attributes for the report email.

type SendSms ¶

type SendSms struct {
	Reference string `json:"reference"`
	MessageId int64  `json:"messageId"`
	// Count of SMS's to send multiple text messages
	SmsCount int64 `json:"smsCount,omitempty"`
	// SMS credits used per text message
	UsedCredits float32 `json:"usedCredits,omitempty"`
	// Remaining SMS credits of the user
	RemainingCredits float32 `json:"remainingCredits,omitempty"`
}

type SendSmtpEmail ¶

type SendSmtpEmail struct {
	Sender *SendSmtpEmailSender `json:"sender,omitempty"`
	// Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]
	To []SendSmtpEmailTo `json:"to,omitempty"`
	// List of email addresses and names (optional) of the recipients in bcc
	Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"`
	// List of email addresses and names (optional) of the recipients in cc
	Cc []SendSmtpEmailCc `json:"cc,omitempty"`
	// HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed )
	HtmlContent string `json:"htmlContent,omitempty"`
	// Plain Text body of the message ( Ignored if 'templateId' is passed )
	TextContent string `json:"textContent,omitempty"`
	// Subject of the message. Mandatory if 'templateId' is not passed
	Subject string                `json:"subject,omitempty"`
	ReplyTo *SendSmtpEmailReplyTo `json:"replyTo,omitempty"`
	// Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: 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 and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored )
	Attachment []SendSmtpEmailAttachment `json:"attachment,omitempty"`
	// Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`.
	Headers map[string]interface{} `json:"headers,omitempty"`
	// Id of the template.
	TemplateId int64 `json:"templateId,omitempty"`
	// Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format.
	Params map[string]interface{} `json:"params,omitempty"`
	// You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.brevo.com/docs/batch-send-transactional-emails
	MessageVersions []SendSmtpEmailMessageVersions `json:"messageVersions,omitempty"`
	// Tag your emails to find them more easily
	Tags []string `json:"tags,omitempty"`
	// UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**.
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end.
	BatchId string `json:"batchId,omitempty"`
}

type SendSmtpEmailAttachment ¶

type SendSmtpEmailAttachment struct {
	// Absolute url of the attachment (no local file).
	Url string `json:"url,omitempty"`
	// Base64 encoded chunk data of the attachment generated on the fly
	Content string `json:"content,omitempty"`
	// Required if content is passed. Name of the attachment
	Name string `json:"name,omitempty"`
}

type SendSmtpEmailBcc ¶

type SendSmtpEmailBcc struct {
	// Email address of the recipient in bcc
	Email string `json:"email"`
	// Name of the recipient in bcc. Maximum allowed characters are 70.
	Name string `json:"name,omitempty"`
}

type SendSmtpEmailCc ¶

type SendSmtpEmailCc struct {
	// Email address of the recipient in cc
	Email string `json:"email"`
	// Name of the recipient in cc. Maximum allowed characters are 70.
	Name string `json:"name,omitempty"`
}

type SendSmtpEmailMessageVersions ¶

type SendSmtpEmailMessageVersions struct {
	// List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]
	To []SendSmtpEmailTo1 `json:"to"`
	// Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format.
	Params map[string]interface{} `json:"params,omitempty"`
	// List of email addresses and names (optional) of the recipients in bcc
	Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"`
	// List of email addresses and names (optional) of the recipients in cc
	Cc      []SendSmtpEmailCc      `json:"cc,omitempty"`
	ReplyTo *SendSmtpEmailReplyTo1 `json:"replyTo,omitempty"`
	// Custom subject specific to message version
	Subject string `json:"subject,omitempty"`
}

type SendSmtpEmailReplyTo ¶

type SendSmtpEmailReplyTo struct {
	// Email address in reply to
	Email string `json:"email"`
	// Name in reply to. Maximum allowed characters are 70.
	Name string `json:"name,omitempty"`
}

Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}.

type SendSmtpEmailReplyTo1 ¶

type SendSmtpEmailReplyTo1 struct {
	// Email address in reply to
	Email string `json:"email"`
	// Name in reply to. Maximum allowed characters are 70.
	Name string `json:"name,omitempty"`
}

Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}

type SendSmtpEmailSender ¶

type SendSmtpEmailSender struct {
	// Name of the sender from which the emails will be sent. Maximum allowed characters are 70. Applicable only when email is passed.
	Name string `json:"name,omitempty"`
	// Email of the sender from which the emails will be sent. Mandatory if sender id is not passed.
	Email string `json:"email,omitempty"`
	// Id of the sender from which the emails will be sent. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email). Mandatory if email is not passed.
	Id int64 `json:"id,omitempty"`
}

Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2}

type SendSmtpEmailTo ¶

type SendSmtpEmailTo struct {
	// Email address of the recipient
	Email string `json:"email"`
	// Name of the recipient. Maximum allowed characters are 70.
	Name string `json:"name,omitempty"`
}

type SendSmtpEmailTo1 ¶

type SendSmtpEmailTo1 struct {
	// Email address of the recipient
	Email string `json:"email"`
	// Name of the recipient. **Maximum allowed characters are 70**.
	Name string `json:"name,omitempty"`
}

type SendTestEmail ¶

type SendTestEmail struct {
	// 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.
	EmailTo []string `json:"emailTo,omitempty"`
}

type SendTestSms ¶

type SendTestSms struct {
	// Mobile number of the recipient with the country code. This number must belong to one of your contacts in Brevo account and must not be blacklisted
	PhoneNumber string `json:"phoneNumber,omitempty"`
}

type SendTransacSms ¶

type SendTransacSms struct {
	// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
	Sender string `json:"sender"`
	// Mobile number to send SMS with the country code
	Recipient string `json:"recipient"`
	// Content of the message. If more than 160 characters long, will be sent as multiple text messages
	Content string `json:"content"`
	// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc.
	Type_ string `json:"type,omitempty"`
	// Tag of the message
	Tag string `json:"tag,omitempty"`
	// Webhook to call for each event triggered by the message (delivered etc.)
	WebUrl string `json:"webUrl,omitempty"`
	// Format of the message. It indicates whether the content should be treated as unicode or not.
	UnicodeEnabled bool `json:"unicodeEnabled,omitempty"`
	// A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**
	OrganisationPrefix string `json:"organisationPrefix,omitempty"`
}

type SendWhatsappMessage ¶

type SendWhatsappMessage struct {
	// ID of the template to send
	TemplateId int32 `json:"templateId,omitempty"`
	// Text to be sent as message body (will be overridden if templateId is passed in the same request)
	Text string `json:"text,omitempty"`
	// WhatsApp Number with country code. Example, 85264318721
	SenderNumber string `json:"senderNumber"`
	// List of phone numbers of the contacts
	ContactNumbers []string `json:"contactNumbers"`
}

type SendersApiService ¶

type SendersApiService service

func (*SendersApiService) CreateSender ¶

func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *CreateSenderOpts) (CreateSenderModel, *http.Response, error)

func (*SendersApiService) DeleteSender ¶

func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*http.Response, error)

SendersApiService Delete a sender

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param senderId Id of the sender

func (*SendersApiService) GetIps ¶

SendersApiService Get all the dedicated IPs for your account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetIps

func (*SendersApiService) GetIpsFromSender ¶

func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64) (GetIpsFromSender, *http.Response, error)

SendersApiService Get all the dedicated IPs for a sender

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param senderId Id of the sender

@return GetIpsFromSender

func (*SendersApiService) GetSenders ¶

func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *GetSendersOpts) (GetSendersList, *http.Response, error)

func (*SendersApiService) UpdateSender ¶

func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, localVarOptionals *UpdateSenderOpts) (*http.Response, error)

func (*SendersApiService) ValidateSenderByOTP ¶

func (a *SendersApiService) ValidateSenderByOTP(ctx context.Context, senderId int64, localVarOptionals *ValidateSenderByOTPOpts) (*http.Response, error)

type SsoTokenRequest ¶

type SsoTokenRequest struct {
	// Id of the sub-account organization
	Id int64 `json:"id"`
	// User email of sub-account organization
	Email string `json:"email,omitempty"`
	// Set target after login success * automation - Redirect to Automation after login * email_campaign - Redirect to Email Campaign after login * contacts - Redirect to Contacts after login * landing_pages - Redirect to Landing Pages after login * email_transactional - Redirect to Email Transactional after login * senders - Redirect to Contacts after login * sms_campaign - Redirect to Sms Campaign after login * sms_transactional - Redirect to Sms Transactional after login
	Target string `json:"target,omitempty"`
}

type SubAccountDetailsResponse ¶

type SubAccountDetailsResponse struct {
	// Name of the sub-account user
	Name string `json:"name,omitempty"`
	// Email id of the sub-account organization
	Email string `json:"email,omitempty"`
	// Sub-account company name
	CompanyName string                             `json:"companyName,omitempty"`
	PlanInfo    *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"`
}

type SubAccountDetailsResponsePlanInfo ¶

type SubAccountDetailsResponsePlanInfo struct {
	Credits  *SubAccountDetailsResponsePlanInfoCredits  `json:"credits,omitempty"`
	Features *SubAccountDetailsResponsePlanInfoFeatures `json:"features,omitempty"`
	// type of the plan
	PlanType string `json:"planType,omitempty"`
}

Sub-account plan details

type SubAccountDetailsResponsePlanInfoCredits ¶

type SubAccountDetailsResponsePlanInfoCredits struct {
	// SMS credits remaining on the sub-account
	Sms    int64                                           `json:"sms,omitempty"`
	Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"`
}

Credits quota and remaining credits on the sub-account

type SubAccountDetailsResponsePlanInfoCreditsEmails ¶

type SubAccountDetailsResponsePlanInfoCreditsEmails struct {
	// Quantity of email messaging limits provided
	Quantity int64 `json:"quantity,omitempty"`
	// Available email messaging limits for use
	Remaining int64 `json:"remaining,omitempty"`
}

Email credits remaining on the sub-account

type SubAccountDetailsResponsePlanInfoFeatures ¶

type SubAccountDetailsResponsePlanInfoFeatures struct {
	Inbox       *SubAccountDetailsResponsePlanInfoFeaturesInbox       `json:"inbox,omitempty"`
	LandingPage *SubAccountDetailsResponsePlanInfoFeaturesLandingPage `json:"landingPage,omitempty"`
	Users       *SubAccountDetailsResponsePlanInfoFeaturesUsers       `json:"users,omitempty"`
}

Features available on the sub-account

type SubAccountDetailsResponsePlanInfoFeaturesInbox ¶

type SubAccountDetailsResponsePlanInfoFeaturesInbox struct {
	// Quantity of inbox provided
	Quantity int64 `json:"quantity,omitempty"`
	// Available inboxes for use
	Remaining int64 `json:"remaining,omitempty"`
}

Inbox details

type SubAccountDetailsResponsePlanInfoFeaturesLandingPage ¶

type SubAccountDetailsResponsePlanInfoFeaturesLandingPage struct {
	// Quantity of landing pages provided
	Quantity int64 `json:"quantity,omitempty"`
	// Available landing pages for use
	Remaining int64 `json:"remaining,omitempty"`
}

Landing page details

type SubAccountDetailsResponsePlanInfoFeaturesUsers ¶

type SubAccountDetailsResponsePlanInfoFeaturesUsers struct {
	// Quantity of multi-account's provided
	Quantity int64 `json:"quantity,omitempty"`
	// Available multi-accounts for use
	Remaining int64 `json:"remaining,omitempty"`
}

Multi-account details

type SubAccountUpdatePlanRequest ¶

type SubAccountUpdatePlanRequest struct {
	Credits  *SubAccountUpdatePlanRequestCredits  `json:"credits,omitempty"`
	Features *SubAccountUpdatePlanRequestFeatures `json:"features,omitempty"`
}

Details of the plan to be changed

type SubAccountUpdatePlanRequestCredits ¶

type SubAccountUpdatePlanRequestCredits struct {
	// Number of email credits
	Email int64 `json:"email,omitempty"`
}

Credit details to update

type SubAccountUpdatePlanRequestFeatures ¶

type SubAccountUpdatePlanRequestFeatures struct {
	// Number of multi-users
	Users int64 `json:"users,omitempty"`
	// Number of landing pages
	LandingPage int64 `json:"landingPage,omitempty"`
	// Number of inboxes
	Inbox int64 `json:"inbox,omitempty"`
}

Features details to update

type SubAccountsResponse ¶

type SubAccountsResponse struct {
	// Total number of subaccounts
	Count       int32                            `json:"count,omitempty"`
	SubAccounts []SubAccountsResponseSubAccounts `json:"subAccounts,omitempty"`
}

type SubAccountsResponseSubAccounts ¶

type SubAccountsResponseSubAccounts struct {
	// id of the sub-account
	Id int64 `json:"id"`
	// Name of the sub-account company
	CompanyName string `json:"companyName"`
	// Whether the sub-account is active or not
	Active bool `json:"active"`
	// Timestamp when the sub-account was created
	CreatedAt int64 `json:"createdAt"`
}

type Task ¶

type Task struct {
	// Unique task id
	Id string `json:"id,omitempty"`
	// Id for type of task e.g Call / Email / Meeting etc.
	TaskTypeId string `json:"taskTypeId"`
	// Name of task
	Name string `json:"name"`
	// Contact ids for contacts linked to this task
	ContactsIds []int32 `json:"contactsIds,omitempty"`
	// Deal ids for deals a task is linked to
	DealsIds []string `json:"dealsIds,omitempty"`
	// Companies ids for companies a task is linked to
	CompaniesIds []string `json:"companiesIds,omitempty"`
}

Task Details

type TaskList ¶

type TaskList struct {
	// List of tasks
	Items []Task `json:"items,omitempty"`
}

List of tasks

type TaskReminder ¶

type TaskReminder struct {
	// Value of time unit before reminder is to be sent
	Value int32 `json:"value"`
	// Unit of time before reminder is to be sent
	Unit string `json:"unit"`
	// Type of task reminder e.g email, push
	Types []string `json:"types"`
}

Task reminder date/time for a task

type TaskTypes ¶

type TaskTypes struct {
	// Id of task type
	Id string `json:"id,omitempty"`
	// Title of task type
	Title string `json:"title,omitempty"`
}

Task types details

type TasksApiService ¶

type TasksApiService service

func (*TasksApiService) CrmTasksGet ¶

func (a *TasksApiService) CrmTasksGet(ctx context.Context, localVarOptionals *CrmTasksGetOpts) (TaskList, *http.Response, error)

func (*TasksApiService) CrmTasksIdDelete ¶

func (a *TasksApiService) CrmTasksIdDelete(ctx context.Context, id string) (*http.Response, error)

TasksApiService Delete a task

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

func (*TasksApiService) CrmTasksIdGet ¶

func (a *TasksApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *http.Response, error)

TasksApiService Get a task

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id

@return Task

func (*TasksApiService) CrmTasksIdPatch ¶

func (a *TasksApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body7) (*http.Response, error)

TasksApiService Update a task

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id
  • @param body Updated task details.

func (*TasksApiService) CrmTasksPost ¶

func (a *TasksApiService) CrmTasksPost(ctx context.Context, body Body6) (InlineResponse2011, *http.Response, error)

TasksApiService Create a task

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body Task name.

@return InlineResponse2011

func (*TasksApiService) CrmTasktypesGet ¶

func (a *TasksApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http.Response, error)

TasksApiService Get all task types

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return TaskTypes

type TransactionalEmailsApiService ¶

type TransactionalEmailsApiService service

func (*TransactionalEmailsApiService) BlockNewDomain ¶

func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, blockDomain BlockDomain) (*http.Response, error)

TransactionalEmailsApiService Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param blockDomain

func (*TransactionalEmailsApiService) CreateSmtpTemplate ¶

func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, smtpTemplate CreateSmtpTemplate) (CreateModel, *http.Response, error)

TransactionalEmailsApiService Create an email template

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param smtpTemplate values to update in transactional email template

@return CreateModel

func (*TransactionalEmailsApiService) DeleteBlockedDomain ¶

func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, domain string) (*http.Response, error)

TransactionalEmailsApiService Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param domain The name of the domain to be deleted

func (*TransactionalEmailsApiService) DeleteHardbounces ¶

func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, localVarOptionals *DeleteHardbouncesOpts) (*http.Response, error)

func (*TransactionalEmailsApiService) DeleteScheduledEmailById ¶

func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Context, identifier string) (*http.Response, error)

TransactionalEmailsApiService Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageId

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param identifier The &#x60;batchId&#x60; of scheduled emails batch (Should be a valid UUIDv4) or the &#x60;messageId&#x60; of scheduled email.

func (*TransactionalEmailsApiService) DeleteSmtpTemplate ¶

func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, templateId int64) (*http.Response, error)

TransactionalEmailsApiService Delete an inactive email template

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param templateId id of the template

func (*TransactionalEmailsApiService) GetAggregatedSmtpReport ¶

func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *GetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error)

func (*TransactionalEmailsApiService) GetBlockedDomains ¶

TransactionalEmailsApiService Get the list of blocked domains Get the list of blocked domains

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetBlockedDomains

func (*TransactionalEmailsApiService) GetEmailEventReport ¶

func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *GetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error)

func (*TransactionalEmailsApiService) GetScheduledEmailByBatchId ¶

func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.Context, batchId string, localVarOptionals *GetScheduledEmailByBatchIdOpts) (GetScheduledEmailByBatchId, *http.Response, error)

func (*TransactionalEmailsApiService) GetScheduledEmailByMessageId ¶

func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context.Context, messageId string, localVarOptionals *GetScheduledEmailByMessageIdOpts) (GetScheduledEmailByMessageId, *http.Response, error)

func (*TransactionalEmailsApiService) GetSmtpReport ¶

func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *GetSmtpReportOpts) (GetReports, *http.Response, error)

func (*TransactionalEmailsApiService) GetSmtpTemplate ¶

TransactionalEmailsApiService Returns the template information

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param templateId id of the template

@return GetSmtpTemplateOverview

func (*TransactionalEmailsApiService) GetSmtpTemplates ¶

func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *GetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error)

func (*TransactionalEmailsApiService) GetTransacBlockedContacts ¶

func (*TransactionalEmailsApiService) GetTransacEmailContent ¶

TransactionalEmailsApiService Get the personalized content of a sent transactional email

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uuid Unique id of the transactional email that has been sent to a particular contact

@return GetTransacEmailContent

func (*TransactionalEmailsApiService) GetTransacEmailsList ¶

func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *GetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error)

func (*TransactionalEmailsApiService) SendTestTemplate ¶

func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, templateId int64, sendTestEmail SendTestEmail) (*http.Response, error)

TransactionalEmailsApiService Send a template to your test list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param templateId Id of the template
  • @param sendTestEmail

func (*TransactionalEmailsApiService) SendTransacEmail ¶

func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, sendSmtpEmail SendSmtpEmail) (CreateSmtpEmail, *http.Response, error)

TransactionalEmailsApiService Send a transactional email

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sendSmtpEmail Values to send a transactional email

@return CreateSmtpEmail

func (*TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete ¶

func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx context.Context, email string) (*http.Response, error)

TransactionalEmailsApiService Unblock or resubscribe a transactional contact

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param email contact email (urlencoded) to unblock.

func (*TransactionalEmailsApiService) SmtpLogMessageIdDelete ¶

func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Context, messageId string) (*http.Response, error)

TransactionalEmailsApiService Delete an SMTP transactional log

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param messageId MessageId of the transactional log to delete

func (*TransactionalEmailsApiService) UpdateSmtpTemplate ¶

func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, templateId int64, smtpTemplate UpdateSmtpTemplate) (*http.Response, error)

TransactionalEmailsApiService Update an email template

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param templateId id of the template
  • @param smtpTemplate values to update in transactional email template

type TransactionalSMSApiService ¶

type TransactionalSMSApiService service

func (*TransactionalSMSApiService) GetSmsEvents ¶

func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *GetSmsEventsOpts) (GetSmsEventReport, *http.Response, error)

func (*TransactionalSMSApiService) GetTransacAggregatedSmsReport ¶

func (*TransactionalSMSApiService) GetTransacSmsReport ¶

func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *GetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error)

func (*TransactionalSMSApiService) SendTransacSms ¶

func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTransacSms SendTransacSms) (SendSms, *http.Response, error)

TransactionalSMSApiService Send SMS message to a mobile number

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sendTransacSms Values to send a transactional SMS

@return SendSms

type TransactionalWhatsAppApiService ¶

type TransactionalWhatsAppApiService service

func (*TransactionalWhatsAppApiService) GetWhatsappEventReport ¶

func (*TransactionalWhatsAppApiService) SendWhatsappMessage ¶

func (a *TransactionalWhatsAppApiService) SendWhatsappMessage(ctx context.Context, sendWhatsappMessage SendWhatsappMessage) (InlineResponse2012, *http.Response, error)

TransactionalWhatsAppApiService Send a WhatsApp message This endpoint is used to send a WhatsApp message. &lt;br/&gt;(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sendWhatsappMessage Values to send WhatsApp message

@return InlineResponse2012

type UpdateAttribute ¶

type UpdateAttribute struct {
	// Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global'
	Value string `json:"value,omitempty"`
	// List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
	Enumeration []UpdateAttributeEnumeration `json:"enumeration,omitempty"`
}

type UpdateAttributeEnumeration ¶

type UpdateAttributeEnumeration struct {
	// Id of the value
	Value int32 `json:"value"`
	// Label of the value
	Label string `json:"label"`
}

type UpdateBatchContacts ¶

type UpdateBatchContacts struct {
	// List of contacts to be updated
	Contacts []UpdateBatchContactsContacts `json:"contacts,omitempty"`
}

type UpdateBatchContactsContacts ¶

type UpdateBatchContactsContacts struct {
	// Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)
	Email string `json:"email,omitempty"`
	// id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)
	Id int64 `json:"id,omitempty"`
	// SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)
	Sms string `json:"sms,omitempty"`
	// Pass your own Id to update ext_id of a contact.
	ExtId string `json:"ext_id,omitempty"`
	// Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}**
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
	EmailBlacklisted bool `json:"emailBlacklisted,omitempty"`
	// Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
	SmsBlacklisted bool `json:"smsBlacklisted,omitempty"`
	// Ids of the lists to add the contact to
	ListIds []int64 `json:"listIds,omitempty"`
	// Ids of the lists to remove the contact from
	UnlinkListIds []int64 `json:"unlinkListIds,omitempty"`
	// transactional email forbidden sender for contact. Use only for email Contact
	SmtpBlacklistSender []string `json:"smtpBlacklistSender,omitempty"`
}

type UpdateBatchContactsModel ¶

type UpdateBatchContactsModel struct {
	SuccessIds []int64 `json:"successIds,omitempty"`
	FailureIds []int64 `json:"failureIds,omitempty"`
}

type UpdateCampaignStatus ¶

type UpdateCampaignStatus struct {
	// Note:- replicateTemplate status will be available only for template type campaigns.
	Status string `json:"status,omitempty"`
}

Status of the campaign

type UpdateChild ¶

type UpdateChild struct {
	// New Email address to update the child account
	Email string `json:"email,omitempty"`
	// New First name to use to update the child account
	FirstName string `json:"firstName,omitempty"`
	// New Last name to use to update the child account
	LastName string `json:"lastName,omitempty"`
	// New Company name to use to update the child account
	CompanyName string `json:"companyName,omitempty"`
	// New password for the child account to login
	Password string `json:"password,omitempty"`
}

type UpdateChildAccountStatus ¶

type UpdateChildAccountStatus struct {
	// Status of Transactional Email Platform activation for your account (true=enabled, false=disabled)
	TransactionalEmail bool `json:"transactionalEmail,omitempty"`
	// Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled)
	TransactionalSms bool `json:"transactionalSms,omitempty"`
	// Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled)
	MarketingAutomation bool `json:"marketingAutomation,omitempty"`
	// Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled)
	SmsCampaign bool `json:"smsCampaign,omitempty"`
}

type UpdateChildDomain ¶

type UpdateChildDomain struct {
	// Value for the sender domain that will replace the existing domain
	Domain string `json:"domain,omitempty"`
}

type UpdateContact ¶

type UpdateContact struct {
	// Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	// Pass your own Id to update ext_id of a contact.
	ExtId string `json:"ext_id,omitempty"`
	// Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
	EmailBlacklisted bool `json:"emailBlacklisted"`
	// Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)
	SmsBlacklisted bool `json:"smsBlacklisted"`
	// Ids of the lists to add the contact to
	ListIds []int64 `json:"listIds,omitempty"`
	// Ids of the lists to remove the contact from
	UnlinkListIds []int64 `json:"unlinkListIds,omitempty"`
	// transactional email forbidden sender for contact. Use only for email Contact
	SmtpBlacklistSender []string `json:"smtpBlacklistSender,omitempty"`
}

type UpdateEmailCampaign ¶

type UpdateEmailCampaign struct {
	// Tag of the campaign
	Tag    string                     `json:"tag,omitempty"`
	Sender *UpdateEmailCampaignSender `json:"sender,omitempty"`
	// Name of the campaign
	Name string `json:"name,omitempty"`
	// Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty
	HtmlContent string `json:"htmlContent,omitempty"`
	// Url which contents the body of the email message. REQUIRED if htmlContent is empty
	HtmlUrl string `json:"htmlUrl,omitempty"`
	// UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Subject of the campaign
	Subject string `json:"subject,omitempty"`
	// Email on which campaign recipients will be able to reply to
	ReplyTo string `json:"replyTo,omitempty"`
	// 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
	ToField    string                         `json:"toField,omitempty"`
	Recipients *UpdateEmailCampaignRecipients `json:"recipients,omitempty"`
	// 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
	AttachmentUrl string `json:"attachmentUrl,omitempty"`
	// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts.
	InlineImageActivation bool `json:"inlineImageActivation,omitempty"`
	// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign
	MirrorActive bool `json:"mirrorActive,omitempty"`
	// FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
	Recurring bool `json:"recurring,omitempty"`
	// Footer of the email campaign
	Footer string `json:"footer,omitempty"`
	// Header of the email campaign
	Header string `json:"header,omitempty"`
	// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
	UtmCampaign string `json:"utmCampaign,omitempty"`
	// Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
	Params map[string]interface{} `json:"params,omitempty"`
	// Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled.
	SendAtBestTime bool `json:"sendAtBestTime,omitempty"`
	// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored.  Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B
	AbTesting bool `json:"abTesting,omitempty"`
	// Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value
	SubjectA string `json:"subjectA,omitempty"`
	// Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value
	SubjectB string `json:"subjectB,omitempty"`
	// Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else
	SplitRule int64 `json:"splitRule,omitempty"`
	// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record
	WinnerCriteria string `json:"winnerCriteria,omitempty"`
	// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record
	WinnerDelay int64 `json:"winnerDelay,omitempty"`
	// Available for dedicated ip clients. Set this to true if you wish to warm up your ip.
	IpWarmupEnable bool `json:"ipWarmupEnable,omitempty"`
	// Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.
	InitialQuota int64 `json:"initialQuota,omitempty"`
	// Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
	IncreaseRate int64 `json:"increaseRate,omitempty"`
	// Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.
	UnsubscriptionPageId string `json:"unsubscriptionPageId,omitempty"`
	// Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.
	UpdateFormId string `json:"updateFormId,omitempty"`
}

type UpdateEmailCampaignRecipients ¶

type UpdateEmailCampaignRecipients struct {
	// List ids which have to be excluded from a campaign
	ExclusionListIds []int64 `json:"exclusionListIds,omitempty"`
	// Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty
	ListIds []int64 `json:"listIds,omitempty"`
	// Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to.
	SegmentIds []int64 `json:"segmentIds,omitempty"`
}

Segment ids and List ids to include/exclude from campaign

type UpdateEmailCampaignSender ¶

type UpdateEmailCampaignSender struct {
	// Sender Name from which the campaign emails are sent
	Name string `json:"name,omitempty"`
	// Sender email from which the campaign emails are sent
	Email string `json:"email,omitempty"`
	// Select the sender for the campaign 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).
	Id int64 `json:"id,omitempty"`
}

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}`

type UpdateExternalFeed ¶

type UpdateExternalFeed struct {
	// Name of the feed
	Name string `json:"name,omitempty"`
	// URL of the feed
	Url string `json:"url,omitempty"`
	// Auth type of the feed:   * `basic`   * `token`   * `noAuth`
	AuthType string `json:"authType,omitempty"`
	// Username for authType `basic`
	Username string `json:"username,omitempty"`
	// Password for authType `basic`
	Password string `json:"password,omitempty"`
	// Token for authType `token`
	Token string `json:"token,omitempty"`
	// Custom headers for the feed
	Headers []GetExternalFeedByUuidHeaders `json:"headers,omitempty"`
	// Maximum number of retries on the feed url
	MaxRetries int32 `json:"maxRetries,omitempty"`
	// Toggle caching of feed url response
	Cache bool `json:"cache,omitempty"`
}

type UpdateList ¶

type UpdateList struct {
	// Name of the list. Either of the two parameters (name, folderId) can be updated at a time.
	Name string `json:"name,omitempty"`
	// Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.
	FolderId int64 `json:"folderId,omitempty"`
}

type UpdateSender ¶

type UpdateSender struct {
	// From Name to update the sender
	Name string `json:"name,omitempty"`
	// From Email to update the sender
	Email string `json:"email,omitempty"`
	// Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs.
	Ips []CreateSenderIps `json:"ips,omitempty"`
}

type UpdateSenderOpts ¶

type UpdateSenderOpts struct {
	Sender optional.Interface
}

type UpdateSmsCampaign ¶

type UpdateSmsCampaign struct {
	// Name of the campaign
	Name string `json:"name,omitempty"`
	// Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**
	Sender string `json:"sender,omitempty"`
	// Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS
	Content    string                       `json:"content,omitempty"`
	Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"`
	// UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
	ScheduledAt string `json:"scheduledAt,omitempty"`
	// Format of the message. It indicates whether the content should be treated as unicode or not.
	UnicodeEnabled bool `json:"unicodeEnabled,omitempty"`
	// A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**
	OrganisationPrefix string `json:"organisationPrefix,omitempty"`
	// Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**
	UnsubscribeInstruction string `json:"unsubscribeInstruction,omitempty"`
}

type UpdateSmtpTemplate ¶

type UpdateSmtpTemplate struct {
	// Tag of the template
	Tag    string                    `json:"tag,omitempty"`
	Sender *UpdateSmtpTemplateSender `json:"sender,omitempty"`
	// Name of the template
	TemplateName string `json:"templateName,omitempty"`
	// 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)
	HtmlContent string `json:"htmlContent,omitempty"`
	// Required if htmlContent is empty. URL to the body of the email (HTML)
	HtmlUrl string `json:"htmlUrl,omitempty"`
	// Subject of the email
	Subject string `json:"subject,omitempty"`
	// Email on which campaign recipients will be able to reply to
	ReplyTo string `json:"replyTo,omitempty"`
	// 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
	ToField string `json:"toField,omitempty"`
	// 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
	AttachmentUrl string `json:"attachmentUrl,omitempty"`
	// Status of the template. isActive = false means template is inactive, isActive = true means template is active
	IsActive bool `json:"isActive,omitempty"`
}

type UpdateSmtpTemplateSender ¶

type UpdateSmtpTemplateSender struct {
	// Name of the sender
	Name string `json:"name,omitempty"`
	// Email of the sender
	Email string `json:"email,omitempty"`
	// 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).
	Id int64 `json:"id,omitempty"`
}

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}`

type UpdateWebhook ¶

type UpdateWebhook struct {
	// URL of the webhook
	Url string `json:"url,omitempty"`
	// Description of the webhook
	Description string `json:"description,omitempty"`
	// - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
	Events []string `json:"events,omitempty"`
	// Inbound domain of webhook, used in case of event type `inbound`
	Domain string `json:"domain,omitempty"`
}

type UploadImageModel ¶

type UploadImageModel struct {
	// URL of the image uploaded
	Url string `json:"url"`
}

type UploadImageToGallery ¶

type UploadImageToGallery struct {
	// 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.
	ImageUrl string `json:"imageUrl"`
	// Name of the image.
	Name string `json:"name,omitempty"`
}

type ValidateSenderByOTPOpts ¶

type ValidateSenderByOTPOpts struct {
	Otp optional.Interface
}

type VariablesItems ¶

type VariablesItems struct {
	Name     string `json:"name,omitempty"`
	Default_ string `json:"default,omitempty"`
	Datatype string `json:"datatype,omitempty"`
}

type WebhooksApiService ¶

type WebhooksApiService service

func (*WebhooksApiService) CreateWebhook ¶

func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook CreateWebhook) (CreateModel, *http.Response, error)

WebhooksApiService Create a webhook

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createWebhook Values to create a webhook

@return CreateModel

func (*WebhooksApiService) DeleteWebhook ¶

func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) (*http.Response, error)

WebhooksApiService Delete a webhook

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param webhookId Id of the webhook

func (*WebhooksApiService) ExportWebhooksHistory ¶

func (a *WebhooksApiService) ExportWebhooksHistory(ctx context.Context, exportWebhookHistory ExportWebhooksHistory) (CreatedProcessId, *http.Response, error)

WebhooksApiService Export all transactional events This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download that CSV file will send to the webhook link provided in notifyURL of the body payload.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param exportWebhookHistory Values to submit for webhooks history

@return CreatedProcessId

func (*WebhooksApiService) GetWebhook ¶

func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (GetWebhook, *http.Response, error)

WebhooksApiService Get a webhook details

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param webhookId Id of the webhook

@return GetWebhook

func (*WebhooksApiService) GetWebhooks ¶

func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *GetWebhooksOpts) (GetWebhooks, *http.Response, error)

func (*WebhooksApiService) UpdateWebhook ¶

func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, updateWebhook UpdateWebhook) (*http.Response, error)

WebhooksApiService Update a webhook

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param webhookId Id of the webhook
  • @param updateWebhook Values to update a webhook

type WhatsAppCampaignsApiService ¶

type WhatsAppCampaignsApiService service

func (*WhatsAppCampaignsApiService) CreateWhatsAppCampaign ¶

func (a *WhatsAppCampaignsApiService) CreateWhatsAppCampaign(ctx context.Context, whatsAppCampaigns CreateWhatsAppCampaign) (CreateModel, *http.Response, error)

WhatsAppCampaignsApiService Create and Send a WhatsApp campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param whatsAppCampaigns Values to create a campaign

@return CreateModel

func (*WhatsAppCampaignsApiService) CreateWhatsAppTemplate ¶

func (a *WhatsAppCampaignsApiService) CreateWhatsAppTemplate(ctx context.Context, whatsAppTemplates CreateWhatsAppTemplate) (CreateModel, *http.Response, error)

WhatsAppCampaignsApiService Create a WhatsApp template

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param whatsAppTemplates Values to create a template

@return CreateModel

func (*WhatsAppCampaignsApiService) DeleteWhatsAppCampaign ¶

func (a *WhatsAppCampaignsApiService) DeleteWhatsAppCampaign(ctx context.Context, campaignId int64) (*http.Response, error)

WhatsAppCampaignsApiService Delete a WhatsApp campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId id of the campaign

func (*WhatsAppCampaignsApiService) GetWhatsAppCampaign ¶

func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaign(ctx context.Context, campaignId int64) (GetWhatsappCampaignOverview, *http.Response, error)

WhatsAppCampaignsApiService Get a WhatsApp campaign

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param campaignId Id of the campaign

@return GetWhatsappCampaignOverview

func (*WhatsAppCampaignsApiService) GetWhatsAppCampaigns ¶

func (a *WhatsAppCampaignsApiService) GetWhatsAppCampaigns(ctx context.Context, localVarOptionals *GetWhatsAppCampaignsOpts) (GetWhatsappCampaigns, *http.Response, error)

func (*WhatsAppCampaignsApiService) GetWhatsAppConfig ¶

WhatsAppCampaignsApiService Get your WhatsApp API account information

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetWhatsAppConfig

func (*WhatsAppCampaignsApiService) GetWhatsAppTemplates ¶

func (a *WhatsAppCampaignsApiService) GetWhatsAppTemplates(ctx context.Context, localVarOptionals *GetWhatsAppTemplatesOpts) (GetWaTemplates, *http.Response, error)

type WhatsappCampStats ¶

type WhatsappCampStats struct {
	Sent        int32 `json:"sent"`
	Delivered   int32 `json:"delivered"`
	Read        int32 `json:"read"`
	Unsubscribe int32 `json:"unsubscribe"`
	NotSent     int32 `json:"not_sent"`
}

type WhatsappCampTemplate ¶

type WhatsappCampTemplate struct {
	// name of the template
	Name string `json:"name,omitempty"`
	// description of the template
	Category string `json:"category,omitempty"`
	// language of the template
	Language       string `json:"language,omitempty"`
	ContainsButton bool   `json:"contains_button,omitempty"`
	DisplayHeader  bool   `json:"display_header,omitempty"`
	// type of header
	HeaderType string `json:"header_type,omitempty"`
	// array of component item objects
	Components []ComponentItems `json:"components,omitempty"`
	// array of variables item object
	HeaderVariables []VariablesItems `json:"header_variables,omitempty"`
	// array of variables item variables
	BodyVariables []VariablesItems `json:"body_variables,omitempty"`
	ButtonType    string           `json:"button_type,omitempty"`
	HideFooter    bool             `json:"hide_footer,omitempty"`
}

Source Files ¶

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL