diff --git a/sdks/db/cached-method-objects/from-custom-request_brevo.com.yaml b/sdks/db/cached-method-objects/from-custom-request_brevo.com.yaml new file mode 100644 index 0000000000..f470497f62 --- /dev/null +++ b/sdks/db/cached-method-objects/from-custom-request_brevo.com.yaml @@ -0,0 +1,6538 @@ +hash: e1e6202ffb143629fca076b7a94dd660b209b65d7d361fe8a18ec457f454c98a +methodObjects: + - url: /emailCampaigns + method: getAll + httpMethod: get + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Return all your created email campaigns + parameters: + - name: type + schema: string + description: Filter on the type of the campaigns + - name: status + schema: string + description: Filter on the status of the campaign + - name: statistics + schema: string + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + - name: startDate + schema: string + description: > + **Mandatory if endDate is used**. Starting + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if passed + is set to 'sent' ) + - name: endDate + schema: string + description: > + **Mandatory if startDate is used**. Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if passed + is set to 'sent' ) + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: excludeHtmlContent + schema: boolean + description: >- + Use this flag to exclude htmlContent from the response body. If set to + **true**, htmlContent field will be returned as empty string in the + response body + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /emailCampaigns + method: createCampaign + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Create an email campaign + parameters: + - name: tag + schema: string + required: false + description: '' + example: Newsletter + - name: sender + schema: object + required: true + description: '' + - name: name + schema: string + required: true + description: '' + example: Newsletter - May 2017 + - name: htmlContent + schema: string + required: false + description: '' + example: >- +
Please + confirm your email address by clicking on the link below
+ + - name: htmlUrl + schema: string + required: false + description: '' + example: https://html.domain.com + - name: templateId + schema: integer + required: false + description: '' + - name: scheduledAt + schema: string + required: false + description: '' + example: '2017-06-01T10:30:00.000Z' + - name: subject + schema: string + required: false + description: '' + example: Discover the New Collection ! + - name: previewText + schema: string + required: false + description: '' + example: Thanks for your order! + - name: replyTo + schema: string + required: false + description: '' + example: support@myshop.com + - name: toField + schema: string + required: false + description: '' + example: '{FNAME} {LNAME}' + - name: recipients + schema: object + required: false + description: '' + - name: attachmentUrl + schema: string + required: false + description: '' + example: https://attachment.domain.com + - name: inlineImageActivation + schema: boolean + required: false + description: '' + example: true + default: false + - name: mirrorActive + schema: boolean + required: false + description: '' + example: true + - name: footer + schema: string + required: false + description: '' + example: '[DEFAULT_FOOTER]' + - name: header + schema: string + required: false + description: '' + example: '[DEFAULT_HEADER]' + - name: utmCampaign + schema: string + required: false + description: '' + example: NL_05_2017 + - name: params + schema: object + required: false + description: '' + example: + FNAME: Joe + LNAME: Doe + - name: sendAtBestTime + schema: boolean + required: false + description: '' + example: true + default: false + - name: abTesting + schema: boolean + required: false + description: '' + example: true + default: false + - name: subjectA + schema: string + required: false + description: '' + example: Discover the New Collection! + - name: subjectB + schema: string + required: false + description: '' + example: Want to discover the New Collection? + - name: splitRule + schema: integer + required: false + description: '' + example: 50 + - name: winnerCriteria + schema: string + required: false + description: '' + example: open + - name: winnerDelay + schema: integer + required: false + description: '' + example: 50 + - name: ipWarmupEnable + schema: boolean + required: false + description: '' + example: true + default: false + - name: initialQuota + schema: integer + required: false + description: '' + example: 3000 + - name: increaseRate + schema: integer + required: false + description: '' + example: 70 + - name: unsubscriptionPageId + schema: string + required: false + description: '' + example: 62cbb7fabbe85021021aac52 + - name: updateFormId + schema: string + required: false + description: '' + example: 6313436b9ad40e23b371d095 + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /emailCampaigns/{campaignId} + method: removeCampaign + httpMethod: delete + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Delete an email campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId} + method: getReport + httpMethod: get + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Get an email campaign report + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: statistics + schema: string + required: false + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId} + method: updateCampaign + httpMethod: put + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Update an email campaign + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: tag + schema: string + description: '' + example: Newsletter + - name: sender + schema: object + description: '' + - name: name + schema: string + description: '' + example: Newsletter - May 2017 + - name: htmlContent + schema: string + description: '' + example: >- +Please + confirm your email address by clicking on the link below
+ + - name: htmlUrl + schema: string + description: '' + example: https://html.domain.com + - name: scheduledAt + schema: string + description: '' + example: '2017-06-01T10:30:00.000Z' + - name: subject + schema: string + description: '' + example: Discover the New Collection ! + - name: previewText + schema: string + description: '' + example: Thanks for your order! + - name: replyTo + schema: string + description: '' + example: support@myshop.com + - name: toField + schema: string + description: '' + example: '{FNAME} {LNAME}' + - name: recipients + schema: object + description: '' + - name: attachmentUrl + schema: string + description: '' + example: https://attachment.domain.com + - name: inlineImageActivation + schema: boolean + description: '' + example: true + default: false + - name: mirrorActive + schema: boolean + description: '' + example: true + - name: recurring + schema: boolean + description: '' + example: false + default: false + - name: footer + schema: string + description: '' + example: '[DEFAULT_FOOTER]' + - name: header + schema: string + description: '' + example: '[DEFAULT_HEADER]' + - name: utmCampaign + schema: string + description: '' + example: NL_05_2017 + - name: params + schema: object + description: '' + example: + FNAME: Joe + LNAME: Doe + - name: sendAtBestTime + schema: boolean + description: '' + example: true + - name: abTesting + schema: boolean + description: '' + example: true + default: false + - name: subjectA + schema: string + description: '' + example: Discover the New Collection! + - name: subjectB + schema: string + description: '' + example: Want to discover the New Collection? + - name: splitRule + schema: integer + description: '' + example: 50 + - name: winnerCriteria + schema: string + description: '' + example: open + - name: winnerDelay + schema: integer + description: '' + example: 50 + - name: ipWarmupEnable + schema: boolean + description: '' + example: true + default: false + - name: initialQuota + schema: integer + description: '' + example: 3000 + - name: increaseRate + schema: integer + description: '' + example: 70 + - name: unsubscriptionPageId + schema: string + description: '' + example: 62cbb7fabbe85021021aac52 + - name: updateFormId + schema: string + description: '' + example: 6313436b9ad40e23b371d095 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/sendNow + method: sendImmediate + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Send an email campaign immediately, based on campaignId + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '402' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/sendTest + method: sendTestToTestList + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Send an email campaign to your test list + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: emailTo + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/status + method: updateStatus + httpMethod: put + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Update an email campaign status + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: status + schema: string + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/sendReport + method: sendReport + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Send the report of a campaign + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: language + schema: string + required: false + description: '' + example: en + default: fr + - name: email + schema: object + required: true + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/abTestCampaignResult + method: getAbTestResult + httpMethod: get + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Get an A/B test email campaign results + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the A/B test campaign + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/{campaignId}/sharedUrl + method: getSharedUrl + httpMethod: get + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Get a shared template url + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign or template + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - statusCode: '405' + description: '' + - url: /emailCampaigns/{campaignId}/exportRecipients + method: exportRecipientsPost + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Export the recipients of an email campaign + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + - name: notifyURL + schema: string + required: false + description: '' + example: http://requestb.in/173lyyx1 + - name: recipientsType + schema: string + required: true + description: '' + example: openers + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /emailCampaigns/images + method: uploadImageToGallery + httpMethod: post + tag: Email Campaigns + typeScriptTag: emailCampaigns + description: Upload an image to your account's image gallery + parameters: + - name: imageUrl + schema: string + required: true + description: '' + example: https://somedomain.com/image1.jpg + - name: name + schema: string + required: false + description: '' + example: nature.jpg + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/email + method: sendTransactionalEmail + httpMethod: post + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Send a transactional email + parameters: + - name: tags + schema: array + description: '' + - name: sender + schema: object + description: '' + - name: to + schema: array + description: '' + - name: bcc + schema: array + description: '' + - name: cc + schema: array + description: '' + - name: htmlContent + schema: string + description: '' + example: >- +Please + confirm your email address by clicking on the link below
+ + - name: textContent + schema: string + description: '' + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + - name: subject + schema: string + description: '' + example: Login Email confirmation + - name: replyTo + schema: object + description: '' + - name: attachment + schema: array + description: '' + - name: headers + schema: object + description: '' + example: + sender.ip: 1.2.3.4 + X-Mailin-custom: some_custom_header + idempotencyKey: abc-123 + - name: templateId + schema: integer + description: '' + example: 2 + - name: params + schema: object + description: '' + example: + FNAME: Joe + LNAME: Doe + - name: messageVersions + schema: array + description: '' + - name: scheduledAt + schema: string + description: '' + example: '2022-04-05T12:30:00+02:00' + - name: batchId + schema: string + description: '' + example: 5c6cfa04-eed9-42c2-8b5c-6d470d978e9d + responses: + - statusCode: '201' + description: '' + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/emails + method: getList + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get the list of transactional emails on the basis of allowed filters + parameters: + - name: email + schema: string + description: > + **Mandatory if templateId and messageId are not passed in query + filters.** Email address to which transactional email has been sent. + - name: templateId + schema: integer + description: > + **Mandatory if email and messageId are not passed in query filters.** + Id of the template that was used to compose transactional email. + - name: messageId + schema: string + description: > + **Mandatory if templateId and email are not passed in query filters.** + Message ID of the transactional email sent. + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ from which you want to fetch the list. + **Maximum time period that can be selected is one month**. + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ till which you want to fetch the list. + **Maximum time period that can be selected is one month.** + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: limit + schema: integer + description: Number of documents returned per page + default: 500 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/emails/{uuid} + method: getContentByUuid + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get the personalized content of a sent transactional email + parameters: + - name: uuid + schema: string + required: true + description: >- + Unique id of the transactional email that has been sent to a + particular contact + example: UUID + responses: + - statusCode: '200' + description: '' + - url: /smtp/log/{identifier} + method: deleteLog + httpMethod: delete + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Delete an SMTP transactional log + parameters: + - name: identifier + schema: string + required: true + description: >- + MessageId or Email of the transactional + log(https://developers.brevo.com/ to delete + example: IDENTIFIER + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/templates + method: listTemplates + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get the list of email templates + parameters: + - name: templateStatus + schema: boolean + description: Filter on the status of the template. Active = true, inactive = false + - name: limit + schema: integer + description: Number of documents returned per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/templates + method: createTemplate + httpMethod: post + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Create an email template + parameters: + - name: tag + schema: string + required: false + description: '' + example: OrderConfirmation + - name: sender + schema: object + required: true + description: '' + - name: templateName + schema: string + required: true + description: '' + example: Order Confirmation - EN + - name: htmlContent + schema: string + required: false + description: '' + example: The order n°xxxxx has been confirmed. Thanks for your purchase + - name: htmlUrl + schema: string + required: false + description: '' + example: https://html.domain.com + - name: subject + schema: string + required: true + description: '' + example: Thanks for your purchase ! + - name: replyTo + schema: string + required: false + description: '' + example: support@myshop.com + - name: toField + schema: string + required: false + description: '' + example: '{FNAME} {LNAME}' + - name: attachmentUrl + schema: string + required: false + description: '' + example: https://attachment.domain.com + - name: isActive + schema: boolean + required: false + description: '' + example: true + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/templates/{templateId} + method: deleteTemplateById + httpMethod: delete + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Delete an inactive email template + parameters: + - name: templateId + schema: integer + required: true + description: id of the template + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/templates/{templateId} + method: getTemplateInfo + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Returns the template information + parameters: + - name: templateId + schema: integer + required: true + description: id of the template + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/templates/{templateId} + method: updateTemplate + httpMethod: put + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Update an email template + parameters: + - name: templateId + schema: integer + required: true + description: id of the template + example: 0 + - name: tag + schema: string + description: '' + example: OrderConfirmation + - name: sender + schema: object + description: '' + - name: templateName + schema: string + description: '' + example: Order Confirmation - EN + - name: htmlContent + schema: string + description: '' + example: The order n°xxxxx has been confirmed. Thanks for your purchase + - name: htmlUrl + schema: string + description: '' + example: https://html.domain.com + - name: subject + schema: string + description: '' + example: Thanks for your purchase ! + - name: replyTo + schema: string + description: '' + example: support@myshop.com + - name: toField + schema: string + description: '' + example: '{FNAME} {LNAME}' + - name: attachmentUrl + schema: string + description: '' + example: https://attachment.domain.com + - name: isActive + schema: boolean + description: '' + example: true + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/templates/{templateId}/sendTest + method: sendTestTemplate + httpMethod: post + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Send a template to your test list + parameters: + - name: templateId + schema: integer + required: true + description: Id of the template + example: 0 + - name: emailTo + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/statistics/aggregatedReport + method: getAggregatedReport + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get your transactional email activity aggregated over a period of time + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date of the report + (https://developers.brevo.com/. Must be lower than equal to endDate + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date of the report + (https://developers.brevo.com/. Must be greater than equal to + startDate + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + - name: tag + schema: string + description: Tag of the emails + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/statistics/reports + method: getActivityPerDay + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get your transactional email activity aggregated per day + parameters: + - name: limit + schema: integer + description: Number of documents returned per page + default: 10 + - name: offset + schema: integer + description: Index of the first document on the page + default: 0 + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date of the report + (https://developers.brevo.com/ + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date of the report + (https://developers.brevo.com/ + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + - name: tag + schema: string + description: Tag of the emails + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/statistics/events + method: getAllActivity + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get all your transactional email activity (unaggregated events) + parameters: + - name: limit + schema: integer + description: Number limitation for the result returned + default: 2500 + - name: offset + schema: integer + description: Beginning point in the list to retrieve from. + default: 0 + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date of the report + (https://developers.brevo.com/. Must be lower than equal to endDate + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date of the report + (https://developers.brevo.com/. Must be greater than equal to + startDate + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + - name: email + schema: string + description: Filter the report for a specific email addresses + - name: event + schema: string + description: Filter the report for a specific event type + - name: tags + schema: string + description: Filter the report for tags (serialized and urlencoded array) + - name: messageId + schema: string + description: Filter on a specific message id + - name: templateId + schema: integer + description: Filter on a specific template id + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/blockedContacts/{email} + method: unblockContact + httpMethod: delete + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Unblock or resubscribe a transactional contact + parameters: + - name: email + schema: string + required: true + description: contact email (https://developers.brevo.com/ to unblock. + example: EMAIL + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/blockedContacts + method: listBlockedContacts + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get the list of blocked or unsubscribed transactional contacts + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ from which you want to fetch the + blocked or unsubscribed contacts + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ till which you want to fetch the + blocked or unsubscribed contacts + - name: limit + schema: integer + description: Number of documents returned per page + default: 50 + - name: offset + schema: integer + description: Index of the first document on the page + default: 0 + - name: senders + schema: array + description: >- + Comma separated list of emails of the senders from which contacts are + blocked or unsubscribed + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smtp/blockedDomains + method: getBlockedDomains + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Get the list of blocked domains + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /smtp/blockedDomains + method: addBlockedDomain + httpMethod: post + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Add a new domain to the list of blocked domains + parameters: + - name: domain + schema: string + required: true + description: '' + example: example.com + responses: + - statusCode: '400' + description: '' + - url: /smtp/blockedDomains/{domain} + method: unblockDomain + httpMethod: delete + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Unblock an existing domain from the list of blocked domains + parameters: + - name: domain + schema: string + required: true + description: The name of the domain to be deleted + example: DOMAIN + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/deleteHardbounces + method: removeHardbounces + httpMethod: post + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Delete hardbounces + parameters: + - name: startDate + schema: string + description: '' + example: '2016-12-31T00:00:00.000Z' + - name: endDate + schema: string + description: '' + example: '2017-01-31T00:00:00.000Z' + - name: contactEmail + schema: string + description: '' + example: alex76@example.com + responses: + - statusCode: '400' + description: '' + - url: /smtp/emailStatus/{identifier} + method: getEmailStatusById + httpMethod: get + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Fetch scheduled emails by batchId or messageId + parameters: + - name: identifier + schema: string + required: true + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or + the `messageId` of scheduled email. + example: IDENTIFIER + - name: startDate + schema: string + required: false + description: >- + Mandatory if `endDate` is used. Starting date + (https://developers.brevo.com/ from which you want to fetch the list. + Can be maximum 30 days older tha current date. + example: '2022-02-02' + - name: endDate + schema: string + required: false + description: >- + Mandatory if `startDate` is used. Ending date + (https://developers.brevo.com/ till which you want to fetch the list. + Maximum time period that can be selected is one month. + example: '2022-03-02' + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed. Not valid + when identifier is `messageId`. + default: desc + - name: status + schema: string + required: false + description: >- + Filter the records by `status` of the scheduled email batch or + message. Not valid when identifier is `messageId`. + - name: limit + schema: integer + required: false + description: >- + Number of documents returned per page. Not valid when identifier is + `messageId`. + example: 100 + default: 100 + - name: offset + schema: integer + required: false + description: >- + Index of the first document on the page. Not valid when identifier is + `messageId`. + example: 0 + default: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smtp/email/{identifier} + method: deleteScheduledEmails + httpMethod: delete + tag: Transactional emails + typeScriptTag: transactionalEmails + description: Delete scheduled emails by batchId or messageId + parameters: + - name: identifier + schema: string + required: true + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or + the `messageId` of scheduled email. + example: IDENTIFIER + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts + method: getAllContacts + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get all the contacts + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: modifiedSince + schema: string + description: > + Filter (https://developers.brevo.com/ the contacts modified after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: createdSince + schema: string + description: > + Filter (https://developers.brevo.com/ the contacts created after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: segmentId + schema: integer + description: Id of the segment. **Either listIds or segmentId can be passed.** + - name: listIds + schema: array + description: Ids of the list. **Either listIds or segmentId can be passed.** + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /contacts + method: createNewContact + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Create a contact + parameters: + - name: email + schema: string + description: '' + example: elly@example.com + - name: ext_id + schema: string + description: '' + example: externalId + - name: attributes + schema: object + description: '' + example: + FNAME: Elly + LNAME: Roger + - name: emailBlacklisted + schema: boolean + description: '' + example: false + - name: smsBlacklisted + schema: boolean + description: '' + example: false + - name: listIds + schema: array + description: '' + - name: updateEnabled + schema: boolean + description: '' + example: false + default: false + - name: smtpBlacklistSender + schema: array + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/doubleOptinConfirmation + method: createDoubleOptInContact + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Create Contact via DOI (https://developers.brevo.com/ Flow + parameters: + - name: email + schema: string + required: true + description: '' + example: elly@example.com + - name: attributes + schema: object + required: false + description: '' + example: + FNAME: Elly + LNAME: Roger + - name: includeListIds + schema: array + required: true + description: '' + - name: excludeListIds + schema: array + required: false + description: '' + - name: templateId + schema: integer + required: true + description: '' + example: 2 + - name: redirectionUrl + schema: string + required: true + description: '' + example: http://requestb.in/173lyyx1 + responses: + - statusCode: '400' + description: '' + - url: /contacts/{identifier} + method: deleteContact + httpMethod: delete + tag: Contacts + typeScriptTag: contacts + description: Delete a contact + parameters: + - name: identifier + schema: undefined + required: true + description: Email (https://developers.brevo.com/ OR ID of the contact + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - statusCode: '405' + description: '' + - url: /contacts/{identifier} + method: getDetails + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get a contact's details + parameters: + - name: identifier + schema: undefined + required: true + description: >- + Email (https://developers.brevo.com/ OR ID of the contact OR its SMS + attribute value + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ of the statistic events specific to + campaigns. Must be lower than equal to endDate + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ of the statistic events specific to + campaigns. Must be greater than equal to startDate. + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/{identifier} + method: updateContactById + httpMethod: put + tag: Contacts + typeScriptTag: contacts + description: Update a contact + parameters: + - name: identifier + schema: undefined + required: true + description: Email (https://developers.brevo.com/ OR ID of the contact + - name: attributes + schema: object + description: '' + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + - name: ext_id + schema: string + description: '' + example: updateExternalId + - name: emailBlacklisted + schema: boolean + description: '' + example: false + - name: smsBlacklisted + schema: boolean + description: '' + example: true + - name: listIds + schema: array + description: '' + - name: unlinkListIds + schema: array + description: '' + - name: smtpBlacklistSender + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/batch + method: updateMultiple + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Update multiple contacts + parameters: + - name: contacts + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - url: /contacts/{identifier}/campaignStats + method: getEmailCampaignStats + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get email campaigns' statistics for a contact + parameters: + - name: identifier + schema: undefined + required: true + description: Email (https://developers.brevo.com/ OR ID of the contact + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ of the statistic events specific to + campaigns. Must be lower than equal to endDate + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ of the statistic events specific to + campaigns. Must be greater than equal to startDate. Maximum difference + between startDate and endDate should not be greater than 90 days + responses: + - statusCode: '200' + description: Campaign Statistics for the contact + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/attributes + method: listAttributes + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: List all attributes + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /contacts/attributes/{attributeCategory}/{attributeName} + method: removeAttribute + httpMethod: delete + tag: Contacts + typeScriptTag: contacts + description: Delete an attribute + parameters: + - name: attributeCategory + schema: string + required: true + description: Category of the attribute + example: ATTRIBUTECATEGORY + - name: attributeName + schema: string + required: true + description: Name of the existing attribute + example: ATTRIBUTENAME + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/attributes/{attributeCategory}/{attributeName} + method: createAttribute + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Create contact attribute + parameters: + - name: attributeCategory + schema: string + required: true + description: Category of the attribute + example: ATTRIBUTECATEGORY + - name: attributeName + schema: string + required: true + description: Name of the attribute + example: ATTRIBUTENAME + - name: value + schema: string + description: '' + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + - name: isRecurring + schema: boolean + description: '' + example: true + - name: enumeration + schema: array + description: '' + - name: type + schema: string + description: '' + example: text + responses: + - statusCode: '400' + description: '' + - url: /contacts/attributes/{attributeCategory}/{attributeName} + method: updateAttribute + httpMethod: put + tag: Contacts + typeScriptTag: contacts + description: Update contact attribute + parameters: + - name: attributeCategory + schema: string + required: true + description: Category of the attribute + example: ATTRIBUTECATEGORY + - name: attributeName + schema: string + required: true + description: Name of the existing attribute + example: ATTRIBUTENAME + - name: value + schema: string + description: '' + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + - name: enumeration + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/folders + method: getAllFolders + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get all folders + parameters: + - name: limit + schema: integer + required: true + description: Number of documents per page + example: 0 + default: 10 + - name: offset + schema: integer + required: true + description: Index of the first document of the page + example: 0 + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/folders + method: createFolder + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Create a folder + parameters: + - name: name + schema: string + description: '' + example: Wordpress Contacts + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/folders/{folderId} + method: deleteFolder + httpMethod: delete + tag: Contacts + typeScriptTag: contacts + description: Delete a folder (and all its lists) + parameters: + - name: folderId + schema: integer + required: true + description: Id of the folder + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/folders/{folderId} + method: getFolderDetails + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Returns a folder's details + parameters: + - name: folderId + schema: integer + required: true + description: id of the folder + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/folders/{folderId} + method: updateFolder + httpMethod: put + tag: Contacts + typeScriptTag: contacts + description: Update a folder + parameters: + - name: folderId + schema: integer + required: true + description: Id of the folder + example: 0 + - name: name + schema: string + description: '' + example: Wordpress Contacts + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/folders/{folderId}/lists + method: getFolderLists + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get lists in a folder + parameters: + - name: folderId + schema: integer + required: true + description: Id of the folder + example: 0 + - name: limit + schema: integer + description: Number of documents per page + default: 10 + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/lists + method: getAllLists + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get all the lists + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 10 + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/lists + method: createList + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Create a list + parameters: + - name: name + schema: string + required: true + description: '' + example: Magento Customer - ES + - name: folderId + schema: integer + required: true + description: '' + example: 2 + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/lists/{listId} + method: deleteList + httpMethod: delete + tag: Contacts + typeScriptTag: contacts + description: Delete a list + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/lists/{listId} + method: getListDetails + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get a list's details + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + - name: startDate + schema: string + description: > + **Mandatory if endDate is used**. Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a + specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + - name: endDate + schema: string + description: > + **Mandatory if startDate is used**. Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a + specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/lists/{listId} + method: updateList + httpMethod: put + tag: Contacts + typeScriptTag: contacts + description: Update a list + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + - name: name + schema: string + description: '' + example: Magento Customer - ES + - name: folderId + schema: integer + description: '' + example: 2 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/segments + method: getAllSegments + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get all the segments + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 10 + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/lists/{listId}/contacts + method: getListContacts + httpMethod: get + tag: Contacts + typeScriptTag: contacts + description: Get contacts in a list + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + - name: modifiedSince + schema: string + description: > + Filter (https://developers.brevo.com/ the contacts modified after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/lists/{listId}/contacts/add + method: addToList + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Add existing contacts to a list + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/lists/{listId}/contacts/remove + method: removeContactFromList + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Delete a contact from a list + parameters: + - name: listId + schema: integer + required: true + description: Id of the list + example: 0 + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /contacts/export + method: exportProcessId + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Export contacts + parameters: + - name: exportAttributes + schema: array + required: false + description: '' + - name: customContactFilter + schema: object + required: true + description: '' + - name: notifyUrl + schema: string + required: false + description: '' + example: http://requestb.in/173lyyx1 + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - url: /contacts/import + method: importContactsProcess + httpMethod: post + tag: Contacts + typeScriptTag: contacts + description: Import contacts + parameters: + - name: fileUrl + schema: string + description: '' + example: https://importfile.domain.com + - name: fileBody + schema: string + description: '' + example: |- + NAME;SURNAME;EMAIL + Smith;John;john.smith@example.com + Roger;Ellie;ellie36@example.com + - name: jsonBody + schema: array + description: '' + - name: listIds + schema: array + description: '' + - name: notifyUrl + schema: string + description: '' + example: http://requestb.in/173lyyx1 + - name: newList + schema: object + description: '' + - name: emailBlacklist + schema: boolean + description: '' + example: false + default: false + - name: disableNotification + schema: boolean + description: '' + example: false + default: false + - name: smsBlacklist + schema: boolean + description: '' + example: false + default: false + - name: updateExistingContacts + schema: boolean + description: '' + example: true + default: true + - name: emptyContactsAttributes + schema: boolean + description: '' + example: true + default: false + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - url: /smsCampaigns + method: getAllInformation + httpMethod: get + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Returns the information for all your created SMS campaigns + parameters: + - name: status + schema: string + description: Status of campaign. + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer + to pass your timezone in date-time format for accurate result** ( only + available if either 'status' not passed and if passed is set to 'sent' + ) + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer + to pass your timezone in date-time format for accurate result** ( only + available if either 'status' not passed and if passed is set to 'sent' + ) + - name: limit + schema: integer + description: Number limitation for the result returned + default: 500 + - name: offset + schema: integer + description: Beginning point in the list to retrieve from. + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /smsCampaigns + method: createCampaign + httpMethod: post + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Creates an SMS campaign + parameters: + - name: name + schema: string + required: true + description: '' + example: Spring Promo Code + - name: sender + schema: string + required: true + description: '' + example: MyShop + - name: content + schema: string + required: true + description: '' + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + - name: recipients + schema: object + required: false + description: '' + - name: scheduledAt + schema: string + required: false + description: '' + example: '2017-05-05T10:30:00.000Z' + - name: unicodeEnabled + schema: boolean + required: false + description: '' + example: true + default: false + - name: organisationPrefix + schema: string + required: false + description: '' + example: MyCompany + - name: unsubscribeInstruction + schema: string + required: false + description: '' + example: send Stop if you want to unsubscribe. + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /smsCampaigns/{campaignId} + method: removeCampaignById + httpMethod: delete + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Delete an SMS campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the SMS campaign + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId} + method: getCampaignById + httpMethod: get + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Get an SMS campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the SMS campaign + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId} + method: updateCampaignById + httpMethod: put + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Update an SMS campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the SMS campaign + example: 0 + - name: name + schema: string + description: '' + example: Spring Promo Code + - name: sender + schema: string + description: '' + example: MyShop + - name: content + schema: string + description: '' + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + - name: recipients + schema: object + description: '' + - name: scheduledAt + schema: string + description: '' + example: '2017-05-05T10:30:00.000Z' + - name: unicodeEnabled + schema: boolean + description: '' + example: true + default: false + - name: organisationPrefix + schema: string + description: '' + example: MyCompany + - name: unsubscribeInstruction + schema: string + description: '' + example: send Stop if you want to unsubscribe. + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId}/sendNow + method: sendImmediately + httpMethod: post + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Send your SMS campaign immediately + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '402' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId}/status + method: updateStatus + httpMethod: put + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Update a campaign's status + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + - name: status + schema: string + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId}/sendTest + method: sendTestSms + httpMethod: post + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Send a test SMS campaign + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the SMS campaign + example: 0 + - name: phoneNumber + schema: string + description: '' + example: '33689965433' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId}/exportRecipients + method: exportRecipientsProcess + httpMethod: post + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Export an SMS campaign's recipients + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + - name: notifyURL + schema: string + required: false + description: '' + example: http://requestb.in/173lyyx1 + - name: recipientsType + schema: string + required: true + description: '' + example: answered + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /smsCampaigns/{campaignId}/sendReport + method: sendCampaignReport + httpMethod: post + tag: SMS Campaigns + typeScriptTag: smsCampaigns + description: Send an SMS campaign's report + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + - name: language + schema: string + required: false + description: '' + example: en + default: fr + - name: email + schema: object + required: true + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /transactionalSMS/sms + method: sendSmsMessageToMobile + httpMethod: post + tag: Transactional SMS + typeScriptTag: transactionalSms + description: Send SMS message to a mobile number + parameters: + - name: sender + schema: string + required: true + description: '' + example: MyShop + - name: recipient + schema: string + required: true + description: '' + example: '33689965433' + - name: content + schema: string + required: true + description: '' + example: Enter this code:CCJJG8 to validate your account + - name: type + schema: string + required: false + description: '' + example: marketing + default: transactional + - name: tag + schema: string + required: false + description: '' + example: accountValidation + - name: webUrl + schema: string + required: false + description: '' + example: http://requestb.in/173lyyx1 + - name: unicodeEnabled + schema: boolean + required: false + description: '' + example: true + default: false + - name: organisationPrefix + schema: string + required: false + description: '' + example: MyCompany + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - statusCode: '402' + description: '' + - url: /transactionalSMS/statistics/aggregatedReport + method: getAggregatedReport + httpMethod: get + tag: Transactional SMS + typeScriptTag: transactionalSms + description: Get your SMS activity aggregated over a period of time + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ of the report + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ of the report + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). **Not + compatible with startDate and endDate** + - name: tag + schema: string + description: Filter on a tag + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /transactionalSMS/statistics/reports + method: getSmsActivityAggregatedPerDay + httpMethod: get + tag: Transactional SMS + typeScriptTag: transactionalSms + description: Get your SMS activity aggregated per day + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ of the report + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ of the report + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + - name: tag + schema: string + description: Filter on a tag + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /transactionalSMS/statistics/events + method: getAllEvents + httpMethod: get + tag: Transactional SMS + typeScriptTag: transactionalSms + description: Get all your SMS activity (unaggregated events) + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date + (https://developers.brevo.com/ of the report + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date + (https://developers.brevo.com/ of the report + - name: offset + schema: integer + description: Index of the first document of the page + default: 0 + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + - name: phoneNumber + schema: string + description: Filter the report for a specific phone number + - name: event + schema: string + description: Filter the report for specific events + - name: tags + schema: string + description: >- + Filter the report for specific tags passed as a serialized urlencoded + array + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /whatsappCampaigns/{campaignId} + method: deleteCampaign + httpMethod: delete + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Delete a WhatsApp campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /whatsappCampaigns/{campaignId} + method: getCampaignById + httpMethod: get + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Get a WhatsApp campaign + parameters: + - name: campaignId + schema: integer + required: true + description: Id of the campaign + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /whatsappCampaigns/{campaignId} + method: updateCampaignById + httpMethod: put + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Update a WhatsApp campaign + parameters: + - name: campaignId + schema: integer + required: true + description: id of the campaign + example: 0 + - name: campaignName + schema: string + description: '' + example: Test WhatsApp + - name: campaignStatus + schema: string + description: '' + example: scheduled + default: scheduled + - name: rescheduleFor + schema: string + description: '' + example: '2017-06-01T10:30:00.000Z' + - name: recipients + schema: object + description: '' + responses: + - statusCode: '400' + description: '' + - url: /whatsappCampaigns/template-list + method: getTemplates + httpMethod: get + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Return all your created WhatsApp templates + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used**. Starting + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. + + **Prefer to pass your timezone in date-time format for accurate + result** + - name: endDate + schema: string + description: > + **Mandatory if startDate is used**. Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. + + **Prefer to pass your timezone in date-time format for accurate + result** + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not passed + default: desc + - name: source + schema: string + required: false + description: source of the template + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /whatsappCampaigns + method: getAll + httpMethod: get + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Return all your created WhatsApp campaigns + parameters: + - name: startDate + schema: string + description: > + **Mandatory if endDate is used**. Starting + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + - name: endDate + schema: string + description: > + **Mandatory if startDate is used**. Ending + (https://developers.brevo.com/ UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /whatsappCampaigns + method: createAndSend + httpMethod: post + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Create and Send a WhatsApp campaign + parameters: + - name: name + schema: string + required: true + description: '' + example: Test Campaign + - name: templateId + schema: integer + required: true + description: '' + example: 19 + - name: scheduledAt + schema: string + required: true + description: '' + example: '2017-06-01T10:30:00.000Z' + - name: recipients + schema: object + required: true + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /whatsappCampaigns/template + method: createTemplate + httpMethod: post + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Create a WhatsApp template + parameters: + - name: name + schema: string + required: true + description: '' + example: Test template + - name: language + schema: string + required: true + description: '' + example: en + - name: category + schema: string + required: true + description: '' + example: MARKETING + - name: mediaUrl + schema: string + required: false + description: '' + example: https://attachment.domain.com + - name: bodyText + schema: string + required: true + description: '' + example: making it look like readable English + - name: headerText + schema: string + required: false + description: '' + example: Test WhatsApp campaign + - name: source + schema: string + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /whatsappCampaigns/template/approval/{templateId} + method: sendTemplateForApproval + httpMethod: post + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Send your WhatsApp template for approval + parameters: + - name: templateId + schema: integer + required: true + description: id of the template + example: 0 + responses: + - statusCode: '400' + description: '' + - url: /whatsappCampaigns/config + method: getAccountInfo + httpMethod: get + tag: WhatsApp Campaigns + typeScriptTag: whatsAppCampaigns + description: Get your WhatsApp API account information + parameters: [] + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /senders + method: listAll + httpMethod: get + tag: Senders + typeScriptTag: senders + description: Get the list of all your senders + parameters: + - name: ip + schema: string + description: > + Filter your senders for a specific ip. **Available for dedicated IP + usage only** + - name: domain + schema: string + description: Filter your senders for a specific domain + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /senders + method: createNewSender + httpMethod: post + tag: Senders + typeScriptTag: senders + description: Create a new sender + parameters: + - name: name + schema: string + required: true + description: '' + example: Newsletter + - name: email + schema: string + required: true + description: '' + example: newsletter@mycompany.com + - name: ips + schema: array + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /senders/{senderId} + method: removeSender + httpMethod: delete + tag: Senders + typeScriptTag: senders + description: Delete a sender + parameters: + - name: senderId + schema: integer + required: true + description: Id of the sender + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/{senderId} + method: updateSenderById + httpMethod: put + tag: Senders + typeScriptTag: senders + description: Update a sender + parameters: + - name: senderId + schema: integer + required: true + description: Id of the sender + example: 0 + - name: name + schema: string + description: '' + example: Newsletter + - name: email + schema: string + description: '' + example: newsletter@mycompany.com + - name: ips + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/{senderId}/validate + method: validateSenderUsingOtp + httpMethod: put + tag: Senders + typeScriptTag: senders + description: Validate Sender using OTP + parameters: + - name: senderId + schema: integer + required: true + description: Id of the sender + example: 0 + - name: otp + schema: integer + required: true + description: '' + example: 123456 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/{senderId}/ips + method: getAllDedicatedIps + httpMethod: get + tag: Senders + typeScriptTag: senders + description: Get all the dedicated IPs for a sender + parameters: + - name: senderId + schema: integer + required: true + description: Id of the sender + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/ips + method: getDedicatedIps + httpMethod: get + tag: Senders + typeScriptTag: senders + description: Get all the dedicated IPs for your account + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /senders/domains + method: getAll + httpMethod: get + tag: Domains + typeScriptTag: domains + description: Get the list of all your domains + parameters: [] + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /senders/domains + method: createNewDomain + httpMethod: post + tag: Domains + typeScriptTag: domains + description: Create a new domain + parameters: + - name: name + schema: string + required: true + description: '' + example: mycompany.com + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /senders/domains/{domainName} + method: deleteDomain + httpMethod: delete + tag: Domains + typeScriptTag: domains + description: Delete a domain + parameters: + - name: domainName + schema: string + required: true + description: Domain name + example: DOMAINNAME + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/domains/{domainName} + method: validateConfiguration + httpMethod: get + tag: Domains + typeScriptTag: domains + description: Validate domain configuration + parameters: + - name: domainName + schema: string + required: true + description: Domain name + example: DOMAINNAME + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /senders/domains/{domainName}/authenticate + method: authenticateDomain + httpMethod: put + tag: Domains + typeScriptTag: domains + description: Authenticate a domain + parameters: + - name: domainName + schema: string + required: true + description: Domain name + example: DOMAINNAME + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /webhooks + method: getAll + httpMethod: get + tag: Webhooks + typeScriptTag: webhooks + description: Get all webhooks + parameters: + - name: type + schema: string + description: Filter on webhook type + default: transactional + - name: sort + schema: string + required: false + description: Sort the results in the ascending/descending order of webhook creation + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /webhooks + method: createHook + httpMethod: post + tag: Webhooks + typeScriptTag: webhooks + description: Create a webhook + parameters: + - name: description + schema: string + required: false + description: '' + example: Webhook triggered on unsubscription + - name: url + schema: string + required: true + description: '' + example: http://requestb.in/173lyyx1 + - name: events + schema: array + required: true + description: '' + - name: type + schema: string + required: false + description: '' + example: marketing + default: transactional + - name: domain + schema: string + required: false + description: '' + example: example.com + - name: batched + schema: boolean + required: false + description: '' + example: true + - name: auth + schema: object + required: false + description: '' + example: + type: bearer + token: test-auth-token1234 + - name: headers + schema: array + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /webhooks/{webhookId} + method: deleteWebhook + httpMethod: delete + tag: Webhooks + typeScriptTag: webhooks + description: Delete a webhook + parameters: + - name: webhookId + schema: integer + required: true + description: Id of the webhook + example: 0 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /webhooks/{webhookId} + method: getDetails + httpMethod: get + tag: Webhooks + typeScriptTag: webhooks + description: Get a webhook details + parameters: + - name: webhookId + schema: integer + required: true + description: Id of the webhook + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /webhooks/{webhookId} + method: updateWebhookById + httpMethod: put + tag: Webhooks + typeScriptTag: webhooks + description: Update a webhook + parameters: + - name: webhookId + schema: integer + required: true + description: Id of the webhook + example: 0 + - name: description + schema: string + description: '' + example: Webhook triggered on contact hardbounce + - name: url + schema: string + description: '' + example: http://requestb.in/173lyyx1 + - name: events + schema: array + description: '' + - name: domain + schema: string + description: '' + example: example.com + - name: batched + schema: boolean + description: '' + example: true + - name: auth + schema: object + description: '' + example: + type: bearer + token: test-auth-token1234 + - name: headers + schema: array + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /webhooks/export + method: exportAllEvents + httpMethod: post + tag: Webhooks + typeScriptTag: webhooks + description: Export all webhook events + parameters: [] + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - url: /reseller/children + method: listChildrenAccounts + httpMethod: get + tag: Reseller + typeScriptTag: reseller + description: Get the list of all children accounts + parameters: + - name: limit + schema: integer + description: Number of documents for child accounts information per page + default: 10 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '403' + description: '' + - url: /reseller/children + method: createChild + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Creates a reseller child + parameters: + - name: email + schema: string + required: true + description: '' + example: josh.cruise@example.com + - name: firstName + schema: string + required: true + description: '' + example: Josh + - name: lastName + schema: string + required: true + description: '' + example: Cruise + - name: companyName + schema: string + required: true + description: '' + example: Your Company + - name: password + schema: string + required: true + description: '' + example: Pa55w0rd65 + - name: language + schema: string + required: false + description: '' + example: en + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - url: /reseller/children/{childIdentifier} + method: deleteChildByIdentifier + httpMethod: delete + tag: Reseller + typeScriptTag: reseller + description: Delete a single reseller child based on the child identifier supplied + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or child id of reseller's child + example: CHILDIDENTIFIER + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier} + method: getChildDetails + httpMethod: get + tag: Reseller + typeScriptTag: reseller + description: Get a child account's details + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier} + method: updateChildInfo + httpMethod: put + tag: Reseller + typeScriptTag: reseller + description: Update info of reseller's child based on the child identifier supplied + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: email + schema: string + description: '' + example: josh.cruise@example.com + - name: firstName + schema: string + description: '' + example: Josh + - name: lastName + schema: string + description: '' + example: Cruise + - name: companyName + schema: string + description: '' + example: Your Company + - name: password + schema: string + description: '' + example: Pa55w0rd65 + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/accountStatus + method: updateChildAccountStatus + httpMethod: put + tag: Reseller + typeScriptTag: reseller + description: >- + Update info of reseller's child account status based on the identifier + supplied + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: transactionalEmail + schema: boolean + description: '' + example: false + - name: transactionalSms + schema: boolean + description: '' + example: false + - name: marketingAutomation + schema: boolean + description: '' + example: true + - name: smsCampaign + schema: boolean + description: '' + example: true + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/accountCreationStatus + method: getChildAccountCreationStatus + httpMethod: get + tag: Reseller + typeScriptTag: reseller + description: >- + Get the status of a reseller's child account creation, whether it is + successfully created (https://developers.brevo.com/ or not based on the + childIdentifier supplied + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/ips/associate + method: associateDedicatedIpToChild + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Associate a dedicated IP to the child + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: ip + schema: string + description: '' + example: 123.65.8.22 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/ips/dissociate + method: dissociateIpToChild + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Dissociate a dedicated IP to the child + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: ip + schema: string + description: '' + example: 123.65.8.22 + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/credits/add + method: addChildCredits + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Add Email and/or SMS credits to a specific child account + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: sms + schema: integer + description: '' + example: 450 + - name: email + schema: integer + description: '' + example: 1200 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/credits/remove + method: removeCreditsFromChild + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Remove Email and/or SMS credits from a specific child account + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: sms + schema: integer + description: '' + example: 300 + - name: email + schema: integer + description: '' + example: 500 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/domains + method: getChildDomains + httpMethod: get + tag: Reseller + typeScriptTag: reseller + description: Get all sender domains for a specific child account + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/domains + method: createChildDomain + httpMethod: post + tag: Reseller + typeScriptTag: reseller + description: Create a domain for a child account + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: domain + schema: string + description: '' + example: mychilddomain.com + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/domains/{domainName} + method: deleteSenderDomainByChildIdentifierAndDomainName + httpMethod: delete + tag: Reseller + typeScriptTag: reseller + description: >- + Delete the sender domain of the reseller child based on the + childIdentifier and domainName passed + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: domainName + schema: string + required: true + description: Pass the existing domain that needs to be deleted + example: DOMAINNAME + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/domains/{domainName} + method: updateSenderDomain + httpMethod: put + tag: Reseller + typeScriptTag: reseller + description: >- + Update the sender domain of reseller's child based on the childIdentifier + and domainName passed + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + - name: domainName + schema: string + required: true + description: Pass the existing domain that needs to be updated + example: DOMAINNAME + - name: domain + schema: string + description: '' + example: myupdateddomain.com + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /reseller/children/{childIdentifier}/auth + method: getSessionToken + httpMethod: get + tag: Reseller + typeScriptTag: reseller + description: Get session token to access Brevo (https://developers.brevo.com/ + parameters: + - name: childIdentifier + schema: string + required: true + description: Either auth key or id of reseller's child + example: CHILDIDENTIFIER + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - statusCode: '404' + description: '' + - url: /account + method: informationDetails + httpMethod: get + tag: Account + typeScriptTag: account + description: Get your account information, plan and credits details + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /organization/activities + method: getUserActivityLogs + httpMethod: get + tag: Account + typeScriptTag: account + description: Get user activity logs + parameters: + - name: startDate + schema: string + required: false + description: >- + Mandatory if endDate is used. Enter start date in UTC date + (https://developers.brevo.com/ format to filter the activity in your + account. Maximum time period that can be selected is one month. + Additionally, you can retrieve activity logs from the past 12 months + from the date of your search. + - name: endDate + schema: string + required: false + description: >- + Mandatory if startDate is used. Enter end date in UTC date + (https://developers.brevo.com/ format to filter the activity in your + account. Maximum time period that can be selected is one month. + - name: limit + schema: integer + required: false + description: Number of documents per page + default: 10 + - name: offset + schema: integer + required: false + description: Index of the first document in the page. + default: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /organization/invited/users + method: getAllUsers + httpMethod: get + tag: User + typeScriptTag: user + description: Get the list of all your users + parameters: [] + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /organization/user/{email}/permissions + method: checkPermission + httpMethod: get + tag: User + typeScriptTag: user + description: Check user permission + parameters: + - name: email + schema: string + required: true + description: Email of the invited user. + example: EMAIL + responses: + - statusCode: '200' + description: Check user permission + - statusCode: '400' + description: '' + - url: /organization/user/invitation/revoke/{email} + method: revokePermissionByEmail + httpMethod: put + tag: User + typeScriptTag: user + description: Revoke user permission + parameters: + - name: email + schema: string + required: true + description: Email of the invited user. + example: EMAIL + responses: + - statusCode: '200' + description: '' + - statusCode: '403' + description: '' + - url: /organization/user/invitation/{action}/{email} + method: resendInvitation + httpMethod: put + tag: User + typeScriptTag: user + description: Resend / Cancel invitation + parameters: + - name: action + schema: string + required: true + description: action + example: ACTION + - name: email + schema: string + required: true + description: Email of the invited user. + example: EMAIL + responses: + - statusCode: '200' + description: '' + - statusCode: '403' + description: '' + - url: /organization/user/invitation/send + method: sendInvitation + httpMethod: post + tag: User + typeScriptTag: user + description: Send invitation to user + parameters: + - name: email + schema: string + required: true + description: '' + example: inviteuser@example.com + - name: all_features_access + schema: boolean + required: true + description: '' + example: true + - name: privileges + schema: array + required: true + description: '' + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /organization/user/update/permissions + method: updatePermissions + httpMethod: post + tag: User + typeScriptTag: user + description: Update permission for a user + parameters: + - name: email + schema: string + required: true + description: '' + example: inviteuser@example.com + - name: all_features_access + schema: boolean + required: true + description: '' + example: true + - name: privileges + schema: array + required: true + description: '' + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /processes + method: getAllProcesses + httpMethod: get + tag: Process + typeScriptTag: process + description: Return all the processes for your account + parameters: + - name: limit + schema: integer + description: Number limitation for the result returned + default: 10 + - name: offset + schema: integer + description: Beginning point in the list to retrieve from. + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /processes/{processId} + method: getProcessInformation + httpMethod: get + tag: Process + typeScriptTag: process + description: Return the informations for a process + parameters: + - name: processId + schema: integer + required: true + description: Id of the process + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /inbound/events + method: getAllEvents + httpMethod: get + tag: Inbound Parsing + typeScriptTag: inboundParsing + description: Get the list of all the events for the received emails. + parameters: + - name: sender + schema: string + required: false + description: Email address of the sender. + - name: startDate + schema: string + required: false + description: >- + Mandatory if endDate is used. Starting date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. + Maximum time period that can be selected is one month. + - name: endDate + schema: string + required: false + description: >- + Mandatory if startDate is used. Ending date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. + Maximum time period that can be selected is one month. + - name: limit + schema: integer + required: false + description: Number of documents returned per page + default: 100 + - name: offset + schema: integer + required: false + description: Index of the first document on the page + default: 0 + - name: sort + schema: string + required: false + description: Sort the results in the ascending/descending order of record creation + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /inbound/events/{uuid} + method: getEmailEvents + httpMethod: get + tag: Inbound Parsing + typeScriptTag: inboundParsing + description: Fetch all events history for one particular received email. + parameters: + - name: uuid + schema: string + required: true + description: UUID to fetch events specific to recieved email + example: UUID + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /inbound/attachments/{downloadToken} + method: getAttachmentByToken + httpMethod: get + tag: Inbound Parsing + typeScriptTag: inboundParsing + description: Retrieve inbound attachment with download token. + parameters: + - name: downloadToken + schema: string + required: true + description: Token to fetch a particular attachment + example: DOWNLOADTOKEN + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /corporate/subAccount + method: listSubAccounts + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Get the list of all the sub-accounts of the master account. + parameters: + - name: offset + schema: integer + required: true + description: Index of the first sub-account in the page + example: 0 + - name: limit + schema: integer + required: true + description: Number of sub-accounts to be displayed on each page + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/subAccount + method: createSubAccount + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Create a new sub-account under a master account. + parameters: + - name: companyName + schema: string + required: true + description: '' + example: COMPANYNAME + - name: email + schema: string + required: true + description: '' + example: EMAIL + - name: language + schema: string + required: false + description: '' + - name: timezone + schema: string + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/subAccount/{id} + method: deleteSubAccount + httpMethod: delete + tag: Master account + typeScriptTag: masterAccount + description: Delete a sub-account + parameters: + - name: id + schema: integer + required: true + description: Id of the sub-account organization to be deleted + example: 0 + responses: + - statusCode: '204' + description: Returned when sub-account is deleted succesfully + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /corporate/subAccount/{id} + method: getSubAccountDetails + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Get sub-account details + parameters: + - name: id + schema: integer + required: true + description: Id of the sub-account organization + example: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/subAccount/{id}/plan + method: updateSubAccountPlan + httpMethod: put + tag: Master account + typeScriptTag: masterAccount + description: Update sub-account plan + parameters: + - name: id + schema: integer + required: true + description: Id of the sub-account organization + example: 0 + - name: credits + schema: object + description: '' + - name: features + schema: object + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - url: /corporate/ssoToken + method: generateSsoToken + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Generate SSO token to access admin account + parameters: + - name: email + schema: string + required: true + description: '' + example: vipin+ent-user@brevo.com + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - url: /corporate/subAccount/ssoToken + method: generateSsoToken + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Generate SSO token to access sub-account + parameters: + - name: id + schema: integer + required: true + description: '' + example: 3232323 + - name: email + schema: string + required: false + description: '' + example: vipin+subaccount@brevo.com + - name: target + schema: string + required: false + description: '' + example: contacts + - name: url + schema: string + required: false + description: '' + example: https://app.brevo.com/senders/domain/list + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - url: /corporate/masterAccount + method: getDetails + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Get the details of requested master account + parameters: [] + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/subAccount/key + method: createSubAccountKey + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Create an API key for a sub-account + parameters: + - name: id + schema: integer + required: true + description: '' + example: 3232323 + - name: name + schema: string + required: true + description: '' + example: My Api Key + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/subAccount/{id}/applications/toggle + method: enableDisable + httpMethod: put + tag: Master account + typeScriptTag: masterAccount + description: Enable/disable sub-account application(https://developers.brevo.com/ + parameters: + - name: id + schema: integer + required: true + description: Id of the sub-account organization (https://developers.brevo.com/ + example: 0 + - name: inbox + schema: boolean + description: '' + - name: whatsapp + schema: boolean + description: '' + - name: automation + schema: boolean + description: '' + - name: email-campaigns + schema: boolean + description: '' + - name: sms-campaigns + schema: boolean + description: '' + - name: landing-pages + schema: boolean + description: '' + - name: transactional-emails + schema: boolean + description: '' + - name: transactional-sms + schema: boolean + description: '' + - name: facebook-ads + schema: boolean + description: '' + - name: web-push + schema: boolean + description: '' + - name: meetings + schema: boolean + description: '' + - name: conversations + schema: boolean + description: '' + - name: crm + schema: boolean + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '403' + description: '' + - url: /corporate/group + method: createGroupOfSubAccounts + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Create a group of sub-accounts + parameters: + - name: groupName + schema: string + required: true + description: '' + example: My group + - name: subAccountIds + schema: array + required: false + description: '' + example: + - 234322 + - 325553 + - 893432 + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/group/{id} + method: deleteGroup + httpMethod: delete + tag: Master account + typeScriptTag: masterAccount + description: Delete a group + parameters: + - name: id + schema: string + required: true + description: Id of the group + example: ID + responses: + - statusCode: '204' + description: Group deleted + - statusCode: '400' + description: '' + - url: /corporate/group/{id} + method: getGroupDetails + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: GET a group details + parameters: + - name: id + schema: string + required: true + description: Id of the group of sub-organization + example: ID + responses: + - statusCode: '200' + description: '' + - url: /corporate/group/{id} + method: updateGroupSubAccounts + httpMethod: put + tag: Master account + typeScriptTag: masterAccount + description: Update a group of sub-accounts + parameters: + - name: id + schema: string + required: true + description: Id of the group + example: ID + - name: groupName + schema: string + description: '' + example: My group + - name: subAccountIds + schema: array + description: '' + example: + - 234322 + - 325553 + - 893432 + responses: + - statusCode: '400' + description: '' + - url: /corporate/group/unlink/{groupId}/subAccounts + method: unlinkSubAccountFromGroup + httpMethod: put + tag: Master account + typeScriptTag: masterAccount + description: Delete sub-account from group + parameters: + - name: groupId + schema: string + required: true + description: Group id + example: GROUPID + - name: subAccountIds + schema: array + required: true + description: '' + example: + - 423432 + - 234323 + - 87678 + responses: + - statusCode: '400' + description: '' + - url: /corporate/user/invitation/send + method: sendInvitationToAdminUser + httpMethod: post + tag: Master account + typeScriptTag: masterAccount + description: Send invitation to an admin user + parameters: + - name: email + schema: string + required: true + description: '' + example: inviteuser@example.com + - name: all_features_access + schema: boolean + required: true + description: '' + example: true + - name: groupIds + schema: array + required: false + description: '' + example: + - 2baxxxxxxxxxxxxxxxxxxxxxcaa + - 65axxxxxxxxxxxxxxxxxxxxxc5a + - name: privileges + schema: array + required: true + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/user/invitation/{action}/{email} + method: resendCancelAdminUserInvitation + httpMethod: put + tag: Master account + typeScriptTag: masterAccount + description: Resend / cancel admin user invitation + parameters: + - name: action + schema: string + required: true + description: Action to be performed (cancel / resend) + example: ACTION + - name: email + schema: string + required: true + description: Email address of the recipient + example: EMAIL + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /corporate/user/revoke/{email} + method: revokeAdminUser + httpMethod: delete + tag: Master account + typeScriptTag: masterAccount + description: Revoke an admin user + parameters: + - name: email + schema: string + required: true + description: Email of the invited user + example: EMAIL + responses: + - statusCode: '204' + description: User revoked + - statusCode: '400' + description: '' + - url: /corporate/invited/users + method: listAdminUsers + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Get the list of all admin users + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /corporate/user/{email}/permissions + method: checkAdminUserPermissions + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Check admin user permissions + parameters: + - name: email + schema: string + required: true + description: Email of the invited user. + example: EMAIL + responses: + - statusCode: '200' + description: Check admin user permissions + - statusCode: '400' + description: '' + - url: /corporate/groups + method: listGroups + httpMethod: get + tag: Master account + typeScriptTag: masterAccount + description: Get the list of groups + parameters: [] + responses: + - statusCode: '200' + description: '' + - url: /companies + method: getAll + httpMethod: get + tag: Companies + typeScriptTag: companies + description: Get all Companies + parameters: + - name: filters + schema: string + description: >- + Filter by attrbutes. If you have filter for owner on your side please + send it as {"attributes.owner":"6299dcf3874a14eacbc65c46"} + - name: linkedContactsIds + schema: integer + description: Filter by linked contacts ids + - name: linkedDealsIds + schema: string + description: Filter by linked Deals ids + - name: page + schema: integer + description: Index of the first document of the page + - name: limit + schema: integer + description: Number of documents per page + - name: sort + schema: string + description: >- + Sort the results in the ascending/descending order. Default order is + **descending** by creation if `sort` is not passed + - name: sortBy + schema: string + description: The field used to sort field names. + responses: + - statusCode: '200' + description: List of companies + - statusCode: '400' + description: '' + - url: /companies + method: createCompany + httpMethod: post + tag: Companies + typeScriptTag: companies + description: Create a company + parameters: + - name: name + schema: string + required: true + description: '' + example: company + - name: attributes + schema: object + required: false + description: '' + example: + domain: https://example.com + industry: Fabric + owner: 60e68d60582a3b006f524197 + - name: countryCode + schema: integer + required: false + description: '' + example: 91 + responses: + - statusCode: '200' + description: Created company id + - statusCode: '400' + description: '' + - url: /companies/{id} + method: deleteCompany + httpMethod: delete + tag: Companies + typeScriptTag: companies + description: Delete a company + parameters: + - name: id + schema: string + required: true + description: Company ID to delete + example: ID + responses: + - statusCode: '204' + description: When company deleted + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /companies/{id} + method: getCompanyById + httpMethod: get + tag: Companies + typeScriptTag: companies + description: Get a company + parameters: + - name: id + schema: string + required: true + description: Get Company Details + example: ID + responses: + - statusCode: '200' + description: Company Details + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /companies/{id} + method: updateCompany + httpMethod: patch + tag: Companies + typeScriptTag: companies + description: Update a company + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + - name: name + schema: string + description: '' + example: company + - name: attributes + schema: object + description: '' + example: + category: label_2 + domain: xyz + date: '2022-05-04T00:00:00+05:30' + industry: flipkart + number_of_contacts: 1 + number_of_employees: 100 + owner: 5b1a17d914b73d35a76ca0c7 + phone_number: '81718441912' + revenue: 10000.34222 + - name: countryCode + schema: integer + description: '' + example: 91 + responses: + - statusCode: '200' + description: Company Details + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /companies/attributes + method: getAttributes + httpMethod: get + tag: Companies + typeScriptTag: companies + description: Get company attributes + parameters: [] + responses: + - statusCode: '200' + description: List of company attributes + - url: /companies/link-unlink/{id} + method: linkUnlinkWithContactDeal + httpMethod: patch + tag: Companies + typeScriptTag: companies + description: Link and Unlink company with contact and deal + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + - name: linkContactIds + schema: array + description: '' + example: + - 1 + - 2 + - 3 + - name: unlinkContactIds + schema: array + description: '' + example: + - 4 + - 5 + - 6 + - name: linkDealsIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: unlinkDealsIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045994 + - 61a5ce58c5d479576104595 + - 61a5ce58c5d4795761045996 + responses: + - statusCode: '204' + description: Successfully linked/unlinked contacts/deals with the company. + - statusCode: '400' + description: '' + - url: /crm/pipeline/details + method: getPipelineStages + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get pipeline stages + parameters: [] + responses: + - statusCode: '200' + description: List of stages + - url: /crm/pipeline/details/{pipelineID} + method: getDetails + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get a pipeline + parameters: + - name: pipelineId + schema: string + required: true + description: '' + example: PIPELINEID + responses: + - statusCode: '200' + description: List of pipeline + - statusCode: '400' + description: '' + - url: /crm/pipeline/details/all + method: getAllPipelines + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get all pipelines + parameters: [] + responses: + - statusCode: '200' + description: List of pipeline + - statusCode: '400' + description: '' + - url: /crm/attributes/deals + method: getAttributes + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get deal attributes + parameters: [] + responses: + - statusCode: '200' + description: List of deal attributes + - url: /crm/deals + method: getAllDeals + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get all deals + parameters: + - name: filters[attributesDealName] + schema: string + description: >- + Filter by attributes. If you have a filter for the owner on your end, + please send it as filters[attributes.deal_owner] and utilize the + account email for the filtering. + - name: filters[linkedCompaniesIds] + schema: string + description: Filter by linked companies ids + - name: filters[linkedContactsIds] + schema: string + description: Filter by linked companies ids + - name: offset + schema: integer + description: Index of the first document of the page + - name: limit + schema: integer + description: Number of documents per page + - name: sort + schema: string + description: >- + Sort the results in the ascending/descending order. Default order is + **descending** by creation if `sort` is not passed + responses: + - statusCode: '200' + description: List of Deals + - statusCode: '400' + description: '' + - url: /crm/deals + method: createNewDeal + httpMethod: post + tag: Deals + typeScriptTag: deals + description: Create a deal + parameters: + - name: name + schema: string + required: true + description: '' + example: 'Deal: Connect with company' + - name: attributes + schema: object + required: false + description: '' + example: + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + responses: + - statusCode: '201' + description: Created deal id + - statusCode: '400' + description: Returned when invalid data posted + - url: /crm/deals/{id} + method: deleteDeal + httpMethod: delete + tag: Deals + typeScriptTag: deals + description: Delete a deal + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + responses: + - statusCode: '204' + description: Returned when item deleted + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/deals/{id} + method: getById + httpMethod: get + tag: Deals + typeScriptTag: deals + description: Get a deal + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + responses: + - statusCode: '200' + description: Deal Details + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/deals/{id} + method: updateDealById + httpMethod: patch + tag: Deals + typeScriptTag: deals + description: Update a deal + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + - name: name + schema: string + description: '' + example: 'Deal: Connect with client' + - name: attributes + schema: object + description: '' + example: + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + responses: + - statusCode: '204' + description: Deal updated successfully + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/deals/link-unlink/{id} + method: linkUnlinkPatch + httpMethod: patch + tag: Deals + typeScriptTag: deals + description: Link and Unlink a deal with contacts and companies + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + - name: linkContactIds + schema: array + description: '' + example: + - 1 + - 2 + - 3 + - name: unlinkContactIds + schema: array + description: '' + example: + - 4 + - 5 + - 6 + - name: linkCompanyIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: unlinkCompanyIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045994 + - 61a5ce58c5d479576104595 + - 61a5ce58c5d4795761045996 + responses: + - statusCode: '204' + description: Successfully linked/unlinked contacts/companies with the deal. + - statusCode: '400' + description: '' + - url: /crm/tasktypes + method: getAllTaskTypes + httpMethod: get + tag: Tasks + typeScriptTag: tasks + description: Get all task types + parameters: [] + responses: + - statusCode: '200' + description: Task types details + - url: /crm/tasks + method: getAll + httpMethod: get + tag: Tasks + typeScriptTag: tasks + description: Get all tasks + parameters: + - name: filter[type] + schema: string + description: Filter by task type (https://developers.brevo.com/ + - name: filter[status] + schema: string + description: Filter by task status + - name: filter[date] + schema: string + description: Filter by date + - name: filter[assignTo] + schema: string + description: >- + Filter by the "assignTo" ID. You can utilize account emails for the + "assignTo" attribute. + - name: filter[contacts] + schema: string + description: Filter by contact ids + - name: filter[deals] + schema: string + description: Filter by deals ids + - name: filter[companies] + schema: string + description: Filter by companies ids + - name: dateFrom + schema: integer + description: dateFrom to date range filter type (timestamp in milliseconds) + - name: dateTo + schema: integer + description: dateTo to date range filter type (timestamp in milliseconds) + - name: offset + schema: integer + description: Index of the first document of the page + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: sort + schema: string + description: >- + Sort the results in the ascending/descending order. Default order is + **descending** by creation if `sort` is not passed + - name: sortBy + schema: string + description: The field used to sort field names. + example: name + responses: + - statusCode: '200' + description: List of tasks + - statusCode: '400' + description: '' + - url: /crm/tasks + method: createNewTask + httpMethod: post + tag: Tasks + typeScriptTag: tasks + description: Create a task + parameters: + - name: name + schema: string + required: true + description: '' + example: 'Task: Connect with client' + - name: duration + schema: integer + required: false + description: '' + example: 600000 + - name: taskTypeId + schema: string + required: true + description: '' + example: 61a5cd07ca1347c82306ad09 + - name: date + schema: string + required: true + description: '' + example: '2021-11-01T17:44:54.668Z' + - name: notes + schema: string + required: false + description: '' + example: In communication with client for resolution of queries. + - name: done + schema: boolean + required: false + description: '' + example: false + - name: assignToId + schema: string + required: false + description: '' + example: 5faab4b7f195bb3c4c31e62a + - name: contactsIds + schema: array + required: false + description: '' + example: + - 1 + - 2 + - 3 + - name: dealsIds + schema: array + required: false + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: companiesIds + schema: array + required: false + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: reminder + schema: object + required: false + description: '' + responses: + - statusCode: '201' + description: Task Details + - statusCode: '400' + description: Returned when invalid data posted + - url: /crm/tasks/{id} + method: removeTask + httpMethod: delete + tag: Tasks + typeScriptTag: tasks + description: Delete a task + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + responses: + - statusCode: '204' + description: Returned when item deleted + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/tasks/{id} + method: getTaskById + httpMethod: get + tag: Tasks + typeScriptTag: tasks + description: Get a task + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + responses: + - statusCode: '200' + description: Task Details + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/tasks/{id} + method: updateTask + httpMethod: patch + tag: Tasks + typeScriptTag: tasks + description: Update a task + parameters: + - name: id + schema: string + required: true + description: '' + example: ID + - name: name + schema: string + description: '' + example: 'Task: Connect with client' + - name: duration + schema: integer + description: '' + example: 600000 + - name: taskTypeId + schema: string + description: '' + example: 61a5cd07ca1347c82306ad09 + - name: date + schema: string + description: '' + example: '2021-11-01T17:44:54.668Z' + - name: notes + schema: string + description: '' + example: In communication with client for resolution of queries. + - name: done + schema: boolean + description: '' + example: false + - name: assignToId + schema: string + description: '' + example: 5faab4b7f195bb3c4c31e62a + - name: contactsIds + schema: array + description: '' + example: + - 1 + - 2 + - 3 + - name: dealsIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: companiesIds + schema: array + description: '' + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + - name: reminder + schema: object + description: '' + responses: + - statusCode: '204' + description: Task updated succussfully + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/notes + method: getAll + httpMethod: get + tag: Notes + typeScriptTag: notes + description: Get all notes + parameters: + - name: entity + schema: string + description: Filter by note entity type + - name: entityIds + schema: string + description: Filter by note entity IDs + - name: dateFrom + schema: integer + description: dateFrom to date range filter type (timestamp in milliseconds) + - name: dateTo + schema: integer + description: dateTo to date range filter type (timestamp in milliseconds) + - name: offset + schema: integer + description: Index of the first document of the page + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: sort + schema: string + description: >- + Sort the results in the ascending/descending order. Default order is + **descending** by creation if `sort` is not passed + responses: + - statusCode: '200' + description: List of notes + - statusCode: '400' + description: '' + - url: /crm/notes + method: createNewNote + httpMethod: post + tag: Notes + typeScriptTag: notes + description: Create a note + parameters: + - name: text + schema: string + required: true + description: '' + example: In communication with client for resolution of queries. + - name: contactIds + schema: array + required: false + description: '' + example: &ref_0 + - 247 + - 1 + - 2 + - name: dealIds + schema: array + required: false + description: '' + example: &ref_1 + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - name: companyIds + schema: array + required: false + description: '' + example: &ref_2 + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + responses: + - statusCode: '200' + description: Updated Note ID + - statusCode: '400' + description: '' + - statusCode: '415' + description: '' + - url: /crm/notes/{id} + method: removeById + httpMethod: delete + tag: Notes + typeScriptTag: notes + description: Delete a note + parameters: + - name: id + schema: string + required: true + description: Note ID to delete + example: ID + responses: + - statusCode: '204' + description: Returned when item deleted + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/notes/{id} + method: getById + httpMethod: get + tag: Notes + typeScriptTag: notes + description: Get a note + parameters: + - name: id + schema: string + required: true + description: Note ID to get + example: ID + responses: + - statusCode: '200' + description: Note Details + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/notes/{id} + method: updateNoteById + httpMethod: patch + tag: Notes + typeScriptTag: notes + description: Update a note + parameters: + - name: id + schema: string + required: true + description: Note ID to update + example: ID + - name: text + schema: string + required: true + description: '' + example: In communication with client for resolution of queries. + - name: contactIds + schema: array + required: false + description: '' + example: *ref_0 + - name: dealIds + schema: array + required: false + description: '' + example: *ref_1 + - name: companyIds + schema: array + required: false + description: '' + example: *ref_2 + responses: + - statusCode: '204' + description: Note updated successfully + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - statusCode: '415' + description: '' + - url: /crm/files + method: getAllFiles + httpMethod: get + tag: Files + typeScriptTag: files + description: Get all files + parameters: + - name: entity + schema: string + required: false + description: Filter by file entity type + - name: entityIds + schema: string + required: false + description: Filter by file entity IDs + - name: dateFrom + schema: integer + required: false + description: dateFrom to date range filter type (timestamp in milliseconds) + - name: dateTo + schema: integer + required: false + description: dateTo to date range filter type (timestamp in milliseconds) + - name: offset + schema: integer + required: false + description: Index of the first document of the page + - name: limit + schema: integer + required: false + description: Number of documents per page + default: 50 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order. Default order is + **descending** by creation if `sort` is not passed + responses: + - statusCode: '200' + description: List of files + - statusCode: '400' + description: '' + - url: /crm/files + method: uploadFile + httpMethod: post + tag: Files + typeScriptTag: files + description: Upload a file + parameters: + - name: file + schema: string + required: true + description: '' + example: FILE + - name: dealId + schema: string + required: false + description: '' + - name: contactId + schema: integer + required: false + description: '' + - name: companyId + schema: string + required: false + description: '' + responses: + - statusCode: '201' + description: File data that is uploaded + - statusCode: '400' + description: '' + - url: /crm/files/{id} + method: deleteFile + httpMethod: delete + tag: Files + typeScriptTag: files + description: Delete a file + parameters: + - name: id + schema: string + required: true + description: File id to delete. + example: ID + responses: + - statusCode: '204' + description: Returned when file is deleted. + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/files/{id} + method: downloadFile + httpMethod: get + tag: Files + typeScriptTag: files + description: Download a file + parameters: + - name: id + schema: string + required: true + description: File id to download. + example: ID + responses: + - statusCode: '200' + description: Downloadable file link + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /crm/files/{id}/data + method: getFileDetails + httpMethod: get + tag: Files + typeScriptTag: files + description: Get file details + parameters: + - name: id + schema: string + required: true + description: File id to get file data. + example: ID + responses: + - statusCode: '200' + description: File data that is uploaded + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/messages + method: sendMessageAsAgent + httpMethod: post + tag: Conversations + typeScriptTag: conversations + description: Send a message as an agent + parameters: + - name: visitorId + schema: undefined + required: true + description: '' + - name: text + schema: undefined + required: true + description: '' + - name: agentId + schema: undefined + required: false + description: '' + - name: receivedFrom + schema: undefined + required: false + description: '' + - name: agentEmail + schema: undefined + required: false + description: '' + - name: agentName + schema: undefined + required: false + description: '' + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - url: /conversations/messages/{id} + method: deleteMessageSentByAgent + httpMethod: delete + tag: Conversations + typeScriptTag: conversations + description: Delete a message sent by an agent + parameters: + - name: id + schema: string + required: true + description: ID of the message + example: ID + responses: + - statusCode: '204' + description: The message was deleted from the conversation + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/messages/{id} + method: getMessageById + httpMethod: get + tag: Conversations + typeScriptTag: conversations + description: Get a message + parameters: + - name: id + schema: string + required: true + description: ID of the message + example: ID + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/messages/{id} + method: updateAgentMessage + httpMethod: put + tag: Conversations + typeScriptTag: conversations + description: Update a message sent by an agent + parameters: + - name: id + schema: string + required: true + description: ID of the message + example: ID + - name: text + schema: string + required: true + description: '' + example: TEXT + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/pushedMessages + method: sendAutomatedMessage + httpMethod: post + tag: Conversations + typeScriptTag: conversations + description: Send an automated message to a visitor + parameters: + - name: visitorId + schema: undefined + required: true + description: '' + - name: text + schema: undefined + required: true + description: '' + - name: agentId + schema: undefined + required: false + description: '' + - name: groupId + schema: undefined + required: false + description: '' + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - url: /conversations/pushedMessages/{id} + method: deleteAutomatedMessage + httpMethod: delete + tag: Conversations + typeScriptTag: conversations + description: Delete an automated message + parameters: + - name: id + schema: string + required: true + description: ID of the message + example: ID + responses: + - statusCode: '204' + description: The message was deleted from the conversation + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/pushedMessages/{id} + method: getAutomatedMessage + httpMethod: get + tag: Conversations + typeScriptTag: conversations + description: Get an automated message + parameters: + - name: id + schema: string + required: true + description: ID of the message sent previously + example: ID + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/pushedMessages/{id} + method: updatePushedMessage + httpMethod: put + tag: Conversations + typeScriptTag: conversations + description: Update an automated message + parameters: + - name: id + schema: string + required: true + description: ID of the message + example: ID + - name: text + schema: string + required: true + description: '' + example: TEXT + responses: + - statusCode: '200' + description: a Conversations message + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /conversations/agentOnlinePing + method: setAgentOnlineStatus + httpMethod: post + tag: Conversations + typeScriptTag: conversations + description: Sets agent’s status to online for 2-3 minutes + parameters: + - name: agentId + schema: undefined + description: '' + - name: receivedFrom + schema: undefined + description: '' + - name: agentEmail + schema: undefined + description: '' + - name: agentName + schema: undefined + description: '' + responses: + - statusCode: '201' + description: Status of the agent was set successfully. Response body will be empty. + - statusCode: '400' + description: '' + - url: /ecommerce/activate + method: activateApp + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Activate the eCommerce app + parameters: [] + responses: + - statusCode: '200' + description: eCommerce activation is in process, please wait for 5 minutes. + - statusCode: '401' + description: '' + - statusCode: '404' + description: '' + - url: /orders + method: getOrders + httpMethod: get + tag: Ecommerce + typeScriptTag: ecommerce + description: Get order details + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: modifiedSince + schema: string + description: > + Filter (https://developers.brevo.com/ the orders modified after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: createdSince + schema: string + description: > + Filter (https://developers.brevo.com/ the orders created after a given + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /orders/status + method: manageOrderStatus + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Managing the status of the order + parameters: + - name: id + schema: string + required: true + description: '' + example: '14' + - name: createdAt + schema: string + required: true + description: '' + example: '2021-07-29T20:59:23.383Z' + - name: updatedAt + schema: string + required: true + description: '' + example: '2021-07-30T10:59:23.383Z' + - name: status + schema: string + required: true + description: '' + example: completed + - name: amount + schema: number + required: true + description: '' + example: 308.42 + - name: products + schema: array + required: true + description: '' + - name: email + schema: string + required: false + description: '' + example: example@brevo.com + - name: billing + schema: object + required: false + description: '' + - name: coupons + schema: array + required: false + description: '' + example: + - EASTER15OFF + responses: + - statusCode: '400' + description: '' + - url: /orders/status/batch + method: createOrderBatch + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Create orders in batch + parameters: + - name: orders + schema: array + required: true + description: '' + - name: notifyUrl + schema: string + required: false + description: '' + example: https://en.wikipedia.org/wiki/Webhook + - name: historical + schema: boolean + required: false + description: '' + example: true + default: true + responses: + - statusCode: '202' + description: '' + - statusCode: '400' + description: '' + - url: /events + method: trackInteraction + httpMethod: post + tag: Event + typeScriptTag: event + description: Create an event + parameters: + - name: event_name + schema: string + required: true + description: '' + example: video_played + - name: event_date + schema: string + required: false + description: '' + example: '2024-02-06T20:59:23.383Z' + - name: identifiers + schema: object + required: true + description: '' + - name: contact_properties + schema: object + required: false + description: '' + example: + AGE: 32 + GENDER: FEMALE + - name: event_properties + schema: object + required: false + description: '' + example: + video_title: Brevo — The most approachable CRM suite + vide_description: Create your free account today! + duration: 142 + autoplayed: false + upload_date: '2023-11-24T12:09:10+01:00' + responses: + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - url: /categories + method: getAllCategories + httpMethod: get + tag: Ecommerce + typeScriptTag: ecommerce + description: Return all your categories + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: ids + schema: array + description: Filter by category ids + - name: name + schema: string + description: Filter by category name + - name: modifiedSince + schema: string + description: > + Filter (https://developers.brevo.com/ the categories modified after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: createdSince + schema: string + description: > + Filter (https://developers.brevo.com/ the categories created after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /categories + method: createCategory + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Create/Update a category + parameters: + - name: id + schema: string + required: true + description: '' + example: CAT123 + - name: name + schema: string + required: false + description: '' + example: Electronics + - name: url + schema: string + required: false + description: '' + example: http://mydomain.com/category/electronics + - name: updateEnabled + schema: boolean + required: false + description: '' + example: false + default: false + - name: deletedAt + schema: string + required: false + description: '' + example: '2017-05-12T12:30:00.000Z' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /categories/{id} + method: getCategoryDetails + httpMethod: get + tag: Ecommerce + typeScriptTag: ecommerce + description: Get a category details + parameters: + - name: id + schema: string + required: true + description: Category ID + example: ID + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /categories/batch + method: createCategoriesBatch + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Create categories in batch + parameters: + - name: categories + schema: array + required: true + description: '' + - name: updateEnabled + schema: boolean + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /products + method: listAllProducts + httpMethod: get + tag: Ecommerce + typeScriptTag: ecommerce + description: Return all your products + parameters: + - name: limit + schema: integer + description: Number of documents per page + default: 50 + - name: offset + schema: integer + description: Index of the first document in the page + default: 0 + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + - name: ids + schema: array + description: Filter by product ids + - name: name + schema: string + description: >- + Filter by product name, minimum 3 characters should be present for + search + - name: price[lte] + schema: number + description: Price filter for products less than and equals to particular amount + - name: price[gte] + schema: number + description: Price filter for products greater than and equals to particular amount + - name: price[lt] + schema: number + description: Price filter for products less than particular amount + - name: price[gt] + schema: number + description: Price filter for products greater than particular amount + - name: price[eq] + schema: number + description: Price filter for products equals to particular amount + - name: price[ne] + schema: number + description: Price filter for products not equals to particular amount + - name: categories + schema: array + description: Filter by product categories + - name: modifiedSince + schema: string + description: > + Filter (https://developers.brevo.com/ the orders modified after a + given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + - name: createdSince + schema: string + description: > + Filter (https://developers.brevo.com/ the orders created after a given + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your + timezone in date-time format for accurate result.** + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /products + method: createProduct + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Create/Update a product + parameters: + - name: id + schema: string + required: true + description: '' + example: P11 + - name: name + schema: string + required: true + description: '' + example: Iphone 11 + - name: url + schema: string + required: false + description: '' + example: http://mydomain.com/product/electronics/product1 + - name: imageUrl + schema: string + required: false + description: '' + example: http://mydomain.com/product-absoulte-url/img.jpeg + - name: sku + schema: string + required: false + description: '' + - name: price + schema: number + required: false + description: '' + - name: categories + schema: array + required: false + description: '' + - name: parentId + schema: string + required: false + description: '' + - name: metaInfo + schema: object + required: false + description: '' + example: + description: Shoes for sports + brand: addidas + - name: updateEnabled + schema: boolean + required: false + description: '' + example: false + default: false + - name: deletedAt + schema: string + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '204' + description: Product updated + - statusCode: '400' + description: '' + - url: /products/{id} + method: getProductDetails + httpMethod: get + tag: Ecommerce + typeScriptTag: ecommerce + description: Get a product's details + parameters: + - name: id + schema: string + required: true + description: Product ID + example: ID + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /products/batch + method: createProductsBatch + httpMethod: post + tag: Ecommerce + typeScriptTag: ecommerce + description: Create products in batch + parameters: + - name: products + schema: array + required: true + description: '' + - name: updateEnabled + schema: boolean + required: false + description: '' + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /couponCollections + method: listCouponCollections + httpMethod: get + tag: Coupons + typeScriptTag: coupons + description: Get all your coupon collections + parameters: + - name: limit + schema: integer + description: Number of documents returned per page + default: 50 + - name: offset + schema: integer + description: Index of the first document on the page + default: 0 + - name: sort + schema: string + description: Sort the results by creation time in ascending/descending order + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - url: /couponCollections + method: createCollection + httpMethod: post + tag: Coupons + typeScriptTag: coupons + description: Create а coupon collection + parameters: + - name: name + schema: string + required: true + description: '' + example: SummerPromotions + - name: defaultCoupon + schema: string + required: true + description: '' + example: 10 OFF + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - url: /couponCollections/{id} + method: getById + httpMethod: get + tag: Coupons + typeScriptTag: coupons + description: Get a coupon collection by id + parameters: + - name: id + schema: string + required: true + description: Id of the collection to return + example: ID + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - statusCode: '404' + description: '' + - url: /couponCollections/{id} + method: updateCouponCollectionById + httpMethod: patch + tag: Coupons + typeScriptTag: coupons + description: Update a coupon collection by id + parameters: + - name: id + schema: string + required: true + description: Id of the collection to update + example: ID + - name: defaultCoupon + schema: string + required: true + description: '' + example: 10 OFF + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - url: /coupons + method: createCouponCollection + httpMethod: post + tag: Coupons + typeScriptTag: coupons + description: Create coupons for a coupon collection + parameters: + - name: collectionId + schema: string + required: true + description: '' + example: 23befbae-1505-47a8-bd27-e30ef739f32c + - name: coupons + schema: array + required: true + description: '' + responses: + - statusCode: '400' + description: '' + - statusCode: '401' + description: '' + - statusCode: '404' + description: '' + - url: /whatsapp/sendMessage + method: sendMessage + httpMethod: post + tag: Transactional WhatsApp + typeScriptTag: transactionalWhatsApp + description: Send a WhatsApp message + parameters: [] + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /whatsapp/statistics/events + method: getActivity + httpMethod: get + tag: Transactional WhatsApp + typeScriptTag: transactionalWhatsApp + description: Get all your WhatsApp activity (unaggregated events) + parameters: + - name: limit + schema: integer + description: Number limitation for the result returned + default: 2500 + - name: offset + schema: integer + description: Beginning point in the list to retrieve from + default: 0 + - name: startDate + schema: string + description: > + **Mandatory if endDate is used.** Starting date of the report + (https://developers.brevo.com/. Must be lower than equal to endDate + - name: endDate + schema: string + description: > + **Mandatory if startDate is used.** Ending date of the report + (https://developers.brevo.com/. Must be greater than equal to + startDate + - name: days + schema: integer + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + - name: contactNumber + schema: string + description: >- + Filter results for specific contact (WhatsApp Number with country + code. Example, 85264318721) + - name: event + schema: string + description: Filter the report for a specific event type + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed + default: desc + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - url: /feeds + method: getAllFeeds + httpMethod: get + tag: External Feeds + typeScriptTag: externalFeeds + description: Fetch all external feeds + parameters: + - name: search + schema: string + required: false + description: Can be used to filter records by search keyword on feed name + example: search + - name: startDate + schema: string + required: false + description: >- + Mandatory if `endDate` is used. Starting date + (https://developers.brevo.com/ from which you want to fetch the list. + Can be maximum 30 days older than current date. + example: '2022-09-04' + - name: endDate + schema: string + required: false + description: >- + Mandatory if `startDate` is used. Ending date + (https://developers.brevo.com/ till which you want to fetch the list. + Maximum time period that can be selected is one month. + example: '2022-10-01' + - name: sort + schema: string + required: false + description: >- + Sort the results in the ascending/descending order of record creation. + Default order is **descending** if `sort` is not passed. + default: desc + - name: authType + schema: string + required: false + description: Filter the records by `authType` of the feed. + - name: limit + schema: integer + required: false + description: Number of documents returned per page. + example: 100 + default: 50 + - name: offset + schema: integer + required: false + description: Index of the first document on the page. + example: 0 + default: 0 + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /feeds + method: createFeed + httpMethod: post + tag: External Feeds + typeScriptTag: externalFeeds + description: Create an external feed + parameters: + - name: name + schema: string + required: true + description: '' + example: New feed + - name: url + schema: string + required: true + description: '' + example: http://requestb.in/173lyyx1 + - name: authType + schema: string + required: false + description: '' + default: noAuth + - name: username + schema: string + required: false + description: '' + example: user + - name: password + schema: string + required: false + description: '' + example: password + - name: token + schema: string + required: false + description: '' + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + - name: headers + schema: array + required: false + description: '' + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + - name: maxRetries + schema: integer + required: false + description: '' + example: 5 + default: 5 + - name: cache + schema: boolean + required: false + description: '' + example: true + default: false + responses: + - statusCode: '201' + description: '' + - statusCode: '400' + description: '' + - url: /feeds/{uuid} + method: deleteFeedByUuid + httpMethod: delete + tag: External Feeds + typeScriptTag: externalFeeds + description: Delete an external feed + parameters: + - name: uuid + schema: string + required: true + description: UUID of the feed to delete + example: 38f351fb-6e77-4b38-979a-a2465260449e + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /feeds/{uuid} + method: getFeedByUuid + httpMethod: get + tag: External Feeds + typeScriptTag: externalFeeds + description: Get an external feed by UUID + parameters: + - name: uuid + schema: string + required: true + description: UUID of the feed to fetch + example: 38f351fb-6e77-4b38-979a-a2465260449e + responses: + - statusCode: '200' + description: '' + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' + - url: /feeds/{uuid} + method: updateFeedByUuid + httpMethod: put + tag: External Feeds + typeScriptTag: externalFeeds + description: Update an external feed + parameters: + - name: uuid + schema: string + required: true + description: UUID of the feed to update + example: 38f351fb-6e77-4b38-979a-a2465260449e + - name: name + schema: string + description: '' + example: New feed + - name: url + schema: string + description: '' + example: http://requestb.in/173lyyx1 + - name: authType + schema: string + description: '' + - name: username + schema: string + description: '' + example: user + - name: password + schema: string + description: '' + example: password + - name: token + schema: string + description: '' + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + - name: headers + schema: array + description: '' + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + - name: maxRetries + schema: integer + description: '' + example: 5 + default: 5 + - name: cache + schema: boolean + description: '' + example: true + default: false + responses: + - statusCode: '400' + description: '' + - statusCode: '404' + description: '' +numberOfSchemas: 254 +apiDescription: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | diff --git a/sdks/db/category-cache.yaml b/sdks/db/category-cache.yaml index 8c2f006d05..f5bb2e3c2d 100644 --- a/sdks/db/category-cache.yaml +++ b/sdks/db/category-cache.yaml @@ -262,3 +262,4 @@ apis: Onna-undefined: Documents GetResponse-undefined: Email Podium-undefined: Reviews + Brevo-undefined: CRM (Customer Relationship Management) diff --git a/sdks/db/custom-request-last-fetched.yaml b/sdks/db/custom-request-last-fetched.yaml index c0afa437e0..f192748bf6 100644 --- a/sdks/db/custom-request-last-fetched.yaml +++ b/sdks/db/custom-request-last-fetched.yaml @@ -242,3 +242,4 @@ lastUpdated: onna.com: 2024-03-28T22:40:16.345Z getresponse.com: 2024-03-28T22:30:02.555Z podium.com: 2024-03-28T23:11:05.907Z + brevo.com: 2024-03-28T23:17:22.210Z diff --git a/sdks/db/custom-request-specs/brevo.com.yaml b/sdks/db/custom-request-specs/brevo.com.yaml new file mode 100644 index 0000000000..4a71bac860 --- /dev/null +++ b/sdks/db/custom-request-specs/brevo.com.yaml @@ -0,0 +1,20831 @@ +openapi: 3.0.1 +info: + title: Brevo API + description: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | + contact: + name: Brevo Support + url: https://account.brevo.com/support + email: contact@brevo.com + license: + name: MIT + url: http://opensource.org/licenses/MIT + version: 3.0.0 +servers: + - url: https://api.brevo.com/v3 +security: + - api-key: [] +paths: + /emailCampaigns: + get: + tags: + - Email Campaigns + summary: Return all your created email campaigns + operationId: getEmailCampaigns + parameters: + - name: type + in: query + description: Filter on the type of the campaigns + schema: + type: string + enum: + - classic + - trigger + - name: status + in: query + description: Filter on the status of the campaign + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: excludeHtmlContent + in: query + description: >- + Use this flag to exclude htmlContent from the response body. If set + to **true**, htmlContent field will be returned as empty string in + the response body + schema: + type: boolean + enum: + - true + - false + responses: + '200': + description: Email campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaigns' + examples: + response: + value: + count: 2 + campaigns: + - id: 12 + name: EN - Sales Summer 2017 + subject: 20% OFF for 2017 Summer Sales + previewText: Don't miss the sale + type: classic + status: sent + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: marketing@mycompany.com + name: Marketing + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 5 + exclusionLists: + - 13 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 5 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: 80 + statsByDomain: + yahoo.com: + uniqueClicks: 298 + clickers: 533 + complaints: 0 + sent: 25601 + softBounces: 5 + hardBounces: 0 + uniqueViews: 3527 + unsubscriptions: 17 + viewed: 5255 + delivered: 25596 + hotmail.co.uk: + uniqueClicks: 1970 + clickers: 2720 + complaints: 5 + sent: 117055 + softBounces: 111 + hardBounces: 0 + uniqueViews: 21111 + unsubscriptions: 105 + viewed: 35251 + delivered: 117056 + - id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter + type: Classic + status: draft + scheduledAt: '' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 10 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 10 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + aol: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Email Campaigns + summary: Create an email campaign + operationId: createEmailCampaign + requestBody: + description: Values to create a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createEmailCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}: + get: + tags: + - Email Campaigns + summary: Get an email campaign report + operationId: getEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + required: false + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - statsByDevice + - statsByBrowser + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaign' + examples: + response: + value: + id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter! + type: classic + status: draft + scheduledAt: '2017-09-22T12:30:00.000Z' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://dhh.brevo.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 22 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 22 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + statsByDevice: + desktop: + mac: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 1 + mobile: + androidMobile: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + iPhone: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 0 + statsByBrowser: + thunderbird: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + safari: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + internetExplorer: + clickers: 0 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Email Campaigns + summary: Update an email campaign + operationId: updateEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateEmailCampaign' + required: true + responses: + '204': + description: Email campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Email Campaigns + summary: Delete an email campaign + operationId: deleteEmailCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendNow: + post: + tags: + - Email Campaigns + summary: Send an email campaign immediately, based on campaignId + operationId: sendEmailCampaignNow + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been scheduled + content: {} + '400': + description: Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendTest: + post: + tags: + - Email Campaigns + summary: Send an email campaign to your test list + operationId: sendTestEmail + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + /emailCampaigns/{campaignId}/status: + put: + tags: + - Email Campaigns + summary: Update an email campaign status + operationId: updateCampaignStatus + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendReport: + post: + tags: + - Email Campaigns + summary: Send the report of a campaign + description: A PDF will be sent to the specified email addresses + operationId: sendReport + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: + tags: + - Email Campaigns + summary: Get an A/B test email campaign results + description: Obtain winning version of an A/B test email campaign + operationId: getAbTestCampaignResult + parameters: + - name: campaignId + in: path + description: Id of the A/B test campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: A/B test email campaign Result + content: + application/json: + schema: + $ref: '#/components/schemas/abTestCampaignResult' + examples: + response: + value: + winningVersion: B + winningCriteria: Click + openRate: 100% + clickRate: 50% + winningVersionRate: 0% + statistics: + openers: + Version A: 20% + Version B: 100% + clicks: + Version A: 0% + Version B: 50% + unsubscribed: + Version A: 20% + Version B: 0% + softBounces: + Version A: 0% + Version B: 0% + hardBounces: + Version A: 0% + Version B: 0% + complaints: + Version A: 0% + Version B: 0% + clickedLinks: + Version A: + - link: https://google.com + clicksCount: 0 + clickRate: 0% + - link: https://youtube.com + clicksCount: 0 + clickRate: 0% + Version B: + - link: http://www.github.com + clicksCount: 2 + clickRate: 40% + - link: http://www.stackoverflow.com + clicksCount: 3 + clickRate: 60% + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: A/B test Email Campaign not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sharedUrl: + get: + tags: + - Email Campaigns + summary: Get a shared template url + description: >- + Get a unique URL to share & import an email template from one Brevo + account to another. + operationId: getSharedTemplateUrl + parameters: + - name: campaignId + in: path + description: Id of the campaign or template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Shared template URL information + content: + application/json: + schema: + $ref: '#/components/schemas/getSharedTemplateUrl' + examples: + response: + value: + sharedUrl: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign/Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: Only email campaigns or templates are allowed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/exportRecipients: + post: + tags: + - Email Campaigns + summary: Export the recipients of an email campaign + operationId: emailExportRecipients + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/emailExportRecipients' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/images: + post: + tags: + - Email Campaigns + summary: Upload an image to your account's image gallery + operationId: uploadImageToGallery + requestBody: + description: Parameters to upload an image + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageToGallery' + required: true + responses: + '201': + description: Image has been successfully uploaded + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageModel' + examples: + response: + value: + url: >- + https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email: + post: + tags: + - Transactional emails + summary: Send a transactional email + operationId: sendTransacEmail + requestBody: + description: Values to send a transactional email + content: + application/json: + schema: + $ref: '#/components/schemas/sendSmtpEmail' + required: true + responses: + '201': + description: transactional email sent + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '202': + description: transactional email scheduled + content: + application/json: + schema: + $ref: '#/components/schemas/scheduleSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails: + get: + tags: + - Transactional emails + summary: Get the list of transactional emails on the basis of allowed filters + description: >- + This endpoint will show the list of emails for past 30 days by default. + To retrieve emails before that time, please pass startDate and endDate + in query filters. + operationId: getTransacEmailsList + parameters: + - name: email + in: query + description: > + **Mandatory if templateId and messageId are not passed in query + filters.** Email address to which transactional email has been sent. + schema: + type: string + - name: templateId + in: query + description: > + **Mandatory if email and messageId are not passed in query + filters.** Id of the template that was used to compose transactional + email. + schema: + type: integer + format: int64 + - name: messageId + in: query + description: > + **Mandatory if templateId and email are not passed in query + filters.** Message ID of the transactional email sent. + schema: + type: string + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the list. **Maximum time period that can be + selected is one month**. + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the list. **Maximum time period that can be + selected is one month.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: List of transactional emails + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailsList' + examples: + response: + value: + count: 120 + transactionalEmails: + - email: abc@xyz.com + subject: summer camp + templateId: 15 + messageId: <201798300811.5787683@relay.domain.com> + uuid: 5a78c-209ok98262910-std2341 + date: '2019-05-25T11:53:26.000Z' + - email: test@test.com + subject: details verification + templateId: 15 + messageId: <201798300811.5700093@relay.domain.com> + uuid: 5a78c-209ok98262910-s99a341 + date: '2019-05-25T07:28:11.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails/{uuid}: + get: + tags: + - Transactional emails + summary: Get the personalized content of a sent transactional email + operationId: getTransacEmailContent + parameters: + - name: uuid + in: path + description: >- + Unique id of the transactional email that has been sent to a + particular contact + required: true + schema: + type: string + responses: + '200': + description: Transactional email content + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailContent' + examples: + response: + value: + email: abc@example.com + subject: Summer Camps + templateId: 12 + date: '2016-02-25T11:53:26.000Z' + events: + - name: sent + time: '2016-02-25T11:53:26.000Z' + - name: delivered + time: '2016-02-25T11:55:26.000Z' + - name: opened + time: '2016-02-26T09:53:26.000Z' + body: >- +This is the actual html content sent
+ + /smtp/log/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete an SMTP transactional log + parameters: + - name: identifier + in: path + description: MessageId or Email of the transactional log(s) to delete + required: true + schema: + type: string + responses: + '204': + description: Transactional Logs deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Message ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates: + get: + tags: + - Transactional emails + summary: Get the list of email templates + operationId: getSmtpTemplates + parameters: + - name: templateStatus + in: query + description: >- + Filter on the status of the template. Active = true, inactive = + false + schema: + type: boolean + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: transactional email templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 5 + name: ChristomasTimeTemplate + subject: Merry Christmas + isActive: false + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Festival + htmlContent: HTML CONTENT 1 + createdAt: '2016-02-24T14:44:24.000Z' + modifiedAt: '2016-02-24T15:37:11.000Z' + - id: 12 + name: SummerSales2017Template + subject: Enjoy our summer Sales ! + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Summer + htmlContent: HTML CONTENT 2 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Transactional emails + summary: Create an email template + operationId: createSmtpTemplate + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}: + get: + tags: + - Transactional emails + summary: Returns the template information + operationId: getSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Email template informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplateOverview' + examples: + response: + value: + id: 33 + name: OrderConfirmation + subject: 'Order Confirmation : Thanks for your Purchase !' + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 26 + replyTo: replyto@domain.com + toField: '' + tag: '' + htmlContent: HTML CONTENT 4 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + doiTemplate: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Transactional emails + summary: Update an email template + operationId: updateSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmtpTemplate' + required: true + responses: + '204': + description: transactional email template updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Transactional emails + summary: Delete an inactive email template + operationId: deleteSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Inactive transactional email template has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}/sendTest: + post: + tags: + - Transactional emails + summary: Send a template to your test list + operationId: sendTestTemplate + parameters: + - name: templateId + in: path + description: Id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/aggregatedReport: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated over a period of time + description: >- + This endpoint will show the aggregated stats for past 90 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getAggregatedSmtpReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAggregatedReport' + examples: + response: + value: + range: 2016-09-08|2017-04-28 + requests: 19887 + delivered: 18996 + hardBounces: 234 + softBounces: 1533 + clicks: 9987 + uniqueClicks: 8766 + opens: 17654 + uniqueOpens: 13688 + spamReports: 1 + blocked: 2 + invalid: 0 + unsubscribed: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/reports: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated per day + operationId: getSmtpReport + parameters: + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 30 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD) + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getReports' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + clicks: 1026 + uniqueClicks: 720 + opens: 5091 + uniqueOpens: 2318 + spamReports: 0 + blocked: 519 + invalid: 1 + unsubscribed: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + clicks: 1514 + uniqueClicks: 1090 + opens: 10089 + uniqueOpens: 4393 + spamReports: 0 + blocked: 920 + invalid: 2 + unsubscribed: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/events: + get: + tags: + - Transactional emails + summary: Get all your transactional email activity (unaggregated events) + description: >- + This endpoint will show the aggregated stats for past 30 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getEmailEventReport + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 5000 + type: integer + format: int64 + default: 2500 + minimum: 0 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: email + in: query + description: Filter the report for a specific email addresses + schema: + type: string + format: email + - name: event + in: query + description: Filter the report for a specific event type + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - spam + - requests + - opened + - clicks + - invalid + - deferred + - blocked + - unsubscribed + - error + - loadedByProxy + - name: tags + in: query + description: Filter the report for tags (serialized and urlencoded array) + schema: + type: string + - name: messageId + in: query + description: Filter on a specific message id + schema: + type: string + - name: templateId + in: query + description: Filter on a specific template id + schema: + type: integer + format: int64 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Email events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailEventReport' + examples: + response: + value: + events: + - email: john.smith@example.com + date: '2017-03-12T12:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: deferred + reason: Error connection timeout + tag: OrderConfirmation + from: john@example.com + templateId: 4 + - email: john.smith@example.com + date: '2017-03-13T16:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: delivered + tag: OrderConfirmation + from: john@example.com + templateId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts/{email}: + delete: + tags: + - Transactional emails + summary: Unblock or resubscribe a transactional contact + parameters: + - name: email + in: path + description: contact email (urlencoded) to unblock. + required: true + schema: + type: string + responses: + '204': + description: Contact unblocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts: + get: + tags: + - Transactional emails + summary: Get the list of blocked or unsubscribed transactional contacts + operationId: getTransacBlockedContacts + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 100 + type: integer + format: int64 + default: 50 + minimum: 0 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: senders + in: query + description: >- + Comma separated list of emails of the senders from which contacts + are blocked or unsubscribed + style: form + explode: false + schema: + type: array + items: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: List of blocked or unsubscribed transactional contacts + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacBlockedContacts' + examples: + response: + value: + count: 1 + contacts: + - email: abc@xyz.com + senderEmail: ez312@gmal.com + reason: + message: Admin blocked + code: adminBlocked + blockedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains: + get: + tags: + - Transactional emails + summary: Get the list of blocked domains + description: Get the list of blocked domains + operationId: getBlockedDomains + responses: + '200': + description: List of blocked domains + content: + application/json: + schema: + $ref: '#/components/schemas/getBlockedDomains' + examples: + response: + value: + domains: + - example.com + - testdomain.com + post: + tags: + - Transactional emails + summary: Add a new domain to the list of blocked domains + description: Blocks a new domain in order to avoid messages being sent to the same + operationId: blockNewDomain + requestBody: + description: Name of the domain to be blocked + content: + application/json: + schema: + $ref: '#/components/schemas/blockDomain' + required: true + responses: + '201': + description: Domain is successfully blocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains/{domain}: + delete: + tags: + - Transactional emails + summary: Unblock an existing domain from the list of blocked domains + description: Unblocks an existing domain from the list of blocked domains + operationId: deleteBlockedDomain + parameters: + - name: domain + description: The name of the domain to be deleted + in: path + required: true + schema: + type: string + responses: + '204': + description: Domain is successfully deleted from the list of blocked domains + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/deleteHardbounces: + post: + tags: + - Transactional emails + summary: Delete hardbounces + description: >- + Delete hardbounces. To use carefully (e.g. in case of temporary ISP + failures) + operationId: deleteHardbounces + requestBody: + description: values to delete hardbounces + content: + application/json: + schema: + $ref: '#/components/schemas/deleteHardbounces' + required: false + responses: + '204': + description: Hardbounces deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emailStatus/{identifier}: + get: + tags: + - Transactional emails + summary: Fetch scheduled emails by batchId or messageId + description: >- + Fetch scheduled batch of emails by batchId or single scheduled email by + messageId (Can retrieve data upto 30 days old) + operationId: getScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + - name: startDate + description: >- + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from + which you want to fetch the list. Can be maximum 30 days older tha + current date. + in: query + example: '2022-02-02' + required: false + schema: + type: string + format: date + - name: endDate + description: >- + Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till + which you want to fetch the list. Maximum time period that can be + selected is one month. + in: query + example: '2022-03-02' + required: false + schema: + type: string + format: date + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed. + Not valid when identifier is `messageId`. + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: status + in: query + description: >- + Filter the records by `status` of the scheduled email batch or + message. Not valid when identifier is `messageId`. + required: false + schema: + type: string + enum: + - processed + - inProgress + - queued + - name: limit + description: >- + Number of documents returned per page. Not valid when identifier is + `messageId`. + in: query + required: false + example: 100 + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: >- + Index of the first document on the page. Not valid when identifier + is `messageId`. + in: query + required: false + example: 0 + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: Scheduled email batches + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/getScheduledEmailByBatchId' + - $ref: '#/components/schemas/getScheduledEmailByMessageId' + examples: + batchId: + value: + count: 3 + batches: + - scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + - scheduledAt: '2022-02-25T11:36:43.576000000Z' + createdAt: '2022-02-24T11:36:43.576000000Z' + status: processed + - scheduledAt: '2022-02-26T11:36:43.576000000Z' + createdAt: '2022-02-25T11:36:43.576000000Z' + status: inProgress + messageId: + value: + scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete scheduled emails by batchId or messageId + description: >- + Delete scheduled batch of emails by batchId or single scheduled email by + messageId + operationId: deleteScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + responses: + '204': + description: Scheduled email(s) deleted + content: {} + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts: + get: + tags: + - Contacts + summary: Get all the contacts + operationId: getContacts + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: createdSince + in: query + description: > + Filter (urlencoded) the contacts created after a given UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in + date-time format for accurate result.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: segmentId + in: query + description: Id of the segment. **Either listIds or segmentId can be passed.** + schema: + type: integer + format: int64 + - name: listIds + in: query + description: Ids of the list. **Either listIds or segmentId can be passed.** + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: All contacts listed + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: contact1@example.com + id: 247 + emailBlacklisted: true + smsBlacklisted: true + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 58 + attributes: + SMS: '33058407250' + IDENTIFICATION: 1-3RHQ-259 + CIV: MS + LAST_NAME: Brennon + FIRST_NAME: Meg + DOB: '1986-05-02T00:00:00.000Z' + ADDRESS: 1 5th avenue + ZIP_CODE: '44300' + CITY: New-York + ACTION_CODE: 17HH98CH + - email: 33058407248@mailin-sms.com + id: 245 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 61 + - 58 + attributes: + SMS: '33058407248' + IDENTIFICATION: 1-78JS-432 + CIV: MS + LAST_NAME: Press + FIRST_NAME: Sophia + DOB: '1980-09-11T00:00:00.000Z' + ADDRESS: 5 Flower Street + ZIP_CODE: '44119' + CITY: Seattle + ACTION_CODE: 17HU765 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a contact + operationId: createContact + requestBody: + description: Values to create a contact + content: + application/json: + schema: + $ref: '#/components/schemas/createContact' + required: true + responses: + '201': + description: Contact created + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateContactModel' + examples: + response: + value: + id: 21 + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/doubleOptinConfirmation: + post: + tags: + - Contacts + summary: Create Contact via DOI (Double-Opt-In) Flow + operationId: createDoiContact + requestBody: + description: Values to create the Double opt-in (DOI) contact + content: + application/json: + schema: + $ref: '#/components/schemas/createDoiContact' + required: true + responses: + '201': + description: DOI Contact created + content: {} + '204': + description: DOI Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createDoiContact + /contacts/{identifier}: + get: + tags: + - Contacts + summary: Get a contact's details + description: >- + Along with the contact details, this endpoint will show the statistics + of contact for the recent 90 days by default. To fetch the earlier + statistics, please use Get contact campaign stats + ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` + endpoint with the appropriate date ranges. + operationId: getContactInfo + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact OR its SMS attribute value + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. + schema: + type: string + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedContactDetails' + examples: + response: + value: + email: peggy.rain@example.com + id: 42 + emailBlacklisted: false + smsBlacklisted: false + createdAt: '2017-05-02T16:40:31.000Z' + modifiedAt: '2017-05-02T16:40:31.000Z' + attributes: + FIRST_NAME: Peggy + LAST_NAME: Rain + SMS: '3087433387669' + CIV: '1' + DOB: '1986-04-13T00:00:00.000Z' + ADDRESS: 987 5th avenue + ZIP_CODE: '87544' + CITY: New-York + AREA: NY + listIds: + - 40 + statistics: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 68 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a contact + operationId: deleteContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + responses: + '204': + description: Contact deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: You're not allowed to delete registered email contact with Brevo + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a contact + operationId: updateContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + requestBody: + description: Values to update a contact + content: + application/json: + schema: + $ref: '#/components/schemas/updateContact' + required: true + responses: + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateContact + /contacts/batch: + post: + tags: + - Contacts + summary: Update multiple contacts + operationId: updateBatchContacts + requestBody: + description: Values to update multiple contacts + content: + application/json: + schema: + $ref: '#/components/schemas/updateBatchContacts' + required: true + responses: + '204': + description: All contacts updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/{identifier}/campaignStats: + get: + tags: + - Contacts + summary: Get email campaigns' statistics for a contact + operationId: getContactStats + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. Maximum difference between startDate and endDate + should not be greater than 90 days + schema: + type: string + responses: + '200': + description: Contact campaign statistics informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContactCampaignStats' + examples: + response: + value: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + - campaignId: 45 + eventTime: '2016-11-09T11:45:02.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 45 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/attributes: + get: + tags: + - Contacts + summary: List all attributes + operationId: getAttributes + responses: + '200': + description: Attributes listed + content: + application/json: + schema: + $ref: '#/components/schemas/getAttributes' + examples: + response: + value: + attributes: + - name: LASTNAME + category: normal + type: text + - name: FIRSTNAME + category: normal + type: text + - name: DOB + category: normal + type: date + - name: GENDER + category: category + type: text + enumeration: + - value: 1 + label: Men + - value: 2 + label: Women + - value: 3 + label: Kid + /contacts/attributes/{attributeCategory}/{attributeName}: + put: + tags: + - Contacts + summary: Update contact attribute + operationId: updateAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + requestBody: + description: Values to update an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/updateAttribute' + required: true + responses: + '204': + description: Attribute updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateAttribute + post: + tags: + - Contacts + summary: Create contact attribute + operationId: createAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the attribute + required: true + schema: + type: string + requestBody: + description: Values to create an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/createAttribute' + required: true + responses: + '201': + description: Attribute created + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete an attribute + operationId: deleteAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + responses: + '204': + description: Attribute deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders: + get: + tags: + - Contacts + summary: Get all folders + operationId: getFolders + parameters: + - name: limit + in: query + description: Number of documents per page + required: true + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + required: true + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folders informations + content: + application/json: + schema: + $ref: '#/components/schemas/getFolders' + examples: + response: + value: + folders: + - id: 42 + name: Ninja_Form + totalBlacklisted: 98 + totalSubscribers: 4567 + uniqueSubscribers: 4665 + - id: 29 + name: Prestashop + totalBlacklisted: 10 + totalSubscribers: 6543 + uniqueSubscribers: 6553 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a folder + operationId: createFolder + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createFolder + /contacts/folders/{folderId}: + get: + tags: + - Contacts + summary: Returns a folder's details + operationId: getFolder + parameters: + - name: folderId + in: path + description: id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Folder details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolder' + examples: + response: + value: + id: 1 + name: Client_Folder + totalBlacklisted: 987 + totalSubscribers: 16778 + uniqueSubscribers: 17765 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a folder + operationId: updateFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '204': + description: Folder updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateFolder + delete: + tags: + - Contacts + summary: Delete a folder (and all its lists) + operationId: deleteFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Folder deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders/{folderId}/lists: + get: + tags: + - Contacts + summary: Get lists in a folder + operationId: getFolderLists + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folder's Lists details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolderLists' + examples: + response: + value: + lists: + - id: 46 + name: Reactiv + totalSubscribers: 7655 + totalBlacklisted: 0 + uniqueSubscribers: 7655 + - id: 41 + name: NY_Area + totalSubscribers: 3654 + totalBlacklisted: 23 + uniqueSubscribers: 3677 + - id: 22 + name: VIP_Customer + totalSubscribers: 8753 + totalBlacklisted: 72 + uniqueSubscribers: 8825 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists: + get: + tags: + - Contacts + summary: Get all the lists + operationId: getLists + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Lists informations + content: + application/json: + schema: + $ref: '#/components/schemas/getLists' + examples: + response: + value: + lists: + - id: 53 + name: Spanish_Speakers + totalSubscribers: 5432 + totalBlacklisted: 65 + uniqueSubscribers: 5497 + folderId: 1 + - id: 50 + name: Other + totalSubscribers: 10976 + totalBlacklisted: 765 + uniqueSubscribers: 11741 + folderId: 2 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a list + operationId: createList + requestBody: + description: Values to create a list + content: + application/json: + schema: + $ref: '#/components/schemas/createList' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}: + get: + tags: + - Contacts + summary: Get a list's details + operationId: getList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for + a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email + campaigns for a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + responses: + '200': + description: List informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedList' + examples: + response: + value: + id: 12 + name: Newsletter_Weekly + startDate: '2023-09-30T00:00:00.000Z' + endDate: '2023-03-31T00:00:00.000Z' + totalSubscribers: 6533 + totalBlacklisted: 63 + uniqueSubscribers: 6596 + folderId: 1 + createdAt: '2016-02-26T11:56:08.000Z' + campaignStats: + - campaignId: 15 + stats: + uniqueClicks: 701 + clickers: 789 + complaints: 0 + delivered: 6632 + sent: 6645 + softBounces: 34 + hardBounces: 4 + uniqueViews: 3442 + unsubscriptions: 4 + viewed: 4322 + deferred: 0 + - campaignId: 45 + stats: + uniqueClicks: 654 + clickers: 788 + complaints: 1 + delivered: 4078 + sent: 4334 + softBounces: 18 + hardBounces: 2 + uniqueViews: 987 + unsubscriptions: 4 + viewed: 1555 + deferred: 0 + dynamicList: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a list + operationId: updateList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a list + content: + application/json: + schema: + $ref: '#/components/schemas/updateList' + required: true + responses: + '204': + description: List updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a list + operationId: deleteList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: List deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/segments: + get: + tags: + - Contacts + summary: Get all the segments + operationId: getSegments + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Segments informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSegments' + examples: + response: + value: + segments: + - id: 53 + segmentName: Segment1 + categoryName: Name1 + updatedAt: '2017-03-12T12:30:00.000Z' + - id: 50 + segmentName: Segment2 + categoryName: Name2 + updatedAt: '2017-03-12T12:30:00.000Z' + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts: + get: + tags: + - Contacts + summary: Get contacts in a list + operationId: getContactsFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 500 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: alex.pain@example.com + id: 45 + emailBlacklisted: false + smsBlacklisted: true + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + - 2 + attributes: + LASTNAME: Pain + FIRSTNAME: Alex + DOB: '2010-12-31T00:00:00.000Z' + GENDER: Kid + - email: john.smith@example.com + id: 32 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Smith + FIRSTNAME: John + DOB: '1986-06-21T00:00:00.000Z' + GENDER: Men + - email: helen.rose@example.com + id: 65 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Rose + FIRSTNAME: Helen + DOB: '1988-11-02T00:00:00.000Z' + GENDER: Women + SMS: '3375599887766' + count: 17655 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/add: + post: + tags: + - Contacts + summary: Add existing contacts to a list + operationId: addContactToList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails addresses OR IDs of the contacts + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/addContactToListByEmails' + - $ref: '#/components/schemas/addContactToListByIDs' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + required: true + responses: + '201': + description: >- + All contacts have been added successfully to the list with details + of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/remove: + post: + tags: + - Contacts + summary: Delete a contact from a list + operationId: removeContactFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails adresses OR IDs of the contacts OR 'all' true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/removeContactFromListByEmails' + - $ref: '#/components/schemas/removeContactFromListByIDs' + - $ref: '#/components/schemas/removeContactFromListByAll' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + allTrue: + summary: Passing 'all' true + value: + all: true + required: true + responses: + '201': + description: >- + All contacts have been removed successfully from the list with + details of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + allTrue: + summary: Response example when 'all' is passed as true + value: + total: 23 + processId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: contactEmails + /contacts/export: + post: + tags: + - Contacts + summary: Export contacts + description: >- + 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. + operationId: requestContactExport + requestBody: + description: Values to request a contact export + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactExport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/import: + post: + tags: + - Contacts + summary: Import contacts + description: > + It returns the background process ID which on completion calls + + the notify URL that you have set in the input. + + + **Note**: + + - Any contact attribute that doesn't exist in your account will be + ignored at import end. + operationId: importContacts + requestBody: + description: >- + Values to import contacts in Brevo. To know more about the expected + format, please have a look at + ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactImport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns: + get: + tags: + - SMS Campaigns + summary: Returns the information for all your created SMS campaigns + operationId: getSmsCampaigns + parameters: + - name: status + in: query + description: Status of campaign. + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: SMS campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaigns' + examples: + response: + value: + campaigns: + - id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + - id: 10 + name: SUMMER SALE + status: draft + content: >- + Summer Sale is starting tomorrow. Get extra 10% with + this code:SUM17 + scheduledAt: '2017-08-04T12:30:00.000Z' + testSent: false + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + count: 12 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - SMS Campaigns + summary: Creates an SMS campaign + operationId: createSmsCampaign + requestBody: + description: Values to create an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createSmsCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}: + get: + tags: + - SMS Campaigns + summary: Get an SMS campaign + operationId: getSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: SMS campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaign' + examples: + response: + value: + id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - SMS Campaigns + summary: Update an SMS campaign + operationId: updateSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmsCampaign' + required: true + responses: + '204': + description: SMS campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - SMS Campaigns + summary: Delete an SMS campaign + operationId: deleteSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/sendNow: + post: + tags: + - SMS Campaigns + summary: Send your SMS campaign immediately + operationId: sendSmsCampaignNow + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been scheduled + content: {} + '400': + description: SMS Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/status: + put: + tags: + - SMS Campaigns + summary: Update a campaign's status + operationId: updateSmsCampaignStatus + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign. + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: status + /smsCampaigns/{campaignId}/sendTest: + post: + tags: + - SMS Campaigns + summary: Send a test SMS campaign + operationId: sendTestSms + parameters: + - name: campaignId + in: path + description: Id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: > + 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** + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestSms' + required: true + responses: + '204': + description: Test SMS has been sent successfully to the recipient + content: {} + '400': + description: Test SMS could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendSmsTestFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/exportRecipients: + post: + tags: + - SMS Campaigns + summary: Export an SMS campaign's recipients + description: >- + It returns the background process ID which on completion calls the + notify URL that you have set in the input. + operationId: requestSmsRecipientExport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/requestSmsRecipientExport' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: recipientExport + /smsCampaigns/{campaignId}/sendReport: + post: + tags: + - SMS Campaigns + summary: Send an SMS campaign's report + description: >- + Send report of Sent and Archived campaign, to the specified email + addresses, with respective data and a pdf attachment in detail. + operationId: sendSmsReport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/sms: + post: + tags: + - Transactional SMS + summary: Send SMS message to a mobile number + operationId: sendTransacSms + requestBody: + description: Values to send a transactional SMS + content: + application/json: + schema: + $ref: '#/components/schemas/sendTransacSms' + required: true + responses: + '201': + description: SMS has been sent successfully to the recipient + content: + application/json: + schema: + $ref: '#/components/schemas/sendSms' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your SMS. Please update your + plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sendTransacSms + /transactionalSMS/statistics/aggregatedReport: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated over a period of time + operationId: getTransacAggregatedSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with startDate and endDate** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacAggregatedSmsReport' + examples: + response: + value: + range: 2015-05-22|2017-11-29 + requests: 54 + delivered: 16 + hardBounces: 5 + softBounces: 26 + blocked: 4 + unsubscribed: 10 + replied: 8 + accepted: 6 + rejected: 14 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/reports: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated per day + operationId: getTransacSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacSmsReport' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + blocked: 1026 + unsubscribed: 720 + replied: 5091 + accepted: 2318 + rejected: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + blocked: 1514 + unsubscribed: 1090 + replied: 10089 + accepted: 4393 + rejected: 0 + - date: '2017-05-02T00:00:00.000Z' + requests: 14321 + delivered: 13427 + hardBounces: 16 + softBounces: 176 + blocked: 1646 + unsubscribed: 1170 + replied: 11563 + accepted: 4689 + rejected: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/events: + get: + tags: + - Transactional SMS + summary: Get all your SMS activity (unaggregated events) + operationId: getSmsEvents + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: phoneNumber + in: query + description: Filter the report for a specific phone number + schema: + type: string + - name: event + in: query + description: Filter the report for specific events + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - sent + - accepted + - unsubscription + - replies + - blocked + - rejected + - name: tags + in: query + description: >- + Filter the report for specific tags passed as a serialized + urlencoded array + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Sms events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsEventReport' + examples: + response: + value: + events: + - phoneNumber: '00911059469013' + date: '2015-05-20T12:30:00.000Z' + messageId: '1473139351170140' + event: sent + reason: Recipient is currently unreachable + tag: cabWaiting + - phoneNumber: '00911059469013' + date: '2015-05-20T16:30:00.000Z' + messageId: '1473139351170140' + event: delivered + reason: Recipient is currently unreachable + tag: cabRequest + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/{campaignId}: + get: + tags: + - WhatsApp Campaigns + summary: Get a WhatsApp campaign + operationId: getWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Get WhatsApp campaign information on the basis of campaignId + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaignOverview' + examples: + response: + value: + id: 1672035851100690 + campaignName: Test WhatsApp Campaign + campaignStatus: sent + scheduledAt: '2022-12-26T09:50:00.000Z' + senderNumber: 9368207029 + recipients: + type: list + includedLists: + - 22 + excludedLists: + - 45 + template: + name: official_campaign8 + category: MARKETING + language: en + contains_button: true + display_header: false + components: + - type: BODY + text: making it look like readable English. + - type: BUTTONS + buttons: + - type: URL + text: vLorem Ipsum is simply du + url: app.brevo + - type: PHONE_NUMBER + text: Lorem Ipsum is simply dum + phone_number: '+918800613137' + header_variables: + - name: FIRSTNAME + default: INVALID HEADER + index: 1 + datatype: text + header_type: text + body_variable: [] + button_type: CALL_TO_ACTION + header_footer: true + stats: + sent: 3, + delivered: 3, + read: 2, + unsubscribe: 0, + notSent: 4 + createdAt: '2022-12-26T06:50:00.000Z' + modifiedAt: '2022-12-26T08:50:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - WhatsApp Campaigns + summary: Delete a WhatsApp campaign + operationId: deleteWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - WhatsApp Campaigns + summary: Update a WhatsApp campaign + operationId: updateWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateWhatsAppCampaign' + required: true + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template-list: + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp templates + operationId: getWhatsAppTemplates + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: source + in: query + description: source of the template + required: false + schema: + type: string + enum: + - Automation + - Conversations + responses: + '200': + description: WhatsApp templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 235 + name: campaign_22 + type: whatsapp + status: approved + language: en + category: MARKETING + errorReason: NONE + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + - id: 124 + name: test-template + type: whatsapp + status: draft + language: '' + category: MARKETING + errorReason: NONE + createdAt: 2017-0 + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns: + post: + tags: + - WhatsApp Campaigns + summary: Create and Send a WhatsApp campaign + operationId: createWhatsAppCampaign + requestBody: + description: Values to create a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp campaigns + operationId: getWhatsAppCampaigns + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: WhatsApp campaigns information + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaigns' + examples: + response: + value: + count: 23 + campaigns: + - id: 1672035851100690 + campaignName: campaign_22 + campaignStatus: sent + templateId: 637660278078655 + scheduledAt: '2022-12-27T09:50:00.000Z' + errorReason: '' + invalidatedContacts: 0 + stats: + sent: 3 + delivered: 3 + read: 2 + unsubscribe: 0 + notSent: 4 + readPercentage: 28.57 + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template: + post: + tags: + - WhatsApp Campaigns + summary: Create a WhatsApp template + operationId: createWhatsAppTemplate + requestBody: + description: Values to create a WhatsApp template + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template/approval/{templateId}: + post: + tags: + - WhatsApp Campaigns + summary: Send your WhatsApp template for approval + operationId: sendWhatsAppTemplateApproval + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: WhatsApp template sent for approval + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/config: + get: + tags: + - WhatsApp Campaigns + summary: Get your WhatsApp API account information + operationId: getWhatsAppConfig + responses: + '200': + description: Get all the information of your WhatsApp API account + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsAppConfig' + examples: + response: + value: + whatsappBusinessAccountID: 105569359072383 + sendingLimit: TIER_1K + phoneNumberQuality: GREEN + whatsappBusinessAccountStatus: APPROVED + businessStatus: verified + phoneNumberNameStatus: APPROVED + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders: + get: + tags: + - Senders + summary: Get the list of all your senders + operationId: getSenders + parameters: + - name: ip + in: query + description: > + Filter your senders for a specific ip. **Available for dedicated IP + usage only** + schema: + type: string + - name: domain + in: query + description: Filter your senders for a specific domain + schema: + type: string + responses: + '200': + description: list of senders + content: + application/json: + schema: + $ref: '#/components/schemas/getSendersList' + examples: + response: + value: + senders: + - id: 1 + name: Marketing + email: marketing@mycompany.com + active: true + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 100 + - id: 2 + name: Newsletter + email: newsletter@mycompany.com + active: false + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 50 + - ip: 123.98.643.2 + domain: news.mycompany.com + weight: 50 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Senders + summary: Create a new sender + operationId: createSender + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/createSender' + required: false + responses: + '201': + description: sender created + content: + application/json: + schema: + $ref: '#/components/schemas/createSenderModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}: + put: + tags: + - Senders + summary: Update a sender + operationId: updateSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/updateSender' + required: false + responses: + '204': + description: sender updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + delete: + tags: + - Senders + summary: Delete a sender + operationId: deleteSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: sender deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/{senderId}/validate: + put: + tags: + - Senders + summary: Validate Sender using OTP + operationId: validateSenderByOTP + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: otp + content: + application/json: + schema: + $ref: '#/components/schemas/otp' + required: false + responses: + '204': + description: Sender verified + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for a sender + operationId: getIpsFromSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIpsFromSender' + examples: + response: + value: + ips: + - id: 3 + ip: 123.65.8.22 + domain: mailing.myshop.dom + weight: 40 + - id: 5 + ip: 123.43.21.3 + domain: newsletter.myshop.dom + weight: 60 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for your account + operationId: getIps + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIps' + examples: + response: + value: + ips: + - id: 3 + ip: 67.145.89.3 + active: true + domain: mailing.myshop.com + - id: 5 + ip: 76.76.125.9 + active: true + domain: newsletter.myshop.com + - id: 6 + ip: 123.65.8.22 + active: false + domain: notifications.myshop.com + /senders/domains: + get: + tags: + - Domains + summary: Get the list of all your domains + operationId: getDomains + responses: + '200': + description: list of domains + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainsList' + examples: + response: + value: + domains: + - id: 1 + domain_name: mycompany.com + authenticated: true + verified: true + ip: 123.98.689.7 + - id: 2 + domain_name: myexample.com + authenticated: false + verified: true + ip: null + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Domains + summary: Create a new domain + operationId: createDomain + requestBody: + description: domain's name + content: + application/json: + schema: + $ref: '#/components/schemas/createDomain' + required: false + responses: + '200': + description: domain created + content: + application/json: + schema: + $ref: '#/components/schemas/createDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: domain + /senders/domains/{domainName}: + delete: + tags: + - Domains + summary: Delete a domain + operationId: deleteDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - Domains + summary: Validate domain configuration + operationId: getDomainConfiguration + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain configuration + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainConfigurationModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/domains/{domainName}/authenticate: + put: + tags: + - Domains + summary: Authenticate a domain + operationId: authenticateDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/authenticateDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks: + get: + tags: + - Webhooks + summary: Get all webhooks + operationId: getWebhooks + parameters: + - name: type + in: query + description: Filter on webhook type + schema: + type: string + default: transactional + enum: + - marketing + - transactional + - inbound + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of webhook + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: Webhooks informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhooks' + examples: + response: + value: + webhooks: + - url: >- + https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1 + id: 9864 + description: Webhook triggered on campaign openings + events: + - opened + type: transac + createdAt: '2016-07-18T12:30:09.000Z' + modifiedAt: '2016-07-18T16:00:50.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + - url: http://exmaple.domain.com/15kxxxxxn1 + id: 22770 + description: Webhook triggered on campaign hard bounces + events: + - hardBounces + type: marketing + createdAt: '2017-02-20T14:30:00.000Z' + modifiedAt: '2017-02-20T19:00:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Webhooks + summary: Create a webhook + operationId: createWebhook + requestBody: + description: Values to create a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/createWebhook' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/{webhookId}: + get: + tags: + - Webhooks + summary: Get a webhook details + operationId: getWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Webhook informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhook' + examples: + response: + value: + url: http://example.domain.com/1brxxxxxx5p1 + id: 7287 + description: >- + Webhook triggered on campaign openings and addition of + lists + events: + - listAdditions + - opened + type: marketing + createdAt: '2016-06-07T09:10:10.000Z' + modifiedAt: '2016-06-08T11:30:00.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Webhooks + summary: Update a webhook + operationId: updateWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/updateWebhook' + required: true + responses: + '204': + description: Webhook updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateWebhook + delete: + tags: + - Webhooks + summary: Delete a webhook + operationId: deleteWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Webhook deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/export: + post: + tags: + - Webhooks + summary: Export all webhook events + description: >- + This endpoint will submit a request to get the history of webhooks in + the CSV file. The link to download the CSV file will be sent to the + webhook that was provided in the notifyURL. + operationId: exportWebhooksHistory + requestBody: + description: Values to submit for webhooks history + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/exportWebhooksHistory' + required: true + responses: + '202': + description: Request accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children: + get: + tags: + - Reseller + summary: Get the list of all children accounts + operationId: getResellerChilds + parameters: + - name: limit + in: query + description: Number of documents for child accounts information per page + schema: + maximum: 20 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of children + content: + application/json: + schema: + $ref: '#/components/schemas/getChildrenList' + examples: + response: + value: + children: + - email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187588 + - email: alex.pain@example.com + firstName: Alex + lastName: Pain + companyName: MyStore + credits: + emailCredits: 2000 + smsCredits: 0 + statistics: + previousMonthTotalSent: 654 + currentMonthTotalSent: 300 + totalSent: 6553 + password: abC0xxxxx64kL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187669 + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Creates a reseller child + operationId: createResellerChild + requestBody: + description: reseller child to add + content: + application/json: + schema: + $ref: '#/components/schemas/createChild' + required: false + responses: + '201': + description: child created + content: + application/json: + schema: + $ref: '#/components/schemas/createReseller' + examples: + response: + value: + authKey: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 1234567 + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}: + get: + tags: + - Reseller + summary: Get a child account's details + operationId: getChildInfo + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Information for the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildInfo' + examples: + response: + value: + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Reseller + summary: Update info of reseller's child based on the child identifier supplied + operationId: updateResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child profile + content: + application/json: + schema: + $ref: '#/components/schemas/updateChild' + required: true + responses: + '204': + description: reseller's child updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: resellerChild + delete: + tags: + - Reseller + summary: Delete a single reseller child based on the child identifier supplied + operationId: deleteResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or child id of reseller's child + required: true + schema: + type: string + responses: + '204': + description: child deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountStatus: + put: + tags: + - Reseller + summary: >- + Update info of reseller's child account status based on the identifier + supplied + operationId: updateChildAccountStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child account status + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildAccountStatus' + required: true + responses: + '204': + description: reseller's child account status updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountCreationStatus: + get: + tags: + - Reseller + summary: >- + Get the status of a reseller's child account creation, whether it is + successfully created (exists) or not based on the childIdentifier + supplied + operationId: getChildAccountCreationStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: status of reseller's child account + content: + application/json: + schema: + $ref: '#/components/schemas/getChildAccountCreationStatus' + examples: + response: + value: + childAccountCreated: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/ips/associate: + post: + tags: + - Reseller + summary: Associate a dedicated IP to the child + operationId: associateIpToChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to associate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is associated to the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/ips/dissociate: + post: + tags: + - Reseller + summary: Dissociate a dedicated IP to the child + operationId: dissociateIpFromChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to dissociate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is dissociated from the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/credits/add: + post: + tags: + - Reseller + summary: Add Email and/or SMS credits to a specific child account + operationId: addCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: Values to post to add credit to a specific child account + content: + application/json: + schema: + $ref: '#/components/schemas/addCredits' + required: true + responses: + '200': + description: Credits added + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/credits/remove: + post: + tags: + - Reseller + summary: Remove Email and/or SMS credits from a specific child account + operationId: removeCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Values to post to remove email or SMS credits from a specific child + account + content: + application/json: + schema: + $ref: '#/components/schemas/removeCredits' + required: true + responses: + '200': + description: Credits removed + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: removeCredits + /reseller/children/{childIdentifier}/domains: + get: + tags: + - Reseller + summary: Get all sender domains for a specific child account + operationId: getChildDomains + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Sender domains of the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildDomains' + examples: + response: + value: + - domain: mycustomdomain.com + active: true + - domain: mynewdomain.com + active: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Create a domain for a child account + operationId: createChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Sender domain to add for a specific child account. This will not be + displayed to the parent account. + content: + application/json: + schema: + $ref: '#/components/schemas/addChildDomain' + required: true + responses: + '201': + description: Domain added + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/domains/{domainName}: + put: + tags: + - Reseller + summary: >- + Update the sender domain of reseller's child based on the + childIdentifier and domainName passed + operationId: updateChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be updated + required: true + schema: + type: string + requestBody: + description: value to update for sender domain + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildDomain' + required: true + responses: + '204': + description: reseller's child domain updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Reseller + summary: >- + Delete the sender domain of the reseller child based on the + childIdentifier and domainName passed + operationId: deleteChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be deleted + required: true + schema: + type: string + responses: + '204': + description: child domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/auth: + get: + tags: + - Reseller + summary: Get session token to access Brevo (SSO) + description: >- + 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 => + https:/email.mydomain.com/login/sso?token=[token] + operationId: getSsoToken + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Session token + content: + application/json: + schema: + $ref: '#/components/schemas/getSsoToken' + examples: + response: + value: + token: 5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /account: + get: + tags: + - Account + summary: Get your account information, plan and credits details + operationId: getAccount + responses: + '200': + description: account informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAccount' + examples: + response: + value: + plan: + - type: payAsYouGo + credits: 5000 + creditsType: sendLimit + - type: subscription + credits: 39983 + creditsType: sendLimit + startDate: '2017-03-11T00:00:00.000Z' + endDate: '2017-04-11T00:00:00.000Z' + - type: sms + credits: 999.5360000000001 + creditsType: sendLimit + relay: + enabled: true + data: + userName: john.smith@example.com + relay: smtp-relay.domain.com + port: 587 + marketingAutomation: + key: kzfr5xxxxxxttuyo1 + enabled: true + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyShop + address: + city: New-York + street: 1677B 8th Avenue + zipCode: '7665' + country: USA + /organization/activities: + get: + tags: + - Account + - Master account + summary: Get user activity logs + operationId: getAccountActivity + parameters: + - name: startDate + description: >- + Mandatory if endDate is used. Enter start date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. Additionally, you can + retrieve activity logs from the past 12 months from the date of your + search. + in: query + required: false + schema: + type: string + - name: endDate + description: >- + Mandatory if startDate is used. Enter end date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. + in: query + required: false + schema: + type: string + - name: limit + description: Number of documents per page + in: query + required: false + schema: + type: integer + format: int64 + default: 10 + maximum: 100 + minimum: 1 + - name: offset + description: Index of the first document in the page. + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of user activity logs + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountActivity' + examples: + response: + value: + logs: + - action: login-success + date: '2023-03-16T11:19:23.000Z' + user_email: test@mycompany.com + user_ip: 192.158.1.34 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + - action: update-profile + date: '2023-03-15T11:19:23.000Z' + user_email: test@myexample.com + user_ip: 192.158.1.38 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/invited/users: + get: + tags: + - User + summary: Get the list of all your users + operationId: getInvitedUsersList + responses: + '200': + description: list of all your users + content: + application/json: + schema: + $ref: '#/components/schemas/getInvitedUsersList' + examples: + response: + value: + users: + - email: owner@company.com + is_owner: true + status: active + feature_access: + marketing: owner + conversations: owner + crm: owner + - email: pendingInvitedUser@company.com + is_owner: false + status: pending + feature_access: + marketing: custom + conversations: none + crm: full + - email: connectedInvitedUser@company.com + is_owner: false + status: active + feature_access: + marketing: none + conversations: full + crm: none + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/{email}/permissions: + get: + tags: + - User + summary: Check user permission + operationId: getUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: list of all the user's permissions + content: + application/json: + schema: + $ref: '#/components/schemas/getUserPermission' + examples: + response: + value: + email: invitedUser@company.com + status: active + privileges: + - feature: Email campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Templates + permissions: + - Create / edit / delete + - Activate / deactivate + - feature: SMS campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Facebook Ads + permissions: + - Schedule / pause + - feature: Landing pages + permissions: + - All + - feature: Workflows + permissions: + - Create / edit / delete + - Activate / deactivate / Pause + - feature: Contacts + permissions: + - View + - Contact forms + - feature: SMTP & API + permissions: + - SMTP + - API Keys + - Authorized IPs + - feature: User management + permissions: + - None + - feature: Sales Platform + permissions: + - Manage Owned Deals / Tasks / Companies + - Manage Others Deals / Tasks / Companies + - Reports + - Settings + - feature: Conversations + permissions: + - None + - feature: Senders, Domains & Dedicated IPs + permissions: + - Senders management + - Domains management + - Dedicated IPs management + - feature: Push + permissions: + - View + - Create / edit / delete + - Send + - Settings + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/revoke/{email}: + put: + tags: + - User + summary: Revoke user permission + operationId: putRevokeUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Credit note exists + content: + application/json: + schema: + $ref: '#/components/schemas/putRevokeUserPermissionResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/{action}/{email}: + put: + tags: + - User + summary: Resend / Cancel invitation + operationId: putresendcancelinvitation + parameters: + - name: action + description: action + in: path + required: true + schema: + type: string + enum: + - resend + - cancel + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/putresendcancelinvitationResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/send: + post: + tags: + - User + summary: Send invitation to user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - If `all_features_access: false` then only privileges are required + otherwise if `true` then it's assumed that all permissions will be there + for the invited user. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: inviteuser + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/update/permissions: + post: + tags: + - User + summary: Update permission for a user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - The privileges array remains the same as in the send invitation; the + user simply needs to provide the permissions that need to be updated. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: EditUserPermission + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/updateUserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes: + get: + tags: + - Process + summary: Return all the processes for your account + operationId: getProcesses + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: processes informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcesses' + examples: + response: + value: + processes: + - id: 40 + status: completed + name: TRANS-CALC + - id: 43 + status: queued + name: TRANS-GLOBAL-CALC + - id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes/{processId}: + get: + tags: + - Process + summary: Return the informations for a process + operationId: getProcess + parameters: + - name: processId + in: path + description: Id of the process + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: process informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcess' + examples: + response: + value: + id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Process ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + example: + code: invalid_parameter + message: processId is invalid + /inbound/events: + get: + tags: + - Inbound Parsing + summary: Get the list of all the events for the received emails. + description: >- + This endpoint will show the list of all the events for the received + emails. + operationId: getInboundEmailEvents + parameters: + - name: sender + description: Email address of the sender. + in: query + required: false + schema: + type: string + - name: startDate + description: >- + Mandatory if endDate is used. Starting date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: endDate + description: >- + Mandatory if startDate is used. Ending date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: limit + description: Number of documents returned per page + in: query + required: false + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: Index of the first document on the page + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: List of events for received emails. + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEvents' + examples: + response: + value: + events: + - uuid: 1a825d56-029b-4a41-b8e4-1a825d56 + date: '2017-03-11T12:30:00.000Z' + sender: john@example.com + recipient: alexa@example.com + - uuid: 1a825d56-029b-4a41-b8e4-61670463431b + date: '2017-03-12T12:30:00.000Z' + sender: alice@example.com + recipient: bob@example.com + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /inbound/events/{uuid}: + get: + tags: + - Inbound Parsing + summary: Fetch all events history for one particular received email. + description: >- + This endpoint will show the list of all events history for one + particular received email. + operationId: getInboundEmailEventsByUuid + parameters: + - name: uuid + description: UUID to fetch events specific to recieved email + in: path + required: true + schema: + type: string + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEventsByUuid' + examples: + response: + value: + receivedAt: '2017-03-12T12:30:00.000Z' + deliveredAt: '2017-03-12T12:31:00.000Z' + sender: alice@example.com + recipient: bob@example.com + messageId:Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + **Mandatory if htmlContent and templateId are empty**. Url to the + message (HTML). For example: + + **https://html.domain.com** + format: url + example: https://html.domain.com + templateId: + type: integer + description: > + **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. + format: int64 + scheduledAt: + type: string + description: > + 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). For example: + + **2017-06-01T12:30:00+02:00** + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: | + Subject of the campaign. **Mandatory if abTesting is false**. + Ignored if abTesting is true. + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which the campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact attributes must already exist in your Brevo account. If + input parameter **params** used please use **{{contact.FNAME}} + {{contact.LNAME}}** for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids to exclude from the campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + **Mandatory if scheduledAt is not empty**. List Ids to send the + campaign to + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **Mandatory if listIds are not used**. Segment ids to send the + campaign to. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_ + example: true + default: false + mirrorActive: + type: boolean + description: Use true to enable the mirror link + example: true + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: Set this to true if you want to send your campaign at best time. + example: true + default: false + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + **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. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + **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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + updateEmailCampaign: + type: object + properties: + tag: + type: string + description: Tag of the campaign + example: Newsletter + sender: + type: object + properties: + name: + type: string + description: Sender Name from which the campaign emails are sent + example: Mary from MyShop + email: + type: string + description: Sender email from which the campaign emails are sent + format: email + example: newsletter@myshop.com + id: + type: integer + description: > + 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)**. + format: int64 + example: 3 + description: > + Sender details including id or email and name (optional). Only one + of either Sender's email or Sender's ID shall be passed in one + request at a time. For example: + + **{"name":"xyz", "email":"example@abc.com"}** + + **{"name":"xyz", "id":123}** + name: + type: string + description: Name of the campaign + example: Newsletter - May 2017 + htmlContent: + type: string + description: > + 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** + example: >- +Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + Url which contents the body of the email message. **REQUIRED if + htmlContent is empty** + format: url + example: https://html.domain.com + scheduledAt: + type: string + description: > + 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). + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: Subject of the campaign + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact + + attributes must already exist in your Brevo account. If input + parameter + + **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** + for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + 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** + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **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. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps' + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_. + example: true + default: false + mirrorActive: + type: boolean + description: >- + Status of mirror links in campaign. mirrorActive = false means + mirror links are deactivated, & mirrorActive = true means mirror + links are activated, in the campaign + example: true + recurring: + type: boolean + description: > + **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 + example: false + default: false + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: | + Set this to true if you want to send your campaign at best time. + Note:- **if true, warmup ip will be disabled.** + example: true + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + Set an initial quota greater than 1 for warming up your ip. We + recommend you set a value of 3000. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + 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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + getSharedTemplateUrl: + required: + - sharedUrl + type: object + properties: + sharedUrl: + type: string + description: >- + A unique URL for the email campaign or transactional template. This + URL can be shared with other Brevo users. + format: url + example: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + abTestCampaignResult: + type: object + properties: + winningVersion: + type: string + description: >- + 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. + example: A + enum: + - notAvailable + - pending + - tie + - A + - B + winningCriteria: + type: string + description: Criteria choosen for winning version (Open/Click) + example: Open + enum: + - Open + - Click + winningSubjectLine: + type: string + description: Subject Line of current winning version + example: Subject Line A + openRate: + type: string + description: Open rate for current winning version + example: 70% + clickRate: + type: string + description: Click rate for current winning version + example: 70% + winningVersionRate: + type: string + description: Open/Click rate for the winner version + example: 70% + statistics: + required: + - clicks + - complaints + - hardBounces + - openers + - softBounces + - unsubscribed + type: object + properties: + openers: + $ref: '#/components/schemas/abTestVersionStats' + clicks: + $ref: '#/components/schemas/abTestVersionStats' + unsubscribed: + $ref: '#/components/schemas/abTestVersionStats' + hardBounces: + $ref: '#/components/schemas/abTestVersionStats' + softBounces: + $ref: '#/components/schemas/abTestVersionStats' + complaints: + $ref: '#/components/schemas/abTestVersionStats' + clickedLinks: + required: + - Version A + - Version B + type: object + properties: + Version A: + $ref: '#/components/schemas/abTestVersionClicks' + Version B: + $ref: '#/components/schemas/abTestVersionClicks' + emailExportRecipients: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + Webhook called once the export process is finished. For reference, + https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Type of recipients to export for a campaign + example: openers + enum: + - all + - nonClickers + - nonOpeners + - clickers + - openers + - softBounces + - hardBounces + - unsubscribed + requestSmsRecipientExport: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + URL that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Filter the recipients based on how they interacted with the campaign + example: answered + enum: + - all + - delivered + - answered + - softBounces + - hardBounces + - unsubscribed + sendReport: + required: + - email + type: object + properties: + language: + type: string + description: Language of email content for campaign report sending. + example: en + default: fr + enum: + - fr + - es + - pt + - it + - de + - en + email: + required: + - body + - to + type: object + properties: + to: + type: array + description: Email addresses of the recipients + items: + type: string + description: Email address of the recipient + format: email + example: jim.suehan@example.com + body: + type: string + description: Custom text message to be presented in the report email. + example: Please find attached the report of our last email campaign. + description: Custom attributes for the report email. + uploadImageToGallery: + required: + - imageUrl + type: object + properties: + imageUrl: + type: string + description: > + 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. + example: https://somedomain.com/image1.jpg + name: + type: string + description: Name of the image. + example: nature.jpg + sendSmtpEmail: + type: object + properties: + sender: + description: > + **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"}** + + **{"id":2}** + type: object + properties: + name: + type: string + description: > + description: Name of the sender from which the emails will be + sent. **Maximum allowed characters are 70**. Applicable only + when email is passed. + example: Mary from MyShop + email: + type: string + description: >- + Email of the sender from which the emails will be sent. + Mandatory if sender id is not passed. + format: email + example: no-reply@myshop.com + id: + type: integer + description: >- + 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. + format: int64 + example: 2 + to: + type: array + description: > + **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"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: | + Name of the recipient. **Maximum allowed characters are 70**. + example: Jimmy + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed characters are + 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed characters are + 70**. + example: Ann + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not passed, + ignored if 'templateId' is passed** + example: >- +Please + confirm your email address by clicking on the link below
+ + textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + subject: + type: string + description: | + Subject of the message. **Mandatory if 'templateId' is not passed** + example: Login Email confirmation + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + attachment: + type: array + description: > + 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 + items: + type: object + properties: + url: + type: string + description: | + Absolute url of the attachment (**no local file**). + format: url + example: https://attachment.domain.com/myAttachmentFromUrl.jpg + content: + pattern: >- + ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + description: >- + Base64 encoded chunk data of the attachment generated on the + fly + format: byte + example: b3JkZXIucGRm + name: + type: string + description: | + **Required if content is passed**. Name of the attachment + example: myAttachment.png + headers: + type: object + additionalProperties: {} + description: > + 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"}**. + example: + sender.ip: 1.2.3.4 + X-Mailin-custom: some_custom_header + idempotencyKey: abc-123 + templateId: + type: integer + description: Id of the template. + format: int64 + example: 2 + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + messageVersions: + type: array + description: > + 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** + items: + type: object + required: + - to + properties: + to: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients. For example, + + **[{"name":"Jimmy", "email":"jimmy98@example.com"}, + {"name":"Joe", "email":"joe@example.com"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: > + Name of the recipient. **Maximum allowed characters are + 70**. + example: Jimmy + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed + characters are 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed + characters are 70**. + example: Ann + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + subject: + type: string + description: | + Custom subject specific to message version + example: Login Email confirmation + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not + passed, ignored if 'templateId' is passed** + example: >- +Please confirm your email address by clicking on the link + below
+ textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + tags: + type: array + description: Tag your emails to find them more easily + items: + type: string + example: tag1 + scheduledAt: + type: string + description: >- + 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**. + format: date-time + example: '2022-04-05T12:30:00+02:00' + batchId: + type: string + description: >- + 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. + example: 5c6cfa04-eed9-42c2-8b5c-6d470d978e9d + deleteHardbounces: + type: object + properties: + startDate: + type: string + description: >- + Starting date (YYYY-MM-DD) of the time period for deletion. The + hardbounces occurred after this date will be deleted. Must be less + than or equal to the endDate + example: '2016-12-31T00:00:00.000Z' + endDate: + type: string + description: >- + Ending date (YYYY-MM-DD) of the time period for deletion. The + hardbounces until this date will be deleted. Must be greater than or + equal to the startDate + example: '2017-01-31T00:00:00.000Z' + contactEmail: + type: string + description: Target a specific email address + format: email + example: alex76@example.com + blockDomain: + type: object + required: + - domain + properties: + domain: + type: string + description: name of the domain to be blocked + example: example.com + createWebhook: + required: + - events + - url + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on unsubscription + events: + type: array + description: > + - 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` + items: + type: string + example: unsubscribed + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + type: + type: string + description: Type of the webhook + example: marketing + default: transactional + enum: + - transactional + - marketing + - inbound + domain: + type: string + description: Inbound domain of webhook, required in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + updateWebhook: + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on contact hardbounce + events: + type: array + description: > + - 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` + items: + type: string + example: hardBounce + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + domain: + type: string + description: Inbound domain of webhook, used in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + createDoiContact: + required: + - email + - includeListIds + - redirectionUrl + - templateId + type: object + properties: + email: + type: string + description: >- + Email address where the confirmation email will be sent. This email + address will be the identifier for all other contact attributes. + format: email + example: elly@example.com + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. **These attributes must + be present in your Brevo account**. For eg. **{'FNAME':'Elly', + 'LNAME':'Roger'}** + example: + FNAME: Elly + LNAME: Roger + includeListIds: + type: array + description: Lists under user account where contact should be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + excludeListIds: + type: array + description: Lists under user account where contact should not be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + templateId: + type: integer + description: Id of the Double opt-in (DOI) template + format: int64 + example: 2 + redirectionUrl: + type: string + description: > + 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 }}**. + format: url + example: http://requestb.in/173lyyx1 + createContact: + type: object + properties: + email: + type: string + description: > + 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"}** + format: email + example: elly@example.com + ext_id: + description: Pass your own Id to create a contact. + type: string + example: externalId + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. The attribute's + parameter should be passed in capital letter while creating a + contact. Values that don't match the attribute type (e.g. text or + string in a date attribute) will be ignored. **These attributes must + be present in your Brevo account.**. For eg: + + **{"FNAME":"Elly", "LNAME":"Roger"}** + example: + FNAME: Elly + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for emails (emailBlacklisted + = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for SMS (smsBlacklisted = + true) + example: false + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 36 + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing contact in the same request + (updateEnabled = true) + example: false + default: false + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact ( only available if updateEnabled = true ) + items: + type: string + format: email + updateContact: + type: object + properties: + attributes: + type: object + additionalProperties: {} + description: > + 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. Values that don't match the attribute type (e.g. + text or string in a date attribute) will be ignored. 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: updateExternalId + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact + items: + type: string + format: email + updateBatchContacts: + type: object + properties: + contacts: + type: array + description: List of contacts to be updated + items: + type: object + properties: + email: + type: string + description: >- + Email address of the user to be updated (For each operation + only pass one of the supported contact identifiers. Email, id + or sms) + format: email + example: elly@example.com + id: + type: integer + description: >- + id of the user to be updated (For each operation only pass one + of the supported contact identifiers. Email, id or sms) + format: int64 + example: 31 + sms: + type: string + description: >- + SMS of the user to be updated (For each operation only pass + one of the supported contact identifiers. Email, id or sms) + example: +91xxxxxxxxxx + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: UpdateExternalId + attributes: + type: object + additionalProperties: {} + description: > + 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for + email Contact + items: + type: string + format: email + createAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + isRecurring: + type: boolean + description: > + Type of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: true + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Women + type: + type: string + description: > + 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 + example: text + enum: + - text + - date + - float + - boolean + - id + - category + updateAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute to update. **Use only if the attribute's + category is 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Men + createList: + required: + - folderId + - name + type: object + properties: + name: + type: string + description: Name of the list + example: Magento Customer - ES + folderId: + type: integer + description: Id of the parent folder in which this list is to be created + format: int64 + example: 2 + updateList: + type: object + properties: + name: + type: string + description: >- + Name of the list. Either of the two parameters (name, folderId) can + be updated at a time. + example: Magento Customer - ES + folderId: + type: integer + description: >- + 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. + format: int64 + example: 2 + requestContactExport: + type: object + required: + - customContactFilter + properties: + exportAttributes: + type: array + description: > + List of all the attributes that you want to export. **These + attributes must be present in your contact database.** For example: + + **['fname', 'lname', 'email']** + items: + type: string + example: NAME + customContactFilter: + type: object + properties: + actionForContacts: + type: string + description: > + **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. + enum: + - allContacts + - subscribed + - unsubscribed + - unsubscribedPerList + actionForEmailCampaigns: + type: string + description: > + **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). + enum: + - openers + - nonOpeners + - clickers + - nonClickers + - unsubscribed + - hardBounces + - softBounces + actionForSmsCampaigns: + type: string + description: > + **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. + enum: + - hardBounces + - softBounces + - unsubscribed + listId: + type: integer + description: > + **Mandatory if actionForContacts is passed, ignored otherwise.** + Id of the list for which the corresponding action shall be + applied in the filter. + format: int64 + example: 2 + emailCampaignId: + type: integer + description: > + 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. + format: int64 + example: 12 + smsCampaignId: + type: integer + description: > + Considered only if **actionForSmsCampaigns** is passed, ignored + otherwise. The id of sms campaign for which the corresponding + action shall be applied in the filter. + format: int64 + example: 12 + description: | + Set the filter for the contacts to be exported. + notifyUrl: + type: string + description: >- + Webhook that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + requestContactImport: + type: object + properties: + fileUrl: + type: string + description: > + **Mandatory if fileBody and jsonBody is not defined.** URL of the + file to be imported (**no local file**). Possible file formats: + + #### .txt, .csv, .json + format: url + example: https://importfile.domain.com + fileBody: + type: string + description: > + **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. + example: |- + NAME;SURNAME;EMAIL + Smith;John;john.smith@example.com + Roger;Ellie;ellie36@example.com + jsonBody: + type: array + description: > + **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. + items: + type: object + properties: + email: + type: string + attributes: + type: object + additionalProperties: true + description: List of attributes to be imported + example: + email: ndicky0@ocn.ne.jp + attributes: + LNAME: Noemi + FNAME: Dicky + COUNTRY: DE + BIRTHDAY: 11/02/1989 + PREFERED_COLOR: BLACK + WHATSAPP: '33689965433' + LANDLINE_NUMBER: '33689965433' + SMS: '33689965433' + listIds: + type: array + description: > + **Mandatory if newList is not defined.** Ids of the lists in which + the contacts shall be imported. For example, **[2, 4, 7]**. + items: + type: integer + description: List Id in which the contacts shall be imported + format: int64 + example: 76 + notifyUrl: + type: string + description: >- + URL that will be called once the import process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + newList: + type: object + properties: + listName: + type: string + description: > + List with listName will be created first and users will be + imported in it. **Mandatory if listIds is empty**. + example: ContactImport - 2017-05 + folderId: + type: integer + description: > + Id of the folder where this new list shall be created. + **Mandatory if listName is not empty** + format: int64 + example: 2 + description: >- + To create a new list and import the contacts into it, pass the + listName and an optional folderId. + emailBlacklist: + type: boolean + description: To blacklist all the contacts for email + example: false + default: false + disableNotification: + type: boolean + description: To disable email notification + example: false + default: false + smsBlacklist: + type: boolean + description: To blacklist all the contacts for sms + example: false + default: false + updateExistingContacts: + type: boolean + description: To facilitate the choice to update the existing contacts + example: true + default: true + emptyContactsAttributes: + type: boolean + description: > + 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 **) + example: true + default: false + createSmsCampaign: + required: + - content + - name + - sender + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + updateSmsCampaign: + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + sendTransacSms: + required: + - content + - recipient + - sender + type: object + properties: + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + recipient: + type: string + description: Mobile number to send SMS with the country code + example: '33689965433' + content: + type: string + description: > + Content of the message. If more than **160 characters** long, will + be sent as multiple text messages + example: Enter this code:CCJJG8 to validate your account + type: + type: string + description: >- + 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. + example: marketing + default: transactional + enum: + - transactional + - marketing + tag: + type: string + description: Tag of the message + example: accountValidation + webUrl: + type: string + description: >- + Webhook to call for each event triggered by the message (delivered + etc.) + format: url + example: http://requestb.in/173lyyx1 + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + type: string + description: >- + 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.** + example: MyCompany + sendTestEmail: + type: object + properties: + emailTo: + type: array + description: > + List of the email addresses of the recipients whom you wish to send + the test mail. + + _If left empty, the test mail will be sent to your entire test list. + You can not send more than 50 test emails per day_. + items: + type: string + description: Email addres of the recipient + format: email + example: helen.jurger@example.com + sendTestSms: + type: object + properties: + phoneNumber: + type: string + description: > + 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** + example: '33689965433' + getTransacAggregatedSmsReport: + type: object + properties: + range: + type: string + description: Time frame of the report + example: 2016-09-08|2017-04-06 + requests: + type: integer + description: Number of requests for the timeframe + format: int64 + example: 263 + delivered: + type: integer + description: Number of delivered SMS for the timeframe + format: int64 + example: 249 + hardBounces: + type: integer + description: Number of hardbounces for the timeframe + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the timeframe + format: int64 + example: 4 + blocked: + type: integer + description: Number of blocked contact for the timeframe + format: int64 + example: 2 + unsubscribed: + type: integer + description: Number of unsubscription for the timeframe + format: int64 + example: 6 + replied: + type: integer + description: Number of answered SMS for the timeframe + format: int64 + example: 12 + accepted: + type: integer + description: Number of accepted for the timeframe + format: int64 + example: 252 + rejected: + type: integer + description: Number of rejected for the timeframe + format: int64 + example: 8 + getTransacSmsReport: + type: object + properties: + reports: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which statistics are retrieved + format: date + example: '2017-03-17T00:00:00.000Z' + requests: + type: integer + description: Number of requests for the date + format: int64 + example: 87 + delivered: + type: integer + description: Number of delivered SMS for the date + format: int64 + example: 85 + hardBounces: + type: integer + description: Number of hardbounces for the date + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the date + format: int64 + example: 1 + blocked: + type: integer + description: Number of blocked contact for the date + format: int64 + example: 0 + unsubscribed: + type: integer + description: Number of unsubscription for the date + format: int64 + example: 1 + replied: + type: integer + description: Number of answered SMS for the date + format: int64 + example: 2 + accepted: + type: integer + description: Number of accepted for the date + format: int64 + example: 85 + rejected: + type: integer + description: Number of rejected for the date + format: int64 + example: 1 + getIp: + required: + - active + - domain + - id + - ip + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + active: + type: boolean + description: Status of the IP (true=active, false=inactive) + example: true + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.com + getIpsFromSender: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) linked to a sender + items: + $ref: '#/components/schemas/getIpFromSender' + getIps: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) available on your account + items: + $ref: '#/components/schemas/getIp' + getIpFromSender: + required: + - domain + - id + - ip + - weight + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.dom + weight: + type: integer + description: Weight of the IP + format: int64 + example: 75 + manageIp: + type: object + properties: + ip: + type: string + description: Dedicated ID + example: 123.65.8.22 + getTransacEmailContent: + required: + - attachmentCount + - body + - date + - email + - events + - subject + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: abc@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + events: + type: array + description: Series of events which occurred on the transactional email + items: + required: + - name + - time + type: object + properties: + name: + type: string + description: Name of the event that occurred on the sent email + example: delivered + time: + type: string + description: Time at which the event occurred + example: '2017-03-12T12:30:00.000Z' + body: + type: string + description: Actual content of the transactional email that has been sent + example: >- +This is the actual html content sent
+ attachmentCount: + type: integer + description: Count of the attachments that were sent in the email + format: int64 + example: 2 + getTransacEmailsList: + type: object + properties: + count: + type: integer + description: >- + Total number of transactional emails available on your account + according to the passed filter + format: int64 + example: 5 + transactionalEmails: + type: array + items: + required: + - date + - email + - messageId + - subject + - uuid + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: john.smith@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + messageId: + type: string + description: Message Id of the sent email + example: <201798300811.5700093@relay.domain.com> + uuid: + type: string + description: Unique id of the email sent to a particular contact + example: 5a78c-209ok98262910-s99a341 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + from: + type: string + description: Email address of the sender from which the email was sent + format: email + example: diana.doe@example.com + tags: + type: array + description: Tags used for your email + items: + type: string + example: tag1 + getBlockedDomains: + type: object + required: + - domains + properties: + domains: + description: List of all blocked domains + type: array + items: + type: string + description: name of blocked domain + example: contact.com + abTestVersionStats: + required: + - Version A + - Version B + type: object + properties: + Version A: + type: string + description: percentage of an event for version A + example: 50% + Version B: + type: string + description: percentage of an event for version B + example: 50% + description: Percentage of a particular event for both versions + abTestVersionClicks: + type: array + description: Information on clicked links for a particular version + items: + required: + - clickRate + - clicksCount + - link + type: object + properties: + link: + type: string + description: URL of the link + example: https://facbook.com/versionA + clicksCount: + type: integer + description: Number of times a link is clicked + format: int64 + example: 3 + clickRate: + type: string + description: Percentage of clicks of link with respect to total clicks + example: 40% + getInboundEmailEvents: + type: object + properties: + events: + type: array + items: + type: object + required: + - uuid + - sender + - date + - recipient + properties: + uuid: + description: UUID that can be used to fetch additional data + type: string + format: uuid + date: + description: Date when email was received on SMTP relay + type: string + format: date-time + sender: + description: Sender’s email address + type: string + format: email + recipient: + description: Recipient’s email address + type: string + format: email + getInboundEmailEventsByUuid: + type: object + properties: + receivedAt: + description: Date when email was received on SMTP relay + type: string + format: date-time + example: '2019-05-25T11:53:26Z' + deliveredAt: + description: Date when email was delivered successfully to client’s webhook + type: string + nullable: true + format: date-time + recipient: + description: Recipient’s email address + type: string + format: email + sender: + description: Sender’s email address + type: string + format: email + messageId: + description: >- + Value of the Message-ID header. This will be present only after the + processing is done. + type: string + subject: + description: >- + Value of the Subject header. This will be present only after the + processing is done. + type: string + attachments: + description: >- + List of attachments of the email. This will be present only after + the processing is done. + type: array + items: + type: object + properties: + name: + description: >- + filename specified in the Content-Disposition header of the + attachment + type: string + contentType: + description: value of the Content-Type header of the attachment + type: string + contentId: + description: value of the Content-ID header of the attachment. + type: string + contentLength: + description: size of the attachment in bytes + type: integer + logs: + description: >- + List of events/logs that describe the lifecycle of the email on SIB + platform + type: array + items: + type: object + properties: + date: + description: Date of the event + type: string + format: date-time + type: + description: Type of the event + type: string + enum: + - received + - processed + - webhookFailed + - webhookDelivered + getScheduledEmailByBatchId: + type: object + properties: + count: + type: integer + description: Total number of batches + batches: + type: array + items: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the batch was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the batch was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled batch + type: string + enum: + - inProgress + - queued + - processed + - error + getScheduledEmailByMessageId: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the email was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the email was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled email + type: string + enum: + - inProgress + - queued + - processed + - error + subAccountsResponse: + type: object + properties: + count: + type: integer + description: Total number of subaccounts + subAccounts: + type: array + items: + type: object + required: + - id + - companyName + - active + - createdAt + properties: + id: + description: id of the sub-account + type: integer + format: int64 + companyName: + description: Name of the sub-account company + type: string + active: + description: Whether the sub-account is active or not + type: boolean + createdAt: + description: Timestamp when the sub-account was created + type: integer + format: int64 + createSubAccount: + type: object + required: + - companyName + - email + properties: + companyName: + description: Set the name of the sub-account company + type: string + email: + description: Email address for the organization + type: string + language: + description: Set the language of the sub-account + type: string + enum: + - en + - fr + - it + - es + - pt + - de + timezone: + description: Set the timezone of the sub-account + type: string + example: + companyName: Test Sub-account + email: test-sub@example.com + timezone: Europe/Paris + language: en + createSubAccountResponse: + required: + - id + type: object + properties: + id: + type: integer + description: ID of the sub-account created + format: int64 + example: 5 + corporateGroupDetailsResponse: + type: object + properties: + group: + type: object + properties: + id: + type: string + description: Group id + groupName: + type: string + description: Name of the group + createdAt: + type: string + description: Group creation date + sub-accounts: + type: array + items: + type: object + properties: + id: + type: integer + format: int64 + description: Id of the sub-account organzation + companyName: + type: string + description: Name of the sub-account organzation + createdAt: + type: string + description: Creation date of the sub-account organzation + users: + type: array + items: + type: object + properties: + email: + type: string + description: Email address of the user + lastName: + type: string + description: Last name of the user + firstName: + type: string + description: First name of the user + masterDetailsResponse: + type: object + properties: + email: + type: string + description: Email id of master account + companyName: + type: string + description: Company name of master account organization + id: + type: integer + format: int64 + description: Unique identifier of the master account organization + currencyCode: + type: string + description: Currency code of the master account organization + timezone: + type: string + description: Timezone of the master account organization + billingInfo: + type: object + description: Billing details of the master account organization + properties: + email: + type: string + description: Billing email id of master account + companyName: + type: string + description: Company name of master account + name: + type: object + description: Billing name of master account holder + properties: + givenName: + type: string + description: First name for billing + familyName: + type: string + description: Last name for billing + address: + type: object + description: Billing address of master account + properties: + streetAddress: + type: string + description: Street address + locality: + type: string + description: Locality + postalCode: + type: string + description: Postal code + stateCode: + type: string + description: State code + countryCode: + type: string + description: Country code + planInfo: + type: object + description: Plan details + properties: + currencyCode: + type: string + description: Plan currency + nextBillingAt: + type: integer + format: int64 + description: Timestamp of next billing date + price: + type: number + description: Plan amount + planPeriod: + type: string + description: Plan period type + enum: + - month + - year + subAccounts: + type: integer + description: Number of sub-accounts + features: + type: array + description: List of provided features in the plan + items: + type: object + properties: + name: + type: string + description: Name of the feature + unitValue: + type: string + description: Unit value of the feature + quantity: + type: integer + format: int64 + description: Quantity provided in the plan + quantityWithOverages: + type: integer + format: int64 + description: >- + Quantity with overages provided in the plan (only + applicable on ENTv2) + used: + type: integer + format: int64 + description: Quantity consumed by master + usedOverages: + type: integer + format: int64 + description: >- + Quantity consumed by sub-organizations over the admin plan + limit (only applicable on ENTv2) + remaining: + type: integer + format: int64 + description: Quantity remaining in the plan + subAccountDetailsResponse: + type: object + properties: + name: + type: string + description: Name of the sub-account user + email: + type: string + description: Email id of the sub-account organization + companyName: + type: string + description: Sub-account company name + planInfo: + type: object + description: Sub-account plan details + properties: + credits: + type: object + description: Credits quota and remaining credits on the sub-account + properties: + sms: + type: integer + format: int64 + description: SMS credits remaining on the sub-account + emails: + type: object + description: Email credits remaining on the sub-account + properties: + quantity: + type: integer + format: int64 + description: Quantity of email messaging limits provided + remaining: + type: integer + format: int64 + description: Available email messaging limits for use + features: + type: object + description: Features available on the sub-account + properties: + inbox: + type: object + description: Inbox details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of inbox provided + remaining: + type: integer + format: int64 + description: Available inboxes for use + landingPage: + type: object + description: Landing page details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of landing pages provided + remaining: + type: integer + format: int64 + description: Available landing pages for use + users: + type: object + description: Multi-account details + properties: + quantity: + type: integer + format: int64 + description: Quantity of multi-account's provided + remaining: + type: integer + format: int64 + description: Available multi-accounts for use + planType: + type: string + description: type of the plan + subAccountUpdatePlanRequest: + type: object + description: Details of the plan to be changed + properties: + credits: + type: object + description: Credit details to update + properties: + email: + type: integer + format: int64 + description: Number of email credits + features: + type: object + description: Features details to update + properties: + users: + type: integer + format: int64 + description: Number of multi-users + landingPage: + type: integer + format: int64 + description: Number of landing pages / Not required on ENTv2 + inbox: + type: integer + format: int64 + description: Number of inboxes / Not required on ENTv2 + example: + credits: + email: 5000 + features: + users: 15 + landingPage: 20 + inbox: 10 + subAccountAppsToggleRequest: + type: object + description: List of enable/disable applications on the sub-account + properties: + inbox: + type: boolean + description: >- + Set this field to enable or disable Inbox on the sub-account / Not + applicable on ENTv2 + whatsapp: + type: boolean + description: >- + Set this field to enable or disable Whatsapp campaigns on the + sub-account + automation: + type: boolean + description: Set this field to enable or disable Automation on the sub-account + email-campaigns: + type: boolean + description: >- + Set this field to enable or disable Email Campaigns on the + sub-account + sms-campaigns: + type: boolean + description: Set this field to enable or disable SMS Marketing on the sub-account + landing-pages: + type: boolean + description: Set this field to enable or disable Landing pages on the sub-account + transactional-emails: + type: boolean + description: >- + Set this field to enable or disable Transactional Email on the + sub-account + transactional-sms: + type: boolean + description: >- + Set this field to enable or disable Transactional SMS on the + sub-account + facebook-ads: + type: boolean + description: Set this field to enable or disable Facebook ads on the sub-account + web-push: + type: boolean + description: Set this field to enable or disable Web Push on the sub-account + meetings: + type: boolean + description: Set this field to enable or disable Meetings on the sub-account + conversations: + type: boolean + description: Set this field to enable or disable Conversations on the sub-account + crm: + type: boolean + description: Set this field to enable or disable Sales CRM on the sub-account + example: + landing-pages: true + sms-campaigns: false + whatsapp: true + meetings: true + web-push: false + TaskTypes: + type: object + description: Task types details + properties: + id: + type: string + description: Id of task type + example: 61a88a2eb7a574180261234 + title: + type: string + description: Title of task type + example: Email + Task: + required: + - taskTypeId + - name + - date + type: object + description: Task Details + properties: + id: + type: string + description: Unique task id + example: 61a5cd07ca1347c82306ad06 + taskTypeId: + type: string + description: Id for type of task e.g Call / Email / Meeting etc. + example: 61a5cd07ca1347c82306ad09 + name: + type: string + description: Name of task + example: 'Task: Connect with client' + contactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this task + example: + - 1 + - 2 + - 3 + dealsIds: + items: + type: string + type: array + description: Deal ids for deals a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + items: + type: string + type: array + description: Companies ids for companies a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + TaskReminder: + required: + - value + - unit + - types + type: object + description: Task reminder date/time for a task + properties: + value: + type: integer + example: 10 + description: Value of time unit before reminder is to be sent + unit: + type: string + enum: + - minutes + - hours + - weeks + - days + description: Unit of time before reminder is to be sent + types: + items: + type: string + enum: + - email + - push + description: Type of task reminder e.g email, push + type: array + example: + - email + FileList: + type: array + description: List of files + items: + $ref: '#/components/schemas/FileData' + FileDownloadableLink: + type: object + description: Downloadable file link + properties: + fileUrl: + type: string + description: A unique link to download the requested file. + example: https://storage.googleapis.com/brevo-app-crm.......-sample.pdf + FileData: + type: object + description: File data that is uploaded + properties: + name: + type: string + description: Name of uploaded file + example: example.png + authorId: + type: string + description: Account id of user which created the file + example: 61a5ce58y5d4795761045991 + contactId: + type: integer + format: int64 + description: Contact id of contact on which file is uploaded + example: 1 + dealId: + type: string + description: Deal id linked to a file + example: 61a5ce58c5d4795761045991 + companyId: + type: string + description: Company id linked to a file + example: 61a5ce58c5d4795761045991 + size: + type: integer + format: int64 + description: Size of file in bytes + example: 10 + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: File created date/time + NoteData: + required: + - text + type: object + description: Note data to be saved + properties: + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact Ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + companyIds: + items: + type: string + description: Company Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + Note: + required: + - text + type: object + description: Note Details + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + authorId: + type: object + description: Account details of user which created the note + example: + id: 61a5ce58y5d4795761045991 + email: johndoe@example.com + locale: en_GB + timezone: Asia/Kolkata + name: + fullName: John Doe + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note created date/time + updatedAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note updated date/time + NoteId: + type: object + description: Updated Note ID + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + NoteList: + type: array + description: List of notes + items: + $ref: '#/components/schemas/Note' + TaskList: + type: object + description: List of tasks + properties: + items: + type: array + description: List of tasks + items: + $ref: '#/components/schemas/Task' + Pipelines: + type: array + description: List of pipeline + items: + $ref: '#/components/schemas/Pipeline' + PipelineStage: + type: object + description: List of stages + properties: + id: + type: string + description: Stage id + example: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + name: + type: string + description: Stage name + example: New + Pipeline: + type: object + description: List of stages + properties: + pipeline_name: + type: string + description: Pipeline name + example: Sales Pipeline + pipeline: + type: string + description: Pipeline id + example: 5ea675e3da0dd085acaea610 + stages: + type: array + description: List of stages + items: + $ref: '#/components/schemas/PipelineStage' + DealAttributes: + type: array + description: List of deal attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: deal_name + label: + type: string + example: Deal Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + DealsList: + type: object + description: List of Deals + properties: + items: + type: array + description: List of deals + items: + $ref: '#/components/schemas/Deal' + Deal: + type: object + description: Deal Details + properties: + id: + type: string + description: Unique deal id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Deal attributes with values + example: + deal_name: testname + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + pipeline: 6093d296ad1e9c5cf2140a58 + deal_stage: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + stage_updated_at: '2022-05-30T07:42:05.671Z' + created_at: '2022-05-30T07:42:05.671Z' + number_of_contacts: 1 + last_updated_date: '2022-06-06T08:38:36.761Z' + last_activity_date: '2022-06-06T08:38:36.000Z' + next_activity_date: null + number_of_activities: 0 + linkedContactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this deal + example: + - 1 + - 2 + - 3 + linkedCompaniesIds: + items: + type: string + type: array + description: Companies ids for companies linked to this deal + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompaniesList: + type: object + description: List of companies + properties: + items: + type: array + description: List of compaies + items: + $ref: '#/components/schemas/Company' + Company: + type: object + description: Company Details + properties: + id: + type: string + description: Unique comoany id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Company attributes with values + example: + created_at: '2022-01-13T19:04:24.376+05:30' + domain: xyz + last_updated_at: '2022-04-01T18:47:48.283+05:30' + name: text + number_of_contacts: 0 + owner: 62260474111b1101704a9d85 + owner_assign_date: '2022-04-01T18:21:13.379+05:30' + phone_number: 8171844192 + revenue: 10 + linkedContactsIds: + items: + type: integer + type: array + format: in64 + description: Contact ids for contacts linked to this company + example: + - 1 + - 2 + - 3 + linkedDealsIds: + items: + type: string + type: array + format: objectID + description: Deals ids for companies linked to this company + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompanyAttributes: + type: array + description: List of company attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: name + label: + type: string + example: Company Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + ConversationsMessage: + type: object + description: a Conversations message + properties: + id: + type: string + description: >- + Message ID. It can be used for further manipulations with the + message. + example: eYBEm3gq3zc5ayE2g + type: + type: string + enum: + - agent + - visitor + description: '`"agent"` for agents’ messages, `"visitor"` for visitors’ messages.' + example: agent + text: + type: string + description: Message text or name of the attached file + example: Good morning! How can I help you? + visitorId: + type: string + description: visitor’s ID + example: kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg + agentId: + type: string + description: >- + ID of the agent on whose behalf the message was sent (only in + messages sent by an agent). + example: d9nKoegKSjmCtyK78 + agentName: + type: string + description: >- + Agent’s name as displayed to the visitor. Only in the messages sent + by an agent. + example: Liz + createdAt: + type: integer + format: int64 + minimum: 0 + description: Timestamp in milliseconds. + example: 1470222622433 + isPushed: + type: boolean + description: '`true` for pushed messages' + example: true + receivedFrom: + type: string + description: >- + 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. + example: SuperAwesomeHelpdesk + file: + type: object + properties: + filename: + type: string + description: Name of the file + example: conversations.png + size: + type: integer + format: int64 + minimum: 0 + description: Size in bytes + example: 15538 + isImage: + type: boolean + description: Whether the file is an image + example: true + url: + type: string + format: url + description: URL of the file + example: https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/ + imageInfo: + type: object + description: image info is passed in case the file is an image + properties: + width: + type: integer + format: int64 + minimum: 0 + description: Width of the image + example: 1129 + height: + type: integer + format: int64 + minimum: 0 + description: height of the image + example: 525 + previewUrl: + type: string + format: url + description: URL of the preview + example: >- + https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/ + event: + type: object + required: + - event_name + - identifiers + properties: + event_name: + description: >- + The name of the event that occurred. This is how you will find your + event in Brevo. Limited to 255 characters, alphanumerical characters + and - _ only. + type: string + example: video_played + event_date: + description: >- + Timestamp of when the event occurred (e.g. + "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp + of the event creation is used. + type: string + example: '2024-02-06T20:59:23.383Z' + identifiers: + description: Identifies the contact associated with the event. + type: object + required: + - email_id + properties: + email_id: + type: string + description: Email Id associated with the event + example: jane.doe@example.com + contact_properties: + description: >- + Properties defining the state of the contact associated to this + event. Useful to update contact attributes defined in your contacts + database while passing the event. For example: **"FIRSTNAME": "Jane" + , "AGE": 37** + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + AGE: 32 + GENDER: FEMALE + event_properties: + description: >- + Properties of the event. Top level properties and nested properties + can be used to better segment contacts and personalise workflow + conditions. The following field type are supported: string, number, + boolean (true/false), date (Timestamp e.g. + "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, + alphanumerical characters and - _ only. Size is limited to 50Kb. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + - type: object + - type: array + example: + video_title: Brevo — The most approachable CRM suite + vide_description: Create your free account today! + duration: 142 + autoplayed: false + upload_date: '2023-11-24T12:09:10+01:00' + order: + type: object + required: + - id + - createdAt + - updatedAt + - status + - amount + - products + properties: + id: + description: Unique ID of the order. + type: string + example: '14' + createdAt: + description: >- + Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is + actually created. + type: string + example: '2021-07-29T20:59:23.383Z' + updatedAt: + description: >- + Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status + of the order is actually changed/updated. + type: string + example: '2021-07-30T10:59:23.383Z' + status: + description: State of the order. + type: string + example: completed + amount: + description: >- + Total amount of the order, including all shipping expenses, tax and + the price of items. + type: number + example: 308.42 + products: + type: array + items: + type: object + required: + - productId + - quantity + - price + description: Details for the Products in an order. + properties: + productId: + type: string + description: ID of the product. + example: P1 + quantity: + type: number + description: >- + How many pieces of the product the visitor has added to the + cart. + example: 10 + variantId: + type: string + description: Product ID of the red color shirts. + example: P100 + price: + type: number + description: The price of a unit of product + example: 99.99 + email: + description: >- + Email of the contact, Mandatory if "phone" field is not passed in + "billing" parameter. + type: string + example: example@brevo.com + billing: + description: Billing details of an order. + type: object + properties: + address: + type: string + description: Full billing address. + example: 15 Somewhere Road, Brynmenyn + city: + type: string + description: Exact city of the address. + example: Basel + countryCode: + type: string + description: Billing country 2-letter ISO code. + example: CA + phone: + type: string + description: >- + Phone number to contact for further details about the order, + Mandatory if "email" field is not passed. + example: 01559 032133 + postCode: + type: string + description: Postcode for delivery and billing. + example: '4052' + paymentMethod: + type: string + description: >- + How the visitor will pay for the item(s), e.g. paypal, check, + etc. + example: PayPal + region: + type: string + description: Exact region (state/province) for delivery and billing. + example: Northwestern Switzerland + coupons: + description: Coupons applied to the order. Stored case insensitive. + type: array + example: + - EASTER15OFF + items: + type: string + orderBatch: + type: object + required: + - orders + properties: + orders: + description: array of order objects + type: array + items: + $ref: '#/components/schemas/order' + notifyUrl: + description: Notify Url provided by client to get the status of batch request + type: string + example: https://en.wikipedia.org/wiki/Webhook + historical: + description: >- + Defines wether you want your orders to be considered as live data or + as historical data (import of past data, synchronising data). True: + orders will not trigger any automation workflows. False: orders will + trigger workflows as usual. + type: boolean + default: true + example: true + createdBatchId: + type: object + required: + - batchId + properties: + batchId: + type: number + description: Batch ID of the request + example: '1' + count: + type: integer + description: Number of orders + format: int64 + example: 17655 + getCategories: + required: + - categories + - count + type: object + properties: + categories: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getCategoryDetails' + count: + type: integer + description: Number of categories + format: int64 + example: 17655 + getCategoryDetails: + required: + - id + - name + - createdAt + - modifiedAt + type: object + properties: + id: + type: string + description: Category ID for which you requested the details + format: string + example: C11 + name: + type: string + description: Name of the category for which you requested the details + format: string + example: Electronics + createdAt: + type: string + description: Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the category + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the category + format: string + example: http://mydomain.com/category/clothing + isDeleted: + type: boolean + description: category deleted from the shop's database + format: string + example: true + createUpdateCategory: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateCategories: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateBatchCategory: + type: object + required: + - categories + properties: + categories: + description: array of categories objects + type: array + items: + $ref: '#/components/schemas/createUpdateCategories' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createCategoryModel: + type: object + properties: + id: + type: integer + description: ID of the category when a new category is created + format: int64 + example: 122 + createUpdateBatchCategoryModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created categories + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing categories updated + format: int64 + example: 5 + getProducts: + required: + - products + - count + type: object + properties: + products: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getProductDetails' + count: + type: integer + description: Number of products + format: int64 + example: 17655 + getProductDetails: + required: + - id + - name + - createdAt + - modifiedAt + - s3ThumbAnalytics + - s3ThumbEditor + type: object + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: Name of the product for which you requested the details + format: string + example: Iphone 11 + createdAt: + type: string + description: Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the product + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + s3Original: + type: string + description: S3 url of original image + format: string + s3ThumbAnalytics: + type: string + description: >- + S3 thumbnail url of original image in 120x120 dimension for + analytics section + format: string + s3ThumbEditor: + type: string + description: >- + S3 thumbnail url of original image in 600x400 dimension for editor + section + format: string + metaInfo: + type: object + description: >- + Meta data of product such as description, vendor, producer, stock + level, etc. + example: + description: Shoes for sports + brand: addidas + isDeleted: + type: boolean + description: product deleted from the shop's database + example: true + createUpdateProduct: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createUpdateBatchProducts: + type: object + required: + - products + properties: + products: + description: array of products objects + type: array + items: + $ref: '#/components/schemas/createUpdateProducts' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createUpdateProducts: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createProductModel: + type: object + properties: + id: + type: integer + description: ID of the Product when a new product is created + format: int64 + example: 122 + createUpdateBatchProductsModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created products + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing products updated + format: int64 + example: 5 + getCouponCollection: + required: + - id + - name + - defaultCoupon + - createdAt + - totalCoupons + - remainingCoupons + type: object + properties: + id: + type: string + description: The id of the collection + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + name: + type: string + description: The name of the collection + format: uuidv4 + example: SummerPromotions + defaultCoupon: + type: string + description: The default coupon of the collection + example: 10 OFF + createdAt: + description: Datetime on which the collection was created + type: string + format: date-time + example: '2023-01-06T05:03:47.053Z' + totalCoupons: + description: Total coupons in the collection + type: integer + format: int64 + example: 10000 + remainingCoupons: + description: Not sent coupons in the collection + type: integer + format: int64 + example: 5000 + sendWhatsappMessageTemplate: + required: + - senderNumber + - templateId + - contactNumbers + type: object + properties: + templateId: + type: integer + description: ID of the template to send + example: 123 + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + params: + type: object + description: >- + Pass the set of attributes to customize the template. For example, + {"FNAME":"Joe", "LNAME":"Doe"}. + example: + FNAME: Joe + LNAME: Doe + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + sendWhatsappMessageText: + required: + - senderNumber + - contactNumbers + - authType + - text + type: object + properties: + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + text: + type: string + description: >- + Text to be sent as message body (will be overridden if templateId is + passed in the same request) + example: Hi! There i am a message + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + getWhatsappEventReport: + type: object + properties: + events: + type: array + items: + required: + - contactNumber + - date + - messageId + - event + - senderNumber + type: object + properties: + contactNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + date: + type: string + description: UTC date-time on which the event has been generated + example: '2017-03-12T12:30:00.000Z' + messageId: + type: string + description: Message ID which generated the event + example: 23befbae-1505-47a8-bd27-e30ef739f32c + event: + type: string + description: Event which occurred + example: delivered + enum: + - sent + - delivered + - read + - error + - unsubscribe + - reply + - soft-bounce + reason: + type: string + description: >- + Reason for the event (will be there in case of `error` and + `soft-bounce` events) + example: 23befbae-1505-47a8-bd27-e30ef739f32c + body: + type: string + description: >- + Text of the reply (will be there only in case of `reply` event + with text) + example: Hi! I am a reply + mediaUrl: + type: string + format: url + description: >- + Url of the media reply (will be there only in case of `reply` + event with media) + example: https://example.com/media.png + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + getExternalFeedByUUID: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + getAllExternalFeeds: + type: object + properties: + count: + type: integer + description: Total number of batches + feeds: + type: array + items: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + createExternalFeed: + required: + - name + - url + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + default: noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + updateExternalFeed: + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + exportWebhooksHistory: + required: + - event + - notifyURL + - type + type: object + properties: + days: + type: integer + description: >- + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + example: 7 + startDate: + type: string + description: >- + Mandatory if endDate is used. Starting date of the history + (YYYY-MM-DD). Must be lower than equal to endDate + example: '2023-02-13T00:00:00.000Z' + endDate: + type: string + description: >- + Mandatory if startDate is used. Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + example: '2023-02-17T00:00:00.000Z' + sort: + type: string + description: Sorting order of records (asc or desc) + example: desc + type: + type: string + description: Filter the history based on webhook type + example: transactional + enum: + - transactional + - marketing + event: + type: string + description: Filter the history for a specific event type + example: request + enum: + - invalid_parameter + - missing_parameter + - hardBounce + - softBounce + - delivered + - spam + - request + - opened + - click + - invalid + - deferred + - blocked + - unsubscribed + - error + - uniqueOpened + - loadedByProxy + - allEvents + notifyURL: + type: string + description: Webhook URL to receive CSV file link + example: https://brevo.com + webhookId: + type: integer + description: Filter the history for a specific webhook id + example: 2345 + email: + type: string + description: Filter the history for a specific email + example: example@brevo.com + messageId: + type: integer + description: >- + Filter the history for a specific message id. Applicable only for + transactional webhooks. + example: <23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib> + responses: + createModel: + description: successfully created + content: + application/json: + schema: + $ref: '#/components/schemas/createModel' + createdProcessId: + description: process id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + createdBatchId: + description: batch id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdBatchId' + securitySchemes: + api-key: + type: apiKey + description: >- + The API key should be passed in the request headers as `api-key` for + authentication. + name: api-key + in: header +x-samples-languages: + - curl diff --git a/sdks/db/fixed-specs-cache/brevo-fixed-spec.yaml b/sdks/db/fixed-specs-cache/brevo-fixed-spec.yaml new file mode 100644 index 0000000000..a75df64afb --- /dev/null +++ b/sdks/db/fixed-specs-cache/brevo-fixed-spec.yaml @@ -0,0 +1,20879 @@ +publishJson: + company: Brevo + serviceName: false + sdkName: brevo-{language}-sdk + clientName: Brevo + metaDescription: >- + Brevo, formerly known as Sendinblue, is the leading customer relationship + management (CRM) suite designed to fully cultivate long-term customer + relationships and to empower businesses to expand in a fast changing digital + world. With Brevo, businesses have a unified view of the customer journey in + one easy-to-use platform to grow meaningful relationships. + + + 🙌Brevo Fun Facts 🙌 + + - Founded in 2012 by Armand Thiberge with a mission to help businesses of + all sizes build stronger customer relationships and grow beyond their + wildest dreams + + - 500,000 customers across 180 countries + + - Fully compliant with GDPR regulations + + - Service and platform available in six languages + + - Headquartered in Paris with eight other offices in Seattle, Toronto, + Berlin, Vienna, Sofia, Noida, and Bengaluru + + - 700+ talented employees representing over 67 nationalities + + - Continuous efforts to reduce and monitor its carbon footprint + + - Achieved centaur status—$100M in ARR—in 2022 + + - Award wins include Top 100 Software Company by The Software Report (TSR), + Stevie Award: Relationship Management Solution, MarTech Breakthrough Award: + Best Overall Marketing Automation Platform, G2: Leader Winter, Leader + Enterprise Winter, Best Results Mid-Market, Best Software Awards: Top 50 + Marketing Products, Best Software Awards: Top 100 Fastest Growing Products + apiStatusUrls: inherit + homepage: brevo.com + developerDocumentation: developers.brevo.com/ + categories: + - email + - sms + - chat +rawSpecString: | + openapi: 3.0.1 + info: + title: Brevo API + description: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | + contact: + name: Brevo Support + url: https://account.brevo.com/support + email: contact@brevo.com + license: + name: MIT + url: http://opensource.org/licenses/MIT + version: 3.0.0 + servers: + - url: https://api.brevo.com/v3 + security: + - api-key: [] + paths: + /emailCampaigns: + get: + tags: + - Email Campaigns + summary: Return all your created email campaigns + operationId: getEmailCampaigns + parameters: + - name: type + in: query + description: Filter on the type of the campaigns + schema: + type: string + enum: + - classic + - trigger + - name: status + in: query + description: Filter on the status of the campaign + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: excludeHtmlContent + in: query + description: >- + Use this flag to exclude htmlContent from the response body. If set + to **true**, htmlContent field will be returned as empty string in + the response body + schema: + type: boolean + enum: + - true + - false + responses: + '200': + description: Email campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaigns' + examples: + response: + value: + count: 2 + campaigns: + - id: 12 + name: EN - Sales Summer 2017 + subject: 20% OFF for 2017 Summer Sales + previewText: Don't miss the sale + type: classic + status: sent + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: marketing@mycompany.com + name: Marketing + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 5 + exclusionLists: + - 13 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 5 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: 80 + statsByDomain: + yahoo.com: + uniqueClicks: 298 + clickers: 533 + complaints: 0 + sent: 25601 + softBounces: 5 + hardBounces: 0 + uniqueViews: 3527 + unsubscriptions: 17 + viewed: 5255 + delivered: 25596 + hotmail.co.uk: + uniqueClicks: 1970 + clickers: 2720 + complaints: 5 + sent: 117055 + softBounces: 111 + hardBounces: 0 + uniqueViews: 21111 + unsubscriptions: 105 + viewed: 35251 + delivered: 117056 + - id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter + type: Classic + status: draft + scheduledAt: '' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 10 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 10 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + aol: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Email Campaigns + summary: Create an email campaign + operationId: createEmailCampaign + requestBody: + description: Values to create a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createEmailCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}: + get: + tags: + - Email Campaigns + summary: Get an email campaign report + operationId: getEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + required: false + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - statsByDevice + - statsByBrowser + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaign' + examples: + response: + value: + id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter! + type: classic + status: draft + scheduledAt: '2017-09-22T12:30:00.000Z' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://dhh.brevo.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 22 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 22 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + statsByDevice: + desktop: + mac: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 1 + mobile: + androidMobile: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + iPhone: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 0 + statsByBrowser: + thunderbird: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + safari: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + internetExplorer: + clickers: 0 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Email Campaigns + summary: Update an email campaign + operationId: updateEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateEmailCampaign' + required: true + responses: + '204': + description: Email campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Email Campaigns + summary: Delete an email campaign + operationId: deleteEmailCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendNow: + post: + tags: + - Email Campaigns + summary: Send an email campaign immediately, based on campaignId + operationId: sendEmailCampaignNow + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been scheduled + content: {} + '400': + description: Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendTest: + post: + tags: + - Email Campaigns + summary: Send an email campaign to your test list + operationId: sendTestEmail + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + /emailCampaigns/{campaignId}/status: + put: + tags: + - Email Campaigns + summary: Update an email campaign status + operationId: updateCampaignStatus + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendReport: + post: + tags: + - Email Campaigns + summary: Send the report of a campaign + description: A PDF will be sent to the specified email addresses + operationId: sendReport + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: + tags: + - Email Campaigns + summary: Get an A/B test email campaign results + description: Obtain winning version of an A/B test email campaign + operationId: getAbTestCampaignResult + parameters: + - name: campaignId + in: path + description: Id of the A/B test campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: A/B test email campaign Result + content: + application/json: + schema: + $ref: '#/components/schemas/abTestCampaignResult' + examples: + response: + value: + winningVersion: B + winningCriteria: Click + openRate: 100% + clickRate: 50% + winningVersionRate: 0% + statistics: + openers: + Version A: 20% + Version B: 100% + clicks: + Version A: 0% + Version B: 50% + unsubscribed: + Version A: 20% + Version B: 0% + softBounces: + Version A: 0% + Version B: 0% + hardBounces: + Version A: 0% + Version B: 0% + complaints: + Version A: 0% + Version B: 0% + clickedLinks: + Version A: + - link: https://google.com + clicksCount: 0 + clickRate: 0% + - link: https://youtube.com + clicksCount: 0 + clickRate: 0% + Version B: + - link: http://www.github.com + clicksCount: 2 + clickRate: 40% + - link: http://www.stackoverflow.com + clicksCount: 3 + clickRate: 60% + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: A/B test Email Campaign not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sharedUrl: + get: + tags: + - Email Campaigns + summary: Get a shared template url + description: >- + Get a unique URL to share & import an email template from one Brevo + account to another. + operationId: getSharedTemplateUrl + parameters: + - name: campaignId + in: path + description: Id of the campaign or template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Shared template URL information + content: + application/json: + schema: + $ref: '#/components/schemas/getSharedTemplateUrl' + examples: + response: + value: + sharedUrl: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign/Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: Only email campaigns or templates are allowed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/exportRecipients: + post: + tags: + - Email Campaigns + summary: Export the recipients of an email campaign + operationId: emailExportRecipients + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/emailExportRecipients' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/images: + post: + tags: + - Email Campaigns + summary: Upload an image to your account's image gallery + operationId: uploadImageToGallery + requestBody: + description: Parameters to upload an image + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageToGallery' + required: true + responses: + '201': + description: Image has been successfully uploaded + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageModel' + examples: + response: + value: + url: >- + https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email: + post: + tags: + - Transactional emails + summary: Send a transactional email + operationId: sendTransacEmail + requestBody: + description: Values to send a transactional email + content: + application/json: + schema: + $ref: '#/components/schemas/sendSmtpEmail' + required: true + responses: + '201': + description: transactional email sent + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '202': + description: transactional email scheduled + content: + application/json: + schema: + $ref: '#/components/schemas/scheduleSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails: + get: + tags: + - Transactional emails + summary: Get the list of transactional emails on the basis of allowed filters + description: >- + This endpoint will show the list of emails for past 30 days by default. + To retrieve emails before that time, please pass startDate and endDate + in query filters. + operationId: getTransacEmailsList + parameters: + - name: email + in: query + description: > + **Mandatory if templateId and messageId are not passed in query + filters.** Email address to which transactional email has been sent. + schema: + type: string + - name: templateId + in: query + description: > + **Mandatory if email and messageId are not passed in query + filters.** Id of the template that was used to compose transactional + email. + schema: + type: integer + format: int64 + - name: messageId + in: query + description: > + **Mandatory if templateId and email are not passed in query + filters.** Message ID of the transactional email sent. + schema: + type: string + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the list. **Maximum time period that can be + selected is one month**. + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the list. **Maximum time period that can be + selected is one month.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: List of transactional emails + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailsList' + examples: + response: + value: + count: 120 + transactionalEmails: + - email: abc@xyz.com + subject: summer camp + templateId: 15 + messageId: <201798300811.5787683@relay.domain.com> + uuid: 5a78c-209ok98262910-std2341 + date: '2019-05-25T11:53:26.000Z' + - email: test@test.com + subject: details verification + templateId: 15 + messageId: <201798300811.5700093@relay.domain.com> + uuid: 5a78c-209ok98262910-s99a341 + date: '2019-05-25T07:28:11.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails/{uuid}: + get: + tags: + - Transactional emails + summary: Get the personalized content of a sent transactional email + operationId: getTransacEmailContent + parameters: + - name: uuid + in: path + description: >- + Unique id of the transactional email that has been sent to a + particular contact + required: true + schema: + type: string + responses: + '200': + description: Transactional email content + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailContent' + examples: + response: + value: + email: abc@example.com + subject: Summer Camps + templateId: 12 + date: '2016-02-25T11:53:26.000Z' + events: + - name: sent + time: '2016-02-25T11:53:26.000Z' + - name: delivered + time: '2016-02-25T11:55:26.000Z' + - name: opened + time: '2016-02-26T09:53:26.000Z' + body: >- +This is the actual html content sent
+ + /smtp/log/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete an SMTP transactional log + parameters: + - name: identifier + in: path + description: MessageId or Email of the transactional log(s) to delete + required: true + schema: + type: string + responses: + '204': + description: Transactional Logs deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Message ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates: + get: + tags: + - Transactional emails + summary: Get the list of email templates + operationId: getSmtpTemplates + parameters: + - name: templateStatus + in: query + description: >- + Filter on the status of the template. Active = true, inactive = + false + schema: + type: boolean + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: transactional email templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 5 + name: ChristomasTimeTemplate + subject: Merry Christmas + isActive: false + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Festival + htmlContent: HTML CONTENT 1 + createdAt: '2016-02-24T14:44:24.000Z' + modifiedAt: '2016-02-24T15:37:11.000Z' + - id: 12 + name: SummerSales2017Template + subject: Enjoy our summer Sales ! + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Summer + htmlContent: HTML CONTENT 2 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Transactional emails + summary: Create an email template + operationId: createSmtpTemplate + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}: + get: + tags: + - Transactional emails + summary: Returns the template information + operationId: getSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Email template informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplateOverview' + examples: + response: + value: + id: 33 + name: OrderConfirmation + subject: 'Order Confirmation : Thanks for your Purchase !' + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 26 + replyTo: replyto@domain.com + toField: '' + tag: '' + htmlContent: HTML CONTENT 4 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + doiTemplate: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Transactional emails + summary: Update an email template + operationId: updateSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmtpTemplate' + required: true + responses: + '204': + description: transactional email template updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Transactional emails + summary: Delete an inactive email template + operationId: deleteSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Inactive transactional email template has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}/sendTest: + post: + tags: + - Transactional emails + summary: Send a template to your test list + operationId: sendTestTemplate + parameters: + - name: templateId + in: path + description: Id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/aggregatedReport: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated over a period of time + description: >- + This endpoint will show the aggregated stats for past 90 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getAggregatedSmtpReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAggregatedReport' + examples: + response: + value: + range: 2016-09-08|2017-04-28 + requests: 19887 + delivered: 18996 + hardBounces: 234 + softBounces: 1533 + clicks: 9987 + uniqueClicks: 8766 + opens: 17654 + uniqueOpens: 13688 + spamReports: 1 + blocked: 2 + invalid: 0 + unsubscribed: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/reports: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated per day + operationId: getSmtpReport + parameters: + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 30 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD) + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getReports' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + clicks: 1026 + uniqueClicks: 720 + opens: 5091 + uniqueOpens: 2318 + spamReports: 0 + blocked: 519 + invalid: 1 + unsubscribed: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + clicks: 1514 + uniqueClicks: 1090 + opens: 10089 + uniqueOpens: 4393 + spamReports: 0 + blocked: 920 + invalid: 2 + unsubscribed: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/events: + get: + tags: + - Transactional emails + summary: Get all your transactional email activity (unaggregated events) + description: >- + This endpoint will show the aggregated stats for past 30 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getEmailEventReport + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 5000 + type: integer + format: int64 + default: 2500 + minimum: 0 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: email + in: query + description: Filter the report for a specific email addresses + schema: + type: string + format: email + - name: event + in: query + description: Filter the report for a specific event type + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - spam + - requests + - opened + - clicks + - invalid + - deferred + - blocked + - unsubscribed + - error + - loadedByProxy + - name: tags + in: query + description: Filter the report for tags (serialized and urlencoded array) + schema: + type: string + - name: messageId + in: query + description: Filter on a specific message id + schema: + type: string + - name: templateId + in: query + description: Filter on a specific template id + schema: + type: integer + format: int64 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Email events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailEventReport' + examples: + response: + value: + events: + - email: john.smith@example.com + date: '2017-03-12T12:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: deferred + reason: Error connection timeout + tag: OrderConfirmation + from: john@example.com + templateId: 4 + - email: john.smith@example.com + date: '2017-03-13T16:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: delivered + tag: OrderConfirmation + from: john@example.com + templateId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts/{email}: + delete: + tags: + - Transactional emails + summary: Unblock or resubscribe a transactional contact + parameters: + - name: email + in: path + description: contact email (urlencoded) to unblock. + required: true + schema: + type: string + responses: + '204': + description: Contact unblocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts: + get: + tags: + - Transactional emails + summary: Get the list of blocked or unsubscribed transactional contacts + operationId: getTransacBlockedContacts + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 100 + type: integer + format: int64 + default: 50 + minimum: 0 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: senders + in: query + description: >- + Comma separated list of emails of the senders from which contacts + are blocked or unsubscribed + style: form + explode: false + schema: + type: array + items: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: List of blocked or unsubscribed transactional contacts + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacBlockedContacts' + examples: + response: + value: + count: 1 + contacts: + - email: abc@xyz.com + senderEmail: ez312@gmal.com + reason: + message: Admin blocked + code: adminBlocked + blockedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains: + get: + tags: + - Transactional emails + summary: Get the list of blocked domains + description: Get the list of blocked domains + operationId: getBlockedDomains + responses: + '200': + description: List of blocked domains + content: + application/json: + schema: + $ref: '#/components/schemas/getBlockedDomains' + examples: + response: + value: + domains: + - example.com + - testdomain.com + post: + tags: + - Transactional emails + summary: Add a new domain to the list of blocked domains + description: Blocks a new domain in order to avoid messages being sent to the same + operationId: blockNewDomain + requestBody: + description: Name of the domain to be blocked + content: + application/json: + schema: + $ref: '#/components/schemas/blockDomain' + required: true + responses: + '201': + description: Domain is successfully blocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains/{domain}: + delete: + tags: + - Transactional emails + summary: Unblock an existing domain from the list of blocked domains + description: Unblocks an existing domain from the list of blocked domains + operationId: deleteBlockedDomain + parameters: + - name: domain + description: The name of the domain to be deleted + in: path + required: true + schema: + type: string + responses: + '204': + description: Domain is successfully deleted from the list of blocked domains + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/deleteHardbounces: + post: + tags: + - Transactional emails + summary: Delete hardbounces + description: >- + Delete hardbounces. To use carefully (e.g. in case of temporary ISP + failures) + operationId: deleteHardbounces + requestBody: + description: values to delete hardbounces + content: + application/json: + schema: + $ref: '#/components/schemas/deleteHardbounces' + required: false + responses: + '204': + description: Hardbounces deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emailStatus/{identifier}: + get: + tags: + - Transactional emails + summary: Fetch scheduled emails by batchId or messageId + description: >- + Fetch scheduled batch of emails by batchId or single scheduled email by + messageId (Can retrieve data upto 30 days old) + operationId: getScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + - name: startDate + description: >- + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from + which you want to fetch the list. Can be maximum 30 days older tha + current date. + in: query + example: '2022-02-02' + required: false + schema: + type: string + format: date + - name: endDate + description: >- + Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till + which you want to fetch the list. Maximum time period that can be + selected is one month. + in: query + example: '2022-03-02' + required: false + schema: + type: string + format: date + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed. + Not valid when identifier is `messageId`. + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: status + in: query + description: >- + Filter the records by `status` of the scheduled email batch or + message. Not valid when identifier is `messageId`. + required: false + schema: + type: string + enum: + - processed + - inProgress + - queued + - name: limit + description: >- + Number of documents returned per page. Not valid when identifier is + `messageId`. + in: query + required: false + example: 100 + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: >- + Index of the first document on the page. Not valid when identifier + is `messageId`. + in: query + required: false + example: 0 + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: Scheduled email batches + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/getScheduledEmailByBatchId' + - $ref: '#/components/schemas/getScheduledEmailByMessageId' + examples: + batchId: + value: + count: 3 + batches: + - scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + - scheduledAt: '2022-02-25T11:36:43.576000000Z' + createdAt: '2022-02-24T11:36:43.576000000Z' + status: processed + - scheduledAt: '2022-02-26T11:36:43.576000000Z' + createdAt: '2022-02-25T11:36:43.576000000Z' + status: inProgress + messageId: + value: + scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete scheduled emails by batchId or messageId + description: >- + Delete scheduled batch of emails by batchId or single scheduled email by + messageId + operationId: deleteScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + responses: + '204': + description: Scheduled email(s) deleted + content: {} + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts: + get: + tags: + - Contacts + summary: Get all the contacts + operationId: getContacts + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: createdSince + in: query + description: > + Filter (urlencoded) the contacts created after a given UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in + date-time format for accurate result.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: segmentId + in: query + description: Id of the segment. **Either listIds or segmentId can be passed.** + schema: + type: integer + format: int64 + - name: listIds + in: query + description: Ids of the list. **Either listIds or segmentId can be passed.** + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: All contacts listed + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: contact1@example.com + id: 247 + emailBlacklisted: true + smsBlacklisted: true + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 58 + attributes: + SMS: '33058407250' + IDENTIFICATION: 1-3RHQ-259 + CIV: MS + LAST_NAME: Brennon + FIRST_NAME: Meg + DOB: '1986-05-02T00:00:00.000Z' + ADDRESS: 1 5th avenue + ZIP_CODE: '44300' + CITY: New-York + ACTION_CODE: 17HH98CH + - email: 33058407248@mailin-sms.com + id: 245 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 61 + - 58 + attributes: + SMS: '33058407248' + IDENTIFICATION: 1-78JS-432 + CIV: MS + LAST_NAME: Press + FIRST_NAME: Sophia + DOB: '1980-09-11T00:00:00.000Z' + ADDRESS: 5 Flower Street + ZIP_CODE: '44119' + CITY: Seattle + ACTION_CODE: 17HU765 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a contact + operationId: createContact + requestBody: + description: Values to create a contact + content: + application/json: + schema: + $ref: '#/components/schemas/createContact' + required: true + responses: + '201': + description: Contact created + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateContactModel' + examples: + response: + value: + id: 21 + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/doubleOptinConfirmation: + post: + tags: + - Contacts + summary: Create Contact via DOI (Double-Opt-In) Flow + operationId: createDoiContact + requestBody: + description: Values to create the Double opt-in (DOI) contact + content: + application/json: + schema: + $ref: '#/components/schemas/createDoiContact' + required: true + responses: + '201': + description: DOI Contact created + content: {} + '204': + description: DOI Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createDoiContact + /contacts/{identifier}: + get: + tags: + - Contacts + summary: Get a contact's details + description: >- + Along with the contact details, this endpoint will show the statistics + of contact for the recent 90 days by default. To fetch the earlier + statistics, please use Get contact campaign stats + ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` + endpoint with the appropriate date ranges. + operationId: getContactInfo + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact OR its SMS attribute value + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. + schema: + type: string + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedContactDetails' + examples: + response: + value: + email: peggy.rain@example.com + id: 42 + emailBlacklisted: false + smsBlacklisted: false + createdAt: '2017-05-02T16:40:31.000Z' + modifiedAt: '2017-05-02T16:40:31.000Z' + attributes: + FIRST_NAME: Peggy + LAST_NAME: Rain + SMS: '3087433387669' + CIV: '1' + DOB: '1986-04-13T00:00:00.000Z' + ADDRESS: 987 5th avenue + ZIP_CODE: '87544' + CITY: New-York + AREA: NY + listIds: + - 40 + statistics: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 68 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a contact + operationId: deleteContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + responses: + '204': + description: Contact deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: You're not allowed to delete registered email contact with Brevo + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a contact + operationId: updateContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + requestBody: + description: Values to update a contact + content: + application/json: + schema: + $ref: '#/components/schemas/updateContact' + required: true + responses: + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateContact + /contacts/batch: + post: + tags: + - Contacts + summary: Update multiple contacts + operationId: updateBatchContacts + requestBody: + description: Values to update multiple contacts + content: + application/json: + schema: + $ref: '#/components/schemas/updateBatchContacts' + required: true + responses: + '204': + description: All contacts updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/{identifier}/campaignStats: + get: + tags: + - Contacts + summary: Get email campaigns' statistics for a contact + operationId: getContactStats + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. Maximum difference between startDate and endDate + should not be greater than 90 days + schema: + type: string + responses: + '200': + description: Contact campaign statistics informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContactCampaignStats' + examples: + response: + value: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + - campaignId: 45 + eventTime: '2016-11-09T11:45:02.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 45 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/attributes: + get: + tags: + - Contacts + summary: List all attributes + operationId: getAttributes + responses: + '200': + description: Attributes listed + content: + application/json: + schema: + $ref: '#/components/schemas/getAttributes' + examples: + response: + value: + attributes: + - name: LASTNAME + category: normal + type: text + - name: FIRSTNAME + category: normal + type: text + - name: DOB + category: normal + type: date + - name: GENDER + category: category + type: text + enumeration: + - value: 1 + label: Men + - value: 2 + label: Women + - value: 3 + label: Kid + /contacts/attributes/{attributeCategory}/{attributeName}: + put: + tags: + - Contacts + summary: Update contact attribute + operationId: updateAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + requestBody: + description: Values to update an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/updateAttribute' + required: true + responses: + '204': + description: Attribute updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateAttribute + post: + tags: + - Contacts + summary: Create contact attribute + operationId: createAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the attribute + required: true + schema: + type: string + requestBody: + description: Values to create an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/createAttribute' + required: true + responses: + '201': + description: Attribute created + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete an attribute + operationId: deleteAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + responses: + '204': + description: Attribute deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders: + get: + tags: + - Contacts + summary: Get all folders + operationId: getFolders + parameters: + - name: limit + in: query + description: Number of documents per page + required: true + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + required: true + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folders informations + content: + application/json: + schema: + $ref: '#/components/schemas/getFolders' + examples: + response: + value: + folders: + - id: 42 + name: Ninja_Form + totalBlacklisted: 98 + totalSubscribers: 4567 + uniqueSubscribers: 4665 + - id: 29 + name: Prestashop + totalBlacklisted: 10 + totalSubscribers: 6543 + uniqueSubscribers: 6553 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a folder + operationId: createFolder + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createFolder + /contacts/folders/{folderId}: + get: + tags: + - Contacts + summary: Returns a folder's details + operationId: getFolder + parameters: + - name: folderId + in: path + description: id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Folder details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolder' + examples: + response: + value: + id: 1 + name: Client_Folder + totalBlacklisted: 987 + totalSubscribers: 16778 + uniqueSubscribers: 17765 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a folder + operationId: updateFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '204': + description: Folder updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateFolder + delete: + tags: + - Contacts + summary: Delete a folder (and all its lists) + operationId: deleteFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Folder deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders/{folderId}/lists: + get: + tags: + - Contacts + summary: Get lists in a folder + operationId: getFolderLists + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folder's Lists details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolderLists' + examples: + response: + value: + lists: + - id: 46 + name: Reactiv + totalSubscribers: 7655 + totalBlacklisted: 0 + uniqueSubscribers: 7655 + - id: 41 + name: NY_Area + totalSubscribers: 3654 + totalBlacklisted: 23 + uniqueSubscribers: 3677 + - id: 22 + name: VIP_Customer + totalSubscribers: 8753 + totalBlacklisted: 72 + uniqueSubscribers: 8825 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists: + get: + tags: + - Contacts + summary: Get all the lists + operationId: getLists + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Lists informations + content: + application/json: + schema: + $ref: '#/components/schemas/getLists' + examples: + response: + value: + lists: + - id: 53 + name: Spanish_Speakers + totalSubscribers: 5432 + totalBlacklisted: 65 + uniqueSubscribers: 5497 + folderId: 1 + - id: 50 + name: Other + totalSubscribers: 10976 + totalBlacklisted: 765 + uniqueSubscribers: 11741 + folderId: 2 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a list + operationId: createList + requestBody: + description: Values to create a list + content: + application/json: + schema: + $ref: '#/components/schemas/createList' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}: + get: + tags: + - Contacts + summary: Get a list's details + operationId: getList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for + a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email + campaigns for a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + responses: + '200': + description: List informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedList' + examples: + response: + value: + id: 12 + name: Newsletter_Weekly + startDate: '2023-09-30T00:00:00.000Z' + endDate: '2023-03-31T00:00:00.000Z' + totalSubscribers: 6533 + totalBlacklisted: 63 + uniqueSubscribers: 6596 + folderId: 1 + createdAt: '2016-02-26T11:56:08.000Z' + campaignStats: + - campaignId: 15 + stats: + uniqueClicks: 701 + clickers: 789 + complaints: 0 + delivered: 6632 + sent: 6645 + softBounces: 34 + hardBounces: 4 + uniqueViews: 3442 + unsubscriptions: 4 + viewed: 4322 + deferred: 0 + - campaignId: 45 + stats: + uniqueClicks: 654 + clickers: 788 + complaints: 1 + delivered: 4078 + sent: 4334 + softBounces: 18 + hardBounces: 2 + uniqueViews: 987 + unsubscriptions: 4 + viewed: 1555 + deferred: 0 + dynamicList: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a list + operationId: updateList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a list + content: + application/json: + schema: + $ref: '#/components/schemas/updateList' + required: true + responses: + '204': + description: List updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a list + operationId: deleteList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: List deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/segments: + get: + tags: + - Contacts + summary: Get all the segments + operationId: getSegments + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Segments informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSegments' + examples: + response: + value: + segments: + - id: 53 + segmentName: Segment1 + categoryName: Name1 + updatedAt: '2017-03-12T12:30:00.000Z' + - id: 50 + segmentName: Segment2 + categoryName: Name2 + updatedAt: '2017-03-12T12:30:00.000Z' + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts: + get: + tags: + - Contacts + summary: Get contacts in a list + operationId: getContactsFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 500 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: alex.pain@example.com + id: 45 + emailBlacklisted: false + smsBlacklisted: true + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + - 2 + attributes: + LASTNAME: Pain + FIRSTNAME: Alex + DOB: '2010-12-31T00:00:00.000Z' + GENDER: Kid + - email: john.smith@example.com + id: 32 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Smith + FIRSTNAME: John + DOB: '1986-06-21T00:00:00.000Z' + GENDER: Men + - email: helen.rose@example.com + id: 65 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Rose + FIRSTNAME: Helen + DOB: '1988-11-02T00:00:00.000Z' + GENDER: Women + SMS: '3375599887766' + count: 17655 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/add: + post: + tags: + - Contacts + summary: Add existing contacts to a list + operationId: addContactToList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails addresses OR IDs of the contacts + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/addContactToListByEmails' + - $ref: '#/components/schemas/addContactToListByIDs' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + required: true + responses: + '201': + description: >- + All contacts have been added successfully to the list with details + of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/remove: + post: + tags: + - Contacts + summary: Delete a contact from a list + operationId: removeContactFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails adresses OR IDs of the contacts OR 'all' true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/removeContactFromListByEmails' + - $ref: '#/components/schemas/removeContactFromListByIDs' + - $ref: '#/components/schemas/removeContactFromListByAll' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + allTrue: + summary: Passing 'all' true + value: + all: true + required: true + responses: + '201': + description: >- + All contacts have been removed successfully from the list with + details of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + allTrue: + summary: Response example when 'all' is passed as true + value: + total: 23 + processId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: contactEmails + /contacts/export: + post: + tags: + - Contacts + summary: Export contacts + description: >- + 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. + operationId: requestContactExport + requestBody: + description: Values to request a contact export + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactExport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/import: + post: + tags: + - Contacts + summary: Import contacts + description: > + It returns the background process ID which on completion calls + + the notify URL that you have set in the input. + + + **Note**: + + - Any contact attribute that doesn't exist in your account will be + ignored at import end. + operationId: importContacts + requestBody: + description: >- + Values to import contacts in Brevo. To know more about the expected + format, please have a look at + ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactImport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns: + get: + tags: + - SMS Campaigns + summary: Returns the information for all your created SMS campaigns + operationId: getSmsCampaigns + parameters: + - name: status + in: query + description: Status of campaign. + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: SMS campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaigns' + examples: + response: + value: + campaigns: + - id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + - id: 10 + name: SUMMER SALE + status: draft + content: >- + Summer Sale is starting tomorrow. Get extra 10% with + this code:SUM17 + scheduledAt: '2017-08-04T12:30:00.000Z' + testSent: false + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + count: 12 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - SMS Campaigns + summary: Creates an SMS campaign + operationId: createSmsCampaign + requestBody: + description: Values to create an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createSmsCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}: + get: + tags: + - SMS Campaigns + summary: Get an SMS campaign + operationId: getSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: SMS campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaign' + examples: + response: + value: + id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - SMS Campaigns + summary: Update an SMS campaign + operationId: updateSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmsCampaign' + required: true + responses: + '204': + description: SMS campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - SMS Campaigns + summary: Delete an SMS campaign + operationId: deleteSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/sendNow: + post: + tags: + - SMS Campaigns + summary: Send your SMS campaign immediately + operationId: sendSmsCampaignNow + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been scheduled + content: {} + '400': + description: SMS Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/status: + put: + tags: + - SMS Campaigns + summary: Update a campaign's status + operationId: updateSmsCampaignStatus + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign. + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: status + /smsCampaigns/{campaignId}/sendTest: + post: + tags: + - SMS Campaigns + summary: Send a test SMS campaign + operationId: sendTestSms + parameters: + - name: campaignId + in: path + description: Id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: > + 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** + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestSms' + required: true + responses: + '204': + description: Test SMS has been sent successfully to the recipient + content: {} + '400': + description: Test SMS could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendSmsTestFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/exportRecipients: + post: + tags: + - SMS Campaigns + summary: Export an SMS campaign's recipients + description: >- + It returns the background process ID which on completion calls the + notify URL that you have set in the input. + operationId: requestSmsRecipientExport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/requestSmsRecipientExport' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: recipientExport + /smsCampaigns/{campaignId}/sendReport: + post: + tags: + - SMS Campaigns + summary: Send an SMS campaign's report + description: >- + Send report of Sent and Archived campaign, to the specified email + addresses, with respective data and a pdf attachment in detail. + operationId: sendSmsReport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/sms: + post: + tags: + - Transactional SMS + summary: Send SMS message to a mobile number + operationId: sendTransacSms + requestBody: + description: Values to send a transactional SMS + content: + application/json: + schema: + $ref: '#/components/schemas/sendTransacSms' + required: true + responses: + '201': + description: SMS has been sent successfully to the recipient + content: + application/json: + schema: + $ref: '#/components/schemas/sendSms' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your SMS. Please update your + plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sendTransacSms + /transactionalSMS/statistics/aggregatedReport: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated over a period of time + operationId: getTransacAggregatedSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with startDate and endDate** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacAggregatedSmsReport' + examples: + response: + value: + range: 2015-05-22|2017-11-29 + requests: 54 + delivered: 16 + hardBounces: 5 + softBounces: 26 + blocked: 4 + unsubscribed: 10 + replied: 8 + accepted: 6 + rejected: 14 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/reports: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated per day + operationId: getTransacSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacSmsReport' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + blocked: 1026 + unsubscribed: 720 + replied: 5091 + accepted: 2318 + rejected: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + blocked: 1514 + unsubscribed: 1090 + replied: 10089 + accepted: 4393 + rejected: 0 + - date: '2017-05-02T00:00:00.000Z' + requests: 14321 + delivered: 13427 + hardBounces: 16 + softBounces: 176 + blocked: 1646 + unsubscribed: 1170 + replied: 11563 + accepted: 4689 + rejected: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/events: + get: + tags: + - Transactional SMS + summary: Get all your SMS activity (unaggregated events) + operationId: getSmsEvents + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: phoneNumber + in: query + description: Filter the report for a specific phone number + schema: + type: string + - name: event + in: query + description: Filter the report for specific events + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - sent + - accepted + - unsubscription + - replies + - blocked + - rejected + - name: tags + in: query + description: >- + Filter the report for specific tags passed as a serialized + urlencoded array + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Sms events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsEventReport' + examples: + response: + value: + events: + - phoneNumber: '00911059469013' + date: '2015-05-20T12:30:00.000Z' + messageId: '1473139351170140' + event: sent + reason: Recipient is currently unreachable + tag: cabWaiting + - phoneNumber: '00911059469013' + date: '2015-05-20T16:30:00.000Z' + messageId: '1473139351170140' + event: delivered + reason: Recipient is currently unreachable + tag: cabRequest + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/{campaignId}: + get: + tags: + - WhatsApp Campaigns + summary: Get a WhatsApp campaign + operationId: getWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Get WhatsApp campaign information on the basis of campaignId + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaignOverview' + examples: + response: + value: + id: 1672035851100690 + campaignName: Test WhatsApp Campaign + campaignStatus: sent + scheduledAt: '2022-12-26T09:50:00.000Z' + senderNumber: 9368207029 + recipients: + type: list + includedLists: + - 22 + excludedLists: + - 45 + template: + name: official_campaign8 + category: MARKETING + language: en + contains_button: true + display_header: false + components: + - type: BODY + text: making it look like readable English. + - type: BUTTONS + buttons: + - type: URL + text: vLorem Ipsum is simply du + url: app.brevo + - type: PHONE_NUMBER + text: Lorem Ipsum is simply dum + phone_number: '+918800613137' + header_variables: + - name: FIRSTNAME + default: INVALID HEADER + index: 1 + datatype: text + header_type: text + body_variable: [] + button_type: CALL_TO_ACTION + header_footer: true + stats: + sent: 3, + delivered: 3, + read: 2, + unsubscribe: 0, + notSent: 4 + createdAt: '2022-12-26T06:50:00.000Z' + modifiedAt: '2022-12-26T08:50:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - WhatsApp Campaigns + summary: Delete a WhatsApp campaign + operationId: deleteWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - WhatsApp Campaigns + summary: Update a WhatsApp campaign + operationId: updateWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateWhatsAppCampaign' + required: true + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template-list: + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp templates + operationId: getWhatsAppTemplates + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: source + in: query + description: source of the template + required: false + schema: + type: string + enum: + - Automation + - Conversations + responses: + '200': + description: WhatsApp templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 235 + name: campaign_22 + type: whatsapp + status: approved + language: en + category: MARKETING + errorReason: NONE + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + - id: 124 + name: test-template + type: whatsapp + status: draft + language: '' + category: MARKETING + errorReason: NONE + createdAt: 2017-0 + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns: + post: + tags: + - WhatsApp Campaigns + summary: Create and Send a WhatsApp campaign + operationId: createWhatsAppCampaign + requestBody: + description: Values to create a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp campaigns + operationId: getWhatsAppCampaigns + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: WhatsApp campaigns information + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaigns' + examples: + response: + value: + count: 23 + campaigns: + - id: 1672035851100690 + campaignName: campaign_22 + campaignStatus: sent + templateId: 637660278078655 + scheduledAt: '2022-12-27T09:50:00.000Z' + errorReason: '' + invalidatedContacts: 0 + stats: + sent: 3 + delivered: 3 + read: 2 + unsubscribe: 0 + notSent: 4 + readPercentage: 28.57 + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template: + post: + tags: + - WhatsApp Campaigns + summary: Create a WhatsApp template + operationId: createWhatsAppTemplate + requestBody: + description: Values to create a WhatsApp template + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template/approval/{templateId}: + post: + tags: + - WhatsApp Campaigns + summary: Send your WhatsApp template for approval + operationId: sendWhatsAppTemplateApproval + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: WhatsApp template sent for approval + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/config: + get: + tags: + - WhatsApp Campaigns + summary: Get your WhatsApp API account information + operationId: getWhatsAppConfig + responses: + '200': + description: Get all the information of your WhatsApp API account + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsAppConfig' + examples: + response: + value: + whatsappBusinessAccountID: 105569359072383 + sendingLimit: TIER_1K + phoneNumberQuality: GREEN + whatsappBusinessAccountStatus: APPROVED + businessStatus: verified + phoneNumberNameStatus: APPROVED + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders: + get: + tags: + - Senders + summary: Get the list of all your senders + operationId: getSenders + parameters: + - name: ip + in: query + description: > + Filter your senders for a specific ip. **Available for dedicated IP + usage only** + schema: + type: string + - name: domain + in: query + description: Filter your senders for a specific domain + schema: + type: string + responses: + '200': + description: list of senders + content: + application/json: + schema: + $ref: '#/components/schemas/getSendersList' + examples: + response: + value: + senders: + - id: 1 + name: Marketing + email: marketing@mycompany.com + active: true + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 100 + - id: 2 + name: Newsletter + email: newsletter@mycompany.com + active: false + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 50 + - ip: 123.98.643.2 + domain: news.mycompany.com + weight: 50 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Senders + summary: Create a new sender + operationId: createSender + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/createSender' + required: false + responses: + '201': + description: sender created + content: + application/json: + schema: + $ref: '#/components/schemas/createSenderModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}: + put: + tags: + - Senders + summary: Update a sender + operationId: updateSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/updateSender' + required: false + responses: + '204': + description: sender updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + delete: + tags: + - Senders + summary: Delete a sender + operationId: deleteSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: sender deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/{senderId}/validate: + put: + tags: + - Senders + summary: Validate Sender using OTP + operationId: validateSenderByOTP + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: otp + content: + application/json: + schema: + $ref: '#/components/schemas/otp' + required: false + responses: + '204': + description: Sender verified + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for a sender + operationId: getIpsFromSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIpsFromSender' + examples: + response: + value: + ips: + - id: 3 + ip: 123.65.8.22 + domain: mailing.myshop.dom + weight: 40 + - id: 5 + ip: 123.43.21.3 + domain: newsletter.myshop.dom + weight: 60 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for your account + operationId: getIps + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIps' + examples: + response: + value: + ips: + - id: 3 + ip: 67.145.89.3 + active: true + domain: mailing.myshop.com + - id: 5 + ip: 76.76.125.9 + active: true + domain: newsletter.myshop.com + - id: 6 + ip: 123.65.8.22 + active: false + domain: notifications.myshop.com + /senders/domains: + get: + tags: + - Domains + summary: Get the list of all your domains + operationId: getDomains + responses: + '200': + description: list of domains + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainsList' + examples: + response: + value: + domains: + - id: 1 + domain_name: mycompany.com + authenticated: true + verified: true + ip: 123.98.689.7 + - id: 2 + domain_name: myexample.com + authenticated: false + verified: true + ip: null + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Domains + summary: Create a new domain + operationId: createDomain + requestBody: + description: domain's name + content: + application/json: + schema: + $ref: '#/components/schemas/createDomain' + required: false + responses: + '200': + description: domain created + content: + application/json: + schema: + $ref: '#/components/schemas/createDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: domain + /senders/domains/{domainName}: + delete: + tags: + - Domains + summary: Delete a domain + operationId: deleteDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - Domains + summary: Validate domain configuration + operationId: getDomainConfiguration + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain configuration + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainConfigurationModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/domains/{domainName}/authenticate: + put: + tags: + - Domains + summary: Authenticate a domain + operationId: authenticateDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/authenticateDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks: + get: + tags: + - Webhooks + summary: Get all webhooks + operationId: getWebhooks + parameters: + - name: type + in: query + description: Filter on webhook type + schema: + type: string + default: transactional + enum: + - marketing + - transactional + - inbound + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of webhook + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: Webhooks informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhooks' + examples: + response: + value: + webhooks: + - url: >- + https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1 + id: 9864 + description: Webhook triggered on campaign openings + events: + - opened + type: transac + createdAt: '2016-07-18T12:30:09.000Z' + modifiedAt: '2016-07-18T16:00:50.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + - url: http://exmaple.domain.com/15kxxxxxn1 + id: 22770 + description: Webhook triggered on campaign hard bounces + events: + - hardBounces + type: marketing + createdAt: '2017-02-20T14:30:00.000Z' + modifiedAt: '2017-02-20T19:00:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Webhooks + summary: Create a webhook + operationId: createWebhook + requestBody: + description: Values to create a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/createWebhook' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/{webhookId}: + get: + tags: + - Webhooks + summary: Get a webhook details + operationId: getWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Webhook informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhook' + examples: + response: + value: + url: http://example.domain.com/1brxxxxxx5p1 + id: 7287 + description: >- + Webhook triggered on campaign openings and addition of + lists + events: + - listAdditions + - opened + type: marketing + createdAt: '2016-06-07T09:10:10.000Z' + modifiedAt: '2016-06-08T11:30:00.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Webhooks + summary: Update a webhook + operationId: updateWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/updateWebhook' + required: true + responses: + '204': + description: Webhook updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateWebhook + delete: + tags: + - Webhooks + summary: Delete a webhook + operationId: deleteWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Webhook deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/export: + post: + tags: + - Webhooks + summary: Export all webhook events + description: >- + This endpoint will submit a request to get the history of webhooks in + the CSV file. The link to download the CSV file will be sent to the + webhook that was provided in the notifyURL. + operationId: exportWebhooksHistory + requestBody: + description: Values to submit for webhooks history + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/exportWebhooksHistory' + required: true + responses: + '202': + description: Request accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children: + get: + tags: + - Reseller + summary: Get the list of all children accounts + operationId: getResellerChilds + parameters: + - name: limit + in: query + description: Number of documents for child accounts information per page + schema: + maximum: 20 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of children + content: + application/json: + schema: + $ref: '#/components/schemas/getChildrenList' + examples: + response: + value: + children: + - email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187588 + - email: alex.pain@example.com + firstName: Alex + lastName: Pain + companyName: MyStore + credits: + emailCredits: 2000 + smsCredits: 0 + statistics: + previousMonthTotalSent: 654 + currentMonthTotalSent: 300 + totalSent: 6553 + password: abC0xxxxx64kL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187669 + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Creates a reseller child + operationId: createResellerChild + requestBody: + description: reseller child to add + content: + application/json: + schema: + $ref: '#/components/schemas/createChild' + required: false + responses: + '201': + description: child created + content: + application/json: + schema: + $ref: '#/components/schemas/createReseller' + examples: + response: + value: + authKey: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 1234567 + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}: + get: + tags: + - Reseller + summary: Get a child account's details + operationId: getChildInfo + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Information for the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildInfo' + examples: + response: + value: + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Reseller + summary: Update info of reseller's child based on the child identifier supplied + operationId: updateResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child profile + content: + application/json: + schema: + $ref: '#/components/schemas/updateChild' + required: true + responses: + '204': + description: reseller's child updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: resellerChild + delete: + tags: + - Reseller + summary: Delete a single reseller child based on the child identifier supplied + operationId: deleteResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or child id of reseller's child + required: true + schema: + type: string + responses: + '204': + description: child deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountStatus: + put: + tags: + - Reseller + summary: >- + Update info of reseller's child account status based on the identifier + supplied + operationId: updateChildAccountStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child account status + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildAccountStatus' + required: true + responses: + '204': + description: reseller's child account status updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountCreationStatus: + get: + tags: + - Reseller + summary: >- + Get the status of a reseller's child account creation, whether it is + successfully created (exists) or not based on the childIdentifier + supplied + operationId: getChildAccountCreationStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: status of reseller's child account + content: + application/json: + schema: + $ref: '#/components/schemas/getChildAccountCreationStatus' + examples: + response: + value: + childAccountCreated: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/ips/associate: + post: + tags: + - Reseller + summary: Associate a dedicated IP to the child + operationId: associateIpToChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to associate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is associated to the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/ips/dissociate: + post: + tags: + - Reseller + summary: Dissociate a dedicated IP to the child + operationId: dissociateIpFromChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to dissociate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is dissociated from the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/credits/add: + post: + tags: + - Reseller + summary: Add Email and/or SMS credits to a specific child account + operationId: addCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: Values to post to add credit to a specific child account + content: + application/json: + schema: + $ref: '#/components/schemas/addCredits' + required: true + responses: + '200': + description: Credits added + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/credits/remove: + post: + tags: + - Reseller + summary: Remove Email and/or SMS credits from a specific child account + operationId: removeCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Values to post to remove email or SMS credits from a specific child + account + content: + application/json: + schema: + $ref: '#/components/schemas/removeCredits' + required: true + responses: + '200': + description: Credits removed + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: removeCredits + /reseller/children/{childIdentifier}/domains: + get: + tags: + - Reseller + summary: Get all sender domains for a specific child account + operationId: getChildDomains + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Sender domains of the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildDomains' + examples: + response: + value: + - domain: mycustomdomain.com + active: true + - domain: mynewdomain.com + active: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Create a domain for a child account + operationId: createChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Sender domain to add for a specific child account. This will not be + displayed to the parent account. + content: + application/json: + schema: + $ref: '#/components/schemas/addChildDomain' + required: true + responses: + '201': + description: Domain added + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/domains/{domainName}: + put: + tags: + - Reseller + summary: >- + Update the sender domain of reseller's child based on the + childIdentifier and domainName passed + operationId: updateChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be updated + required: true + schema: + type: string + requestBody: + description: value to update for sender domain + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildDomain' + required: true + responses: + '204': + description: reseller's child domain updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Reseller + summary: >- + Delete the sender domain of the reseller child based on the + childIdentifier and domainName passed + operationId: deleteChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be deleted + required: true + schema: + type: string + responses: + '204': + description: child domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/auth: + get: + tags: + - Reseller + summary: Get session token to access Brevo (SSO) + description: >- + 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 => + https:/email.mydomain.com/login/sso?token=[token] + operationId: getSsoToken + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Session token + content: + application/json: + schema: + $ref: '#/components/schemas/getSsoToken' + examples: + response: + value: + token: 5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /account: + get: + tags: + - Account + summary: Get your account information, plan and credits details + operationId: getAccount + responses: + '200': + description: account informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAccount' + examples: + response: + value: + plan: + - type: payAsYouGo + credits: 5000 + creditsType: sendLimit + - type: subscription + credits: 39983 + creditsType: sendLimit + startDate: '2017-03-11T00:00:00.000Z' + endDate: '2017-04-11T00:00:00.000Z' + - type: sms + credits: 999.5360000000001 + creditsType: sendLimit + relay: + enabled: true + data: + userName: john.smith@example.com + relay: smtp-relay.domain.com + port: 587 + marketingAutomation: + key: kzfr5xxxxxxttuyo1 + enabled: true + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyShop + address: + city: New-York + street: 1677B 8th Avenue + zipCode: '7665' + country: USA + /organization/activities: + get: + tags: + - Account + - Master account + summary: Get user activity logs + operationId: getAccountActivity + parameters: + - name: startDate + description: >- + Mandatory if endDate is used. Enter start date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. Additionally, you can + retrieve activity logs from the past 12 months from the date of your + search. + in: query + required: false + schema: + type: string + - name: endDate + description: >- + Mandatory if startDate is used. Enter end date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. + in: query + required: false + schema: + type: string + - name: limit + description: Number of documents per page + in: query + required: false + schema: + type: integer + format: int64 + default: 10 + maximum: 100 + minimum: 1 + - name: offset + description: Index of the first document in the page. + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of user activity logs + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountActivity' + examples: + response: + value: + logs: + - action: login-success + date: '2023-03-16T11:19:23.000Z' + user_email: test@mycompany.com + user_ip: 192.158.1.34 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + - action: update-profile + date: '2023-03-15T11:19:23.000Z' + user_email: test@myexample.com + user_ip: 192.158.1.38 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/invited/users: + get: + tags: + - User + summary: Get the list of all your users + operationId: getInvitedUsersList + responses: + '200': + description: list of all your users + content: + application/json: + schema: + $ref: '#/components/schemas/getInvitedUsersList' + examples: + response: + value: + users: + - email: owner@company.com + is_owner: true + status: active + feature_access: + marketing: owner + conversations: owner + crm: owner + - email: pendingInvitedUser@company.com + is_owner: false + status: pending + feature_access: + marketing: custom + conversations: none + crm: full + - email: connectedInvitedUser@company.com + is_owner: false + status: active + feature_access: + marketing: none + conversations: full + crm: none + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/{email}/permissions: + get: + tags: + - User + summary: Check user permission + operationId: getUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: list of all the user's permissions + content: + application/json: + schema: + $ref: '#/components/schemas/getUserPermission' + examples: + response: + value: + email: invitedUser@company.com + status: active + privileges: + - feature: Email campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Templates + permissions: + - Create / edit / delete + - Activate / deactivate + - feature: SMS campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Facebook Ads + permissions: + - Schedule / pause + - feature: Landing pages + permissions: + - All + - feature: Workflows + permissions: + - Create / edit / delete + - Activate / deactivate / Pause + - feature: Contacts + permissions: + - View + - Contact forms + - feature: SMTP & API + permissions: + - SMTP + - API Keys + - Authorized IPs + - feature: User management + permissions: + - None + - feature: Sales Platform + permissions: + - Manage Owned Deals / Tasks / Companies + - Manage Others Deals / Tasks / Companies + - Reports + - Settings + - feature: Conversations + permissions: + - None + - feature: Senders, Domains & Dedicated IPs + permissions: + - Senders management + - Domains management + - Dedicated IPs management + - feature: Push + permissions: + - View + - Create / edit / delete + - Send + - Settings + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/revoke/{email}: + put: + tags: + - User + summary: Revoke user permission + operationId: putRevokeUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Credit note exists + content: + application/json: + schema: + $ref: '#/components/schemas/putRevokeUserPermissionResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/{action}/{email}: + put: + tags: + - User + summary: Resend / Cancel invitation + operationId: putresendcancelinvitation + parameters: + - name: action + description: action + in: path + required: true + schema: + type: string + enum: + - resend + - cancel + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/putresendcancelinvitationResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/send: + post: + tags: + - User + summary: Send invitation to user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - If `all_features_access: false` then only privileges are required + otherwise if `true` then it's assumed that all permissions will be there + for the invited user. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: inviteuser + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/update/permissions: + post: + tags: + - User + summary: Update permission for a user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - The privileges array remains the same as in the send invitation; the + user simply needs to provide the permissions that need to be updated. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: EditUserPermission + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/updateUserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes: + get: + tags: + - Process + summary: Return all the processes for your account + operationId: getProcesses + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: processes informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcesses' + examples: + response: + value: + processes: + - id: 40 + status: completed + name: TRANS-CALC + - id: 43 + status: queued + name: TRANS-GLOBAL-CALC + - id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes/{processId}: + get: + tags: + - Process + summary: Return the informations for a process + operationId: getProcess + parameters: + - name: processId + in: path + description: Id of the process + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: process informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcess' + examples: + response: + value: + id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Process ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + example: + code: invalid_parameter + message: processId is invalid + /inbound/events: + get: + tags: + - Inbound Parsing + summary: Get the list of all the events for the received emails. + description: >- + This endpoint will show the list of all the events for the received + emails. + operationId: getInboundEmailEvents + parameters: + - name: sender + description: Email address of the sender. + in: query + required: false + schema: + type: string + - name: startDate + description: >- + Mandatory if endDate is used. Starting date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: endDate + description: >- + Mandatory if startDate is used. Ending date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: limit + description: Number of documents returned per page + in: query + required: false + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: Index of the first document on the page + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: List of events for received emails. + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEvents' + examples: + response: + value: + events: + - uuid: 1a825d56-029b-4a41-b8e4-1a825d56 + date: '2017-03-11T12:30:00.000Z' + sender: john@example.com + recipient: alexa@example.com + - uuid: 1a825d56-029b-4a41-b8e4-61670463431b + date: '2017-03-12T12:30:00.000Z' + sender: alice@example.com + recipient: bob@example.com + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /inbound/events/{uuid}: + get: + tags: + - Inbound Parsing + summary: Fetch all events history for one particular received email. + description: >- + This endpoint will show the list of all events history for one + particular received email. + operationId: getInboundEmailEventsByUuid + parameters: + - name: uuid + description: UUID to fetch events specific to recieved email + in: path + required: true + schema: + type: string + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEventsByUuid' + examples: + response: + value: + receivedAt: '2017-03-12T12:30:00.000Z' + deliveredAt: '2017-03-12T12:31:00.000Z' + sender: alice@example.com + recipient: bob@example.com + messageId:Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + **Mandatory if htmlContent and templateId are empty**. Url to the + message (HTML). For example: + + **https://html.domain.com** + format: url + example: https://html.domain.com + templateId: + type: integer + description: > + **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. + format: int64 + scheduledAt: + type: string + description: > + 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). For example: + + **2017-06-01T12:30:00+02:00** + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: | + Subject of the campaign. **Mandatory if abTesting is false**. + Ignored if abTesting is true. + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which the campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact attributes must already exist in your Brevo account. If + input parameter **params** used please use **{{contact.FNAME}} + {{contact.LNAME}}** for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids to exclude from the campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + **Mandatory if scheduledAt is not empty**. List Ids to send the + campaign to + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **Mandatory if listIds are not used**. Segment ids to send the + campaign to. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_ + example: true + default: false + mirrorActive: + type: boolean + description: Use true to enable the mirror link + example: true + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: Set this to true if you want to send your campaign at best time. + example: true + default: false + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + **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. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + **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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + updateEmailCampaign: + type: object + properties: + tag: + type: string + description: Tag of the campaign + example: Newsletter + sender: + type: object + properties: + name: + type: string + description: Sender Name from which the campaign emails are sent + example: Mary from MyShop + email: + type: string + description: Sender email from which the campaign emails are sent + format: email + example: newsletter@myshop.com + id: + type: integer + description: > + 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)**. + format: int64 + example: 3 + description: > + Sender details including id or email and name (optional). Only one + of either Sender's email or Sender's ID shall be passed in one + request at a time. For example: + + **{"name":"xyz", "email":"example@abc.com"}** + + **{"name":"xyz", "id":123}** + name: + type: string + description: Name of the campaign + example: Newsletter - May 2017 + htmlContent: + type: string + description: > + 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** + example: >- +Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + Url which contents the body of the email message. **REQUIRED if + htmlContent is empty** + format: url + example: https://html.domain.com + scheduledAt: + type: string + description: > + 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). + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: Subject of the campaign + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact + + attributes must already exist in your Brevo account. If input + parameter + + **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** + for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + 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** + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **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. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps' + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_. + example: true + default: false + mirrorActive: + type: boolean + description: >- + Status of mirror links in campaign. mirrorActive = false means + mirror links are deactivated, & mirrorActive = true means mirror + links are activated, in the campaign + example: true + recurring: + type: boolean + description: > + **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 + example: false + default: false + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: | + Set this to true if you want to send your campaign at best time. + Note:- **if true, warmup ip will be disabled.** + example: true + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + Set an initial quota greater than 1 for warming up your ip. We + recommend you set a value of 3000. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + 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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + getSharedTemplateUrl: + required: + - sharedUrl + type: object + properties: + sharedUrl: + type: string + description: >- + A unique URL for the email campaign or transactional template. This + URL can be shared with other Brevo users. + format: url + example: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + abTestCampaignResult: + type: object + properties: + winningVersion: + type: string + description: >- + 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. + example: A + enum: + - notAvailable + - pending + - tie + - A + - B + winningCriteria: + type: string + description: Criteria choosen for winning version (Open/Click) + example: Open + enum: + - Open + - Click + winningSubjectLine: + type: string + description: Subject Line of current winning version + example: Subject Line A + openRate: + type: string + description: Open rate for current winning version + example: 70% + clickRate: + type: string + description: Click rate for current winning version + example: 70% + winningVersionRate: + type: string + description: Open/Click rate for the winner version + example: 70% + statistics: + required: + - clicks + - complaints + - hardBounces + - openers + - softBounces + - unsubscribed + type: object + properties: + openers: + $ref: '#/components/schemas/abTestVersionStats' + clicks: + $ref: '#/components/schemas/abTestVersionStats' + unsubscribed: + $ref: '#/components/schemas/abTestVersionStats' + hardBounces: + $ref: '#/components/schemas/abTestVersionStats' + softBounces: + $ref: '#/components/schemas/abTestVersionStats' + complaints: + $ref: '#/components/schemas/abTestVersionStats' + clickedLinks: + required: + - Version A + - Version B + type: object + properties: + Version A: + $ref: '#/components/schemas/abTestVersionClicks' + Version B: + $ref: '#/components/schemas/abTestVersionClicks' + emailExportRecipients: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + Webhook called once the export process is finished. For reference, + https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Type of recipients to export for a campaign + example: openers + enum: + - all + - nonClickers + - nonOpeners + - clickers + - openers + - softBounces + - hardBounces + - unsubscribed + requestSmsRecipientExport: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + URL that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Filter the recipients based on how they interacted with the campaign + example: answered + enum: + - all + - delivered + - answered + - softBounces + - hardBounces + - unsubscribed + sendReport: + required: + - email + type: object + properties: + language: + type: string + description: Language of email content for campaign report sending. + example: en + default: fr + enum: + - fr + - es + - pt + - it + - de + - en + email: + required: + - body + - to + type: object + properties: + to: + type: array + description: Email addresses of the recipients + items: + type: string + description: Email address of the recipient + format: email + example: jim.suehan@example.com + body: + type: string + description: Custom text message to be presented in the report email. + example: Please find attached the report of our last email campaign. + description: Custom attributes for the report email. + uploadImageToGallery: + required: + - imageUrl + type: object + properties: + imageUrl: + type: string + description: > + 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. + example: https://somedomain.com/image1.jpg + name: + type: string + description: Name of the image. + example: nature.jpg + sendSmtpEmail: + type: object + properties: + sender: + description: > + **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"}** + + **{"id":2}** + type: object + properties: + name: + type: string + description: > + description: Name of the sender from which the emails will be + sent. **Maximum allowed characters are 70**. Applicable only + when email is passed. + example: Mary from MyShop + email: + type: string + description: >- + Email of the sender from which the emails will be sent. + Mandatory if sender id is not passed. + format: email + example: no-reply@myshop.com + id: + type: integer + description: >- + 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. + format: int64 + example: 2 + to: + type: array + description: > + **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"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: | + Name of the recipient. **Maximum allowed characters are 70**. + example: Jimmy + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed characters are + 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed characters are + 70**. + example: Ann + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not passed, + ignored if 'templateId' is passed** + example: >- +Please + confirm your email address by clicking on the link below
+ + textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + subject: + type: string + description: | + Subject of the message. **Mandatory if 'templateId' is not passed** + example: Login Email confirmation + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + attachment: + type: array + description: > + 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 + items: + type: object + properties: + url: + type: string + description: | + Absolute url of the attachment (**no local file**). + format: url + example: https://attachment.domain.com/myAttachmentFromUrl.jpg + content: + pattern: >- + ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + description: >- + Base64 encoded chunk data of the attachment generated on the + fly + format: byte + example: b3JkZXIucGRm + name: + type: string + description: | + **Required if content is passed**. Name of the attachment + example: myAttachment.png + headers: + type: object + additionalProperties: {} + description: > + 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"}**. + example: + sender.ip: 1.2.3.4 + X-Mailin-custom: some_custom_header + idempotencyKey: abc-123 + templateId: + type: integer + description: Id of the template. + format: int64 + example: 2 + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + messageVersions: + type: array + description: > + 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** + items: + type: object + required: + - to + properties: + to: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients. For example, + + **[{"name":"Jimmy", "email":"jimmy98@example.com"}, + {"name":"Joe", "email":"joe@example.com"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: > + Name of the recipient. **Maximum allowed characters are + 70**. + example: Jimmy + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed + characters are 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed + characters are 70**. + example: Ann + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + subject: + type: string + description: | + Custom subject specific to message version + example: Login Email confirmation + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not + passed, ignored if 'templateId' is passed** + example: >- +Please confirm your email address by clicking on the link + below
+ textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + tags: + type: array + description: Tag your emails to find them more easily + items: + type: string + example: tag1 + scheduledAt: + type: string + description: >- + 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**. + format: date-time + example: '2022-04-05T12:30:00+02:00' + batchId: + type: string + description: >- + 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. + example: 5c6cfa04-eed9-42c2-8b5c-6d470d978e9d + deleteHardbounces: + type: object + properties: + startDate: + type: string + description: >- + Starting date (YYYY-MM-DD) of the time period for deletion. The + hardbounces occurred after this date will be deleted. Must be less + than or equal to the endDate + example: '2016-12-31T00:00:00.000Z' + endDate: + type: string + description: >- + Ending date (YYYY-MM-DD) of the time period for deletion. The + hardbounces until this date will be deleted. Must be greater than or + equal to the startDate + example: '2017-01-31T00:00:00.000Z' + contactEmail: + type: string + description: Target a specific email address + format: email + example: alex76@example.com + blockDomain: + type: object + required: + - domain + properties: + domain: + type: string + description: name of the domain to be blocked + example: example.com + createWebhook: + required: + - events + - url + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on unsubscription + events: + type: array + description: > + - 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` + items: + type: string + example: unsubscribed + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + type: + type: string + description: Type of the webhook + example: marketing + default: transactional + enum: + - transactional + - marketing + - inbound + domain: + type: string + description: Inbound domain of webhook, required in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + updateWebhook: + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on contact hardbounce + events: + type: array + description: > + - 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` + items: + type: string + example: hardBounce + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + domain: + type: string + description: Inbound domain of webhook, used in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + createDoiContact: + required: + - email + - includeListIds + - redirectionUrl + - templateId + type: object + properties: + email: + type: string + description: >- + Email address where the confirmation email will be sent. This email + address will be the identifier for all other contact attributes. + format: email + example: elly@example.com + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. **These attributes must + be present in your Brevo account**. For eg. **{'FNAME':'Elly', + 'LNAME':'Roger'}** + example: + FNAME: Elly + LNAME: Roger + includeListIds: + type: array + description: Lists under user account where contact should be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + excludeListIds: + type: array + description: Lists under user account where contact should not be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + templateId: + type: integer + description: Id of the Double opt-in (DOI) template + format: int64 + example: 2 + redirectionUrl: + type: string + description: > + 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 }}**. + format: url + example: http://requestb.in/173lyyx1 + createContact: + type: object + properties: + email: + type: string + description: > + 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"}** + format: email + example: elly@example.com + ext_id: + description: Pass your own Id to create a contact. + type: string + example: externalId + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. The attribute's + parameter should be passed in capital letter while creating a + contact. Values that don't match the attribute type (e.g. text or + string in a date attribute) will be ignored. **These attributes must + be present in your Brevo account.**. For eg: + + **{"FNAME":"Elly", "LNAME":"Roger"}** + example: + FNAME: Elly + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for emails (emailBlacklisted + = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for SMS (smsBlacklisted = + true) + example: false + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 36 + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing contact in the same request + (updateEnabled = true) + example: false + default: false + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact ( only available if updateEnabled = true ) + items: + type: string + format: email + updateContact: + type: object + properties: + attributes: + type: object + additionalProperties: {} + description: > + 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. Values that don't match the attribute type (e.g. + text or string in a date attribute) will be ignored. 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: updateExternalId + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact + items: + type: string + format: email + updateBatchContacts: + type: object + properties: + contacts: + type: array + description: List of contacts to be updated + items: + type: object + properties: + email: + type: string + description: >- + Email address of the user to be updated (For each operation + only pass one of the supported contact identifiers. Email, id + or sms) + format: email + example: elly@example.com + id: + type: integer + description: >- + id of the user to be updated (For each operation only pass one + of the supported contact identifiers. Email, id or sms) + format: int64 + example: 31 + sms: + type: string + description: >- + SMS of the user to be updated (For each operation only pass + one of the supported contact identifiers. Email, id or sms) + example: +91xxxxxxxxxx + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: UpdateExternalId + attributes: + type: object + additionalProperties: {} + description: > + 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for + email Contact + items: + type: string + format: email + createAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + isRecurring: + type: boolean + description: > + Type of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: true + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Women + type: + type: string + description: > + 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 + example: text + enum: + - text + - date + - float + - boolean + - id + - category + updateAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute to update. **Use only if the attribute's + category is 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Men + createList: + required: + - folderId + - name + type: object + properties: + name: + type: string + description: Name of the list + example: Magento Customer - ES + folderId: + type: integer + description: Id of the parent folder in which this list is to be created + format: int64 + example: 2 + updateList: + type: object + properties: + name: + type: string + description: >- + Name of the list. Either of the two parameters (name, folderId) can + be updated at a time. + example: Magento Customer - ES + folderId: + type: integer + description: >- + 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. + format: int64 + example: 2 + requestContactExport: + type: object + required: + - customContactFilter + properties: + exportAttributes: + type: array + description: > + List of all the attributes that you want to export. **These + attributes must be present in your contact database.** For example: + + **['fname', 'lname', 'email']** + items: + type: string + example: NAME + customContactFilter: + type: object + properties: + actionForContacts: + type: string + description: > + **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. + enum: + - allContacts + - subscribed + - unsubscribed + - unsubscribedPerList + actionForEmailCampaigns: + type: string + description: > + **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). + enum: + - openers + - nonOpeners + - clickers + - nonClickers + - unsubscribed + - hardBounces + - softBounces + actionForSmsCampaigns: + type: string + description: > + **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. + enum: + - hardBounces + - softBounces + - unsubscribed + listId: + type: integer + description: > + **Mandatory if actionForContacts is passed, ignored otherwise.** + Id of the list for which the corresponding action shall be + applied in the filter. + format: int64 + example: 2 + emailCampaignId: + type: integer + description: > + 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. + format: int64 + example: 12 + smsCampaignId: + type: integer + description: > + Considered only if **actionForSmsCampaigns** is passed, ignored + otherwise. The id of sms campaign for which the corresponding + action shall be applied in the filter. + format: int64 + example: 12 + description: | + Set the filter for the contacts to be exported. + notifyUrl: + type: string + description: >- + Webhook that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + requestContactImport: + type: object + properties: + fileUrl: + type: string + description: > + **Mandatory if fileBody and jsonBody is not defined.** URL of the + file to be imported (**no local file**). Possible file formats: + + #### .txt, .csv, .json + format: url + example: https://importfile.domain.com + fileBody: + type: string + description: > + **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. + example: |- + NAME;SURNAME;EMAIL + Smith;John;john.smith@example.com + Roger;Ellie;ellie36@example.com + jsonBody: + type: array + description: > + **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. + items: + type: object + properties: + email: + type: string + attributes: + type: object + additionalProperties: true + description: List of attributes to be imported + example: + email: ndicky0@ocn.ne.jp + attributes: + LNAME: Noemi + FNAME: Dicky + COUNTRY: DE + BIRTHDAY: 11/02/1989 + PREFERED_COLOR: BLACK + WHATSAPP: '33689965433' + LANDLINE_NUMBER: '33689965433' + SMS: '33689965433' + listIds: + type: array + description: > + **Mandatory if newList is not defined.** Ids of the lists in which + the contacts shall be imported. For example, **[2, 4, 7]**. + items: + type: integer + description: List Id in which the contacts shall be imported + format: int64 + example: 76 + notifyUrl: + type: string + description: >- + URL that will be called once the import process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + newList: + type: object + properties: + listName: + type: string + description: > + List with listName will be created first and users will be + imported in it. **Mandatory if listIds is empty**. + example: ContactImport - 2017-05 + folderId: + type: integer + description: > + Id of the folder where this new list shall be created. + **Mandatory if listName is not empty** + format: int64 + example: 2 + description: >- + To create a new list and import the contacts into it, pass the + listName and an optional folderId. + emailBlacklist: + type: boolean + description: To blacklist all the contacts for email + example: false + default: false + disableNotification: + type: boolean + description: To disable email notification + example: false + default: false + smsBlacklist: + type: boolean + description: To blacklist all the contacts for sms + example: false + default: false + updateExistingContacts: + type: boolean + description: To facilitate the choice to update the existing contacts + example: true + default: true + emptyContactsAttributes: + type: boolean + description: > + 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 **) + example: true + default: false + createSmsCampaign: + required: + - content + - name + - sender + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + updateSmsCampaign: + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + sendTransacSms: + required: + - content + - recipient + - sender + type: object + properties: + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + recipient: + type: string + description: Mobile number to send SMS with the country code + example: '33689965433' + content: + type: string + description: > + Content of the message. If more than **160 characters** long, will + be sent as multiple text messages + example: Enter this code:CCJJG8 to validate your account + type: + type: string + description: >- + 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. + example: marketing + default: transactional + enum: + - transactional + - marketing + tag: + type: string + description: Tag of the message + example: accountValidation + webUrl: + type: string + description: >- + Webhook to call for each event triggered by the message (delivered + etc.) + format: url + example: http://requestb.in/173lyyx1 + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + type: string + description: >- + 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.** + example: MyCompany + sendTestEmail: + type: object + properties: + emailTo: + type: array + description: > + List of the email addresses of the recipients whom you wish to send + the test mail. + + _If left empty, the test mail will be sent to your entire test list. + You can not send more than 50 test emails per day_. + items: + type: string + description: Email addres of the recipient + format: email + example: helen.jurger@example.com + sendTestSms: + type: object + properties: + phoneNumber: + type: string + description: > + 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** + example: '33689965433' + getTransacAggregatedSmsReport: + type: object + properties: + range: + type: string + description: Time frame of the report + example: 2016-09-08|2017-04-06 + requests: + type: integer + description: Number of requests for the timeframe + format: int64 + example: 263 + delivered: + type: integer + description: Number of delivered SMS for the timeframe + format: int64 + example: 249 + hardBounces: + type: integer + description: Number of hardbounces for the timeframe + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the timeframe + format: int64 + example: 4 + blocked: + type: integer + description: Number of blocked contact for the timeframe + format: int64 + example: 2 + unsubscribed: + type: integer + description: Number of unsubscription for the timeframe + format: int64 + example: 6 + replied: + type: integer + description: Number of answered SMS for the timeframe + format: int64 + example: 12 + accepted: + type: integer + description: Number of accepted for the timeframe + format: int64 + example: 252 + rejected: + type: integer + description: Number of rejected for the timeframe + format: int64 + example: 8 + getTransacSmsReport: + type: object + properties: + reports: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which statistics are retrieved + format: date + example: '2017-03-17T00:00:00.000Z' + requests: + type: integer + description: Number of requests for the date + format: int64 + example: 87 + delivered: + type: integer + description: Number of delivered SMS for the date + format: int64 + example: 85 + hardBounces: + type: integer + description: Number of hardbounces for the date + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the date + format: int64 + example: 1 + blocked: + type: integer + description: Number of blocked contact for the date + format: int64 + example: 0 + unsubscribed: + type: integer + description: Number of unsubscription for the date + format: int64 + example: 1 + replied: + type: integer + description: Number of answered SMS for the date + format: int64 + example: 2 + accepted: + type: integer + description: Number of accepted for the date + format: int64 + example: 85 + rejected: + type: integer + description: Number of rejected for the date + format: int64 + example: 1 + getIp: + required: + - active + - domain + - id + - ip + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + active: + type: boolean + description: Status of the IP (true=active, false=inactive) + example: true + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.com + getIpsFromSender: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) linked to a sender + items: + $ref: '#/components/schemas/getIpFromSender' + getIps: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) available on your account + items: + $ref: '#/components/schemas/getIp' + getIpFromSender: + required: + - domain + - id + - ip + - weight + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.dom + weight: + type: integer + description: Weight of the IP + format: int64 + example: 75 + manageIp: + type: object + properties: + ip: + type: string + description: Dedicated ID + example: 123.65.8.22 + getTransacEmailContent: + required: + - attachmentCount + - body + - date + - email + - events + - subject + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: abc@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + events: + type: array + description: Series of events which occurred on the transactional email + items: + required: + - name + - time + type: object + properties: + name: + type: string + description: Name of the event that occurred on the sent email + example: delivered + time: + type: string + description: Time at which the event occurred + example: '2017-03-12T12:30:00.000Z' + body: + type: string + description: Actual content of the transactional email that has been sent + example: >- +This is the actual html content sent
+ attachmentCount: + type: integer + description: Count of the attachments that were sent in the email + format: int64 + example: 2 + getTransacEmailsList: + type: object + properties: + count: + type: integer + description: >- + Total number of transactional emails available on your account + according to the passed filter + format: int64 + example: 5 + transactionalEmails: + type: array + items: + required: + - date + - email + - messageId + - subject + - uuid + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: john.smith@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + messageId: + type: string + description: Message Id of the sent email + example: <201798300811.5700093@relay.domain.com> + uuid: + type: string + description: Unique id of the email sent to a particular contact + example: 5a78c-209ok98262910-s99a341 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + from: + type: string + description: Email address of the sender from which the email was sent + format: email + example: diana.doe@example.com + tags: + type: array + description: Tags used for your email + items: + type: string + example: tag1 + getBlockedDomains: + type: object + required: + - domains + properties: + domains: + description: List of all blocked domains + type: array + items: + type: string + description: name of blocked domain + example: contact.com + abTestVersionStats: + required: + - Version A + - Version B + type: object + properties: + Version A: + type: string + description: percentage of an event for version A + example: 50% + Version B: + type: string + description: percentage of an event for version B + example: 50% + description: Percentage of a particular event for both versions + abTestVersionClicks: + type: array + description: Information on clicked links for a particular version + items: + required: + - clickRate + - clicksCount + - link + type: object + properties: + link: + type: string + description: URL of the link + example: https://facbook.com/versionA + clicksCount: + type: integer + description: Number of times a link is clicked + format: int64 + example: 3 + clickRate: + type: string + description: Percentage of clicks of link with respect to total clicks + example: 40% + getInboundEmailEvents: + type: object + properties: + events: + type: array + items: + type: object + required: + - uuid + - sender + - date + - recipient + properties: + uuid: + description: UUID that can be used to fetch additional data + type: string + format: uuid + date: + description: Date when email was received on SMTP relay + type: string + format: date-time + sender: + description: Sender’s email address + type: string + format: email + recipient: + description: Recipient’s email address + type: string + format: email + getInboundEmailEventsByUuid: + type: object + properties: + receivedAt: + description: Date when email was received on SMTP relay + type: string + format: date-time + example: '2019-05-25T11:53:26Z' + deliveredAt: + description: Date when email was delivered successfully to client’s webhook + type: string + nullable: true + format: date-time + recipient: + description: Recipient’s email address + type: string + format: email + sender: + description: Sender’s email address + type: string + format: email + messageId: + description: >- + Value of the Message-ID header. This will be present only after the + processing is done. + type: string + subject: + description: >- + Value of the Subject header. This will be present only after the + processing is done. + type: string + attachments: + description: >- + List of attachments of the email. This will be present only after + the processing is done. + type: array + items: + type: object + properties: + name: + description: >- + filename specified in the Content-Disposition header of the + attachment + type: string + contentType: + description: value of the Content-Type header of the attachment + type: string + contentId: + description: value of the Content-ID header of the attachment. + type: string + contentLength: + description: size of the attachment in bytes + type: integer + logs: + description: >- + List of events/logs that describe the lifecycle of the email on SIB + platform + type: array + items: + type: object + properties: + date: + description: Date of the event + type: string + format: date-time + type: + description: Type of the event + type: string + enum: + - received + - processed + - webhookFailed + - webhookDelivered + getScheduledEmailByBatchId: + type: object + properties: + count: + type: integer + description: Total number of batches + batches: + type: array + items: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the batch was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the batch was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled batch + type: string + enum: + - inProgress + - queued + - processed + - error + getScheduledEmailByMessageId: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the email was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the email was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled email + type: string + enum: + - inProgress + - queued + - processed + - error + subAccountsResponse: + type: object + properties: + count: + type: integer + description: Total number of subaccounts + subAccounts: + type: array + items: + type: object + required: + - id + - companyName + - active + - createdAt + properties: + id: + description: id of the sub-account + type: integer + format: int64 + companyName: + description: Name of the sub-account company + type: string + active: + description: Whether the sub-account is active or not + type: boolean + createdAt: + description: Timestamp when the sub-account was created + type: integer + format: int64 + createSubAccount: + type: object + required: + - companyName + - email + properties: + companyName: + description: Set the name of the sub-account company + type: string + email: + description: Email address for the organization + type: string + language: + description: Set the language of the sub-account + type: string + enum: + - en + - fr + - it + - es + - pt + - de + timezone: + description: Set the timezone of the sub-account + type: string + example: + companyName: Test Sub-account + email: test-sub@example.com + timezone: Europe/Paris + language: en + createSubAccountResponse: + required: + - id + type: object + properties: + id: + type: integer + description: ID of the sub-account created + format: int64 + example: 5 + corporateGroupDetailsResponse: + type: object + properties: + group: + type: object + properties: + id: + type: string + description: Group id + groupName: + type: string + description: Name of the group + createdAt: + type: string + description: Group creation date + sub-accounts: + type: array + items: + type: object + properties: + id: + type: integer + format: int64 + description: Id of the sub-account organzation + companyName: + type: string + description: Name of the sub-account organzation + createdAt: + type: string + description: Creation date of the sub-account organzation + users: + type: array + items: + type: object + properties: + email: + type: string + description: Email address of the user + lastName: + type: string + description: Last name of the user + firstName: + type: string + description: First name of the user + masterDetailsResponse: + type: object + properties: + email: + type: string + description: Email id of master account + companyName: + type: string + description: Company name of master account organization + id: + type: integer + format: int64 + description: Unique identifier of the master account organization + currencyCode: + type: string + description: Currency code of the master account organization + timezone: + type: string + description: Timezone of the master account organization + billingInfo: + type: object + description: Billing details of the master account organization + properties: + email: + type: string + description: Billing email id of master account + companyName: + type: string + description: Company name of master account + name: + type: object + description: Billing name of master account holder + properties: + givenName: + type: string + description: First name for billing + familyName: + type: string + description: Last name for billing + address: + type: object + description: Billing address of master account + properties: + streetAddress: + type: string + description: Street address + locality: + type: string + description: Locality + postalCode: + type: string + description: Postal code + stateCode: + type: string + description: State code + countryCode: + type: string + description: Country code + planInfo: + type: object + description: Plan details + properties: + currencyCode: + type: string + description: Plan currency + nextBillingAt: + type: integer + format: int64 + description: Timestamp of next billing date + price: + type: number + description: Plan amount + planPeriod: + type: string + description: Plan period type + enum: + - month + - year + subAccounts: + type: integer + description: Number of sub-accounts + features: + type: array + description: List of provided features in the plan + items: + type: object + properties: + name: + type: string + description: Name of the feature + unitValue: + type: string + description: Unit value of the feature + quantity: + type: integer + format: int64 + description: Quantity provided in the plan + quantityWithOverages: + type: integer + format: int64 + description: >- + Quantity with overages provided in the plan (only + applicable on ENTv2) + used: + type: integer + format: int64 + description: Quantity consumed by master + usedOverages: + type: integer + format: int64 + description: >- + Quantity consumed by sub-organizations over the admin plan + limit (only applicable on ENTv2) + remaining: + type: integer + format: int64 + description: Quantity remaining in the plan + subAccountDetailsResponse: + type: object + properties: + name: + type: string + description: Name of the sub-account user + email: + type: string + description: Email id of the sub-account organization + companyName: + type: string + description: Sub-account company name + planInfo: + type: object + description: Sub-account plan details + properties: + credits: + type: object + description: Credits quota and remaining credits on the sub-account + properties: + sms: + type: integer + format: int64 + description: SMS credits remaining on the sub-account + emails: + type: object + description: Email credits remaining on the sub-account + properties: + quantity: + type: integer + format: int64 + description: Quantity of email messaging limits provided + remaining: + type: integer + format: int64 + description: Available email messaging limits for use + features: + type: object + description: Features available on the sub-account + properties: + inbox: + type: object + description: Inbox details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of inbox provided + remaining: + type: integer + format: int64 + description: Available inboxes for use + landingPage: + type: object + description: Landing page details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of landing pages provided + remaining: + type: integer + format: int64 + description: Available landing pages for use + users: + type: object + description: Multi-account details + properties: + quantity: + type: integer + format: int64 + description: Quantity of multi-account's provided + remaining: + type: integer + format: int64 + description: Available multi-accounts for use + planType: + type: string + description: type of the plan + subAccountUpdatePlanRequest: + type: object + description: Details of the plan to be changed + properties: + credits: + type: object + description: Credit details to update + properties: + email: + type: integer + format: int64 + description: Number of email credits + features: + type: object + description: Features details to update + properties: + users: + type: integer + format: int64 + description: Number of multi-users + landingPage: + type: integer + format: int64 + description: Number of landing pages / Not required on ENTv2 + inbox: + type: integer + format: int64 + description: Number of inboxes / Not required on ENTv2 + example: + credits: + email: 5000 + features: + users: 15 + landingPage: 20 + inbox: 10 + subAccountAppsToggleRequest: + type: object + description: List of enable/disable applications on the sub-account + properties: + inbox: + type: boolean + description: >- + Set this field to enable or disable Inbox on the sub-account / Not + applicable on ENTv2 + whatsapp: + type: boolean + description: >- + Set this field to enable or disable Whatsapp campaigns on the + sub-account + automation: + type: boolean + description: Set this field to enable or disable Automation on the sub-account + email-campaigns: + type: boolean + description: >- + Set this field to enable or disable Email Campaigns on the + sub-account + sms-campaigns: + type: boolean + description: Set this field to enable or disable SMS Marketing on the sub-account + landing-pages: + type: boolean + description: Set this field to enable or disable Landing pages on the sub-account + transactional-emails: + type: boolean + description: >- + Set this field to enable or disable Transactional Email on the + sub-account + transactional-sms: + type: boolean + description: >- + Set this field to enable or disable Transactional SMS on the + sub-account + facebook-ads: + type: boolean + description: Set this field to enable or disable Facebook ads on the sub-account + web-push: + type: boolean + description: Set this field to enable or disable Web Push on the sub-account + meetings: + type: boolean + description: Set this field to enable or disable Meetings on the sub-account + conversations: + type: boolean + description: Set this field to enable or disable Conversations on the sub-account + crm: + type: boolean + description: Set this field to enable or disable Sales CRM on the sub-account + example: + landing-pages: true + sms-campaigns: false + whatsapp: true + meetings: true + web-push: false + TaskTypes: + type: object + description: Task types details + properties: + id: + type: string + description: Id of task type + example: 61a88a2eb7a574180261234 + title: + type: string + description: Title of task type + example: Email + Task: + required: + - taskTypeId + - name + - date + type: object + description: Task Details + properties: + id: + type: string + description: Unique task id + example: 61a5cd07ca1347c82306ad06 + taskTypeId: + type: string + description: Id for type of task e.g Call / Email / Meeting etc. + example: 61a5cd07ca1347c82306ad09 + name: + type: string + description: Name of task + example: 'Task: Connect with client' + contactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this task + example: + - 1 + - 2 + - 3 + dealsIds: + items: + type: string + type: array + description: Deal ids for deals a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + items: + type: string + type: array + description: Companies ids for companies a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + TaskReminder: + required: + - value + - unit + - types + type: object + description: Task reminder date/time for a task + properties: + value: + type: integer + example: 10 + description: Value of time unit before reminder is to be sent + unit: + type: string + enum: + - minutes + - hours + - weeks + - days + description: Unit of time before reminder is to be sent + types: + items: + type: string + enum: + - email + - push + description: Type of task reminder e.g email, push + type: array + example: + - email + FileList: + type: array + description: List of files + items: + $ref: '#/components/schemas/FileData' + FileDownloadableLink: + type: object + description: Downloadable file link + properties: + fileUrl: + type: string + description: A unique link to download the requested file. + example: https://storage.googleapis.com/brevo-app-crm.......-sample.pdf + FileData: + type: object + description: File data that is uploaded + properties: + name: + type: string + description: Name of uploaded file + example: example.png + authorId: + type: string + description: Account id of user which created the file + example: 61a5ce58y5d4795761045991 + contactId: + type: integer + format: int64 + description: Contact id of contact on which file is uploaded + example: 1 + dealId: + type: string + description: Deal id linked to a file + example: 61a5ce58c5d4795761045991 + companyId: + type: string + description: Company id linked to a file + example: 61a5ce58c5d4795761045991 + size: + type: integer + format: int64 + description: Size of file in bytes + example: 10 + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: File created date/time + NoteData: + required: + - text + type: object + description: Note data to be saved + properties: + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact Ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + companyIds: + items: + type: string + description: Company Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + Note: + required: + - text + type: object + description: Note Details + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + authorId: + type: object + description: Account details of user which created the note + example: + id: 61a5ce58y5d4795761045991 + email: johndoe@example.com + locale: en_GB + timezone: Asia/Kolkata + name: + fullName: John Doe + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note created date/time + updatedAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note updated date/time + NoteId: + type: object + description: Updated Note ID + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + NoteList: + type: array + description: List of notes + items: + $ref: '#/components/schemas/Note' + TaskList: + type: object + description: List of tasks + properties: + items: + type: array + description: List of tasks + items: + $ref: '#/components/schemas/Task' + Pipelines: + type: array + description: List of pipeline + items: + $ref: '#/components/schemas/Pipeline' + PipelineStage: + type: object + description: List of stages + properties: + id: + type: string + description: Stage id + example: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + name: + type: string + description: Stage name + example: New + Pipeline: + type: object + description: List of stages + properties: + pipeline_name: + type: string + description: Pipeline name + example: Sales Pipeline + pipeline: + type: string + description: Pipeline id + example: 5ea675e3da0dd085acaea610 + stages: + type: array + description: List of stages + items: + $ref: '#/components/schemas/PipelineStage' + DealAttributes: + type: array + description: List of deal attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: deal_name + label: + type: string + example: Deal Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + DealsList: + type: object + description: List of Deals + properties: + items: + type: array + description: List of deals + items: + $ref: '#/components/schemas/Deal' + Deal: + type: object + description: Deal Details + properties: + id: + type: string + description: Unique deal id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Deal attributes with values + example: + deal_name: testname + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + pipeline: 6093d296ad1e9c5cf2140a58 + deal_stage: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + stage_updated_at: '2022-05-30T07:42:05.671Z' + created_at: '2022-05-30T07:42:05.671Z' + number_of_contacts: 1 + last_updated_date: '2022-06-06T08:38:36.761Z' + last_activity_date: '2022-06-06T08:38:36.000Z' + next_activity_date: null + number_of_activities: 0 + linkedContactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this deal + example: + - 1 + - 2 + - 3 + linkedCompaniesIds: + items: + type: string + type: array + description: Companies ids for companies linked to this deal + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompaniesList: + type: object + description: List of companies + properties: + items: + type: array + description: List of compaies + items: + $ref: '#/components/schemas/Company' + Company: + type: object + description: Company Details + properties: + id: + type: string + description: Unique comoany id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Company attributes with values + example: + created_at: '2022-01-13T19:04:24.376+05:30' + domain: xyz + last_updated_at: '2022-04-01T18:47:48.283+05:30' + name: text + number_of_contacts: 0 + owner: 62260474111b1101704a9d85 + owner_assign_date: '2022-04-01T18:21:13.379+05:30' + phone_number: 8171844192 + revenue: 10 + linkedContactsIds: + items: + type: integer + type: array + format: in64 + description: Contact ids for contacts linked to this company + example: + - 1 + - 2 + - 3 + linkedDealsIds: + items: + type: string + type: array + format: objectID + description: Deals ids for companies linked to this company + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompanyAttributes: + type: array + description: List of company attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: name + label: + type: string + example: Company Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + ConversationsMessage: + type: object + description: a Conversations message + properties: + id: + type: string + description: >- + Message ID. It can be used for further manipulations with the + message. + example: eYBEm3gq3zc5ayE2g + type: + type: string + enum: + - agent + - visitor + description: '`"agent"` for agents’ messages, `"visitor"` for visitors’ messages.' + example: agent + text: + type: string + description: Message text or name of the attached file + example: Good morning! How can I help you? + visitorId: + type: string + description: visitor’s ID + example: kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg + agentId: + type: string + description: >- + ID of the agent on whose behalf the message was sent (only in + messages sent by an agent). + example: d9nKoegKSjmCtyK78 + agentName: + type: string + description: >- + Agent’s name as displayed to the visitor. Only in the messages sent + by an agent. + example: Liz + createdAt: + type: integer + format: int64 + minimum: 0 + description: Timestamp in milliseconds. + example: 1470222622433 + isPushed: + type: boolean + description: '`true` for pushed messages' + example: true + receivedFrom: + type: string + description: >- + 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. + example: SuperAwesomeHelpdesk + file: + type: object + properties: + filename: + type: string + description: Name of the file + example: conversations.png + size: + type: integer + format: int64 + minimum: 0 + description: Size in bytes + example: 15538 + isImage: + type: boolean + description: Whether the file is an image + example: true + url: + type: string + format: url + description: URL of the file + example: https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/ + imageInfo: + type: object + description: image info is passed in case the file is an image + properties: + width: + type: integer + format: int64 + minimum: 0 + description: Width of the image + example: 1129 + height: + type: integer + format: int64 + minimum: 0 + description: height of the image + example: 525 + previewUrl: + type: string + format: url + description: URL of the preview + example: >- + https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/ + event: + type: object + required: + - event_name + - identifiers + properties: + event_name: + description: >- + The name of the event that occurred. This is how you will find your + event in Brevo. Limited to 255 characters, alphanumerical characters + and - _ only. + type: string + example: video_played + event_date: + description: >- + Timestamp of when the event occurred (e.g. + "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp + of the event creation is used. + type: string + example: '2024-02-06T20:59:23.383Z' + identifiers: + description: Identifies the contact associated with the event. + type: object + required: + - email_id + properties: + email_id: + type: string + description: Email Id associated with the event + example: jane.doe@example.com + contact_properties: + description: >- + Properties defining the state of the contact associated to this + event. Useful to update contact attributes defined in your contacts + database while passing the event. For example: **"FIRSTNAME": "Jane" + , "AGE": 37** + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + AGE: 32 + GENDER: FEMALE + event_properties: + description: >- + Properties of the event. Top level properties and nested properties + can be used to better segment contacts and personalise workflow + conditions. The following field type are supported: string, number, + boolean (true/false), date (Timestamp e.g. + "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, + alphanumerical characters and - _ only. Size is limited to 50Kb. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + - type: object + - type: array + example: + video_title: Brevo — The most approachable CRM suite + vide_description: Create your free account today! + duration: 142 + autoplayed: false + upload_date: '2023-11-24T12:09:10+01:00' + order: + type: object + required: + - id + - createdAt + - updatedAt + - status + - amount + - products + properties: + id: + description: Unique ID of the order. + type: string + example: '14' + createdAt: + description: >- + Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is + actually created. + type: string + example: '2021-07-29T20:59:23.383Z' + updatedAt: + description: >- + Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status + of the order is actually changed/updated. + type: string + example: '2021-07-30T10:59:23.383Z' + status: + description: State of the order. + type: string + example: completed + amount: + description: >- + Total amount of the order, including all shipping expenses, tax and + the price of items. + type: number + example: 308.42 + products: + type: array + items: + type: object + required: + - productId + - quantity + - price + description: Details for the Products in an order. + properties: + productId: + type: string + description: ID of the product. + example: P1 + quantity: + type: number + description: >- + How many pieces of the product the visitor has added to the + cart. + example: 10 + variantId: + type: string + description: Product ID of the red color shirts. + example: P100 + price: + type: number + description: The price of a unit of product + example: 99.99 + email: + description: >- + Email of the contact, Mandatory if "phone" field is not passed in + "billing" parameter. + type: string + example: example@brevo.com + billing: + description: Billing details of an order. + type: object + properties: + address: + type: string + description: Full billing address. + example: 15 Somewhere Road, Brynmenyn + city: + type: string + description: Exact city of the address. + example: Basel + countryCode: + type: string + description: Billing country 2-letter ISO code. + example: CA + phone: + type: string + description: >- + Phone number to contact for further details about the order, + Mandatory if "email" field is not passed. + example: 01559 032133 + postCode: + type: string + description: Postcode for delivery and billing. + example: '4052' + paymentMethod: + type: string + description: >- + How the visitor will pay for the item(s), e.g. paypal, check, + etc. + example: PayPal + region: + type: string + description: Exact region (state/province) for delivery and billing. + example: Northwestern Switzerland + coupons: + description: Coupons applied to the order. Stored case insensitive. + type: array + example: + - EASTER15OFF + items: + type: string + orderBatch: + type: object + required: + - orders + properties: + orders: + description: array of order objects + type: array + items: + $ref: '#/components/schemas/order' + notifyUrl: + description: Notify Url provided by client to get the status of batch request + type: string + example: https://en.wikipedia.org/wiki/Webhook + historical: + description: >- + Defines wether you want your orders to be considered as live data or + as historical data (import of past data, synchronising data). True: + orders will not trigger any automation workflows. False: orders will + trigger workflows as usual. + type: boolean + default: true + example: true + createdBatchId: + type: object + required: + - batchId + properties: + batchId: + type: number + description: Batch ID of the request + example: '1' + count: + type: integer + description: Number of orders + format: int64 + example: 17655 + getCategories: + required: + - categories + - count + type: object + properties: + categories: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getCategoryDetails' + count: + type: integer + description: Number of categories + format: int64 + example: 17655 + getCategoryDetails: + required: + - id + - name + - createdAt + - modifiedAt + type: object + properties: + id: + type: string + description: Category ID for which you requested the details + format: string + example: C11 + name: + type: string + description: Name of the category for which you requested the details + format: string + example: Electronics + createdAt: + type: string + description: Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the category + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the category + format: string + example: http://mydomain.com/category/clothing + isDeleted: + type: boolean + description: category deleted from the shop's database + format: string + example: true + createUpdateCategory: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateCategories: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateBatchCategory: + type: object + required: + - categories + properties: + categories: + description: array of categories objects + type: array + items: + $ref: '#/components/schemas/createUpdateCategories' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createCategoryModel: + type: object + properties: + id: + type: integer + description: ID of the category when a new category is created + format: int64 + example: 122 + createUpdateBatchCategoryModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created categories + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing categories updated + format: int64 + example: 5 + getProducts: + required: + - products + - count + type: object + properties: + products: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getProductDetails' + count: + type: integer + description: Number of products + format: int64 + example: 17655 + getProductDetails: + required: + - id + - name + - createdAt + - modifiedAt + - s3ThumbAnalytics + - s3ThumbEditor + type: object + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: Name of the product for which you requested the details + format: string + example: Iphone 11 + createdAt: + type: string + description: Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the product + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + s3Original: + type: string + description: S3 url of original image + format: string + s3ThumbAnalytics: + type: string + description: >- + S3 thumbnail url of original image in 120x120 dimension for + analytics section + format: string + s3ThumbEditor: + type: string + description: >- + S3 thumbnail url of original image in 600x400 dimension for editor + section + format: string + metaInfo: + type: object + description: >- + Meta data of product such as description, vendor, producer, stock + level, etc. + example: + description: Shoes for sports + brand: addidas + isDeleted: + type: boolean + description: product deleted from the shop's database + example: true + createUpdateProduct: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createUpdateBatchProducts: + type: object + required: + - products + properties: + products: + description: array of products objects + type: array + items: + $ref: '#/components/schemas/createUpdateProducts' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createUpdateProducts: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createProductModel: + type: object + properties: + id: + type: integer + description: ID of the Product when a new product is created + format: int64 + example: 122 + createUpdateBatchProductsModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created products + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing products updated + format: int64 + example: 5 + getCouponCollection: + required: + - id + - name + - defaultCoupon + - createdAt + - totalCoupons + - remainingCoupons + type: object + properties: + id: + type: string + description: The id of the collection + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + name: + type: string + description: The name of the collection + format: uuidv4 + example: SummerPromotions + defaultCoupon: + type: string + description: The default coupon of the collection + example: 10 OFF + createdAt: + description: Datetime on which the collection was created + type: string + format: date-time + example: '2023-01-06T05:03:47.053Z' + totalCoupons: + description: Total coupons in the collection + type: integer + format: int64 + example: 10000 + remainingCoupons: + description: Not sent coupons in the collection + type: integer + format: int64 + example: 5000 + sendWhatsappMessageTemplate: + required: + - senderNumber + - templateId + - contactNumbers + type: object + properties: + templateId: + type: integer + description: ID of the template to send + example: 123 + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + params: + type: object + description: >- + Pass the set of attributes to customize the template. For example, + {"FNAME":"Joe", "LNAME":"Doe"}. + example: + FNAME: Joe + LNAME: Doe + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + sendWhatsappMessageText: + required: + - senderNumber + - contactNumbers + - authType + - text + type: object + properties: + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + text: + type: string + description: >- + Text to be sent as message body (will be overridden if templateId is + passed in the same request) + example: Hi! There i am a message + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + getWhatsappEventReport: + type: object + properties: + events: + type: array + items: + required: + - contactNumber + - date + - messageId + - event + - senderNumber + type: object + properties: + contactNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + date: + type: string + description: UTC date-time on which the event has been generated + example: '2017-03-12T12:30:00.000Z' + messageId: + type: string + description: Message ID which generated the event + example: 23befbae-1505-47a8-bd27-e30ef739f32c + event: + type: string + description: Event which occurred + example: delivered + enum: + - sent + - delivered + - read + - error + - unsubscribe + - reply + - soft-bounce + reason: + type: string + description: >- + Reason for the event (will be there in case of `error` and + `soft-bounce` events) + example: 23befbae-1505-47a8-bd27-e30ef739f32c + body: + type: string + description: >- + Text of the reply (will be there only in case of `reply` event + with text) + example: Hi! I am a reply + mediaUrl: + type: string + format: url + description: >- + Url of the media reply (will be there only in case of `reply` + event with media) + example: https://example.com/media.png + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + getExternalFeedByUUID: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + getAllExternalFeeds: + type: object + properties: + count: + type: integer + description: Total number of batches + feeds: + type: array + items: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + createExternalFeed: + required: + - name + - url + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + default: noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + updateExternalFeed: + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + exportWebhooksHistory: + required: + - event + - notifyURL + - type + type: object + properties: + days: + type: integer + description: >- + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + example: 7 + startDate: + type: string + description: >- + Mandatory if endDate is used. Starting date of the history + (YYYY-MM-DD). Must be lower than equal to endDate + example: '2023-02-13T00:00:00.000Z' + endDate: + type: string + description: >- + Mandatory if startDate is used. Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + example: '2023-02-17T00:00:00.000Z' + sort: + type: string + description: Sorting order of records (asc or desc) + example: desc + type: + type: string + description: Filter the history based on webhook type + example: transactional + enum: + - transactional + - marketing + event: + type: string + description: Filter the history for a specific event type + example: request + enum: + - invalid_parameter + - missing_parameter + - hardBounce + - softBounce + - delivered + - spam + - request + - opened + - click + - invalid + - deferred + - blocked + - unsubscribed + - error + - uniqueOpened + - loadedByProxy + - allEvents + notifyURL: + type: string + description: Webhook URL to receive CSV file link + example: https://brevo.com + webhookId: + type: integer + description: Filter the history for a specific webhook id + example: 2345 + email: + type: string + description: Filter the history for a specific email + example: example@brevo.com + messageId: + type: integer + description: >- + Filter the history for a specific message id. Applicable only for + transactional webhooks. + example: <23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib> + responses: + createModel: + description: successfully created + content: + application/json: + schema: + $ref: '#/components/schemas/createModel' + createdProcessId: + description: process id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + createdBatchId: + description: batch id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdBatchId' + securitySchemes: + api-key: + type: apiKey + description: >- + The API key should be passed in the request headers as `api-key` for + authentication. + name: api-key + in: header + x-samples-languages: + - curl +konfigCliVersion: 1.38.34 diff --git a/sdks/db/fixed-specs/brevo-fixed-spec.yaml b/sdks/db/fixed-specs/brevo-fixed-spec.yaml new file mode 100644 index 0000000000..c32a52e07e --- /dev/null +++ b/sdks/db/fixed-specs/brevo-fixed-spec.yaml @@ -0,0 +1,21099 @@ +openapi: 3.0.1 +info: + title: Brevo API + description: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | + version: 3.0.0 + contact: + name: Brevo Support + url: https://account.brevo.com/support + email: contact@brevo.com + license: + name: MIT + url: http://opensource.org/licenses/MIT + x-konfig-ignore: + potential-incorrect-type: true +servers: + - url: https://api.brevo.com/v3 +tags: + - name: Contacts + - name: Master account + - name: Transactional emails + - name: Reseller + - name: Email Campaigns + - name: Ecommerce + - name: SMS Campaigns + - name: Deals + - name: WhatsApp Campaigns + - name: Conversations + - name: Senders + - name: Companies + - name: Webhooks + - name: User + - name: Tasks + - name: Domains + - name: Notes + - name: Files + - name: Coupons + - name: External Feeds + - name: Transactional SMS + - name: Inbound Parsing + - name: Account + - name: Process + - name: Transactional WhatsApp + - name: Event +paths: + /emailCampaigns: + get: + tags: + - Email Campaigns + summary: Return all your created email campaigns + operationId: EmailCampaigns_getAll + parameters: + - description: Filter on the type of the campaigns + name: type + in: query + schema: + type: string + enum: + - classic + - trigger + - description: Filter on the status of the campaign + name: status + in: query + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + name: statistics + in: query + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + name: endDate + in: query + schema: + type: string + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - description: >- + Use this flag to exclude htmlContent from the response body. If set + to **true**, htmlContent field will be returned as empty string in + the response body + name: excludeHtmlContent + in: query + schema: + type: boolean + enum: + - true + - false + responses: + '200': + description: Email campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaigns' + examples: + response: + value: + count: 2 + campaigns: + - id: 12 + name: EN - Sales Summer 2017 + subject: 20% OFF for 2017 Summer Sales + previewText: Don't miss the sale + type: classic + status: sent + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: marketing@mycompany.com + name: Marketing + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 5 + exclusionLists: + - 13 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 5 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: 80 + statsByDomain: + yahoo.com: + uniqueClicks: 298 + clickers: 533 + complaints: 0 + sent: 25601 + softBounces: 5 + hardBounces: 0 + uniqueViews: 3527 + unsubscriptions: 17 + viewed: 5255 + delivered: 25596 + hotmail.co.uk: + uniqueClicks: 1970 + clickers: 2720 + complaints: 5 + sent: 117055 + softBounces: 111 + hardBounces: 0 + uniqueViews: 21111 + unsubscriptions: 105 + viewed: 35251 + delivered: 117056 + - id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter + type: Classic + status: draft + scheduledAt: '' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 10 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 10 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + aol: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Email Campaigns + summary: Create an email campaign + operationId: EmailCampaigns_createCampaign + requestBody: + description: Values to create a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createEmailCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}: + get: + tags: + - Email Campaigns + summary: Get an email campaign report + operationId: EmailCampaigns_getReport + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + - description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + name: statistics + in: query + required: false + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - statsByDevice + - statsByBrowser + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaign' + examples: + response: + value: + id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter! + type: classic + status: draft + scheduledAt: '2017-09-22T12:30:00.000Z' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://dhh.brevo.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 22 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 22 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + statsByDevice: + desktop: + mac: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 1 + mobile: + androidMobile: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + iPhone: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 0 + statsByBrowser: + thunderbird: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + safari: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + internetExplorer: + clickers: 0 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Email Campaigns + summary: Update an email campaign + operationId: EmailCampaigns_updateCampaign + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateEmailCampaign' + required: true + responses: + '204': + description: Email campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Email Campaigns + summary: Delete an email campaign + operationId: EmailCampaigns_removeCampaign + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendNow: + post: + tags: + - Email Campaigns + summary: Send an email campaign immediately, based on campaignId + operationId: EmailCampaigns_sendImmediate + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been scheduled + content: {} + '400': + description: Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendTest: + post: + tags: + - Email Campaigns + summary: Send an email campaign to your test list + operationId: EmailCampaigns_sendTestToTestList + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + /emailCampaigns/{campaignId}/status: + put: + tags: + - Email Campaigns + summary: Update an email campaign status + operationId: EmailCampaigns_updateStatus + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendReport: + post: + tags: + - Email Campaigns + summary: Send the report of a campaign + operationId: EmailCampaigns_sendReport + description: A PDF will be sent to the specified email addresses + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: + tags: + - Email Campaigns + summary: Get an A/B test email campaign results + operationId: EmailCampaigns_getAbTestResult + description: Obtain winning version of an A/B test email campaign + parameters: + - description: Id of the A/B test campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: A/B test email campaign Result + content: + application/json: + schema: + $ref: '#/components/schemas/abTestCampaignResult' + examples: + response: + value: + winningVersion: B + winningCriteria: Click + openRate: 100% + clickRate: 50% + winningVersionRate: 0% + statistics: + openers: + Version A: 20% + Version B: 100% + clicks: + Version A: 0% + Version B: 50% + unsubscribed: + Version A: 20% + Version B: 0% + softBounces: + Version A: 0% + Version B: 0% + hardBounces: + Version A: 0% + Version B: 0% + complaints: + Version A: 0% + Version B: 0% + clickedLinks: + Version A: + - link: https://google.com + clicksCount: 0 + clickRate: 0% + - link: https://youtube.com + clicksCount: 0 + clickRate: 0% + Version B: + - link: http://www.github.com + clicksCount: 2 + clickRate: 40% + - link: http://www.stackoverflow.com + clicksCount: 3 + clickRate: 60% + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: A/B test Email Campaign not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sharedUrl: + get: + tags: + - Email Campaigns + summary: Get a shared template url + operationId: EmailCampaigns_getSharedUrl + description: >- + Get a unique URL to share & import an email template from one Brevo + account to another. + parameters: + - description: Id of the campaign or template + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Shared template URL information + content: + application/json: + schema: + $ref: '#/components/schemas/getSharedTemplateUrl' + examples: + response: + value: + sharedUrl: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign/Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: Only email campaigns or templates are allowed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/exportRecipients: + post: + tags: + - Email Campaigns + summary: Export the recipients of an email campaign + operationId: EmailCampaigns_exportRecipientsPost + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/emailExportRecipients' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/images: + post: + tags: + - Email Campaigns + summary: Upload an image to your account's image gallery + operationId: EmailCampaigns_uploadImageToGallery + requestBody: + description: Parameters to upload an image + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageToGallery' + required: true + responses: + '201': + description: Image has been successfully uploaded + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageModel' + examples: + response: + value: + url: >- + https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email: + post: + tags: + - Transactional emails + summary: Send a transactional email + operationId: TransactionalEmails_sendTransactionalEmail + requestBody: + description: Values to send a transactional email + content: + application/json: + schema: + $ref: '#/components/schemas/sendSmtpEmail' + required: true + responses: + '201': + description: transactional email sent + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '202': + description: transactional email scheduled + content: + application/json: + schema: + $ref: '#/components/schemas/scheduleSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails: + get: + tags: + - Transactional emails + summary: Get the list of transactional emails on the basis of allowed filters + operationId: TransactionalEmails_getList + description: >- + This endpoint will show the list of emails for past 30 days by default. + To retrieve emails before that time, please pass startDate and endDate + in query filters. + parameters: + - description: > + **Mandatory if templateId and messageId are not passed in query + filters.** Email address to which transactional email has been sent. + name: email + in: query + schema: + type: string + - description: > + **Mandatory if email and messageId are not passed in query + filters.** Id of the template that was used to compose transactional + email. + name: templateId + in: query + schema: + type: integer + format: int64 + - description: > + **Mandatory if templateId and email are not passed in query + filters.** Message ID of the transactional email sent. + name: messageId + in: query + schema: + type: string + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the list. **Maximum time period that can be + selected is one month**. + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the list. **Maximum time period that can be + selected is one month.** + name: endDate + in: query + schema: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - description: Number of documents returned per page + name: limit + in: query + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: List of transactional emails + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailsList' + examples: + response: + value: + count: 120 + transactionalEmails: + - email: abc@xyz.com + subject: summer camp + templateId: 15 + messageId: <201798300811.5787683@relay.domain.com> + uuid: 5a78c-209ok98262910-std2341 + date: '2019-05-25T11:53:26.000Z' + - email: test@test.com + subject: details verification + templateId: 15 + messageId: <201798300811.5700093@relay.domain.com> + uuid: 5a78c-209ok98262910-s99a341 + date: '2019-05-25T07:28:11.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails/{uuid}: + get: + tags: + - Transactional emails + summary: Get the personalized content of a sent transactional email + operationId: TransactionalEmails_getContentByUuid + parameters: + - description: >- + Unique id of the transactional email that has been sent to a + particular contact + name: uuid + in: path + required: true + schema: + type: string + responses: + '200': + description: Transactional email content + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailContent' + examples: + response: + value: + email: abc@example.com + subject: Summer Camps + templateId: 12 + date: '2016-02-25T11:53:26.000Z' + events: + - name: sent + time: '2016-02-25T11:53:26.000Z' + - name: delivered + time: '2016-02-25T11:55:26.000Z' + - name: opened + time: '2016-02-26T09:53:26.000Z' + body: >- +This is the actual html content sent
+ + /smtp/log/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete an SMTP transactional log + operationId: TransactionalEmails_deleteLog + parameters: + - description: MessageId or Email of the transactional log(s) to delete + name: identifier + in: path + required: true + schema: + type: string + responses: + '204': + description: Transactional Logs deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Message ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates: + get: + tags: + - Transactional emails + summary: Get the list of email templates + operationId: TransactionalEmails_listTemplates + parameters: + - description: >- + Filter on the status of the template. Active = true, inactive = + false + name: templateStatus + in: query + schema: + type: boolean + - description: Number of documents returned per page + name: limit + in: query + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: transactional email templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 5 + name: ChristomasTimeTemplate + subject: Merry Christmas + isActive: false + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Festival + htmlContent: HTML CONTENT 1 + createdAt: '2016-02-24T14:44:24.000Z' + modifiedAt: '2016-02-24T15:37:11.000Z' + - id: 12 + name: SummerSales2017Template + subject: Enjoy our summer Sales ! + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Summer + htmlContent: HTML CONTENT 2 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Transactional emails + summary: Create an email template + operationId: TransactionalEmails_createTemplate + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}: + get: + tags: + - Transactional emails + summary: Returns the template information + operationId: TransactionalEmails_getTemplateInfo + parameters: + - description: id of the template + name: templateId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Email template informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplateOverview' + examples: + response: + value: + id: 33 + name: OrderConfirmation + subject: 'Order Confirmation : Thanks for your Purchase !' + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 26 + replyTo: replyto@domain.com + toField: '' + tag: '' + htmlContent: HTML CONTENT 4 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + doiTemplate: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Transactional emails + summary: Update an email template + operationId: TransactionalEmails_updateTemplate + parameters: + - description: id of the template + name: templateId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmtpTemplate' + required: true + responses: + '204': + description: transactional email template updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Transactional emails + summary: Delete an inactive email template + operationId: TransactionalEmails_deleteTemplateById + parameters: + - description: id of the template + name: templateId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Inactive transactional email template has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}/sendTest: + post: + tags: + - Transactional emails + summary: Send a template to your test list + operationId: TransactionalEmails_sendTestTemplate + parameters: + - description: Id of the template + name: templateId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/aggregatedReport: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated over a period of time + operationId: TransactionalEmails_getAggregatedReport + description: >- + This endpoint will show the aggregated stats for past 90 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + parameters: + - description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + name: endDate + in: query + schema: + type: string + - description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + name: days + in: query + schema: + type: integer + format: int64 + - description: Tag of the emails + name: tag + in: query + schema: + type: string + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAggregatedReport' + examples: + response: + value: + range: 2016-09-08|2017-04-28 + requests: 19887 + delivered: 18996 + hardBounces: 234 + softBounces: 1533 + clicks: 9987 + uniqueClicks: 8766 + opens: 17654 + uniqueOpens: 13688 + spamReports: 1 + blocked: 2 + invalid: 0 + unsubscribed: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/reports: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated per day + operationId: TransactionalEmails_getActivityPerDay + parameters: + - description: Number of documents returned per page + name: limit + in: query + schema: + maximum: 30 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document on the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD) + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD) + name: endDate + in: query + schema: + type: string + - description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + name: days + in: query + schema: + type: integer + format: int64 + - description: Tag of the emails + name: tag + in: query + schema: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getReports' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + clicks: 1026 + uniqueClicks: 720 + opens: 5091 + uniqueOpens: 2318 + spamReports: 0 + blocked: 519 + invalid: 1 + unsubscribed: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + clicks: 1514 + uniqueClicks: 1090 + opens: 10089 + uniqueOpens: 4393 + spamReports: 0 + blocked: 920 + invalid: 2 + unsubscribed: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/events: + get: + tags: + - Transactional emails + summary: Get all your transactional email activity (unaggregated events) + operationId: TransactionalEmails_getAllActivity + description: >- + This endpoint will show the aggregated stats for past 30 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + parameters: + - description: Number limitation for the result returned + name: limit + in: query + schema: + maximum: 5000 + type: integer + format: int64 + default: 2500 + minimum: 0 + - description: Beginning point in the list to retrieve from. + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + name: endDate + in: query + schema: + type: string + - description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + name: days + in: query + schema: + type: integer + format: int64 + - description: Filter the report for a specific email addresses + name: email + in: query + schema: + type: string + format: email + - description: Filter the report for a specific event type + name: event + in: query + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - spam + - requests + - opened + - clicks + - invalid + - deferred + - blocked + - unsubscribed + - error + - loadedByProxy + - description: Filter the report for tags (serialized and urlencoded array) + name: tags + in: query + schema: + type: string + - description: Filter on a specific message id + name: messageId + in: query + schema: + type: string + - description: Filter on a specific template id + name: templateId + in: query + schema: + type: integer + format: int64 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Email events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailEventReport' + examples: + response: + value: + events: + - email: john.smith@example.com + date: '2017-03-12T12:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: deferred + reason: Error connection timeout + tag: OrderConfirmation + from: john@example.com + templateId: 4 + - email: john.smith@example.com + date: '2017-03-13T16:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: delivered + tag: OrderConfirmation + from: john@example.com + templateId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts/{email}: + delete: + tags: + - Transactional emails + summary: Unblock or resubscribe a transactional contact + operationId: TransactionalEmails_unblockContact + parameters: + - description: contact email (urlencoded) to unblock. + name: email + in: path + required: true + schema: + type: string + responses: + '204': + description: Contact unblocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts: + get: + tags: + - Transactional emails + summary: Get the list of blocked or unsubscribed transactional contacts + operationId: TransactionalEmails_listBlockedContacts + parameters: + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the blocked or unsubscribed contacts + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the blocked or unsubscribed contacts + name: endDate + in: query + schema: + type: string + - description: Number of documents returned per page + name: limit + in: query + schema: + maximum: 100 + type: integer + format: int64 + default: 50 + minimum: 0 + - description: Index of the first document on the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Comma separated list of emails of the senders from which contacts + are blocked or unsubscribed + name: senders + in: query + style: form + explode: false + schema: + type: array + items: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: List of blocked or unsubscribed transactional contacts + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacBlockedContacts' + examples: + response: + value: + count: 1 + contacts: + - email: abc@xyz.com + senderEmail: ez312@gmal.com + reason: + message: Admin blocked + code: adminBlocked + blockedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains: + get: + tags: + - Transactional emails + summary: Get the list of blocked domains + operationId: TransactionalEmails_getBlockedDomains + description: Get the list of blocked domains + responses: + '200': + description: List of blocked domains + content: + application/json: + schema: + $ref: '#/components/schemas/getBlockedDomains' + examples: + response: + value: + domains: + - example.com + - testdomain.com + post: + tags: + - Transactional emails + summary: Add a new domain to the list of blocked domains + operationId: TransactionalEmails_addBlockedDomain + description: Blocks a new domain in order to avoid messages being sent to the same + requestBody: + description: Name of the domain to be blocked + content: + application/json: + schema: + $ref: '#/components/schemas/blockDomain' + required: true + responses: + '201': + description: Domain is successfully blocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains/{domain}: + delete: + tags: + - Transactional emails + summary: Unblock an existing domain from the list of blocked domains + operationId: TransactionalEmails_unblockDomain + description: Unblocks an existing domain from the list of blocked domains + parameters: + - description: The name of the domain to be deleted + name: domain + in: path + required: true + schema: + type: string + responses: + '204': + description: Domain is successfully deleted from the list of blocked domains + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/deleteHardbounces: + post: + tags: + - Transactional emails + summary: Delete hardbounces + operationId: TransactionalEmails_removeHardbounces + description: >- + Delete hardbounces. To use carefully (e.g. in case of temporary ISP + failures) + requestBody: + description: values to delete hardbounces + content: + application/json: + schema: + $ref: '#/components/schemas/deleteHardbounces' + required: false + responses: + '204': + description: Hardbounces deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emailStatus/{identifier}: + get: + tags: + - Transactional emails + summary: Fetch scheduled emails by batchId or messageId + operationId: TransactionalEmails_getEmailStatusById + description: >- + Fetch scheduled batch of emails by batchId or single scheduled email by + messageId (Can retrieve data upto 30 days old) + parameters: + - description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + name: identifier + in: path + required: true + examples: + batchId: + summary: batchId of scheduled batch + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + messageId: + summary: messageId of scheduled email + value: <202202231031.53307417725@smtp-relay.mailin.fr> + schema: + type: string + - description: >- + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from + which you want to fetch the list. Can be maximum 30 days older tha + current date. + name: startDate + in: query + example: '2022-02-02' + required: false + schema: + type: string + format: date + - description: >- + Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till + which you want to fetch the list. Maximum time period that can be + selected is one month. + name: endDate + in: query + example: '2022-03-02' + required: false + schema: + type: string + format: date + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed. + Not valid when identifier is `messageId`. + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - description: >- + Filter the records by `status` of the scheduled email batch or + message. Not valid when identifier is `messageId`. + name: status + in: query + required: false + schema: + type: string + enum: + - processed + - inProgress + - queued + - description: >- + Number of documents returned per page. Not valid when identifier is + `messageId`. + name: limit + in: query + required: false + example: 100 + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - description: >- + Index of the first document on the page. Not valid when identifier + is `messageId`. + name: offset + in: query + required: false + example: 0 + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: Scheduled email batches + content: + application/json: + schema: + $ref: >- + #/components/schemas/TransactionalEmailsGetEmailStatusByIdResponse + examples: + batchId: + value: + count: 3 + batches: + - scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + - scheduledAt: '2022-02-25T11:36:43.576000000Z' + createdAt: '2022-02-24T11:36:43.576000000Z' + status: processed + - scheduledAt: '2022-02-26T11:36:43.576000000Z' + createdAt: '2022-02-25T11:36:43.576000000Z' + status: inProgress + messageId: + value: + scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete scheduled emails by batchId or messageId + operationId: TransactionalEmails_deleteScheduledEmails + description: >- + Delete scheduled batch of emails by batchId or single scheduled email by + messageId + parameters: + - description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + name: identifier + in: path + required: true + examples: + batchId: + summary: batchId of scheduled batch + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + messageId: + summary: messageId of scheduled email + value: <202202231031.53307417725@smtp-relay.mailin.fr> + schema: + type: string + responses: + '204': + description: Scheduled email(s) deleted + content: {} + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts: + get: + tags: + - Contacts + summary: Get all the contacts + operationId: Contacts_getAllContacts + parameters: + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + name: modifiedSince + in: query + schema: + type: string + - description: > + Filter (urlencoded) the contacts created after a given UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in + date-time format for accurate result.** + name: createdSince + in: query + schema: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - description: Id of the segment. **Either listIds or segmentId can be passed.** + name: segmentId + in: query + schema: + type: integer + format: int64 + - description: Ids of the list. **Either listIds or segmentId can be passed.** + name: listIds + in: query + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: All contacts listed + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: contact1@example.com + id: 247 + emailBlacklisted: true + smsBlacklisted: true + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 58 + attributes: + SMS: '33058407250' + IDENTIFICATION: 1-3RHQ-259 + CIV: MS + LAST_NAME: Brennon + FIRST_NAME: Meg + DOB: '1986-05-02T00:00:00.000Z' + ADDRESS: 1 5th avenue + ZIP_CODE: '44300' + CITY: New-York + ACTION_CODE: 17HH98CH + - email: 33058407248@mailin-sms.com + id: 245 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 61 + - 58 + attributes: + SMS: '33058407248' + IDENTIFICATION: 1-78JS-432 + CIV: MS + LAST_NAME: Press + FIRST_NAME: Sophia + DOB: '1980-09-11T00:00:00.000Z' + ADDRESS: 5 Flower Street + ZIP_CODE: '44119' + CITY: Seattle + ACTION_CODE: 17HU765 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a contact + operationId: Contacts_createNewContact + requestBody: + description: Values to create a contact + content: + application/json: + schema: + $ref: '#/components/schemas/createContact' + required: true + responses: + '201': + description: Contact created + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateContactModel' + examples: + response: + value: + id: 21 + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/doubleOptinConfirmation: + post: + tags: + - Contacts + summary: Create Contact via DOI (Double-Opt-In) Flow + operationId: Contacts_createDoubleOptInContact + requestBody: + description: Values to create the Double opt-in (DOI) contact + content: + application/json: + schema: + $ref: '#/components/schemas/createDoiContact' + required: true + responses: + '201': + description: DOI Contact created + content: {} + '204': + description: DOI Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createDoiContact + /contacts/{identifier}: + get: + tags: + - Contacts + summary: Get a contact's details + operationId: Contacts_getDetails + description: >- + Along with the contact details, this endpoint will show the statistics + of contact for the recent 90 days by default. To fetch the earlier + statistics, please use Get contact campaign stats + ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` + endpoint with the appropriate date ranges. + parameters: + - description: Email (urlencoded) OR ID of the contact OR its SMS attribute value + name: identifier + in: path + required: true + schema: + oneOf: + - type: string + - type: integer + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. + name: endDate + in: query + schema: + type: string + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedContactDetails' + examples: + response: + value: + email: peggy.rain@example.com + id: 42 + emailBlacklisted: false + smsBlacklisted: false + createdAt: '2017-05-02T16:40:31.000Z' + modifiedAt: '2017-05-02T16:40:31.000Z' + attributes: + FIRST_NAME: Peggy + LAST_NAME: Rain + SMS: '3087433387669' + CIV: '1' + DOB: '1986-04-13T00:00:00.000Z' + ADDRESS: 987 5th avenue + ZIP_CODE: '87544' + CITY: New-York + AREA: NY + listIds: + - 40 + statistics: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 68 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a contact + operationId: Contacts_deleteContact + parameters: + - description: Email (urlencoded) OR ID of the contact + name: identifier + in: path + required: true + schema: + oneOf: + - type: string + - type: integer + responses: + '204': + description: Contact deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: You're not allowed to delete registered email contact with Brevo + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a contact + operationId: Contacts_updateContactById + parameters: + - description: Email (urlencoded) OR ID of the contact + name: identifier + in: path + required: true + schema: + oneOf: + - type: string + - type: integer + requestBody: + description: Values to update a contact + content: + application/json: + schema: + $ref: '#/components/schemas/updateContact' + required: true + responses: + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateContact + /contacts/batch: + post: + tags: + - Contacts + summary: Update multiple contacts + operationId: Contacts_updateMultiple + requestBody: + description: Values to update multiple contacts + content: + application/json: + schema: + $ref: '#/components/schemas/updateBatchContacts' + required: true + responses: + '204': + description: All contacts updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/{identifier}/campaignStats: + get: + tags: + - Contacts + summary: Get email campaigns' statistics for a contact + operationId: Contacts_getEmailCampaignStats + parameters: + - description: Email (urlencoded) OR ID of the contact + name: identifier + in: path + required: true + schema: + oneOf: + - type: string + - type: integer + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. Maximum difference between startDate and endDate + should not be greater than 90 days + name: endDate + in: query + schema: + type: string + responses: + '200': + description: Contact campaign statistics informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContactCampaignStats' + examples: + response: + value: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + - campaignId: 45 + eventTime: '2016-11-09T11:45:02.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 45 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/attributes: + get: + tags: + - Contacts + summary: List all attributes + operationId: Contacts_listAttributes + responses: + '200': + description: Attributes listed + content: + application/json: + schema: + $ref: '#/components/schemas/getAttributes' + examples: + response: + value: + attributes: + - name: LASTNAME + category: normal + type: text + - name: FIRSTNAME + category: normal + type: text + - name: DOB + category: normal + type: date + - name: GENDER + category: category + type: text + enumeration: + - value: 1 + label: Men + - value: 2 + label: Women + - value: 3 + label: Kid + /contacts/attributes/{attributeCategory}/{attributeName}: + put: + tags: + - Contacts + summary: Update contact attribute + operationId: Contacts_updateAttribute + parameters: + - description: Category of the attribute + name: attributeCategory + in: path + required: true + schema: + type: string + enum: + - category + - calculated + - global + - description: Name of the existing attribute + name: attributeName + in: path + required: true + schema: + type: string + requestBody: + description: Values to update an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/updateAttribute' + required: true + responses: + '204': + description: Attribute updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateAttribute + post: + tags: + - Contacts + summary: Create contact attribute + operationId: Contacts_createAttribute + parameters: + - description: Category of the attribute + name: attributeCategory + in: path + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - description: Name of the attribute + name: attributeName + in: path + required: true + schema: + type: string + requestBody: + description: Values to create an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/createAttribute' + required: true + responses: + '201': + description: Attribute created + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete an attribute + operationId: Contacts_removeAttribute + parameters: + - description: Category of the attribute + name: attributeCategory + in: path + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - description: Name of the existing attribute + name: attributeName + in: path + required: true + schema: + type: string + responses: + '204': + description: Attribute deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders: + get: + tags: + - Contacts + summary: Get all folders + operationId: Contacts_getAllFolders + parameters: + - description: Number of documents per page + name: limit + in: query + required: true + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document of the page + name: offset + in: query + required: true + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folders informations + content: + application/json: + schema: + $ref: '#/components/schemas/getFolders' + examples: + response: + value: + folders: + - id: 42 + name: Ninja_Form + totalBlacklisted: 98 + totalSubscribers: 4567 + uniqueSubscribers: 4665 + - id: 29 + name: Prestashop + totalBlacklisted: 10 + totalSubscribers: 6543 + uniqueSubscribers: 6553 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a folder + operationId: Contacts_createFolder + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createFolder + /contacts/folders/{folderId}: + get: + tags: + - Contacts + summary: Returns a folder's details + operationId: Contacts_getFolderDetails + parameters: + - description: id of the folder + name: folderId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Folder details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolder' + examples: + response: + value: + id: 1 + name: Client_Folder + totalBlacklisted: 987 + totalSubscribers: 16778 + uniqueSubscribers: 17765 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a folder + operationId: Contacts_updateFolder + parameters: + - description: Id of the folder + name: folderId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '204': + description: Folder updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateFolder + delete: + tags: + - Contacts + summary: Delete a folder (and all its lists) + operationId: Contacts_deleteFolder + parameters: + - description: Id of the folder + name: folderId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Folder deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders/{folderId}/lists: + get: + tags: + - Contacts + summary: Get lists in a folder + operationId: Contacts_getFolderLists + parameters: + - description: Id of the folder + name: folderId + in: path + required: true + schema: + type: integer + format: int64 + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folder's Lists details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolderLists' + examples: + response: + value: + lists: + - id: 46 + name: Reactiv + totalSubscribers: 7655 + totalBlacklisted: 0 + uniqueSubscribers: 7655 + - id: 41 + name: NY_Area + totalSubscribers: 3654 + totalBlacklisted: 23 + uniqueSubscribers: 3677 + - id: 22 + name: VIP_Customer + totalSubscribers: 8753 + totalBlacklisted: 72 + uniqueSubscribers: 8825 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists: + get: + tags: + - Contacts + summary: Get all the lists + operationId: Contacts_getAllLists + parameters: + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Lists informations + content: + application/json: + schema: + $ref: '#/components/schemas/getLists' + examples: + response: + value: + lists: + - id: 53 + name: Spanish_Speakers + totalSubscribers: 5432 + totalBlacklisted: 65 + uniqueSubscribers: 5497 + folderId: 1 + - id: 50 + name: Other + totalSubscribers: 10976 + totalBlacklisted: 765 + uniqueSubscribers: 11741 + folderId: 2 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a list + operationId: Contacts_createList + requestBody: + description: Values to create a list + content: + application/json: + schema: + $ref: '#/components/schemas/createList' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}: + get: + tags: + - Contacts + summary: Get a list's details + operationId: Contacts_getListDetails + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + - description: > + **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for + a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email + campaigns for a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: endDate + in: query + schema: + type: string + responses: + '200': + description: List informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedList' + examples: + response: + value: + id: 12 + name: Newsletter_Weekly + startDate: '2023-09-30T00:00:00.000Z' + endDate: '2023-03-31T00:00:00.000Z' + totalSubscribers: 6533 + totalBlacklisted: 63 + uniqueSubscribers: 6596 + folderId: 1 + createdAt: '2016-02-26T11:56:08.000Z' + campaignStats: + - campaignId: 15 + stats: + uniqueClicks: 701 + clickers: 789 + complaints: 0 + delivered: 6632 + sent: 6645 + softBounces: 34 + hardBounces: 4 + uniqueViews: 3442 + unsubscriptions: 4 + viewed: 4322 + deferred: 0 + - campaignId: 45 + stats: + uniqueClicks: 654 + clickers: 788 + complaints: 1 + delivered: 4078 + sent: 4334 + softBounces: 18 + hardBounces: 2 + uniqueViews: 987 + unsubscriptions: 4 + viewed: 1555 + deferred: 0 + dynamicList: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a list + operationId: Contacts_updateList + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a list + content: + application/json: + schema: + $ref: '#/components/schemas/updateList' + required: true + responses: + '204': + description: List updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a list + operationId: Contacts_deleteList + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: List deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/segments: + get: + tags: + - Contacts + summary: Get all the segments + operationId: Contacts_getAllSegments + parameters: + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Segments informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSegments' + examples: + response: + value: + segments: + - id: 53 + segmentName: Segment1 + categoryName: Name1 + updatedAt: '2017-03-12T12:30:00.000Z' + - id: 50 + segmentName: Segment2 + categoryName: Name2 + updatedAt: '2017-03-12T12:30:00.000Z' + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts: + get: + tags: + - Contacts + summary: Get contacts in a list + operationId: Contacts_getListContacts + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + - description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + name: modifiedSince + in: query + schema: + type: string + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 500 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: alex.pain@example.com + id: 45 + emailBlacklisted: false + smsBlacklisted: true + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + - 2 + attributes: + LASTNAME: Pain + FIRSTNAME: Alex + DOB: '2010-12-31T00:00:00.000Z' + GENDER: Kid + - email: john.smith@example.com + id: 32 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Smith + FIRSTNAME: John + DOB: '1986-06-21T00:00:00.000Z' + GENDER: Men + - email: helen.rose@example.com + id: 65 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Rose + FIRSTNAME: Helen + DOB: '1988-11-02T00:00:00.000Z' + GENDER: Women + SMS: '3375599887766' + count: 17655 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/add: + post: + tags: + - Contacts + summary: Add existing contacts to a list + operationId: Contacts_addToList + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails addresses OR IDs of the contacts + content: + application/json: + schema: + $ref: '#/components/schemas/ContactsAddToListRequest' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + required: true + responses: + '201': + description: >- + All contacts have been added successfully to the list with details + of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/remove: + post: + tags: + - Contacts + summary: Delete a contact from a list + operationId: Contacts_removeContactFromList + parameters: + - description: Id of the list + name: listId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails adresses OR IDs of the contacts OR 'all' true + content: + application/json: + schema: + $ref: '#/components/schemas/ContactsRemoveContactFromListRequest' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + allTrue: + summary: Passing 'all' true + value: + all: true + required: true + responses: + '201': + description: >- + All contacts have been removed successfully from the list with + details of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + allTrue: + summary: Response example when 'all' is passed as true + value: + total: 23 + processId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: contactEmails + /contacts/export: + post: + tags: + - Contacts + summary: Export contacts + operationId: Contacts_exportProcessId + description: >- + 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. + requestBody: + description: Values to request a contact export + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactExport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/import: + post: + tags: + - Contacts + summary: Import contacts + operationId: Contacts_importContactsProcess + description: > + It returns the background process ID which on completion calls + + the notify URL that you have set in the input. + + + **Note**: + + - Any contact attribute that doesn't exist in your account will be + ignored at import end. + requestBody: + description: >- + Values to import contacts in Brevo. To know more about the expected + format, please have a look at + ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactImport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns: + get: + tags: + - SMS Campaigns + summary: Returns the information for all your created SMS campaigns + operationId: SmsCampaigns_getAllInformation + parameters: + - description: Status of campaign. + name: status + in: query + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - description: > + **Mandatory if endDate is used.** Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + name: endDate + in: query + schema: + type: string + - description: Number limitation for the result returned + name: limit + in: query + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - description: Beginning point in the list to retrieve from. + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: SMS campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaigns' + examples: + response: + value: + campaigns: + - id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + - id: 10 + name: SUMMER SALE + status: draft + content: >- + Summer Sale is starting tomorrow. Get extra 10% with + this code:SUM17 + scheduledAt: '2017-08-04T12:30:00.000Z' + testSent: false + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + count: 12 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - SMS Campaigns + summary: Creates an SMS campaign + operationId: SmsCampaigns_createCampaign + requestBody: + description: Values to create an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createSmsCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}: + get: + tags: + - SMS Campaigns + summary: Get an SMS campaign + operationId: SmsCampaigns_getCampaignById + parameters: + - description: id of the SMS campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: SMS campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaign' + examples: + response: + value: + id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - SMS Campaigns + summary: Update an SMS campaign + operationId: SmsCampaigns_updateCampaignById + parameters: + - description: id of the SMS campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmsCampaign' + required: true + responses: + '204': + description: SMS campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - SMS Campaigns + summary: Delete an SMS campaign + operationId: SmsCampaigns_removeCampaignById + parameters: + - description: id of the SMS campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/sendNow: + post: + tags: + - SMS Campaigns + summary: Send your SMS campaign immediately + operationId: SmsCampaigns_sendImmediately + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been scheduled + content: {} + '400': + description: SMS Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/status: + put: + tags: + - SMS Campaigns + summary: Update a campaign's status + operationId: SmsCampaigns_updateStatus + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign. + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: status + /smsCampaigns/{campaignId}/sendTest: + post: + tags: + - SMS Campaigns + summary: Send a test SMS campaign + operationId: SmsCampaigns_sendTestSms + parameters: + - description: Id of the SMS campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: > + 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** + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestSms' + required: true + responses: + '204': + description: Test SMS has been sent successfully to the recipient + content: {} + '400': + description: Test SMS could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendSmsTestFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/exportRecipients: + post: + tags: + - SMS Campaigns + summary: Export an SMS campaign's recipients + operationId: SmsCampaigns_exportRecipientsProcess + description: >- + It returns the background process ID which on completion calls the + notify URL that you have set in the input. + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/requestSmsRecipientExport' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: recipientExport + /smsCampaigns/{campaignId}/sendReport: + post: + tags: + - SMS Campaigns + summary: Send an SMS campaign's report + operationId: SmsCampaigns_sendCampaignReport + description: >- + Send report of Sent and Archived campaign, to the specified email + addresses, with respective data and a pdf attachment in detail. + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/sms: + post: + tags: + - Transactional SMS + summary: Send SMS message to a mobile number + operationId: TransactionalSms_sendSmsMessageToMobile + requestBody: + description: Values to send a transactional SMS + content: + application/json: + schema: + $ref: '#/components/schemas/sendTransacSms' + required: true + responses: + '201': + description: SMS has been sent successfully to the recipient + content: + application/json: + schema: + $ref: '#/components/schemas/sendSms' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your SMS. Please update your + plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sendTransacSms + /transactionalSMS/statistics/aggregatedReport: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated over a period of time + operationId: TransactionalSms_getAggregatedReport + parameters: + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + name: endDate + in: query + schema: + type: string + - description: > + Number of days in the past including today (positive integer). **Not + compatible with startDate and endDate** + name: days + in: query + schema: + type: integer + format: int64 + - description: Filter on a tag + name: tag + in: query + schema: + type: string + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacAggregatedSmsReport' + examples: + response: + value: + range: 2015-05-22|2017-11-29 + requests: 54 + delivered: 16 + hardBounces: 5 + softBounces: 26 + blocked: 4 + unsubscribed: 10 + replied: 8 + accepted: 6 + rejected: 14 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/reports: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated per day + operationId: TransactionalSms_getSmsActivityAggregatedPerDay + parameters: + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + name: endDate + in: query + schema: + type: string + - description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + name: days + in: query + schema: + type: integer + format: int64 + - description: Filter on a tag + name: tag + in: query + schema: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacSmsReport' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + blocked: 1026 + unsubscribed: 720 + replied: 5091 + accepted: 2318 + rejected: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + blocked: 1514 + unsubscribed: 1090 + replied: 10089 + accepted: 4393 + rejected: 0 + - date: '2017-05-02T00:00:00.000Z' + requests: 14321 + delivered: 13427 + hardBounces: 16 + softBounces: 176 + blocked: 1646 + unsubscribed: 1170 + replied: 11563 + accepted: 4689 + rejected: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/events: + get: + tags: + - Transactional SMS + summary: Get all your SMS activity (unaggregated events) + operationId: TransactionalSms_getAllEvents + parameters: + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + name: endDate + in: query + schema: + type: string + - description: Index of the first document of the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + name: days + in: query + schema: + type: integer + format: int64 + - description: Filter the report for a specific phone number + name: phoneNumber + in: query + schema: + type: string + - description: Filter the report for specific events + name: event + in: query + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - sent + - accepted + - unsubscription + - replies + - blocked + - rejected + - description: >- + Filter the report for specific tags passed as a serialized + urlencoded array + name: tags + in: query + schema: + type: string + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Sms events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsEventReport' + examples: + response: + value: + events: + - phoneNumber: '00911059469013' + date: '2015-05-20T12:30:00.000Z' + messageId: '1473139351170140' + event: sent + reason: Recipient is currently unreachable + tag: cabWaiting + - phoneNumber: '00911059469013' + date: '2015-05-20T16:30:00.000Z' + messageId: '1473139351170140' + event: delivered + reason: Recipient is currently unreachable + tag: cabRequest + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/{campaignId}: + get: + tags: + - WhatsApp Campaigns + summary: Get a WhatsApp campaign + operationId: WhatsAppCampaigns_getCampaignById + parameters: + - description: Id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Get WhatsApp campaign information on the basis of campaignId + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaignOverview' + examples: + response: + value: + id: 1672035851100690 + campaignName: Test WhatsApp Campaign + campaignStatus: sent + scheduledAt: '2022-12-26T09:50:00.000Z' + senderNumber: 9368207029 + recipients: + type: list + includedLists: + - 22 + excludedLists: + - 45 + template: + components: + - type: BODY + text: making it look like readable English. + - type: BUTTONS + buttons: + - type: URL + text: vLorem Ipsum is simply du + url: app.brevo + - type: PHONE_NUMBER + text: Lorem Ipsum is simply dum + phone_number: '+918800613137' + name: official_campaign8 + category: MARKETING + language: en + contains_button: true + display_header: false + header_variables: + - name: FIRSTNAME + default: INVALID HEADER + index: 1 + datatype: text + header_type: text + body_variable: [] + button_type: CALL_TO_ACTION + header_footer: true + stats: + sent: 3, + delivered: 3, + read: 2, + unsubscribe: 0, + notSent: 4 + createdAt: '2022-12-26T06:50:00.000Z' + modifiedAt: '2022-12-26T08:50:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - WhatsApp Campaigns + summary: Delete a WhatsApp campaign + operationId: WhatsAppCampaigns_deleteCampaign + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - WhatsApp Campaigns + summary: Update a WhatsApp campaign + operationId: WhatsAppCampaigns_updateCampaignById + parameters: + - description: id of the campaign + name: campaignId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateWhatsAppCampaign' + required: true + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template-list: + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp templates + operationId: WhatsAppCampaigns_getTemplates + parameters: + - description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: endDate + in: query + schema: + type: string + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - description: source of the template + name: source + in: query + required: false + schema: + type: string + enum: + - Automation + - Conversations + responses: + '200': + description: WhatsApp templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 235 + name: campaign_22 + type: whatsapp + status: approved + language: en + category: MARKETING + errorReason: NONE + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + - id: 124 + name: test-template + type: whatsapp + status: draft + language: '' + category: MARKETING + errorReason: NONE + createdAt: 2017-0 + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns: + post: + tags: + - WhatsApp Campaigns + summary: Create and Send a WhatsApp campaign + operationId: WhatsAppCampaigns_createAndSend + requestBody: + description: Values to create a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp campaigns + operationId: WhatsAppCampaigns_getAll + parameters: + - description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: startDate + in: query + schema: + type: string + - description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + name: endDate + in: query + schema: + type: string + - description: Number of documents per page + name: limit + in: query + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: WhatsApp campaigns information + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaigns' + examples: + response: + value: + count: 23 + campaigns: + - id: 1672035851100690 + campaignName: campaign_22 + campaignStatus: sent + templateId: 637660278078655 + scheduledAt: '2022-12-27T09:50:00.000Z' + errorReason: '' + invalidatedContacts: 0 + stats: + sent: 3 + delivered: 3 + read: 2 + unsubscribe: 0 + notSent: 4 + readPercentage: 28.57 + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template: + post: + tags: + - WhatsApp Campaigns + summary: Create a WhatsApp template + operationId: WhatsAppCampaigns_createTemplate + requestBody: + description: Values to create a WhatsApp template + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template/approval/{templateId}: + post: + tags: + - WhatsApp Campaigns + summary: Send your WhatsApp template for approval + operationId: WhatsAppCampaigns_sendTemplateForApproval + parameters: + - description: id of the template + name: templateId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: WhatsApp template sent for approval + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/config: + get: + tags: + - WhatsApp Campaigns + summary: Get your WhatsApp API account information + operationId: WhatsAppCampaigns_getAccountInfo + responses: + '200': + description: Get all the information of your WhatsApp API account + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsAppConfig' + examples: + response: + value: + whatsappBusinessAccountID: 105569359072383 + sendingLimit: TIER_1K + phoneNumberQuality: GREEN + whatsappBusinessAccountStatus: APPROVED + businessStatus: verified + phoneNumberNameStatus: APPROVED + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders: + get: + tags: + - Senders + summary: Get the list of all your senders + operationId: Senders_listAll + parameters: + - description: > + Filter your senders for a specific ip. **Available for dedicated IP + usage only** + name: ip + in: query + schema: + type: string + - description: Filter your senders for a specific domain + name: domain + in: query + schema: + type: string + responses: + '200': + description: list of senders + content: + application/json: + schema: + $ref: '#/components/schemas/getSendersList' + examples: + response: + value: + senders: + - id: 1 + name: Marketing + email: marketing@mycompany.com + active: true + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 100 + - id: 2 + name: Newsletter + email: newsletter@mycompany.com + active: false + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 50 + - ip: 123.98.643.2 + domain: news.mycompany.com + weight: 50 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Senders + summary: Create a new sender + operationId: Senders_createNewSender + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/createSender' + required: false + responses: + '201': + description: sender created + content: + application/json: + schema: + $ref: '#/components/schemas/createSenderModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}: + put: + tags: + - Senders + summary: Update a sender + operationId: Senders_updateSenderById + parameters: + - description: Id of the sender + name: senderId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/updateSender' + required: false + responses: + '204': + description: sender updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + delete: + tags: + - Senders + summary: Delete a sender + operationId: Senders_removeSender + parameters: + - description: Id of the sender + name: senderId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: sender deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/{senderId}/validate: + put: + tags: + - Senders + summary: Validate Sender using OTP + operationId: Senders_validateSenderUsingOtp + parameters: + - description: Id of the sender + name: senderId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: otp + content: + application/json: + schema: + $ref: '#/components/schemas/otp' + required: false + responses: + '204': + description: Sender verified + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for a sender + operationId: Senders_getAllDedicatedIps + parameters: + - description: Id of the sender + name: senderId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIpsFromSender' + examples: + response: + value: + ips: + - id: 3 + ip: 123.65.8.22 + domain: mailing.myshop.dom + weight: 40 + - id: 5 + ip: 123.43.21.3 + domain: newsletter.myshop.dom + weight: 60 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for your account + operationId: Senders_getDedicatedIps + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIps' + examples: + response: + value: + ips: + - id: 3 + ip: 67.145.89.3 + active: true + domain: mailing.myshop.com + - id: 5 + ip: 76.76.125.9 + active: true + domain: newsletter.myshop.com + - id: 6 + ip: 123.65.8.22 + active: false + domain: notifications.myshop.com + /senders/domains: + get: + tags: + - Domains + summary: Get the list of all your domains + operationId: Domains_getAll + responses: + '200': + description: list of domains + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainsList' + examples: + response: + value: + domains: + - id: 1 + domain_name: mycompany.com + authenticated: true + verified: true + ip: 123.98.689.7 + - id: 2 + domain_name: myexample.com + authenticated: false + verified: true + ip: null + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Domains + summary: Create a new domain + operationId: Domains_createNewDomain + requestBody: + description: domain's name + content: + application/json: + schema: + $ref: '#/components/schemas/createDomain' + required: false + responses: + '200': + description: domain created + content: + application/json: + schema: + $ref: '#/components/schemas/createDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: domain + /senders/domains/{domainName}: + delete: + tags: + - Domains + summary: Delete a domain + operationId: Domains_deleteDomain + parameters: + - description: Domain name + name: domainName + in: path + required: true + schema: + type: string + responses: + '200': + description: domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - Domains + summary: Validate domain configuration + operationId: Domains_validateConfiguration + parameters: + - description: Domain name + name: domainName + in: path + required: true + schema: + type: string + responses: + '200': + description: domain configuration + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainConfigurationModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/domains/{domainName}/authenticate: + put: + tags: + - Domains + summary: Authenticate a domain + operationId: Domains_authenticateDomain + parameters: + - description: Domain name + name: domainName + in: path + required: true + schema: + type: string + responses: + '200': + description: domain authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/authenticateDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks: + get: + tags: + - Webhooks + summary: Get all webhooks + operationId: Webhooks_getAll + parameters: + - description: Filter on webhook type + name: type + in: query + schema: + type: string + default: transactional + enum: + - marketing + - transactional + - inbound + - description: >- + Sort the results in the ascending/descending order of webhook + creation + name: sort + in: query + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: Webhooks informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhooks' + examples: + response: + value: + webhooks: + - description: Webhook triggered on campaign openings + url: >- + https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1 + id: 9864 + events: + - opened + type: transac + createdAt: '2016-07-18T12:30:09.000Z' + modifiedAt: '2016-07-18T16:00:50.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + - description: Webhook triggered on campaign hard bounces + url: http://exmaple.domain.com/15kxxxxxn1 + id: 22770 + events: + - hardBounces + type: marketing + createdAt: '2017-02-20T14:30:00.000Z' + modifiedAt: '2017-02-20T19:00:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Webhooks + summary: Create a webhook + operationId: Webhooks_createHook + requestBody: + description: Values to create a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/createWebhook' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/{webhookId}: + get: + tags: + - Webhooks + summary: Get a webhook details + operationId: Webhooks_getDetails + parameters: + - description: Id of the webhook + name: webhookId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Webhook informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhook' + examples: + response: + value: + description: >- + Webhook triggered on campaign openings and addition of + lists + url: http://example.domain.com/1brxxxxxx5p1 + id: 7287 + events: + - listAdditions + - opened + type: marketing + createdAt: '2016-06-07T09:10:10.000Z' + modifiedAt: '2016-06-08T11:30:00.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Webhooks + summary: Update a webhook + operationId: Webhooks_updateWebhookById + parameters: + - description: Id of the webhook + name: webhookId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/updateWebhook' + required: true + responses: + '204': + description: Webhook updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateWebhook + delete: + tags: + - Webhooks + summary: Delete a webhook + operationId: Webhooks_deleteWebhook + parameters: + - description: Id of the webhook + name: webhookId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Webhook deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/export: + post: + tags: + - Webhooks + summary: Export all webhook events + operationId: Webhooks_exportAllEvents + description: >- + This endpoint will submit a request to get the history of webhooks in + the CSV file. The link to download the CSV file will be sent to the + webhook that was provided in the notifyURL. + requestBody: + description: Values to submit for webhooks history + content: + application/json: + schema: + $ref: '#/components/schemas/WebhooksExportAllEventsRequest' + required: true + responses: + '202': + description: Request accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children: + get: + tags: + - Reseller + summary: Get the list of all children accounts + operationId: Reseller_listChildrenAccounts + parameters: + - description: Number of documents for child accounts information per page + name: limit + in: query + schema: + maximum: 20 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Index of the first document in the page + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of children + content: + application/json: + schema: + $ref: '#/components/schemas/getChildrenList' + examples: + response: + value: + children: + - email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187588 + - email: alex.pain@example.com + firstName: Alex + lastName: Pain + companyName: MyStore + credits: + emailCredits: 2000 + smsCredits: 0 + statistics: + previousMonthTotalSent: 654 + currentMonthTotalSent: 300 + totalSent: 6553 + password: abC0xxxxx64kL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187669 + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Creates a reseller child + operationId: Reseller_createChild + requestBody: + description: reseller child to add + content: + application/json: + schema: + $ref: '#/components/schemas/createChild' + required: false + responses: + '201': + description: child created + content: + application/json: + schema: + $ref: '#/components/schemas/createReseller' + examples: + response: + value: + authKey: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 1234567 + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}: + get: + tags: + - Reseller + summary: Get a child account's details + operationId: Reseller_getChildDetails + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + responses: + '200': + description: Information for the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildInfo' + examples: + response: + value: + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Reseller + summary: Update info of reseller's child based on the child identifier supplied + operationId: Reseller_updateChildInfo + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: values to update in child profile + content: + application/json: + schema: + $ref: '#/components/schemas/updateChild' + required: true + responses: + '204': + description: reseller's child updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: resellerChild + delete: + tags: + - Reseller + summary: Delete a single reseller child based on the child identifier supplied + operationId: Reseller_deleteChildByIdentifier + parameters: + - description: Either auth key or child id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + responses: + '204': + description: child deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountStatus: + put: + tags: + - Reseller + summary: >- + Update info of reseller's child account status based on the identifier + supplied + operationId: Reseller_updateChildAccountStatus + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: values to update in child account status + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildAccountStatus' + required: true + responses: + '204': + description: reseller's child account status updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountCreationStatus: + get: + tags: + - Reseller + summary: >- + Get the status of a reseller's child account creation, whether it is + successfully created (exists) or not based on the childIdentifier + supplied + operationId: Reseller_getChildAccountCreationStatus + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + responses: + '200': + description: status of reseller's child account + content: + application/json: + schema: + $ref: '#/components/schemas/getChildAccountCreationStatus' + examples: + response: + value: + childAccountCreated: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/ips/associate: + post: + tags: + - Reseller + summary: Associate a dedicated IP to the child + operationId: Reseller_associateDedicatedIpToChild + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: IP to associate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is associated to the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/ips/dissociate: + post: + tags: + - Reseller + summary: Dissociate a dedicated IP to the child + operationId: Reseller_dissociateIpToChild + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: IP to dissociate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is dissociated from the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/credits/add: + post: + tags: + - Reseller + summary: Add Email and/or SMS credits to a specific child account + operationId: Reseller_addChildCredits + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: Values to post to add credit to a specific child account + content: + application/json: + schema: + $ref: '#/components/schemas/addCredits' + required: true + responses: + '200': + description: Credits added + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/credits/remove: + post: + tags: + - Reseller + summary: Remove Email and/or SMS credits from a specific child account + operationId: Reseller_removeCreditsFromChild + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: >- + Values to post to remove email or SMS credits from a specific child + account + content: + application/json: + schema: + $ref: '#/components/schemas/removeCredits' + required: true + responses: + '200': + description: Credits removed + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: removeCredits + /reseller/children/{childIdentifier}/domains: + get: + tags: + - Reseller + summary: Get all sender domains for a specific child account + operationId: Reseller_getChildDomains + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + responses: + '200': + description: Sender domains of the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildDomains' + examples: + response: + value: + - domain: mycustomdomain.com + active: true + - domain: mynewdomain.com + active: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Create a domain for a child account + operationId: Reseller_createChildDomain + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + requestBody: + description: >- + Sender domain to add for a specific child account. This will not be + displayed to the parent account. + content: + application/json: + schema: + $ref: '#/components/schemas/addChildDomain' + required: true + responses: + '201': + description: Domain added + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/domains/{domainName}: + put: + tags: + - Reseller + summary: >- + Update the sender domain of reseller's child based on the + childIdentifier and domainName passed + operationId: Reseller_updateSenderDomain + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + - description: Pass the existing domain that needs to be updated + name: domainName + in: path + required: true + schema: + type: string + requestBody: + description: value to update for sender domain + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildDomain' + required: true + responses: + '204': + description: reseller's child domain updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Reseller + summary: >- + Delete the sender domain of the reseller child based on the + childIdentifier and domainName passed + operationId: Reseller_deleteSenderDomainByChildIdentifierAndDomainName + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + - description: Pass the existing domain that needs to be deleted + name: domainName + in: path + required: true + schema: + type: string + responses: + '204': + description: child domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/auth: + get: + tags: + - Reseller + summary: Get session token to access Brevo (SSO) + operationId: Reseller_getSessionToken + description: >- + 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 => + https:/email.mydomain.com/login/sso?token=[token] + parameters: + - description: Either auth key or id of reseller's child + name: childIdentifier + in: path + required: true + schema: + type: string + responses: + '200': + description: Session token + content: + application/json: + schema: + $ref: '#/components/schemas/getSsoToken' + examples: + response: + value: + token: 5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /account: + get: + tags: + - Account + summary: Get your account information, plan and credits details + operationId: Account_informationDetails + responses: + '200': + description: account informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAccount' + examples: + response: + value: + plan: + - type: payAsYouGo + credits: 5000 + creditsType: sendLimit + - type: subscription + credits: 39983 + creditsType: sendLimit + startDate: '2017-03-11T00:00:00.000Z' + endDate: '2017-04-11T00:00:00.000Z' + - type: sms + credits: 999.5360000000001 + creditsType: sendLimit + relay: + enabled: true + data: + userName: john.smith@example.com + relay: smtp-relay.domain.com + port: 587 + marketingAutomation: + key: kzfr5xxxxxxttuyo1 + enabled: true + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyShop + address: + city: New-York + street: 1677B 8th Avenue + zipCode: '7665' + country: USA + /organization/activities: + get: + tags: + - Account + - Master account + summary: Get user activity logs + operationId: Account_getUserActivityLogs + parameters: + - description: >- + Mandatory if endDate is used. Enter start date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. Additionally, you can + retrieve activity logs from the past 12 months from the date of your + search. + name: startDate + in: query + required: false + schema: + type: string + - description: >- + Mandatory if startDate is used. Enter end date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. + name: endDate + in: query + required: false + schema: + type: string + - description: Number of documents per page + name: limit + in: query + required: false + schema: + type: integer + format: int64 + default: 10 + maximum: 100 + minimum: 1 + - description: Index of the first document in the page. + name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of user activity logs + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountActivity' + examples: + response: + value: + logs: + - action: login-success + date: '2023-03-16T11:19:23.000Z' + user_email: test@mycompany.com + user_ip: 192.158.1.34 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + - action: update-profile + date: '2023-03-15T11:19:23.000Z' + user_email: test@myexample.com + user_ip: 192.158.1.38 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/invited/users: + get: + tags: + - User + summary: Get the list of all your users + operationId: User_getAllUsers + responses: + '200': + description: list of all your users + content: + application/json: + schema: + $ref: '#/components/schemas/getInvitedUsersList' + examples: + response: + value: + users: + - email: owner@company.com + is_owner: true + status: active + feature_access: + marketing: owner + conversations: owner + crm: owner + - email: pendingInvitedUser@company.com + is_owner: false + status: pending + feature_access: + marketing: custom + conversations: none + crm: full + - email: connectedInvitedUser@company.com + is_owner: false + status: active + feature_access: + marketing: none + conversations: full + crm: none + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/{email}/permissions: + get: + tags: + - User + summary: Check user permission + operationId: User_checkPermission + parameters: + - description: Email of the invited user. + name: email + in: path + required: true + schema: + type: string + responses: + '200': + description: list of all the user's permissions + content: + application/json: + schema: + $ref: '#/components/schemas/getUserPermission' + examples: + response: + value: + email: invitedUser@company.com + status: active + privileges: + - feature: Email campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Templates + permissions: + - Create / edit / delete + - Activate / deactivate + - feature: SMS campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Facebook Ads + permissions: + - Schedule / pause + - feature: Landing pages + permissions: + - All + - feature: Workflows + permissions: + - Create / edit / delete + - Activate / deactivate / Pause + - feature: Contacts + permissions: + - View + - Contact forms + - feature: SMTP & API + permissions: + - SMTP + - API Keys + - Authorized IPs + - feature: User management + permissions: + - None + - feature: Sales Platform + permissions: + - Manage Owned Deals / Tasks / Companies + - Manage Others Deals / Tasks / Companies + - Reports + - Settings + - feature: Conversations + permissions: + - None + - feature: Senders, Domains & Dedicated IPs + permissions: + - Senders management + - Domains management + - Dedicated IPs management + - feature: Push + permissions: + - View + - Create / edit / delete + - Send + - Settings + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/revoke/{email}: + put: + tags: + - User + summary: Revoke user permission + operationId: User_revokePermissionByEmail + parameters: + - description: Email of the invited user. + name: email + in: path + required: true + schema: + type: string + responses: + '200': + description: Credit note exists + content: + application/json: + schema: + $ref: '#/components/schemas/putRevokeUserPermissionResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/{action}/{email}: + put: + tags: + - User + summary: Resend / Cancel invitation + operationId: User_resendInvitation + parameters: + - description: action + name: action + in: path + required: true + schema: + type: string + enum: + - resend + - cancel + - description: Email of the invited user. + name: email + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/putresendcancelinvitationResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/send: + post: + tags: + - User + summary: Send invitation to user + operationId: User_sendInvitation + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - If `all_features_access: false` then only privileges are required + otherwise if `true` then it's assumed that all permissions will be there + for the invited user. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/update/permissions: + post: + tags: + - User + summary: Update permission for a user + operationId: User_updatePermissions + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - The privileges array remains the same as in the send invitation; the + user simply needs to provide the permissions that need to be updated. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/updateUserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes: + get: + tags: + - Process + summary: Return all the processes for your account + operationId: Process_getAllProcesses + parameters: + - description: Number limitation for the result returned + name: limit + in: query + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - description: Beginning point in the list to retrieve from. + name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + name: sort + in: query + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: processes informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcesses' + examples: + response: + value: + processes: + - id: 40 + status: completed + name: TRANS-CALC + - id: 43 + status: queued + name: TRANS-GLOBAL-CALC + - id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes/{processId}: + get: + tags: + - Process + summary: Return the informations for a process + operationId: Process_getProcessInformation + parameters: + - description: Id of the process + name: processId + in: path + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: process informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcess' + examples: + response: + value: + id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Process ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + example: + code: invalid_parameter + message: processId is invalid + /inbound/events: + get: + tags: + - Inbound Parsing + summary: Get the list of all the events for the received emails. + operationId: InboundParsing_getAllEvents + description: >- + This endpoint will show the list of all the events for the received + emails. + parameters: + - description: Email address of the sender. + name: sender + in: query + required: false + schema: + type: string + - description: >- + Mandatory if endDate is used. Starting date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. + Maximum time period that can be selected is one month. + name: startDate + in: query + required: false + schema: + type: string + format: datetime + - description: >- + Mandatory if startDate is used. Ending date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. + Maximum time period that can be selected is one month. + name: endDate + in: query + required: false + schema: + type: string + format: datetime + - description: Number of documents returned per page + name: limit + in: query + required: false + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - description: Index of the first document on the page + name: offset + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + - description: >- + Sort the results in the ascending/descending order of record + creation + name: sort + in: query + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: List of events for received emails. + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEvents' + examples: + response: + value: + events: + - uuid: 1a825d56-029b-4a41-b8e4-1a825d56 + date: '2017-03-11T12:30:00.000Z' + sender: john@example.com + recipient: alexa@example.com + - uuid: 1a825d56-029b-4a41-b8e4-61670463431b + date: '2017-03-12T12:30:00.000Z' + sender: alice@example.com + recipient: bob@example.com + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /inbound/events/{uuid}: + get: + tags: + - Inbound Parsing + summary: Fetch all events history for one particular received email. + operationId: InboundParsing_getEmailEvents + description: >- + This endpoint will show the list of all events history for one + particular received email. + parameters: + - description: UUID to fetch events specific to recieved email + name: uuid + in: path + required: true + schema: + type: string + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEventsByUuid' + examples: + response: + value: + receivedAt: '2017-03-12T12:30:00.000Z' + deliveredAt: '2017-03-12T12:31:00.000Z' + sender: alice@example.com + recipient: bob@example.com + messageId:Please + confirm your email address by clicking on the link below
+ + htmlUrl: + description: > + **Mandatory if htmlContent and templateId are empty**. Url to the + message (HTML). For example: + + **https://html.domain.com** + type: string + format: url + example: https://html.domain.com + templateId: + description: > + **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. + type: integer + format: int64 + scheduledAt: + description: > + 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). For example: + + **2017-06-01T12:30:00+02:00** + type: string + example: '2017-06-01T10:30:00.000Z' + subject: + description: | + Subject of the campaign. **Mandatory if abTesting is false**. + Ignored if abTesting is true. + type: string + example: Discover the New Collection ! + previewText: + description: Preview text or preheader of the email campaign + type: string + example: Thanks for your order! + replyTo: + description: Email on which the campaign recipients will be able to reply to + type: string + format: email + example: support@myshop.com + toField: + description: > + To personalize the **To** Field. If you want to include the first + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact attributes must already exist in your Brevo account. If + input parameter **params** used please use **{{contact.FNAME}} + {{contact.LNAME}}** for personalization + type: string + example: '{FNAME} {LNAME}' + recipients: + description: Segment ids and List ids to include/exclude from campaign + type: object + properties: + exclusionListIds: + description: List ids to exclude from the campaign + type: array + items: + type: integer + format: int64 + example: 8 + listIds: + description: > + **Mandatory if scheduledAt is not empty**. List Ids to send the + campaign to + type: array + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **Mandatory if listIds are not used**. Segment ids to send the + campaign to. + type: array + items: + type: integer + format: int64 + example: 23 + attachmentUrl: + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps + type: string + format: url + example: https://attachment.domain.com + inlineImageActivation: + description: > + 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_ + type: boolean + example: true + default: false + mirrorActive: + description: Use true to enable the mirror link + type: boolean + example: true + footer: + description: Footer of the email campaign + type: string + example: '[DEFAULT_FOOTER]' + header: + description: Header of the email campaign + type: string + example: '[DEFAULT_HEADER]' + utmCampaign: + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + type: string + example: NL_05_2017 + params: + description: > + 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** + type: object + additionalProperties: {} + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + description: Set this to true if you want to send your campaign at best time. + type: boolean + example: true + default: false + abTesting: + description: > + 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 + type: boolean + example: true + default: false + subjectA: + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + type: string + example: Discover the New Collection! + subjectB: + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + type: string + example: Want to discover the New Collection? + splitRule: + description: > + 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 + maximum: 50 + minimum: 1 + type: integer + format: int64 + example: 50 + winnerCriteria: + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + type: string + example: open + enum: + - open + - click + winnerDelay: + description: > + 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 + maximum: 168 + minimum: 1 + type: integer + format: int64 + example: 50 + ipWarmupEnable: + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + type: boolean + example: true + default: false + initialQuota: + description: > + **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. + type: integer + format: int64 + example: 3000 + increaseRate: + description: > + **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%. + maximum: 100 + minimum: 0 + type: integer + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + updateEmailCampaign: + type: object + properties: + tag: + description: Tag of the campaign + type: string + example: Newsletter + sender: + description: > + Sender details including id or email and name (optional). Only one + of either Sender's email or Sender's ID shall be passed in one + request at a time. For example: + + **{"name":"xyz", "email":"example@abc.com"}** + + **{"name":"xyz", "id":123}** + type: object + properties: + name: + description: Sender Name from which the campaign emails are sent + type: string + example: Mary from MyShop + email: + description: Sender email from which the campaign emails are sent + type: string + format: email + example: newsletter@myshop.com + id: + description: > + 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)**. + type: integer + format: int64 + example: 3 + name: + description: Name of the campaign + type: string + example: Newsletter - May 2017 + htmlContent: + description: > + 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** + type: string + example: >- +Please + confirm your email address by clicking on the link below
+ + htmlUrl: + description: > + Url which contents the body of the email message. **REQUIRED if + htmlContent is empty** + type: string + format: url + example: https://html.domain.com + scheduledAt: + description: > + 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). + type: string + example: '2017-06-01T10:30:00.000Z' + subject: + description: Subject of the campaign + type: string + example: Discover the New Collection ! + previewText: + description: Preview text or preheader of the email campaign + type: string + example: Thanks for your order! + replyTo: + description: Email on which campaign recipients will be able to reply to + type: string + format: email + example: support@myshop.com + toField: + description: > + To personalize the **To** Field. If you want to include the first + + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact + + attributes must already exist in your Brevo account. If input + parameter + + **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** + for personalization + type: string + example: '{FNAME} {LNAME}' + recipients: + description: Segment ids and List ids to include/exclude from campaign + type: object + properties: + exclusionListIds: + description: List ids which have to be excluded from a campaign + type: array + items: + type: integer + format: int64 + example: 8 + listIds: + description: > + 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** + type: array + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **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. + type: array + items: + type: integer + format: int64 + example: 23 + attachmentUrl: + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps' + type: string + format: url + example: https://attachment.domain.com + inlineImageActivation: + description: > + 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_. + type: boolean + example: true + default: false + mirrorActive: + description: >- + Status of mirror links in campaign. mirrorActive = false means + mirror links are deactivated, & mirrorActive = true means mirror + links are activated, in the campaign + type: boolean + example: true + recurring: + description: > + **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 + type: boolean + example: false + default: false + footer: + description: Footer of the email campaign + type: string + example: '[DEFAULT_FOOTER]' + header: + description: Header of the email campaign + type: string + example: '[DEFAULT_HEADER]' + utmCampaign: + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + type: string + example: NL_05_2017 + params: + description: > + 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** + type: object + additionalProperties: {} + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + description: | + Set this to true if you want to send your campaign at best time. + Note:- **if true, warmup ip will be disabled.** + type: boolean + example: true + abTesting: + description: > + 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 + type: boolean + example: true + default: false + subjectA: + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + type: string + example: Discover the New Collection! + subjectB: + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + type: string + example: Want to discover the New Collection? + splitRule: + description: > + 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 + maximum: 50 + minimum: 1 + type: integer + format: int64 + example: 50 + winnerCriteria: + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + type: string + example: open + enum: + - open + - click + winnerDelay: + description: > + 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 + maximum: 168 + minimum: 1 + type: integer + format: int64 + example: 50 + ipWarmupEnable: + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + type: boolean + example: true + default: false + initialQuota: + description: > + Set an initial quota greater than 1 for warming up your ip. We + recommend you set a value of 3000. + type: integer + format: int64 + example: 3000 + increaseRate: + description: > + 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%. + maximum: 100 + minimum: 0 + type: integer + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + getSharedTemplateUrl: + required: + - sharedUrl + type: object + properties: + sharedUrl: + description: >- + A unique URL for the email campaign or transactional template. This + URL can be shared with other Brevo users. + type: string + format: url + example: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + abTestCampaignResult: + type: object + properties: + winningVersion: + description: >- + 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. + type: string + example: A + enum: + - notAvailable + - pending + - tie + - A + - B + winningCriteria: + description: Criteria choosen for winning version (Open/Click) + type: string + example: Open + enum: + - Open + - Click + winningSubjectLine: + description: Subject Line of current winning version + type: string + example: Subject Line A + openRate: + description: Open rate for current winning version + type: string + example: 70% + clickRate: + description: Click rate for current winning version + type: string + example: 70% + winningVersionRate: + description: Open/Click rate for the winner version + type: string + example: 70% + statistics: + required: + - clicks + - complaints + - hardBounces + - openers + - softBounces + - unsubscribed + type: object + properties: + openers: + $ref: '#/components/schemas/abTestVersionStats' + clicks: + $ref: '#/components/schemas/abTestVersionStats' + unsubscribed: + $ref: '#/components/schemas/abTestVersionStats' + hardBounces: + $ref: '#/components/schemas/abTestVersionStats' + softBounces: + $ref: '#/components/schemas/abTestVersionStats' + complaints: + $ref: '#/components/schemas/abTestVersionStats' + clickedLinks: + required: + - Version A + - Version B + type: object + properties: + Version A: + $ref: '#/components/schemas/abTestVersionClicks' + Version B: + $ref: '#/components/schemas/abTestVersionClicks' + emailExportRecipients: + required: + - recipientsType + type: object + properties: + notifyURL: + description: >- + Webhook called once the export process is finished. For reference, + https://help.brevo.com/hc/en-us/articles/360007666479 + type: string + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + description: Type of recipients to export for a campaign + type: string + example: openers + enum: + - all + - nonClickers + - nonOpeners + - clickers + - openers + - softBounces + - hardBounces + - unsubscribed + requestSmsRecipientExport: + required: + - recipientsType + type: object + properties: + notifyURL: + description: >- + URL that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + type: string + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + description: Filter the recipients based on how they interacted with the campaign + type: string + example: answered + enum: + - all + - delivered + - answered + - softBounces + - hardBounces + - unsubscribed + sendReport: + required: + - email + type: object + properties: + language: + description: Language of email content for campaign report sending. + type: string + example: en + default: fr + enum: + - fr + - es + - pt + - it + - de + - en + email: + description: Custom attributes for the report email. + required: + - body + - to + type: object + properties: + to: + description: Email addresses of the recipients + type: array + items: + description: Email address of the recipient + type: string + format: email + example: jim.suehan@example.com + body: + description: Custom text message to be presented in the report email. + type: string + example: Please find attached the report of our last email campaign. + uploadImageToGallery: + required: + - imageUrl + type: object + properties: + imageUrl: + description: > + 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. + type: string + example: https://somedomain.com/image1.jpg + name: + description: Name of the image. + type: string + example: nature.jpg + sendSmtpEmail: + type: object + properties: + tags: + description: Tag your emails to find them more easily + type: array + items: + type: string + example: tag1 + sender: + description: > + **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"}** + + **{"id":2}** + type: object + properties: + name: + description: > + description: Name of the sender from which the emails will be + sent. **Maximum allowed characters are 70**. Applicable only + when email is passed. + type: string + example: Mary from MyShop + email: + description: >- + Email of the sender from which the emails will be sent. + Mandatory if sender id is not passed. + type: string + format: email + example: no-reply@myshop.com + id: + description: >- + 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. + type: integer + format: int64 + example: 2 + to: + description: > + **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"}]** + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient + type: string + format: email + example: jimmy98@example.com + name: + description: | + Name of the recipient. **Maximum allowed characters are 70**. + type: string + example: Jimmy + bcc: + description: > + List of email addresses and names (_optional_) of the recipients in + bcc + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient in bcc + type: string + format: email + example: helen9766@example.com + name: + description: > + Name of the recipient in bcc. **Maximum allowed characters are + 70**. + type: string + example: Helen + cc: + description: > + List of email addresses and names (_optional_) of the recipients in + cc + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient in cc + type: string + format: email + example: ann6533@example.com + name: + description: > + Name of the recipient in cc. **Maximum allowed characters are + 70**. + type: string + example: Ann + htmlContent: + description: > + HTML body of the message. **Mandatory if 'templateId' is not passed, + ignored if 'templateId' is passed** + type: string + example: >- +Please + confirm your email address by clicking on the link below
+ + textContent: + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + type: string + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + subject: + description: | + Subject of the message. **Mandatory if 'templateId' is not passed** + type: string + example: Login Email confirmation + replyTo: + description: > + 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"}** + required: + - email + type: object + properties: + email: + description: Email address in reply to + type: string + format: email + example: ann6533@example.com + name: + description: | + Name in reply to. **Maximum allowed characters are 70**. + type: string + example: Ann + attachment: + description: > + 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 + type: array + items: + type: object + properties: + url: + description: | + Absolute url of the attachment (**no local file**). + type: string + format: url + example: https://attachment.domain.com/myAttachmentFromUrl.jpg + content: + description: >- + Base64 encoded chunk data of the attachment generated on the + fly + pattern: >- + ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + format: byte + example: b3JkZXIucGRm + name: + description: | + **Required if content is passed**. Name of the attachment + type: string + example: myAttachment.png + headers: + description: > + 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"}**. + type: object + additionalProperties: {} + example: + sender.ip: 1.2.3.4 + X-Mailin-custom: some_custom_header + idempotencyKey: abc-123 + templateId: + description: Id of the template. + type: integer + format: int64 + example: 2 + params: + description: > + 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**. + type: object + additionalProperties: {} + example: + FNAME: Joe + LNAME: Doe + messageVersions: + description: > + 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** + type: array + items: + type: object + required: + - to + properties: + to: + description: > + List of email addresses and names (_optional_) of the + recipients. For example, + + **[{"name":"Jimmy", "email":"jimmy98@example.com"}, + {"name":"Joe", "email":"joe@example.com"}]** + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient + type: string + format: email + example: jimmy98@example.com + name: + description: > + Name of the recipient. **Maximum allowed characters are + 70**. + type: string + example: Jimmy + params: + description: > + 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**. + type: object + additionalProperties: {} + example: + FNAME: Joe + LNAME: Doe + bcc: + description: > + List of email addresses and names (_optional_) of the + recipients in bcc + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient in bcc + type: string + format: email + example: helen9766@example.com + name: + description: > + Name of the recipient in bcc. **Maximum allowed + characters are 70**. + type: string + example: Helen + cc: + description: > + List of email addresses and names (_optional_) of the + recipients in cc + type: array + items: + required: + - email + type: object + properties: + email: + description: Email address of the recipient in cc + type: string + format: email + example: ann6533@example.com + name: + description: > + Name of the recipient in cc. **Maximum allowed + characters are 70**. + type: string + example: Ann + replyTo: + description: > + 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"}** + required: + - email + type: object + properties: + email: + description: Email address in reply to + type: string + format: email + example: ann6533@example.com + name: + description: | + Name in reply to. **Maximum allowed characters are 70**. + type: string + example: Ann + subject: + description: | + Custom subject specific to message version + type: string + example: Login Email confirmation + htmlContent: + description: > + HTML body of the message. **Mandatory if 'templateId' is not + passed, ignored if 'templateId' is passed** + type: string + example: >- +Please confirm your email address by clicking on the link + below
+ textContent: + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + type: string + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + scheduledAt: + description: >- + 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**. + type: string + format: date-time + example: '2022-04-05T12:30:00+02:00' + batchId: + description: >- + 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. + type: string + example: 5c6cfa04-eed9-42c2-8b5c-6d470d978e9d + deleteHardbounces: + type: object + properties: + startDate: + description: >- + Starting date (YYYY-MM-DD) of the time period for deletion. The + hardbounces occurred after this date will be deleted. Must be less + than or equal to the endDate + type: string + example: '2016-12-31T00:00:00.000Z' + endDate: + description: >- + Ending date (YYYY-MM-DD) of the time period for deletion. The + hardbounces until this date will be deleted. Must be greater than or + equal to the startDate + type: string + example: '2017-01-31T00:00:00.000Z' + contactEmail: + description: Target a specific email address + type: string + format: email + example: alex76@example.com + blockDomain: + type: object + required: + - domain + properties: + domain: + description: name of the domain to be blocked + type: string + example: example.com + createWebhook: + required: + - events + - url + type: object + properties: + description: + description: Description of the webhook + type: string + example: Webhook triggered on unsubscription + url: + description: URL of the webhook + type: string + format: url + example: http://requestb.in/173lyyx1 + events: + description: > + - 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` + type: array + items: + type: string + example: unsubscribed + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + type: + description: Type of the webhook + type: string + example: marketing + default: transactional + enum: + - transactional + - marketing + - inbound + domain: + description: Inbound domain of webhook, required in case of event type `inbound` + type: string + example: example.com + batched: + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + type: boolean + example: true + auth: + description: Authentication header to be send with the webhook requests + type: object + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + description: Headers send with the requests to the webhook + type: object + example: + key: cf-secret + value: test-header-value + updateWebhook: + type: object + properties: + description: + description: Description of the webhook + type: string + example: Webhook triggered on contact hardbounce + url: + description: URL of the webhook + type: string + format: url + example: http://requestb.in/173lyyx1 + events: + description: > + - 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` + type: array + items: + type: string + example: hardBounce + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + domain: + description: Inbound domain of webhook, used in case of event type `inbound` + type: string + example: example.com + batched: + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + type: boolean + example: true + auth: + description: Authentication header to be send with the webhook requests + type: object + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + description: Headers send with the requests to the webhook + type: object + example: + key: cf-secret + value: test-header-value + createDoiContact: + required: + - email + - includeListIds + - redirectionUrl + - templateId + type: object + properties: + email: + description: >- + Email address where the confirmation email will be sent. This email + address will be the identifier for all other contact attributes. + type: string + format: email + example: elly@example.com + attributes: + description: > + Pass the set of attributes and their values. **These attributes must + be present in your Brevo account**. For eg. **{'FNAME':'Elly', + 'LNAME':'Roger'}** + type: object + additionalProperties: {} + example: + FNAME: Elly + LNAME: Roger + includeListIds: + description: Lists under user account where contact should be added + type: array + items: + description: Id of the list + type: integer + format: int64 + example: 36 + excludeListIds: + description: Lists under user account where contact should not be added + type: array + items: + description: Id of the list + type: integer + format: int64 + example: 36 + templateId: + description: Id of the Double opt-in (DOI) template + type: integer + format: int64 + example: 2 + redirectionUrl: + description: > + 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 }}**. + type: string + format: url + example: http://requestb.in/173lyyx1 + createContact: + type: object + properties: + email: + description: > + 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"}** + type: string + format: email + example: elly@example.com + ext_id: + description: Pass your own Id to create a contact. + type: string + example: externalId + attributes: + description: > + Pass the set of attributes and their values. The attribute's + parameter should be passed in capital letter while creating a + contact. Values that don't match the attribute type (e.g. text or + string in a date attribute) will be ignored. **These attributes must + be present in your Brevo account.**. For eg: + + **{"FNAME":"Elly", "LNAME":"Roger"}** + type: object + additionalProperties: {} + example: + FNAME: Elly + LNAME: Roger + emailBlacklisted: + description: >- + Set this field to blacklist the contact for emails (emailBlacklisted + = true) + type: boolean + example: false + smsBlacklisted: + description: >- + Set this field to blacklist the contact for SMS (smsBlacklisted = + true) + type: boolean + example: false + listIds: + description: Ids of the lists to add the contact to + type: array + items: + description: Id of the list to add the contact to + type: integer + format: int64 + example: 36 + updateEnabled: + description: >- + Facilitate to update the existing contact in the same request + (updateEnabled = true) + type: boolean + example: false + default: false + smtpBlacklistSender: + description: >- + transactional email forbidden sender for contact. Use only for email + Contact ( only available if updateEnabled = true ) + type: array + items: + type: string + format: email + updateContact: + type: object + properties: + attributes: + description: > + 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. Values that don't match the attribute type (e.g. + text or string in a date attribute) will be ignored. 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"}** + type: object + additionalProperties: {} + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: updateExternalId + emailBlacklisted: + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + type: boolean + example: false + smsBlacklisted: + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + type: boolean + example: true + listIds: + description: Ids of the lists to add the contact to + type: array + items: + description: Id of the list to add the contact to + type: integer + format: int64 + example: 65 + unlinkListIds: + description: Ids of the lists to remove the contact from + type: array + items: + description: Id of the list to remove the contact from + type: integer + format: int64 + example: 36 + smtpBlacklistSender: + description: >- + transactional email forbidden sender for contact. Use only for email + Contact + type: array + items: + type: string + format: email + updateBatchContacts: + type: object + properties: + contacts: + description: List of contacts to be updated + type: array + items: + type: object + properties: + email: + description: >- + Email address of the user to be updated (For each operation + only pass one of the supported contact identifiers. Email, id + or sms) + type: string + format: email + example: elly@example.com + id: + description: >- + id of the user to be updated (For each operation only pass one + of the supported contact identifiers. Email, id or sms) + type: integer + format: int64 + example: 31 + sms: + description: >- + SMS of the user to be updated (For each operation only pass + one of the supported contact identifiers. Email, id or sms) + type: string + example: +91xxxxxxxxxx + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: UpdateExternalId + attributes: + description: > + 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"}** + type: object + additionalProperties: {} + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + emailBlacklisted: + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + type: boolean + example: false + smsBlacklisted: + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + type: boolean + example: true + listIds: + description: Ids of the lists to add the contact to + type: array + items: + description: Id of the list to add the contact to + type: integer + format: int64 + example: 65 + unlinkListIds: + description: Ids of the lists to remove the contact from + type: array + items: + description: Id of the list to remove the contact from + type: integer + format: int64 + example: 36 + smtpBlacklistSender: + description: >- + transactional email forbidden sender for contact. Use only for + email Contact + type: array + items: + type: string + format: email + createAttribute: + type: object + properties: + value: + description: > + Value of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + type: string + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + isRecurring: + description: > + Type of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + type: boolean + example: true + enumeration: + description: > + 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"}]** + type: array + items: + required: + - label + - value + type: object + properties: + value: + description: Id of the value + type: integer + example: 1 + label: + description: Label of the value + type: string + example: Women + type: + description: > + 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 + example: text + enum: + - text + - date + - float + - boolean + - id + - category + updateAttribute: + type: object + properties: + value: + description: > + Value of the attribute to update. **Use only if the attribute's + category is 'calculated' or 'global'** + type: string + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + enumeration: + description: > + 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"}]** + type: array + items: + required: + - label + - value + type: object + properties: + value: + description: Id of the value + type: integer + example: 1 + label: + description: Label of the value + type: string + example: Men + createList: + required: + - folderId + - name + type: object + properties: + name: + description: Name of the list + type: string + example: Magento Customer - ES + folderId: + description: Id of the parent folder in which this list is to be created + type: integer + format: int64 + example: 2 + updateList: + type: object + properties: + name: + description: >- + Name of the list. Either of the two parameters (name, folderId) can + be updated at a time. + type: string + example: Magento Customer - ES + folderId: + description: >- + 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. + type: integer + format: int64 + example: 2 + requestContactExport: + type: object + required: + - customContactFilter + properties: + exportAttributes: + description: > + List of all the attributes that you want to export. **These + attributes must be present in your contact database.** For example: + + **['fname', 'lname', 'email']** + type: array + items: + type: string + example: NAME + customContactFilter: + description: | + Set the filter for the contacts to be exported. + type: object + properties: + actionForContacts: + description: > + **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. + type: string + enum: + - allContacts + - subscribed + - unsubscribed + - unsubscribedPerList + actionForEmailCampaigns: + description: > + **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). + type: string + enum: + - openers + - nonOpeners + - clickers + - nonClickers + - unsubscribed + - hardBounces + - softBounces + actionForSmsCampaigns: + description: > + **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. + type: string + enum: + - hardBounces + - softBounces + - unsubscribed + listId: + description: > + **Mandatory if actionForContacts is passed, ignored otherwise.** + Id of the list for which the corresponding action shall be + applied in the filter. + type: integer + format: int64 + example: 2 + emailCampaignId: + description: > + 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. + type: integer + format: int64 + example: 12 + smsCampaignId: + description: > + Considered only if **actionForSmsCampaigns** is passed, ignored + otherwise. The id of sms campaign for which the corresponding + action shall be applied in the filter. + type: integer + format: int64 + example: 12 + notifyUrl: + description: >- + Webhook that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + type: string + format: url + example: http://requestb.in/173lyyx1 + requestContactImport: + type: object + properties: + fileUrl: + description: > + **Mandatory if fileBody and jsonBody is not defined.** URL of the + file to be imported (**no local file**). Possible file formats: + + #### .txt, .csv, .json + type: string + format: url + example: https://importfile.domain.com + fileBody: + description: > + **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. + type: string + example: |- + NAME;SURNAME;EMAIL + Smith;John;john.smith@example.com + Roger;Ellie;ellie36@example.com + jsonBody: + description: > + **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. + type: array + items: + type: object + properties: + email: + type: string + attributes: + description: List of attributes to be imported + type: object + additionalProperties: true + example: + email: ndicky0@ocn.ne.jp + attributes: + LNAME: Noemi + FNAME: Dicky + COUNTRY: DE + BIRTHDAY: 11/02/1989 + PREFERED_COLOR: BLACK + WHATSAPP: '33689965433' + LANDLINE_NUMBER: '33689965433' + SMS: '33689965433' + listIds: + description: > + **Mandatory if newList is not defined.** Ids of the lists in which + the contacts shall be imported. For example, **[2, 4, 7]**. + type: array + items: + description: List Id in which the contacts shall be imported + type: integer + format: int64 + example: 76 + notifyUrl: + description: >- + URL that will be called once the import process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + type: string + format: url + example: http://requestb.in/173lyyx1 + newList: + description: >- + To create a new list and import the contacts into it, pass the + listName and an optional folderId. + type: object + properties: + listName: + description: > + List with listName will be created first and users will be + imported in it. **Mandatory if listIds is empty**. + type: string + example: ContactImport - 2017-05 + folderId: + description: > + Id of the folder where this new list shall be created. + **Mandatory if listName is not empty** + type: integer + format: int64 + example: 2 + emailBlacklist: + description: To blacklist all the contacts for email + type: boolean + example: false + default: false + disableNotification: + description: To disable email notification + type: boolean + example: false + default: false + smsBlacklist: + description: To blacklist all the contacts for sms + type: boolean + example: false + default: false + updateExistingContacts: + description: To facilitate the choice to update the existing contacts + type: boolean + example: true + default: true + emptyContactsAttributes: + description: > + 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 **) + type: boolean + example: true + default: false + createSmsCampaign: + required: + - content + - name + - sender + type: object + properties: + name: + description: Name of the campaign + type: string + example: Spring Promo Code + sender: + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + maxLength: 15 + type: string + example: MyShop + content: + description: > + 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 + type: string + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + type: array + items: + description: List Id to send the campaign to + type: integer + format: int64 + example: 54 + exclusionListIds: + description: List ids which have to be excluded from a campaign + type: array + items: + description: List Id to exclude from the campaign + type: integer + format: int64 + example: 15 + scheduledAt: + description: > + 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.** + type: string + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + type: boolean + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + updateSmsCampaign: + type: object + properties: + name: + description: Name of the campaign + type: string + example: Spring Promo Code + sender: + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + maxLength: 15 + type: string + example: MyShop + content: + description: > + 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 + type: string + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + type: array + items: + description: List Id to send the campaign to + type: integer + format: int64 + example: 54 + exclusionListIds: + description: List ids which have to be excluded from a campaign + type: array + items: + description: List Id to exclude from the campaign + type: integer + format: int64 + example: 15 + scheduledAt: + description: > + 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.** + type: string + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + type: boolean + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + sendTransacSms: + required: + - content + - recipient + - sender + type: object + properties: + sender: + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + maxLength: 15 + type: string + example: MyShop + recipient: + description: Mobile number to send SMS with the country code + type: string + example: '33689965433' + content: + description: > + Content of the message. If more than **160 characters** long, will + be sent as multiple text messages + type: string + example: Enter this code:CCJJG8 to validate your account + type: + description: >- + 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 + example: marketing + default: transactional + enum: + - transactional + - marketing + tag: + description: Tag of the message + type: string + example: accountValidation + webUrl: + description: >- + Webhook to call for each event triggered by the message (delivered + etc.) + type: string + format: url + example: http://requestb.in/173lyyx1 + unicodeEnabled: + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + type: boolean + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + sendTestEmail: + type: object + properties: + emailTo: + description: > + List of the email addresses of the recipients whom you wish to send + the test mail. + + _If left empty, the test mail will be sent to your entire test list. + You can not send more than 50 test emails per day_. + type: array + items: + description: Email addres of the recipient + type: string + format: email + example: helen.jurger@example.com + sendTestSms: + type: object + properties: + phoneNumber: + description: > + 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** + type: string + example: '33689965433' + getTransacAggregatedSmsReport: + type: object + properties: + range: + description: Time frame of the report + type: string + example: 2016-09-08|2017-04-06 + requests: + description: Number of requests for the timeframe + type: integer + format: int64 + example: 263 + delivered: + description: Number of delivered SMS for the timeframe + type: integer + format: int64 + example: 249 + hardBounces: + description: Number of hardbounces for the timeframe + type: integer + format: int64 + example: 1 + softBounces: + description: Number of softbounces for the timeframe + type: integer + format: int64 + example: 4 + blocked: + description: Number of blocked contact for the timeframe + type: integer + format: int64 + example: 2 + unsubscribed: + description: Number of unsubscription for the timeframe + type: integer + format: int64 + example: 6 + replied: + description: Number of answered SMS for the timeframe + type: integer + format: int64 + example: 12 + accepted: + description: Number of accepted for the timeframe + type: integer + format: int64 + example: 252 + rejected: + description: Number of rejected for the timeframe + type: integer + format: int64 + example: 8 + getTransacSmsReport: + type: object + properties: + reports: + type: array + items: + type: object + properties: + date: + description: Date for which statistics are retrieved + type: string + format: date + example: '2017-03-17T00:00:00.000Z' + requests: + description: Number of requests for the date + type: integer + format: int64 + example: 87 + delivered: + description: Number of delivered SMS for the date + type: integer + format: int64 + example: 85 + hardBounces: + description: Number of hardbounces for the date + type: integer + format: int64 + example: 1 + softBounces: + description: Number of softbounces for the date + type: integer + format: int64 + example: 1 + blocked: + description: Number of blocked contact for the date + type: integer + format: int64 + example: 0 + unsubscribed: + description: Number of unsubscription for the date + type: integer + format: int64 + example: 1 + replied: + description: Number of answered SMS for the date + type: integer + format: int64 + example: 2 + accepted: + description: Number of accepted for the date + type: integer + format: int64 + example: 85 + rejected: + description: Number of rejected for the date + type: integer + format: int64 + example: 1 + getIp: + required: + - active + - domain + - id + - ip + type: object + properties: + id: + description: ID of the dedicated IP + type: integer + format: int64 + example: 3 + ip: + description: Dedicated IP + type: string + example: 123.65.8.22 + active: + description: Status of the IP (true=active, false=inactive) + type: boolean + example: true + domain: + description: Domain associated to the IP + type: string + example: mailing.myshop.com + getIpsFromSender: + required: + - ips + type: object + properties: + ips: + description: Dedicated IP(s) linked to a sender + type: array + items: + $ref: '#/components/schemas/getIpFromSender' + getIps: + required: + - ips + type: object + properties: + ips: + description: Dedicated IP(s) available on your account + type: array + items: + $ref: '#/components/schemas/getIp' + getIpFromSender: + required: + - domain + - id + - ip + - weight + type: object + properties: + id: + description: ID of the dedicated IP + type: integer + format: int64 + example: 3 + ip: + description: Dedicated IP + type: string + example: 123.65.8.22 + domain: + description: Domain associated to the IP + type: string + example: mailing.myshop.dom + weight: + description: Weight of the IP + type: integer + format: int64 + example: 75 + manageIp: + type: object + properties: + ip: + description: Dedicated ID + type: string + example: 123.65.8.22 + getTransacEmailContent: + required: + - attachmentCount + - body + - date + - email + - events + - subject + type: object + properties: + email: + description: Email address to which transactional email has been sent + type: string + format: email + example: abc@example.com + subject: + description: Subject of the sent email + type: string + example: Summer Camp + templateId: + description: Id of the template + type: integer + format: int64 + example: 2 + date: + description: Date on which transactional email was sent + type: string + example: '2017-03-12T12:30:00.000Z' + events: + description: Series of events which occurred on the transactional email + type: array + items: + required: + - name + - time + type: object + properties: + name: + description: Name of the event that occurred on the sent email + type: string + example: delivered + time: + description: Time at which the event occurred + type: string + example: '2017-03-12T12:30:00.000Z' + body: + description: Actual content of the transactional email that has been sent + type: string + example: >- +This is the actual html content sent
+ attachmentCount: + description: Count of the attachments that were sent in the email + type: integer + format: int64 + example: 2 + getTransacEmailsList: + type: object + properties: + count: + description: >- + Total number of transactional emails available on your account + according to the passed filter + type: integer + format: int64 + example: 5 + transactionalEmails: + type: array + items: + required: + - date + - email + - messageId + - subject + - uuid + type: object + properties: + tags: + description: Tags used for your email + type: array + items: + type: string + example: tag1 + email: + description: Email address to which transactional email has been sent + type: string + format: email + example: john.smith@example.com + subject: + description: Subject of the sent email + type: string + example: Summer Camp + templateId: + description: Id of the template + type: integer + format: int64 + example: 2 + messageId: + description: Message Id of the sent email + type: string + example: <201798300811.5700093@relay.domain.com> + uuid: + description: Unique id of the email sent to a particular contact + type: string + example: 5a78c-209ok98262910-s99a341 + date: + description: Date on which transactional email was sent + type: string + example: '2017-03-12T12:30:00.000Z' + from: + description: Email address of the sender from which the email was sent + type: string + format: email + example: diana.doe@example.com + getBlockedDomains: + type: object + required: + - domains + properties: + domains: + description: List of all blocked domains + type: array + items: + description: name of blocked domain + type: string + example: contact.com + abTestVersionStats: + description: Percentage of a particular event for both versions + required: + - Version A + - Version B + type: object + properties: + Version A: + description: percentage of an event for version A + type: string + example: 50% + Version B: + description: percentage of an event for version B + type: string + example: 50% + abTestVersionClicks: + description: Information on clicked links for a particular version + type: array + items: + required: + - clickRate + - clicksCount + - link + type: object + properties: + link: + description: URL of the link + type: string + example: https://facbook.com/versionA + clicksCount: + description: Number of times a link is clicked + type: integer + format: int64 + example: 3 + clickRate: + description: Percentage of clicks of link with respect to total clicks + type: string + example: 40% + getInboundEmailEvents: + type: object + properties: + events: + type: array + items: + type: object + required: + - uuid + - sender + - date + - recipient + properties: + uuid: + description: UUID that can be used to fetch additional data + type: string + format: uuid + date: + description: Date when email was received on SMTP relay + type: string + format: date-time + sender: + description: Sender’s email address + type: string + format: email + recipient: + description: Recipient’s email address + type: string + format: email + getInboundEmailEventsByUuid: + type: object + properties: + receivedAt: + description: Date when email was received on SMTP relay + type: string + format: date-time + example: '2019-05-25T11:53:26Z' + deliveredAt: + description: Date when email was delivered successfully to client’s webhook + type: string + nullable: true + format: date-time + recipient: + description: Recipient’s email address + type: string + format: email + sender: + description: Sender’s email address + type: string + format: email + messageId: + description: >- + Value of the Message-ID header. This will be present only after the + processing is done. + type: string + subject: + description: >- + Value of the Subject header. This will be present only after the + processing is done. + type: string + attachments: + description: >- + List of attachments of the email. This will be present only after + the processing is done. + type: array + items: + type: object + properties: + name: + description: >- + filename specified in the Content-Disposition header of the + attachment + type: string + contentType: + description: value of the Content-Type header of the attachment + type: string + contentId: + description: value of the Content-ID header of the attachment. + type: string + contentLength: + description: size of the attachment in bytes + type: integer + logs: + description: >- + List of events/logs that describe the lifecycle of the email on SIB + platform + type: array + items: + type: object + properties: + date: + description: Date of the event + type: string + format: date-time + type: + description: Type of the event + type: string + enum: + - received + - processed + - webhookFailed + - webhookDelivered + getScheduledEmailByBatchId: + type: object + properties: + count: + description: Total number of batches + type: integer + batches: + type: array + items: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the batch was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the batch was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled batch + type: string + enum: + - inProgress + - queued + - processed + - error + getScheduledEmailByMessageId: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the email was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the email was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled email + type: string + enum: + - inProgress + - queued + - processed + - error + subAccountsResponse: + type: object + properties: + count: + description: Total number of subaccounts + type: integer + subAccounts: + type: array + items: + type: object + required: + - id + - companyName + - active + - createdAt + properties: + id: + description: id of the sub-account + type: integer + format: int64 + companyName: + description: Name of the sub-account company + type: string + active: + description: Whether the sub-account is active or not + type: boolean + createdAt: + description: Timestamp when the sub-account was created + type: integer + format: int64 + createSubAccount: + type: object + required: + - companyName + - email + properties: + companyName: + description: Set the name of the sub-account company + type: string + email: + description: Email address for the organization + type: string + language: + description: Set the language of the sub-account + type: string + enum: + - en + - fr + - it + - es + - pt + - de + timezone: + description: Set the timezone of the sub-account + type: string + example: + companyName: Test Sub-account + email: test-sub@example.com + timezone: Europe/Paris + language: en + createSubAccountResponse: + required: + - id + type: object + properties: + id: + description: ID of the sub-account created + type: integer + format: int64 + example: 5 + corporateGroupDetailsResponse: + type: object + properties: + group: + type: object + properties: + id: + description: Group id + type: string + groupName: + description: Name of the group + type: string + createdAt: + description: Group creation date + type: string + sub-accounts: + type: array + items: + type: object + properties: + id: + description: Id of the sub-account organzation + type: integer + format: int64 + companyName: + description: Name of the sub-account organzation + type: string + createdAt: + description: Creation date of the sub-account organzation + type: string + users: + type: array + items: + type: object + properties: + email: + description: Email address of the user + type: string + lastName: + description: Last name of the user + type: string + firstName: + description: First name of the user + type: string + masterDetailsResponse: + type: object + properties: + email: + description: Email id of master account + type: string + companyName: + description: Company name of master account organization + type: string + id: + description: Unique identifier of the master account organization + type: integer + format: int64 + currencyCode: + description: Currency code of the master account organization + type: string + timezone: + description: Timezone of the master account organization + type: string + billingInfo: + description: Billing details of the master account organization + type: object + properties: + email: + description: Billing email id of master account + type: string + companyName: + description: Company name of master account + type: string + name: + description: Billing name of master account holder + type: object + properties: + givenName: + description: First name for billing + type: string + familyName: + description: Last name for billing + type: string + address: + description: Billing address of master account + type: object + properties: + streetAddress: + description: Street address + type: string + locality: + description: Locality + type: string + postalCode: + description: Postal code + type: string + stateCode: + description: State code + type: string + countryCode: + description: Country code + type: string + planInfo: + description: Plan details + type: object + properties: + currencyCode: + description: Plan currency + type: string + nextBillingAt: + description: Timestamp of next billing date + type: integer + format: int64 + price: + description: Plan amount + type: number + planPeriod: + description: Plan period type + type: string + enum: + - month + - year + subAccounts: + description: Number of sub-accounts + type: integer + features: + description: List of provided features in the plan + type: array + items: + type: object + properties: + name: + description: Name of the feature + type: string + unitValue: + description: Unit value of the feature + type: string + quantity: + description: Quantity provided in the plan + type: integer + format: int64 + quantityWithOverages: + description: >- + Quantity with overages provided in the plan (only + applicable on ENTv2) + type: integer + format: int64 + used: + description: Quantity consumed by master + type: integer + format: int64 + usedOverages: + description: >- + Quantity consumed by sub-organizations over the admin plan + limit (only applicable on ENTv2) + type: integer + format: int64 + remaining: + description: Quantity remaining in the plan + type: integer + format: int64 + subAccountDetailsResponse: + type: object + properties: + name: + description: Name of the sub-account user + type: string + email: + description: Email id of the sub-account organization + type: string + companyName: + description: Sub-account company name + type: string + planInfo: + description: Sub-account plan details + type: object + properties: + credits: + description: Credits quota and remaining credits on the sub-account + type: object + properties: + sms: + description: SMS credits remaining on the sub-account + type: integer + format: int64 + emails: + description: Email credits remaining on the sub-account + type: object + properties: + quantity: + description: Quantity of email messaging limits provided + type: integer + format: int64 + remaining: + description: Available email messaging limits for use + type: integer + format: int64 + features: + description: Features available on the sub-account + type: object + properties: + inbox: + description: Inbox details / Not available on ENTv2 + type: object + properties: + quantity: + description: Quantity of inbox provided + type: integer + format: int64 + remaining: + description: Available inboxes for use + type: integer + format: int64 + landingPage: + description: Landing page details / Not available on ENTv2 + type: object + properties: + quantity: + description: Quantity of landing pages provided + type: integer + format: int64 + remaining: + description: Available landing pages for use + type: integer + format: int64 + users: + description: Multi-account details + type: object + properties: + quantity: + description: Quantity of multi-account's provided + type: integer + format: int64 + remaining: + description: Available multi-accounts for use + type: integer + format: int64 + planType: + description: type of the plan + type: string + subAccountUpdatePlanRequest: + description: Details of the plan to be changed + type: object + properties: + credits: + description: Credit details to update + type: object + properties: + email: + description: Number of email credits + type: integer + format: int64 + features: + description: Features details to update + type: object + properties: + users: + description: Number of multi-users + type: integer + format: int64 + landingPage: + description: Number of landing pages / Not required on ENTv2 + type: integer + format: int64 + inbox: + description: Number of inboxes / Not required on ENTv2 + type: integer + format: int64 + example: + credits: + email: 5000 + features: + users: 15 + landingPage: 20 + inbox: 10 + subAccountAppsToggleRequest: + description: List of enable/disable applications on the sub-account + type: object + properties: + inbox: + description: >- + Set this field to enable or disable Inbox on the sub-account / Not + applicable on ENTv2 + type: boolean + whatsapp: + description: >- + Set this field to enable or disable Whatsapp campaigns on the + sub-account + type: boolean + automation: + description: Set this field to enable or disable Automation on the sub-account + type: boolean + email-campaigns: + description: >- + Set this field to enable or disable Email Campaigns on the + sub-account + type: boolean + sms-campaigns: + description: Set this field to enable or disable SMS Marketing on the sub-account + type: boolean + landing-pages: + description: Set this field to enable or disable Landing pages on the sub-account + type: boolean + transactional-emails: + description: >- + Set this field to enable or disable Transactional Email on the + sub-account + type: boolean + transactional-sms: + description: >- + Set this field to enable or disable Transactional SMS on the + sub-account + type: boolean + facebook-ads: + description: Set this field to enable or disable Facebook ads on the sub-account + type: boolean + web-push: + description: Set this field to enable or disable Web Push on the sub-account + type: boolean + meetings: + description: Set this field to enable or disable Meetings on the sub-account + type: boolean + conversations: + description: Set this field to enable or disable Conversations on the sub-account + type: boolean + crm: + description: Set this field to enable or disable Sales CRM on the sub-account + type: boolean + example: + landing-pages: true + sms-campaigns: false + whatsapp: true + meetings: true + web-push: false + TaskTypes: + description: Task types details + type: object + properties: + title: + description: Title of task type + type: string + example: Email + id: + description: Id of task type + type: string + example: 61a88a2eb7a574180261234 + Task: + description: Task Details + required: + - taskTypeId + - name + - date + type: object + properties: + id: + description: Unique task id + type: string + example: 61a5cd07ca1347c82306ad06 + taskTypeId: + description: Id for type of task e.g Call / Email / Meeting etc. + type: string + example: 61a5cd07ca1347c82306ad09 + name: + description: Name of task + type: string + example: 'Task: Connect with client' + contactsIds: + description: Contact ids for contacts linked to this task + items: + type: integer + type: array + example: + - 1 + - 2 + - 3 + dealsIds: + description: Deal ids for deals a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + description: Companies ids for companies a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + TaskReminder: + description: Task reminder date/time for a task + required: + - value + - unit + - types + type: object + properties: + value: + description: Value of time unit before reminder is to be sent + type: integer + example: 10 + unit: + description: Unit of time before reminder is to be sent + type: string + enum: + - minutes + - hours + - weeks + - days + types: + description: Type of task reminder e.g email, push + items: + type: string + enum: + - email + - push + type: array + example: + - email + FileList: + description: List of files + type: array + items: + $ref: '#/components/schemas/FileData' + FileDownloadableLink: + description: Downloadable file link + type: object + properties: + fileUrl: + description: A unique link to download the requested file. + type: string + example: https://storage.googleapis.com/brevo-app-crm.......-sample.pdf + FileData: + description: File data that is uploaded + type: object + properties: + name: + description: Name of uploaded file + type: string + example: example.png + authorId: + description: Account id of user which created the file + type: string + example: 61a5ce58y5d4795761045991 + contactId: + description: Contact id of contact on which file is uploaded + type: integer + format: int64 + example: 1 + dealId: + description: Deal id linked to a file + type: string + example: 61a5ce58c5d4795761045991 + companyId: + description: Company id linked to a file + type: string + example: 61a5ce58c5d4795761045991 + size: + description: Size of file in bytes + type: integer + format: int64 + example: 10 + createdAt: + description: File created date/time + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + NoteData: + description: Note data to be saved + required: + - text + type: object + properties: + text: + description: Text content of a note + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + contactIds: + description: Contact Ids linked to a note + items: + type: integer + type: array + example: + - 247 + - 1 + - 2 + dealIds: + description: Deal Ids linked to a note + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + companyIds: + description: Company Ids linked to a note + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + Note: + description: Note Details + required: + - text + type: object + properties: + id: + description: Unique note Id + type: string + example: 61a5cd07ca1347c82306ad09 + text: + description: Text content of a note + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + contactIds: + description: Contact ids linked to a note + items: + type: integer + type: array + example: + - 247 + - 1 + - 2 + dealIds: + description: Deal ids linked to a note + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + authorId: + description: Account details of user which created the note + type: object + example: + id: 61a5ce58y5d4795761045991 + email: johndoe@example.com + locale: en_GB + timezone: Asia/Kolkata + name: + fullName: John Doe + createdAt: + description: Note created date/time + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + updatedAt: + description: Note updated date/time + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + NoteId: + description: Updated Note ID + type: object + properties: + id: + description: Unique note Id + type: string + example: 61a5cd07ca1347c82306ad09 + NoteList: + description: List of notes + type: array + items: + $ref: '#/components/schemas/Note' + TaskList: + description: List of tasks + type: object + properties: + items: + description: List of tasks + type: array + items: + $ref: '#/components/schemas/Task' + Pipelines: + description: List of pipeline + type: array + items: + $ref: '#/components/schemas/Pipeline' + PipelineStage: + description: List of stages + type: object + properties: + id: + description: Stage id + type: string + example: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + name: + description: Stage name + type: string + example: New + Pipeline: + description: List of stages + type: object + properties: + pipeline_name: + description: Pipeline name + type: string + example: Sales Pipeline + pipeline: + description: Pipeline id + type: string + example: 5ea675e3da0dd085acaea610 + stages: + description: List of stages + type: array + items: + $ref: '#/components/schemas/PipelineStage' + DealAttributes: + description: List of deal attributes + type: array + items: + description: List of attributes + type: object + properties: + internalName: + type: string + example: deal_name + label: + type: string + example: Deal Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + DealsList: + description: List of Deals + type: object + properties: + items: + description: List of deals + type: array + items: + $ref: '#/components/schemas/Deal' + Deal: + description: Deal Details + type: object + properties: + id: + description: Unique deal id + type: string + example: 629475917295261d9b1f4403 + attributes: + description: Deal attributes with values + type: object + example: + deal_name: testname + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + pipeline: 6093d296ad1e9c5cf2140a58 + deal_stage: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + stage_updated_at: '2022-05-30T07:42:05.671Z' + created_at: '2022-05-30T07:42:05.671Z' + number_of_contacts: 1 + last_updated_date: '2022-06-06T08:38:36.761Z' + last_activity_date: '2022-06-06T08:38:36.000Z' + next_activity_date: null + number_of_activities: 0 + linkedContactsIds: + description: Contact ids for contacts linked to this deal + items: + type: integer + type: array + example: + - 1 + - 2 + - 3 + linkedCompaniesIds: + description: Companies ids for companies linked to this deal + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompaniesList: + description: List of companies + type: object + properties: + items: + description: List of compaies + type: array + items: + $ref: '#/components/schemas/Company' + Company: + description: Company Details + type: object + properties: + id: + description: Unique comoany id + type: string + example: 629475917295261d9b1f4403 + attributes: + description: Company attributes with values + type: object + example: + created_at: '2022-01-13T19:04:24.376+05:30' + domain: xyz + last_updated_at: '2022-04-01T18:47:48.283+05:30' + name: text + number_of_contacts: 0 + owner: 62260474111b1101704a9d85 + owner_assign_date: '2022-04-01T18:21:13.379+05:30' + phone_number: 8171844192 + revenue: 10 + linkedContactsIds: + description: Contact ids for contacts linked to this company + items: + type: integer + type: array + format: in64 + example: + - 1 + - 2 + - 3 + linkedDealsIds: + description: Deals ids for companies linked to this company + items: + type: string + type: array + format: objectID + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompanyAttributes: + description: List of company attributes + type: array + items: + description: List of attributes + type: object + properties: + internalName: + type: string + example: name + label: + type: string + example: Company Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + ConversationsMessage: + description: a Conversations message + type: object + properties: + id: + description: >- + Message ID. It can be used for further manipulations with the + message. + type: string + example: eYBEm3gq3zc5ayE2g + type: + description: '`"agent"` for agents’ messages, `"visitor"` for visitors’ messages.' + type: string + enum: + - agent + - visitor + example: agent + text: + description: Message text or name of the attached file + type: string + example: Good morning! How can I help you? + visitorId: + description: visitor’s ID + type: string + example: kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg + agentId: + description: >- + ID of the agent on whose behalf the message was sent (only in + messages sent by an agent). + type: string + example: d9nKoegKSjmCtyK78 + agentName: + description: >- + Agent’s name as displayed to the visitor. Only in the messages sent + by an agent. + type: string + example: Liz + createdAt: + description: Timestamp in milliseconds. + type: integer + format: int64 + minimum: 0 + example: 1470222622433 + isPushed: + description: '`true` for pushed messages' + type: boolean + example: true + receivedFrom: + description: >- + 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. + type: string + example: SuperAwesomeHelpdesk + file: + type: object + properties: + filename: + description: Name of the file + type: string + example: conversations.png + size: + description: Size in bytes + type: integer + format: int64 + minimum: 0 + example: 15538 + isImage: + description: Whether the file is an image + type: boolean + example: true + url: + description: URL of the file + type: string + format: url + example: https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/ + imageInfo: + description: image info is passed in case the file is an image + type: object + properties: + width: + description: Width of the image + type: integer + format: int64 + minimum: 0 + example: 1129 + height: + description: height of the image + type: integer + format: int64 + minimum: 0 + example: 525 + previewUrl: + description: URL of the preview + type: string + format: url + example: >- + https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/ + event: + type: object + required: + - event_name + - identifiers + properties: + event_name: + description: >- + The name of the event that occurred. This is how you will find your + event in Brevo. Limited to 255 characters, alphanumerical characters + and - _ only. + type: string + example: video_played + event_date: + description: >- + Timestamp of when the event occurred (e.g. + "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp + of the event creation is used. + type: string + example: '2024-02-06T20:59:23.383Z' + identifiers: + description: Identifies the contact associated with the event. + type: object + required: + - email_id + properties: + email_id: + description: Email Id associated with the event + type: string + example: jane.doe@example.com + contact_properties: + description: >- + Properties defining the state of the contact associated to this + event. Useful to update contact attributes defined in your contacts + database while passing the event. For example: **"FIRSTNAME": "Jane" + , "AGE": 37** + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + AGE: 32 + GENDER: FEMALE + event_properties: + description: >- + Properties of the event. Top level properties and nested properties + can be used to better segment contacts and personalise workflow + conditions. The following field type are supported: string, number, + boolean (true/false), date (Timestamp e.g. + "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, + alphanumerical characters and - _ only. Size is limited to 50Kb. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + - type: object + - type: array + items: + description: >- + WARNING: Missing items property in array schema. Missing + items property has been filled with this AnyType schema. + example: + video_title: Brevo — The most approachable CRM suite + vide_description: Create your free account today! + duration: 142 + autoplayed: false + upload_date: '2023-11-24T12:09:10+01:00' + order: + type: object + required: + - id + - createdAt + - updatedAt + - status + - amount + - products + properties: + id: + description: Unique ID of the order. + type: string + example: '14' + createdAt: + description: >- + Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is + actually created. + type: string + example: '2021-07-29T20:59:23.383Z' + updatedAt: + description: >- + Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status + of the order is actually changed/updated. + type: string + example: '2021-07-30T10:59:23.383Z' + status: + description: State of the order. + type: string + example: completed + amount: + description: >- + Total amount of the order, including all shipping expenses, tax and + the price of items. + type: number + example: 308.42 + products: + type: array + items: + description: Details for the Products in an order. + type: object + required: + - productId + - quantity + - price + properties: + productId: + description: ID of the product. + type: string + example: P1 + quantity: + description: >- + How many pieces of the product the visitor has added to the + cart. + type: number + example: 10 + variantId: + description: Product ID of the red color shirts. + type: string + example: P100 + price: + description: The price of a unit of product + type: number + example: 99.99 + email: + description: >- + Email of the contact, Mandatory if "phone" field is not passed in + "billing" parameter. + type: string + example: example@brevo.com + billing: + description: Billing details of an order. + type: object + properties: + address: + description: Full billing address. + type: string + example: 15 Somewhere Road, Brynmenyn + city: + description: Exact city of the address. + type: string + example: Basel + countryCode: + description: Billing country 2-letter ISO code. + type: string + example: CA + phone: + description: >- + Phone number to contact for further details about the order, + Mandatory if "email" field is not passed. + type: string + example: 01559 032133 + postCode: + description: Postcode for delivery and billing. + type: string + example: '4052' + paymentMethod: + description: >- + How the visitor will pay for the item(s), e.g. paypal, check, + etc. + type: string + example: PayPal + region: + description: Exact region (state/province) for delivery and billing. + type: string + example: Northwestern Switzerland + coupons: + description: Coupons applied to the order. Stored case insensitive. + type: array + example: + - EASTER15OFF + items: + type: string + orderBatch: + type: object + required: + - orders + properties: + orders: + description: array of order objects + type: array + items: + $ref: '#/components/schemas/order' + notifyUrl: + description: Notify Url provided by client to get the status of batch request + type: string + example: https://en.wikipedia.org/wiki/Webhook + historical: + description: >- + Defines wether you want your orders to be considered as live data or + as historical data (import of past data, synchronising data). True: + orders will not trigger any automation workflows. False: orders will + trigger workflows as usual. + type: boolean + default: true + example: true + createdBatchId: + type: object + required: + - batchId + properties: + batchId: + description: Batch ID of the request + type: number + example: 1 + count: + description: Number of orders + type: integer + format: int64 + example: 17655 + getCategories: + required: + - categories + - count + type: object + properties: + categories: + type: array + items: + $ref: '#/components/schemas/getCategoryDetails' + count: + description: Number of categories + type: integer + format: int64 + example: 17655 + getCategoryDetails: + required: + - id + - name + - createdAt + - modifiedAt + type: object + properties: + id: + description: Category ID for which you requested the details + type: string + format: string + example: C11 + name: + description: Name of the category for which you requested the details + type: string + format: string + example: Electronics + createdAt: + description: Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + type: string + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + description: >- + Last modification UTC date-time of the category + (YYYY-MM-DDTHH:mm:ss.SSSZ) + type: string + example: '2017-05-12T12:30:00.000Z' + url: + description: URL to the category + type: string + format: string + example: http://mydomain.com/category/clothing + isDeleted: + description: category deleted from the shop's database + type: boolean + format: string + example: true + createUpdateCategory: + type: object + required: + - id + properties: + id: + description: | + Unique Category ID as saved in the shop + type: string + format: email + example: CAT123 + name: + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + type: string + example: Electronics + url: + description: URL to the category + type: string + example: http://mydomain.com/category/electronics + updateEnabled: + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + type: boolean + example: false + default: false + deletedAt: + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + type: string + example: '2017-05-12T12:30:00.000Z' + createUpdateCategories: + type: object + required: + - id + properties: + id: + description: | + Unique Category ID as saved in the shop + type: string + format: email + example: CAT123 + name: + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + type: string + example: Electronics + url: + description: URL to the category + type: string + example: http://mydomain.com/category/electronics + deletedAt: + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + type: string + example: '2017-05-12T12:30:00.000Z' + createUpdateBatchCategory: + type: object + required: + - categories + properties: + categories: + description: array of categories objects + type: array + items: + $ref: '#/components/schemas/createUpdateCategories' + updateEnabled: + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + type: boolean + createCategoryModel: + type: object + properties: + id: + description: ID of the category when a new category is created + type: integer + format: int64 + example: 122 + createUpdateBatchCategoryModel: + type: object + properties: + createdCount: + description: Number of the new created categories + type: integer + format: int64 + example: 7 + updatedCount: + description: Number of the existing categories updated + type: integer + format: int64 + example: 5 + getProducts: + required: + - products + - count + type: object + properties: + products: + type: array + items: + $ref: '#/components/schemas/getProductDetails' + count: + description: Number of products + type: integer + format: int64 + example: 17655 + getProductDetails: + required: + - id + - name + - createdAt + - modifiedAt + - s3ThumbAnalytics + - s3ThumbEditor + type: object + properties: + id: + description: Product ID for which you requested the details + type: string + format: string + example: P11 + name: + description: Name of the product for which you requested the details + type: string + format: string + example: Iphone 11 + createdAt: + description: Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + type: string + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + description: >- + Last modification UTC date-time of the product + (YYYY-MM-DDTHH:mm:ss.SSSZ) + type: string + example: '2017-05-12T12:30:00.000Z' + url: + description: URL to the product + type: string + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + description: Absolute URL to the cover image of the product + type: string + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + description: Product identifier from the shop + type: string + format: string + price: + description: Price of the product + type: number + format: float + categories: + description: Category ID-s of the product + type: array + items: + type: string + parentId: + description: Parent product id of the product + type: string + format: string + s3Original: + description: S3 url of original image + type: string + format: string + s3ThumbAnalytics: + description: >- + S3 thumbnail url of original image in 120x120 dimension for + analytics section + type: string + format: string + s3ThumbEditor: + description: >- + S3 thumbnail url of original image in 600x400 dimension for editor + section + type: string + format: string + metaInfo: + description: >- + Meta data of product such as description, vendor, producer, stock + level, etc. + type: object + example: + description: Shoes for sports + brand: addidas + isDeleted: + description: product deleted from the shop's database + type: boolean + example: true + createUpdateProduct: + type: object + required: + - id + - name + properties: + id: + description: Product ID for which you requested the details + type: string + format: string + example: P11 + name: + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + type: string + format: string + example: Iphone 11 + url: + description: URL to the product + type: string + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + description: Absolute URL to the cover image of the product + type: string + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + description: Product identifier from the shop + type: string + format: string + price: + description: Price of the product + type: number + format: float + categories: + description: Category ID-s of the product + type: array + items: + type: string + parentId: + description: Parent product id of the product + type: string + format: string + metaInfo: + description: >- + 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. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + description: Shoes for sports + brand: addidas + updateEnabled: + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + type: boolean + example: false + default: false + deletedAt: + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + type: string + createUpdateBatchProducts: + type: object + required: + - products + properties: + products: + description: array of products objects + type: array + items: + $ref: '#/components/schemas/createUpdateProducts' + updateEnabled: + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + type: boolean + createUpdateProducts: + type: object + required: + - id + - name + properties: + id: + description: Product ID for which you requested the details + type: string + format: string + example: P11 + name: + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + type: string + format: string + example: Iphone 11 + url: + description: URL to the product + type: string + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + description: Absolute URL to the cover image of the product + type: string + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + description: Product identifier from the shop + type: string + format: string + price: + description: Price of the product + type: number + format: float + categories: + description: Category ID-s of the product + type: array + items: + type: string + parentId: + description: Parent product id of the product + type: string + format: string + metaInfo: + description: >- + 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. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + description: Shoes for sports + brand: addidas + deletedAt: + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + type: string + createProductModel: + type: object + properties: + id: + description: ID of the Product when a new product is created + type: integer + format: int64 + example: 122 + createUpdateBatchProductsModel: + type: object + properties: + createdCount: + description: Number of the new created products + type: integer + format: int64 + example: 7 + updatedCount: + description: Number of the existing products updated + type: integer + format: int64 + example: 5 + getCouponCollection: + required: + - id + - name + - defaultCoupon + - createdAt + - totalCoupons + - remainingCoupons + type: object + properties: + id: + description: The id of the collection + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + name: + description: The name of the collection + type: string + format: uuidv4 + example: SummerPromotions + defaultCoupon: + description: The default coupon of the collection + type: string + example: 10 OFF + createdAt: + description: Datetime on which the collection was created + type: string + format: date-time + example: '2023-01-06T05:03:47.053Z' + totalCoupons: + description: Total coupons in the collection + type: integer + format: int64 + example: 10000 + remainingCoupons: + description: Not sent coupons in the collection + type: integer + format: int64 + example: 5000 + sendWhatsappMessageTemplate: + required: + - senderNumber + - templateId + - contactNumbers + type: object + properties: + templateId: + description: ID of the template to send + type: integer + example: 123 + senderNumber: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + params: + description: >- + Pass the set of attributes to customize the template. For example, + {"FNAME":"Joe", "LNAME":"Doe"}. + type: object + example: + FNAME: Joe + LNAME: Doe + contactNumbers: + description: List of phone numbers of the contacts + type: array + items: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + sendWhatsappMessageText: + required: + - senderNumber + - contactNumbers + - authType + - text + type: object + properties: + senderNumber: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + text: + description: >- + Text to be sent as message body (will be overridden if templateId is + passed in the same request) + type: string + example: Hi! There i am a message + contactNumbers: + description: List of phone numbers of the contacts + type: array + items: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + getWhatsappEventReport: + type: object + properties: + events: + type: array + items: + required: + - contactNumber + - date + - messageId + - event + - senderNumber + type: object + properties: + contactNumber: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + date: + description: UTC date-time on which the event has been generated + type: string + example: '2017-03-12T12:30:00.000Z' + messageId: + description: Message ID which generated the event + type: string + example: 23befbae-1505-47a8-bd27-e30ef739f32c + event: + description: Event which occurred + type: string + example: delivered + enum: + - sent + - delivered + - read + - error + - unsubscribe + - reply + - soft-bounce + reason: + description: >- + Reason for the event (will be there in case of `error` and + `soft-bounce` events) + type: string + example: 23befbae-1505-47a8-bd27-e30ef739f32c + body: + description: >- + Text of the reply (will be there only in case of `reply` event + with text) + type: string + example: Hi! I am a reply + mediaUrl: + description: >- + Url of the media reply (will be there only in case of `reply` + event with media) + type: string + format: url + example: https://example.com/media.png + senderNumber: + description: WhatsApp Number with country code. Example, 85264318721 + type: string + format: mobile + example: 919876543210 + getExternalFeedByUUID: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + type: string + enum: + - basic + - token + - noAuth + username: + description: Username for authType `basic` + type: string + example: user + password: + description: Password for authType `basic` + type: string + example: password + token: + description: Token for authType `token` + type: string + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + description: Custom headers for the feed + type: array + items: + type: object + properties: + name: + description: Name of the header + type: string + example: userId + value: + description: Value of the header + type: string + example: user12345 + maxRetries: + description: Maximum number of retries on the feed url + type: integer + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + description: Toggle caching of feed url response + type: boolean + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + getAllExternalFeeds: + type: object + properties: + count: + description: Total number of batches + type: integer + feeds: + type: array + items: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + type: string + enum: + - basic + - token + - noAuth + username: + description: Username for authType `basic` + type: string + example: user + password: + description: Password for authType `basic` + type: string + example: password + token: + description: Token for authType `token` + type: string + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + description: Custom headers for the feed + type: array + items: + type: object + properties: + name: + description: Name of the header + type: string + example: userId + value: + description: Value of the header + type: string + example: user12345 + maxRetries: + description: Maximum number of retries on the feed url + type: integer + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + description: Toggle caching of feed url response + type: boolean + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + createExternalFeed: + required: + - name + - url + type: object + properties: + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + type: string + enum: + - basic + - token + - noAuth + default: noAuth + username: + description: Username for authType `basic` + type: string + example: user + password: + description: Password for authType `basic` + type: string + example: password + token: + description: Token for authType `token` + type: string + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + description: Custom headers for the feed + type: array + items: + type: object + properties: + name: + description: Name of the header + type: string + example: userId + value: + description: Value of the header + type: string + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + description: Maximum number of retries on the feed url + type: integer + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + description: Toggle caching of feed url response + type: boolean + example: true + default: false + updateExternalFeed: + type: object + properties: + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + type: string + enum: + - basic + - token + - noAuth + username: + description: Username for authType `basic` + type: string + example: user + password: + description: Password for authType `basic` + type: string + example: password + token: + description: Token for authType `token` + type: string + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + description: Custom headers for the feed + type: array + items: + type: object + properties: + name: + description: Name of the header + type: string + example: userId + value: + description: Value of the header + type: string + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + description: Maximum number of retries on the feed url + type: integer + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + description: Toggle caching of feed url response + type: boolean + example: true + default: false + exportWebhooksHistory: + required: + - event + - notifyURL + - type + type: object + properties: + days: + description: >- + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + type: integer + example: 7 + startDate: + description: >- + Mandatory if endDate is used. Starting date of the history + (YYYY-MM-DD). Must be lower than equal to endDate + type: string + example: '2023-02-13T00:00:00.000Z' + endDate: + description: >- + Mandatory if startDate is used. Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + type: string + example: '2023-02-17T00:00:00.000Z' + sort: + description: Sorting order of records (asc or desc) + type: string + example: desc + type: + description: Filter the history based on webhook type + type: string + example: transactional + enum: + - transactional + - marketing + event: + description: Filter the history for a specific event type + type: string + example: request + enum: + - invalid_parameter + - missing_parameter + - hardBounce + - softBounce + - delivered + - spam + - request + - opened + - click + - invalid + - deferred + - blocked + - unsubscribed + - error + - uniqueOpened + - loadedByProxy + - allEvents + notifyURL: + description: Webhook URL to receive CSV file link + type: string + example: https://brevo.com + webhookId: + description: Filter the history for a specific webhook id + type: integer + example: 2345 + email: + description: Filter the history for a specific email + type: string + example: example@brevo.com + messageId: + description: >- + Filter the history for a specific message id. Applicable only for + transactional webhooks. + type: integer + example: .nan + ContactsAddToListRequest: + oneOf: + - $ref: '#/components/schemas/addContactToListByEmails' + - $ref: '#/components/schemas/addContactToListByIDs' + ContactsRemoveContactFromListRequest: + oneOf: + - $ref: '#/components/schemas/removeContactFromListByEmails' + - $ref: '#/components/schemas/removeContactFromListByIDs' + - $ref: '#/components/schemas/removeContactFromListByAll' + WebhooksExportAllEventsRequest: + oneOf: + - $ref: '#/components/schemas/exportWebhooksHistory' + MasterAccountGenerateSsoTokenRequest: + required: + - email + type: object + properties: + email: + description: User email of admin account + type: string + example: vipin+ent-user@brevo.com + MasterAccountGenerateSsoTokenRequest1: + required: + - id + type: object + properties: + id: + description: Id of the sub-account organization + type: integer + format: int64 + example: 3232323 + email: + description: User email of sub-account organization + type: string + example: vipin+subaccount@brevo.com + target: + description: > + **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 Senders after login + + * **sms_campaign** - Redirect to Sms Campaign after login + + * **sms_transactional** - Redirect to Sms Transactional after login + type: string + enum: + - automation + - email_campaign + - contacts + - landing_pages + - email_transactional + - senders + - sms_campaign + - sms_transactional + example: contacts + url: + description: >- + Set the full target URL after login success. The user will land + directly on this target URL after login + type: string + example: https://app.brevo.com/senders/domain/list + MasterAccountCreateSubAccountKeyRequest: + required: + - id + - name + type: object + properties: + id: + description: Id of the sub-account organization + type: integer + format: int64 + example: 3232323 + name: + description: Name of the API key + type: string + example: My Api Key + MasterAccountCreateGroupOfSubAccountsRequest: + required: + - groupName + type: object + properties: + groupName: + description: The name of the group of sub-accounts + type: string + example: My group + subAccountIds: + description: Pass the list of sub-account Ids to be included in the group + items: + type: integer + format: int64 + type: array + example: + - 234322 + - 325553 + - 893432 + MasterAccountUpdateGroupSubAccountsRequest: + type: object + properties: + groupName: + description: The name of the group of sub-accounts + type: string + example: My group + subAccountIds: + description: Pass the list of sub-account Ids to be included in the group + items: + type: integer + format: int64 + type: array + example: + - 234322 + - 325553 + - 893432 + MasterAccountUnlinkSubAccountFromGroupRequest: + required: + - subAccountIds + type: object + properties: + subAccountIds: + description: List of sub-account ids + type: array + items: + type: integer + format: int64 + example: + - 423432 + - 234323 + - 87678 + CompaniesCreateCompanyRequest: + required: + - name + properties: + name: + description: Name of company + type: string + example: company + attributes: + description: Attributes for company creation + type: object + example: + domain: https://example.com + industry: Fabric + owner: 60e68d60582a3b006f524197 + countryCode: + description: Country code if phone_number is passed in attributes. + type: integer + format: int64 + example: 91 + type: object + CompaniesUpdateCompanyRequest: + properties: + name: + description: Name of company + type: string + example: company + attributes: + description: Attributes for company update + type: object + example: + category: label_2 + domain: xyz + date: '2022-05-04T00:00:00+05:30' + industry: flipkart + number_of_contacts: 1 + number_of_employees: 100 + owner: 5b1a17d914b73d35a76ca0c7 + phone_number: '81718441912' + revenue: 10000.34222 + countryCode: + description: Country code if phone_number is passed in attributes. + type: integer + format: int64 + example: 91 + type: object + CompaniesLinkUnlinkWithContactDealRequest: + properties: + linkContactIds: + description: Contact ids for contacts to be linked with company + items: + type: integer + format: int64 + type: array + example: + - 1 + - 2 + - 3 + unlinkContactIds: + description: Contact ids for contacts to be unlinked from company + items: + type: integer + format: int64 + type: array + example: + - 4 + - 5 + - 6 + linkDealsIds: + description: Deal ids for deals to be linked with company + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + unlinkDealsIds: + description: Deal ids for deals to be unlinked from company + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045994 + - 61a5ce58c5d479576104595 + - 61a5ce58c5d4795761045996 + type: object + DealsCreateNewDealRequest: + required: + - name + properties: + name: + description: Name of deal + type: string + example: 'Deal: Connect with company' + attributes: + description: > + Attributes for deal creation + + + To assign owner of a Deal you can send attributes.deal_owner and + utilize the account email or ID. + + + If you want to create a deal on a specific pipeline and stage you + can use the following attributes `pipeline` and `deal_stage`. + + + Pipeline and deal_stage are ids you can fetch using this endpoint + `/crm/pipeline/details/{pipelineID}` + type: object + example: + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + type: object + DealsUpdateDealByIdRequest: + properties: + name: + description: Name of deal + type: string + example: 'Deal: Connect with client' + attributes: + description: > + Attributes for deal update + + + To assign owner of a Deal you can send attributes.deal_owner and + utilize the account email or ID. + + + If you wish to update the pipeline of a deal you need to provide the + `pipeline` and the `deal_stage` + + + Pipeline and deal_stage are ids you can fetch using this endpoint + `/crm/pipeline/details/{pipelineID}` + type: object + example: + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + type: object + DealsLinkUnlinkPatchRequest: + properties: + linkContactIds: + description: Contact ids for contacts to be linked with deal + items: + type: integer + format: int64 + type: array + example: + - 1 + - 2 + - 3 + unlinkContactIds: + description: Contact ids for contacts to be unlinked from deal + items: + type: integer + format: int64 + type: array + example: + - 4 + - 5 + - 6 + linkCompanyIds: + description: Company ids to be linked with deal + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + unlinkCompanyIds: + description: Company ids to be unlinked from deal + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045994 + - 61a5ce58c5d479576104595 + - 61a5ce58c5d4795761045996 + type: object + TasksCreateNewTaskRequest: + required: + - name + - taskTypeId + - date + properties: + name: + description: Name of task + type: string + example: 'Task: Connect with client' + duration: + description: Duration of task in milliseconds [1 minute = 60000 ms] + type: integer + example: 600000 + format: int64 + minimum: 0 + taskTypeId: + description: Id for type of task e.g Call / Email / Meeting etc. + type: string + example: 61a5cd07ca1347c82306ad09 + date: + description: Task due date and time + type: string + format: date-time + example: '2021-11-01T17:44:54.668Z' + notes: + description: Notes added to a task + type: string + example: In communication with client for resolution of queries. + done: + description: Task marked as done + type: boolean + example: false + assignToId: + description: >- + To assign a task to a user you can use either the account email or + ID. + type: string + example: 5faab4b7f195bb3c4c31e62a + contactsIds: + description: Contact ids for contacts linked to this task + items: + type: integer + type: array + example: + - 1 + - 2 + - 3 + dealsIds: + description: Deal ids for deals a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + description: Companies ids for companies a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + reminder: + $ref: '#/components/schemas/TaskReminder' + type: object + TasksUpdateTaskRequest: + properties: + name: + description: Name of task + type: string + example: 'Task: Connect with client' + duration: + description: Duration of task in milliseconds [1 minute = 60000 ms] + type: integer + format: int64 + example: 600000 + taskTypeId: + description: Id for type of task e.g Call / Email / Meeting etc. + type: string + example: 61a5cd07ca1347c82306ad09 + date: + description: Task date/time + type: string + format: date-time + example: '2021-11-01T17:44:54.668Z' + notes: + description: Notes added to a task + type: string + example: In communication with client for resolution of queries. + done: + description: Task marked as done + type: boolean + example: false + assignToId: + description: >- + To assign a task to a user you can use either the account email or + ID. + type: string + example: 5faab4b7f195bb3c4c31e62a + contactsIds: + description: Contact ids for contacts linked to this task + items: + type: integer + type: array + example: + - 1 + - 2 + - 3 + dealsIds: + description: Deal ids for deals a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + description: Companies ids for companies a task is linked to + items: + type: string + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + reminder: + $ref: '#/components/schemas/TaskReminder' + type: object + FilesUploadFileRequest: + type: object + properties: + file: + description: File data to create a file. + type: string + format: binary + dealId: + type: string + contactId: + type: integer + format: int64 + companyId: + type: string + required: + - file + ConversationsSendMessageAsAgentRequest: + type: object + required: + - visitorId + - text + properties: + visitorId: + description: >- + visitor’s ID received from + a webhook or generated by you to bind + existing user account to Conversations + text: + description: message text + agentId: + description: >- + agent ID. It can be found on agent’s page or received from + a webhook. Alternatively, you can use `agentEmail` + `agentName` + + `receivedFrom` instead (all 3 fields required). + receivedFrom: + description: >- + mark your messages to distinguish messages created by you from the + others. + agentEmail: + description: >- + 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. + agentName: + description: agent name + ConversationsUpdateAgentMessageRequest: + type: object + required: + - text + properties: + text: + description: edited message text + type: string + ConversationsSendAutomatedMessageRequest: + type: object + required: + - visitorId + - text + properties: + visitorId: + description: >- + visitor’s ID received from + a webhook or generated by you to bind + existing user account to Conversations + text: + description: message text + agentId: + description: >- + agent ID. It can be found on agent’s page or received from + a webhook. + groupId: + description: group ID. It can be found on group’s page. + ConversationsUpdatePushedMessageRequest: + type: object + required: + - text + properties: + text: + description: edited message text + type: string + ConversationsSetAgentOnlineStatusRequest: + type: object + properties: + agentId: + description: >- + agent ID. It can be found on agent’s page or received from + a webhook. Alternatively, you can use `agentEmail` + `agentName` + + `receivedFrom` instead (all 3 fields required). + receivedFrom: + description: >- + mark your messages to distinguish messages created by you from the + others. + agentEmail: + description: >- + 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. + agentName: + description: agent name + CouponsCreateCollectionRequest: + required: + - name + - defaultCoupon + type: object + properties: + name: + description: Name of the collection with no white spaces between words + type: string + example: SummerPromotions + defaultCoupon: + description: A default coupon to be used in case there are no coupons left + type: string + example: 10 OFF + CouponsUpdateCouponCollectionByIdRequest: + required: + - defaultCoupon + type: object + properties: + defaultCoupon: + description: A default coupon to be used in case there are no coupons left + type: string + example: 10 OFF + CouponsCreateCouponCollectionRequest: + required: + - collectionId + - coupons + type: object + properties: + collectionId: + description: >- + The id of the coupon collection for which the coupons will be + created + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + coupons: + type: array + minItems: 1 + maxItems: 1000 + uniqueItems: true + items: + description: Name of the coupon + type: string + example: Uf12AF + TransactionalWhatsAppSendMessageRequest: + oneOf: + - $ref: '#/components/schemas/sendWhatsappMessageTemplate' + - $ref: '#/components/schemas/sendWhatsappMessageText' + TransactionalEmailsGetEmailStatusByIdResponse: + oneOf: + - $ref: '#/components/schemas/getScheduledEmailByBatchId' + - $ref: '#/components/schemas/getScheduledEmailByMessageId' + InboundParsingGetAttachmentByTokenResponse: + type: string + format: binary + MasterAccountCreateGroupOfSubAccountsResponse: + type: object + properties: + id: + type: string + MasterAccountSendInvitationToAdminUserResponse: + type: object + properties: + id: + type: string + MasterAccountResendCancelAdminUserInvitationResponse: + type: object + properties: + message: + description: Action success message + type: string + MasterAccountListGroupsResponse: + type: array + items: + type: object + properties: + id: + description: Unique id of the group + type: string + groupName: + description: The name of the group of sub-accounts + type: string + CompaniesCreateCompanyResponse: + description: Created company id + required: + - id + type: object + properties: + id: + description: Unique company id + type: string + example: 61a5cd07ca1347c82306ad06 + DealsCreateNewDealResponse: + description: Created deal id + required: + - id + type: object + properties: + id: + description: Unique deal id + type: string + example: 61a5cd07ca1347c82306ad06 + TasksCreateNewTaskResponse: + description: Task Details + required: + - id + type: object + properties: + id: + description: Unique task id + type: string + example: 61a5cd07ca1347c82306ad06 + EcommerceGetOrdersResponse: + type: object + properties: + orders: + type: array + items: + type: object + properties: + id: + type: string + example: order1803 + createdAt: + type: string + example: '2021-12-31T11:42:35.638Z' + updatedAt: + type: string + example: '2022-03-03T14:48:31.867Z' + contact_id: + type: number + example: 2 + status: + type: string + example: complete + amount: + type: number + example: 2000 + billing: + type: object + properties: + address: + type: string + example: Sec 62, Noida + city: + type: string + example: Noida + countryCode: + type: string + example: IN + phone: + type: number + example: 9238283982 + postCode: + type: number + example: 110001 + paymentMethod: + type: string + example: Net banking + region: + type: string + example: North India + products: + type: array + items: + type: object + properties: + productId: + type: number + example: 21 + quantity: + type: number + example: 2 + variantId: + type: string + example: P100 + price: + type: number + example: 100 + email: + type: string + example: testvisitor@sendinblue.com + coupons: + type: array + items: + type: string + example: flat50 + count: + type: number + example: 1 + example: + orders: + - id: order1803X + createdAt: '2021-12-31T11:42:35.638Z' + updatedAt: '2022-03-03T14:48:31.867Z' + contact_id: 2 + status: complete + amount: 2000 + billing: + address: Sec 62, Noida + city: Noida + countryCode: IN + phone: 9238283982 + postCode: 110001 + paymentMethod: Net banking + region: North India + products: + - productId: 21 + quantity: 2 + variantId: P100 + price: 100 + - productId: 21 + quantity: 2 + variantId: P15756 + price: 100 + email: testvisitor@sendinblue.com + coupons: + - flat50 + - flat40 + count: 1 + CouponsCreateCollectionResponse: + required: + - id + type: object + properties: + id: + description: The id of the created collection + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + CouponsUpdateCouponCollectionByIdResponse: + required: + - id + - name + - defaultCoupon + type: object + properties: + id: + description: The id of the collection + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + name: + description: The name of the collection + type: string + format: uuidv4 + example: SummerPromotions + defaultCoupon: + description: The default coupon of the collection + type: string + example: 10 OFF + TransactionalWhatsAppSendMessageResponse: + required: + - messageId + type: object + properties: + messageId: + description: messageId of sent message + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + ExternalFeedsCreateFeedResponse: + required: + - id + type: object + properties: + id: + description: ID of the object created + type: string + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + securitySchemes: + api-key: + description: >- + The API key should be passed in the request headers as `api-key` for + authentication. + type: apiKey + name: api-key + in: header +security: + - api-key: [] +x-samples-languages: + - curl diff --git a/sdks/db/generate-repository-description-cache/brevo.json b/sdks/db/generate-repository-description-cache/brevo.json new file mode 100644 index 0000000000..8f36f0e70c --- /dev/null +++ b/sdks/db/generate-repository-description-cache/brevo.json @@ -0,0 +1,3 @@ +{ + "Brevo, formerly known as Sendinblue, is the leading customer relationship management (CRM) suite designed to fully cultivate long-term customer relationships and to empower businesses to expand in a fast changing digital world. With Brevo, businesses have a unified view of the customer journey in one easy-to-use platform to grow meaningful relationships.\n\n🙌Brevo Fun Facts 🙌\n- Founded in 2012 by Armand Thiberge with a mission to help businesses of all sizes build stronger customer relationships and grow beyond their wildest dreams\n- 500,000 customers across 180 countries \n- Fully compliant with GDPR regulations\n- Service and platform available in six languages\n- Headquartered in Paris with eight other offices in Seattle, Toronto, Berlin, Vienna, Sofia, Noida, and Bengaluru\n- 700+ talented employees representing over 67 nationalities\n- Continuous efforts to reduce and monitor its carbon footprint\n- Achieved centaur status—$100M in ARR—in 2022 \n- Award wins include Top 100 Software Company by The Software Report (TSR), Stevie Award: Relationship Management Solution, MarTech Breakthrough Award: Best Overall Marketing Automation Platform, G2: Leader Winter, Leader Enterprise Winter, Best Results Mid-Market, Best Software Awards: Top 50 Marketing Products, Best Software Awards: Top 100 Fastest Growing Products": "Brevo, formerly Sendinblue, is a leading CRM suite empowering businesses to grow in a digital world. Unified view of customer journey to foster meaningful relationships. Founded in 2012, 500,000+ customers in 180 countries. HQ in Paris, 700+ employees, focused on sustainability. Brevo's {language} SDK generated by Konfig (https://konfigthis.com/)." +} \ No newline at end of file diff --git a/sdks/db/intermediate-fixed-specs/brevo/openapi.yaml b/sdks/db/intermediate-fixed-specs/brevo/openapi.yaml new file mode 100644 index 0000000000..4a71bac860 --- /dev/null +++ b/sdks/db/intermediate-fixed-specs/brevo/openapi.yaml @@ -0,0 +1,20831 @@ +openapi: 3.0.1 +info: + title: Brevo API + description: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | + contact: + name: Brevo Support + url: https://account.brevo.com/support + email: contact@brevo.com + license: + name: MIT + url: http://opensource.org/licenses/MIT + version: 3.0.0 +servers: + - url: https://api.brevo.com/v3 +security: + - api-key: [] +paths: + /emailCampaigns: + get: + tags: + - Email Campaigns + summary: Return all your created email campaigns + operationId: getEmailCampaigns + parameters: + - name: type + in: query + description: Filter on the type of the campaigns + schema: + type: string + enum: + - classic + - trigger + - name: status + in: query + description: Filter on the status of the campaign + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email + campaigns. + + **Prefer to pass your timezone in date-time format for accurate + result** ( only available if either 'status' not passed and if + passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: excludeHtmlContent + in: query + description: >- + Use this flag to exclude htmlContent from the response body. If set + to **true**, htmlContent field will be returned as empty string in + the response body + schema: + type: boolean + enum: + - true + - false + responses: + '200': + description: Email campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaigns' + examples: + response: + value: + count: 2 + campaigns: + - id: 12 + name: EN - Sales Summer 2017 + subject: 20% OFF for 2017 Summer Sales + previewText: Don't miss the sale + type: classic + status: sent + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: marketing@mycompany.com + name: Marketing + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 5 + exclusionLists: + - 13 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 5 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: 80 + statsByDomain: + yahoo.com: + uniqueClicks: 298 + clickers: 533 + complaints: 0 + sent: 25601 + softBounces: 5 + hardBounces: 0 + uniqueViews: 3527 + unsubscriptions: 17 + viewed: 5255 + delivered: 25596 + hotmail.co.uk: + uniqueClicks: 1970 + clickers: 2720 + complaints: 5 + sent: 117055 + softBounces: 111 + hardBounces: 0 + uniqueViews: 21111 + unsubscriptions: 105 + viewed: 35251 + delivered: 117056 + - id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter + type: Classic + status: draft + scheduledAt: '' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://example.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 10 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 10 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + aol: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Email Campaigns + summary: Create an email campaign + operationId: createEmailCampaign + requestBody: + description: Values to create a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createEmailCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}: + get: + tags: + - Email Campaigns + summary: Get an email campaign report + operationId: getEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + - name: statistics + in: query + description: >- + Filter on the type of statistics required. Example **globalStats** + value will only fetch globalStats info of the campaign in returned + response. + required: false + schema: + type: string + enum: + - globalStats + - linksStats + - statsByDomain + - statsByDevice + - statsByBrowser + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailCampaign' + examples: + response: + value: + id: 22 + name: Weekly - 1 + subject: Week 1 - Newsletter + previewText: your weekly newsletter! + type: classic + status: draft + scheduledAt: '2017-09-22T12:30:00.000Z' + testSent: false + header: '[DEFAULT_HEADER]' + footer: '[DEFAULT_FOOTER]' + sender: + email: newsletter@mycompany.com + name: Newsletter + id: 26 + replyTo: replyto@domain.com + toField: '{FNAME} {LNAME}' + htmlContent: This is my HTML Content + shareLink: http://dhh.brevo.com/fhsgccc.html?t=9865448900 + tag: Newsletter + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 22 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 22 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + statsByDevice: + desktop: + mac: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 1 + mobile: + androidMobile: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + iPhone: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 0 + statsByBrowser: + thunderbird: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + safari: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + internetExplorer: + clickers: 0 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Email Campaigns + summary: Update an email campaign + operationId: updateEmailCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateEmailCampaign' + required: true + responses: + '204': + description: Email campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Email Campaigns + summary: Delete an email campaign + operationId: deleteEmailCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendNow: + post: + tags: + - Email Campaigns + summary: Send an email campaign immediately, based on campaignId + operationId: sendEmailCampaignNow + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Email campaign has been scheduled + content: {} + '400': + description: Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendTest: + post: + tags: + - Email Campaigns + summary: Send an email campaign to your test list + operationId: sendTestEmail + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + /emailCampaigns/{campaignId}/status: + put: + tags: + - Email Campaigns + summary: Update an email campaign status + operationId: updateCampaignStatus + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sendReport: + post: + tags: + - Email Campaigns + summary: Send the report of a campaign + description: A PDF will be sent to the specified email addresses + operationId: sendReport + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: + tags: + - Email Campaigns + summary: Get an A/B test email campaign results + description: Obtain winning version of an A/B test email campaign + operationId: getAbTestCampaignResult + parameters: + - name: campaignId + in: path + description: Id of the A/B test campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: A/B test email campaign Result + content: + application/json: + schema: + $ref: '#/components/schemas/abTestCampaignResult' + examples: + response: + value: + winningVersion: B + winningCriteria: Click + openRate: 100% + clickRate: 50% + winningVersionRate: 0% + statistics: + openers: + Version A: 20% + Version B: 100% + clicks: + Version A: 0% + Version B: 50% + unsubscribed: + Version A: 20% + Version B: 0% + softBounces: + Version A: 0% + Version B: 0% + hardBounces: + Version A: 0% + Version B: 0% + complaints: + Version A: 0% + Version B: 0% + clickedLinks: + Version A: + - link: https://google.com + clicksCount: 0 + clickRate: 0% + - link: https://youtube.com + clicksCount: 0 + clickRate: 0% + Version B: + - link: http://www.github.com + clicksCount: 2 + clickRate: 40% + - link: http://www.stackoverflow.com + clicksCount: 3 + clickRate: 60% + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: A/B test Email Campaign not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/sharedUrl: + get: + tags: + - Email Campaigns + summary: Get a shared template url + description: >- + Get a unique URL to share & import an email template from one Brevo + account to another. + operationId: getSharedTemplateUrl + parameters: + - name: campaignId + in: path + description: Id of the campaign or template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Shared template URL information + content: + application/json: + schema: + $ref: '#/components/schemas/getSharedTemplateUrl' + examples: + response: + value: + sharedUrl: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign/Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: Only email campaigns or templates are allowed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/{campaignId}/exportRecipients: + post: + tags: + - Email Campaigns + summary: Export the recipients of an email campaign + operationId: emailExportRecipients + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/emailExportRecipients' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /emailCampaigns/images: + post: + tags: + - Email Campaigns + summary: Upload an image to your account's image gallery + operationId: uploadImageToGallery + requestBody: + description: Parameters to upload an image + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageToGallery' + required: true + responses: + '201': + description: Image has been successfully uploaded + content: + application/json: + schema: + $ref: '#/components/schemas/uploadImageModel' + examples: + response: + value: + url: >- + https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email: + post: + tags: + - Transactional emails + summary: Send a transactional email + operationId: sendTransacEmail + requestBody: + description: Values to send a transactional email + content: + application/json: + schema: + $ref: '#/components/schemas/sendSmtpEmail' + required: true + responses: + '201': + description: transactional email sent + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '202': + description: transactional email scheduled + content: + application/json: + schema: + $ref: '#/components/schemas/scheduleSmtpEmail' + examples: + response: + value: + messageId: <201798300811.5787683@relay.domain.com> + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails: + get: + tags: + - Transactional emails + summary: Get the list of transactional emails on the basis of allowed filters + description: >- + This endpoint will show the list of emails for past 30 days by default. + To retrieve emails before that time, please pass startDate and endDate + in query filters. + operationId: getTransacEmailsList + parameters: + - name: email + in: query + description: > + **Mandatory if templateId and messageId are not passed in query + filters.** Email address to which transactional email has been sent. + schema: + type: string + - name: templateId + in: query + description: > + **Mandatory if email and messageId are not passed in query + filters.** Id of the template that was used to compose transactional + email. + schema: + type: integer + format: int64 + - name: messageId + in: query + description: > + **Mandatory if templateId and email are not passed in query + filters.** Message ID of the transactional email sent. + schema: + type: string + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the list. **Maximum time period that can be + selected is one month**. + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the list. **Maximum time period that can be + selected is one month.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: List of transactional emails + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailsList' + examples: + response: + value: + count: 120 + transactionalEmails: + - email: abc@xyz.com + subject: summer camp + templateId: 15 + messageId: <201798300811.5787683@relay.domain.com> + uuid: 5a78c-209ok98262910-std2341 + date: '2019-05-25T11:53:26.000Z' + - email: test@test.com + subject: details verification + templateId: 15 + messageId: <201798300811.5700093@relay.domain.com> + uuid: 5a78c-209ok98262910-s99a341 + date: '2019-05-25T07:28:11.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emails/{uuid}: + get: + tags: + - Transactional emails + summary: Get the personalized content of a sent transactional email + operationId: getTransacEmailContent + parameters: + - name: uuid + in: path + description: >- + Unique id of the transactional email that has been sent to a + particular contact + required: true + schema: + type: string + responses: + '200': + description: Transactional email content + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacEmailContent' + examples: + response: + value: + email: abc@example.com + subject: Summer Camps + templateId: 12 + date: '2016-02-25T11:53:26.000Z' + events: + - name: sent + time: '2016-02-25T11:53:26.000Z' + - name: delivered + time: '2016-02-25T11:55:26.000Z' + - name: opened + time: '2016-02-26T09:53:26.000Z' + body: >- +This is the actual html content sent
+ + /smtp/log/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete an SMTP transactional log + parameters: + - name: identifier + in: path + description: MessageId or Email of the transactional log(s) to delete + required: true + schema: + type: string + responses: + '204': + description: Transactional Logs deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Message ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates: + get: + tags: + - Transactional emails + summary: Get the list of email templates + operationId: getSmtpTemplates + parameters: + - name: templateStatus + in: query + description: >- + Filter on the status of the template. Active = true, inactive = + false + schema: + type: boolean + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: transactional email templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 5 + name: ChristomasTimeTemplate + subject: Merry Christmas + isActive: false + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Festival + htmlContent: HTML CONTENT 1 + createdAt: '2016-02-24T14:44:24.000Z' + modifiedAt: '2016-02-24T15:37:11.000Z' + - id: 12 + name: SummerSales2017Template + subject: Enjoy our summer Sales ! + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 23 + replyTo: replyto@domain.com + toField: '' + tag: Summer + htmlContent: HTML CONTENT 2 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Transactional emails + summary: Create an email template + operationId: createSmtpTemplate + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/createSmtpTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}: + get: + tags: + - Transactional emails + summary: Returns the template information + operationId: getSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Email template informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmtpTemplateOverview' + examples: + response: + value: + id: 33 + name: OrderConfirmation + subject: 'Order Confirmation : Thanks for your Purchase !' + isActive: true + testSent: false + sender: + name: John + email: john.smith@example.com + id: 26 + replyTo: replyto@domain.com + toField: '' + tag: '' + htmlContent: HTML CONTENT 4 + createdAt: '2016-02-25T11:53:26.000Z' + modifiedAt: '2016-02-25T11:53:26.000Z' + doiTemplate: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Transactional emails + summary: Update an email template + operationId: updateSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + description: values to update in transactional email template + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmtpTemplate' + required: true + responses: + '204': + description: transactional email template updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Transactional emails + summary: Delete an inactive email template + operationId: deleteSmtpTemplate + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Inactive transactional email template has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/templates/{templateId}/sendTest: + post: + tags: + - Transactional emails + summary: Send a template to your test list + operationId: sendTestTemplate + parameters: + - name: templateId + in: path + description: Id of the template + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestEmail' + required: true + responses: + '204': + description: Test email has been sent successfully to all recipients + content: {} + '400': + description: Test email could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendFailed' + '404': + description: Template ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/aggregatedReport: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated over a period of time + description: >- + This endpoint will show the aggregated stats for past 90 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getAggregatedSmtpReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAggregatedReport' + examples: + response: + value: + range: 2016-09-08|2017-04-28 + requests: 19887 + delivered: 18996 + hardBounces: 234 + softBounces: 1533 + clicks: 9987 + uniqueClicks: 8766 + opens: 17654 + uniqueOpens: 13688 + spamReports: 1 + blocked: 2 + invalid: 0 + unsubscribed: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/reports: + get: + tags: + - Transactional emails + summary: Get your transactional email activity aggregated per day + operationId: getSmtpReport + parameters: + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 30 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD) + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: tag + in: query + description: Tag of the emails + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getReports' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + clicks: 1026 + uniqueClicks: 720 + opens: 5091 + uniqueOpens: 2318 + spamReports: 0 + blocked: 519 + invalid: 1 + unsubscribed: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + clicks: 1514 + uniqueClicks: 1090 + opens: 10089 + uniqueOpens: 4393 + spamReports: 0 + blocked: 920 + invalid: 2 + unsubscribed: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/statistics/events: + get: + tags: + - Transactional emails + summary: Get all your transactional email activity (unaggregated events) + description: >- + This endpoint will show the aggregated stats for past 30 days by default + if `startDate` and `endDate` OR `days` is not passed. The date range can + not exceed 90 days + operationId: getEmailEventReport + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 5000 + type: integer + format: int64 + default: 2500 + minimum: 0 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date of the report + (YYYY-MM-DD). Must be lower than equal to endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + schema: + type: integer + format: int64 + - name: email + in: query + description: Filter the report for a specific email addresses + schema: + type: string + format: email + - name: event + in: query + description: Filter the report for a specific event type + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - spam + - requests + - opened + - clicks + - invalid + - deferred + - blocked + - unsubscribed + - error + - loadedByProxy + - name: tags + in: query + description: Filter the report for tags (serialized and urlencoded array) + schema: + type: string + - name: messageId + in: query + description: Filter on a specific message id + schema: + type: string + - name: templateId + in: query + description: Filter on a specific template id + schema: + type: integer + format: int64 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Email events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailEventReport' + examples: + response: + value: + events: + - email: john.smith@example.com + date: '2017-03-12T12:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: deferred + reason: Error connection timeout + tag: OrderConfirmation + from: john@example.com + templateId: 4 + - email: john.smith@example.com + date: '2017-03-13T16:30:00.000Z' + messageId: <201798300811.5787683@example.domain.com> + event: delivered + tag: OrderConfirmation + from: john@example.com + templateId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts/{email}: + delete: + tags: + - Transactional emails + summary: Unblock or resubscribe a transactional contact + parameters: + - name: email + in: path + description: contact email (urlencoded) to unblock. + required: true + schema: + type: string + responses: + '204': + description: Contact unblocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedContacts: + get: + tags: + - Transactional emails + summary: Get the list of blocked or unsubscribed transactional contacts + operationId: getTransacBlockedContacts + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till + which you want to fetch the blocked or unsubscribed contacts + schema: + type: string + - name: limit + in: query + description: Number of documents returned per page + schema: + maximum: 100 + type: integer + format: int64 + default: 50 + minimum: 0 + - name: offset + in: query + description: Index of the first document on the page + schema: + type: integer + format: int64 + default: 0 + - name: senders + in: query + description: >- + Comma separated list of emails of the senders from which contacts + are blocked or unsubscribed + style: form + explode: false + schema: + type: array + items: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: List of blocked or unsubscribed transactional contacts + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacBlockedContacts' + examples: + response: + value: + count: 1 + contacts: + - email: abc@xyz.com + senderEmail: ez312@gmal.com + reason: + message: Admin blocked + code: adminBlocked + blockedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains: + get: + tags: + - Transactional emails + summary: Get the list of blocked domains + description: Get the list of blocked domains + operationId: getBlockedDomains + responses: + '200': + description: List of blocked domains + content: + application/json: + schema: + $ref: '#/components/schemas/getBlockedDomains' + examples: + response: + value: + domains: + - example.com + - testdomain.com + post: + tags: + - Transactional emails + summary: Add a new domain to the list of blocked domains + description: Blocks a new domain in order to avoid messages being sent to the same + operationId: blockNewDomain + requestBody: + description: Name of the domain to be blocked + content: + application/json: + schema: + $ref: '#/components/schemas/blockDomain' + required: true + responses: + '201': + description: Domain is successfully blocked + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/blockedDomains/{domain}: + delete: + tags: + - Transactional emails + summary: Unblock an existing domain from the list of blocked domains + description: Unblocks an existing domain from the list of blocked domains + operationId: deleteBlockedDomain + parameters: + - name: domain + description: The name of the domain to be deleted + in: path + required: true + schema: + type: string + responses: + '204': + description: Domain is successfully deleted from the list of blocked domains + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/deleteHardbounces: + post: + tags: + - Transactional emails + summary: Delete hardbounces + description: >- + Delete hardbounces. To use carefully (e.g. in case of temporary ISP + failures) + operationId: deleteHardbounces + requestBody: + description: values to delete hardbounces + content: + application/json: + schema: + $ref: '#/components/schemas/deleteHardbounces' + required: false + responses: + '204': + description: Hardbounces deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/emailStatus/{identifier}: + get: + tags: + - Transactional emails + summary: Fetch scheduled emails by batchId or messageId + description: >- + Fetch scheduled batch of emails by batchId or single scheduled email by + messageId (Can retrieve data upto 30 days old) + operationId: getScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + - name: startDate + description: >- + Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from + which you want to fetch the list. Can be maximum 30 days older tha + current date. + in: query + example: '2022-02-02' + required: false + schema: + type: string + format: date + - name: endDate + description: >- + Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till + which you want to fetch the list. Maximum time period that can be + selected is one month. + in: query + example: '2022-03-02' + required: false + schema: + type: string + format: date + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed. + Not valid when identifier is `messageId`. + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: status + in: query + description: >- + Filter the records by `status` of the scheduled email batch or + message. Not valid when identifier is `messageId`. + required: false + schema: + type: string + enum: + - processed + - inProgress + - queued + - name: limit + description: >- + Number of documents returned per page. Not valid when identifier is + `messageId`. + in: query + required: false + example: 100 + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: >- + Index of the first document on the page. Not valid when identifier + is `messageId`. + in: query + required: false + example: 0 + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: Scheduled email batches + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/getScheduledEmailByBatchId' + - $ref: '#/components/schemas/getScheduledEmailByMessageId' + examples: + batchId: + value: + count: 3 + batches: + - scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + - scheduledAt: '2022-02-25T11:36:43.576000000Z' + createdAt: '2022-02-24T11:36:43.576000000Z' + status: processed + - scheduledAt: '2022-02-26T11:36:43.576000000Z' + createdAt: '2022-02-25T11:36:43.576000000Z' + status: inProgress + messageId: + value: + scheduledAt: '2022-02-28T11:36:43.576000000Z' + createdAt: '2022-02-26T11:36:43.576000000Z' + status: queued + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smtp/email/{identifier}: + delete: + tags: + - Transactional emails + summary: Delete scheduled emails by batchId or messageId + description: >- + Delete scheduled batch of emails by batchId or single scheduled email by + messageId + operationId: deleteScheduledEmailById + parameters: + - name: identifier + description: >- + The `batchId` of scheduled emails batch (Should be a valid UUIDv4) + or the `messageId` of scheduled email. + in: path + required: true + examples: + batchId: + value: 4320f270-a4e3-4a2e-b591-edfe30a5e627 + summary: batchId of scheduled batch + messageId: + value: <202202231031.53307417725@smtp-relay.mailin.fr> + summary: messageId of scheduled email + schema: + type: string + responses: + '204': + description: Scheduled email(s) deleted + content: {} + '400': + description: Invalid parameters passed + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Record(s) for identifier not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts: + get: + tags: + - Contacts + summary: Get all the contacts + operationId: getContacts + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: createdSince + in: query + description: > + Filter (urlencoded) the contacts created after a given UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in + date-time format for accurate result.** + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: segmentId + in: query + description: Id of the segment. **Either listIds or segmentId can be passed.** + schema: + type: integer + format: int64 + - name: listIds + in: query + description: Ids of the list. **Either listIds or segmentId can be passed.** + schema: + type: array + items: + type: integer + format: int64 + responses: + '200': + description: All contacts listed + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: contact1@example.com + id: 247 + emailBlacklisted: true + smsBlacklisted: true + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 58 + attributes: + SMS: '33058407250' + IDENTIFICATION: 1-3RHQ-259 + CIV: MS + LAST_NAME: Brennon + FIRST_NAME: Meg + DOB: '1986-05-02T00:00:00.000Z' + ADDRESS: 1 5th avenue + ZIP_CODE: '44300' + CITY: New-York + ACTION_CODE: 17HH98CH + - email: 33058407248@mailin-sms.com + id: 245 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-01T17:05:03.000Z' + modifiedAt: '2017-05-01T17:05:03.000Z' + listIds: + - 43 + - 61 + - 58 + attributes: + SMS: '33058407248' + IDENTIFICATION: 1-78JS-432 + CIV: MS + LAST_NAME: Press + FIRST_NAME: Sophia + DOB: '1980-09-11T00:00:00.000Z' + ADDRESS: 5 Flower Street + ZIP_CODE: '44119' + CITY: Seattle + ACTION_CODE: 17HU765 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a contact + operationId: createContact + requestBody: + description: Values to create a contact + content: + application/json: + schema: + $ref: '#/components/schemas/createContact' + required: true + responses: + '201': + description: Contact created + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateContactModel' + examples: + response: + value: + id: 21 + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/doubleOptinConfirmation: + post: + tags: + - Contacts + summary: Create Contact via DOI (Double-Opt-In) Flow + operationId: createDoiContact + requestBody: + description: Values to create the Double opt-in (DOI) contact + content: + application/json: + schema: + $ref: '#/components/schemas/createDoiContact' + required: true + responses: + '201': + description: DOI Contact created + content: {} + '204': + description: DOI Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createDoiContact + /contacts/{identifier}: + get: + tags: + - Contacts + summary: Get a contact's details + description: >- + Along with the contact details, this endpoint will show the statistics + of contact for the recent 90 days by default. To fetch the earlier + statistics, please use Get contact campaign stats + ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` + endpoint with the appropriate date ranges. + operationId: getContactInfo + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact OR its SMS attribute value + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. + schema: + type: string + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedContactDetails' + examples: + response: + value: + email: peggy.rain@example.com + id: 42 + emailBlacklisted: false + smsBlacklisted: false + createdAt: '2017-05-02T16:40:31.000Z' + modifiedAt: '2017-05-02T16:40:31.000Z' + attributes: + FIRST_NAME: Peggy + LAST_NAME: Rain + SMS: '3087433387669' + CIV: '1' + DOB: '1986-04-13T00:00:00.000Z' + ADDRESS: 987 5th avenue + ZIP_CODE: '87544' + CITY: New-York + AREA: NY + listIds: + - 40 + statistics: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 68 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a contact + operationId: deleteContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + responses: + '204': + description: Contact deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '405': + description: You're not allowed to delete registered email contact with Brevo + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a contact + operationId: updateContact + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + requestBody: + description: Values to update a contact + content: + application/json: + schema: + $ref: '#/components/schemas/updateContact' + required: true + responses: + '204': + description: Contact updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateContact + /contacts/batch: + post: + tags: + - Contacts + summary: Update multiple contacts + operationId: updateBatchContacts + requestBody: + description: Values to update multiple contacts + content: + application/json: + schema: + $ref: '#/components/schemas/updateBatchContacts' + required: true + responses: + '204': + description: All contacts updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/{identifier}/campaignStats: + get: + tags: + - Contacts + summary: Get email campaigns' statistics for a contact + operationId: getContactStats + parameters: + - name: identifier + in: path + description: Email (urlencoded) OR ID of the contact + required: true + schema: + oneOf: + - type: string + - type: integer + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be lower than equal to + endDate + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + statistic events specific to campaigns. Must be greater than equal + to startDate. Maximum difference between startDate and endDate + should not be greater than 90 days + schema: + type: string + responses: + '200': + description: Contact campaign statistics informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContactCampaignStats' + examples: + response: + value: + messagesSent: + - campaignId: 21 + eventTime: '2016-05-03T20:15:13.000Z' + - campaignId: 42 + eventTime: '2016-10-17T10:30:01.000Z' + - campaignId: 45 + eventTime: '2016-11-09T11:45:02.000Z' + opened: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + - campaignId: 45 + count: 1 + eventTime: '2017-01-30T13:56:40.000Z' + ip: 66.249.93.217 + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: '2016-05-03T21:25:01.000Z' + ip: 66.249.93.118 + url: >- + https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email + delivered: + - campaignId: 21 + count: 2 + eventTime: '2016-05-03T21:24:56.000Z' + ip: 66.249.93.118 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Contact's email not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/attributes: + get: + tags: + - Contacts + summary: List all attributes + operationId: getAttributes + responses: + '200': + description: Attributes listed + content: + application/json: + schema: + $ref: '#/components/schemas/getAttributes' + examples: + response: + value: + attributes: + - name: LASTNAME + category: normal + type: text + - name: FIRSTNAME + category: normal + type: text + - name: DOB + category: normal + type: date + - name: GENDER + category: category + type: text + enumeration: + - value: 1 + label: Men + - value: 2 + label: Women + - value: 3 + label: Kid + /contacts/attributes/{attributeCategory}/{attributeName}: + put: + tags: + - Contacts + summary: Update contact attribute + operationId: updateAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + requestBody: + description: Values to update an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/updateAttribute' + required: true + responses: + '204': + description: Attribute updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateAttribute + post: + tags: + - Contacts + summary: Create contact attribute + operationId: createAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the attribute + required: true + schema: + type: string + requestBody: + description: Values to create an attribute + content: + application/json: + schema: + $ref: '#/components/schemas/createAttribute' + required: true + responses: + '201': + description: Attribute created + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete an attribute + operationId: deleteAttribute + parameters: + - name: attributeCategory + in: path + description: Category of the attribute + required: true + schema: + type: string + enum: + - normal + - transactional + - category + - calculated + - global + - name: attributeName + in: path + description: Name of the existing attribute + required: true + schema: + type: string + responses: + '204': + description: Attribute deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Attribute not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders: + get: + tags: + - Contacts + summary: Get all folders + operationId: getFolders + parameters: + - name: limit + in: query + description: Number of documents per page + required: true + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + required: true + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folders informations + content: + application/json: + schema: + $ref: '#/components/schemas/getFolders' + examples: + response: + value: + folders: + - id: 42 + name: Ninja_Form + totalBlacklisted: 98 + totalSubscribers: 4567 + uniqueSubscribers: 4665 + - id: 29 + name: Prestashop + totalBlacklisted: 10 + totalSubscribers: 6543 + uniqueSubscribers: 6553 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a folder + operationId: createFolder + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: createFolder + /contacts/folders/{folderId}: + get: + tags: + - Contacts + summary: Returns a folder's details + operationId: getFolder + parameters: + - name: folderId + in: path + description: id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Folder details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolder' + examples: + response: + value: + id: 1 + name: Client_Folder + totalBlacklisted: 987 + totalSubscribers: 16778 + uniqueSubscribers: 17765 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a folder + operationId: updateFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + requestBody: + description: Name of the folder + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateFolder' + required: true + responses: + '204': + description: Folder updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateFolder + delete: + tags: + - Contacts + summary: Delete a folder (and all its lists) + operationId: deleteFolder + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Folder deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/folders/{folderId}/lists: + get: + tags: + - Contacts + summary: Get lists in a folder + operationId: getFolderLists + parameters: + - name: folderId + in: path + description: Id of the folder + required: true + schema: + type: integer + format: int64 + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Folder's Lists details + content: + application/json: + schema: + $ref: '#/components/schemas/getFolderLists' + examples: + response: + value: + lists: + - id: 46 + name: Reactiv + totalSubscribers: 7655 + totalBlacklisted: 0 + uniqueSubscribers: 7655 + - id: 41 + name: NY_Area + totalSubscribers: 3654 + totalBlacklisted: 23 + uniqueSubscribers: 3677 + - id: 22 + name: VIP_Customer + totalSubscribers: 8753 + totalBlacklisted: 72 + uniqueSubscribers: 8825 + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Folder ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists: + get: + tags: + - Contacts + summary: Get all the lists + operationId: getLists + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Lists informations + content: + application/json: + schema: + $ref: '#/components/schemas/getLists' + examples: + response: + value: + lists: + - id: 53 + name: Spanish_Speakers + totalSubscribers: 5432 + totalBlacklisted: 65 + uniqueSubscribers: 5497 + folderId: 1 + - id: 50 + name: Other + totalSubscribers: 10976 + totalBlacklisted: 765 + uniqueSubscribers: 11741 + folderId: 2 + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Contacts + summary: Create a list + operationId: createList + requestBody: + description: Values to create a list + content: + application/json: + schema: + $ref: '#/components/schemas/createList' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}: + get: + tags: + - Contacts + summary: Get a list's details + operationId: getList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Ending (urlencoded) UTC date-time + (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for + a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email + campaigns for a specific list id. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + responses: + '200': + description: List informations + content: + application/json: + schema: + $ref: '#/components/schemas/getExtendedList' + examples: + response: + value: + id: 12 + name: Newsletter_Weekly + startDate: '2023-09-30T00:00:00.000Z' + endDate: '2023-03-31T00:00:00.000Z' + totalSubscribers: 6533 + totalBlacklisted: 63 + uniqueSubscribers: 6596 + folderId: 1 + createdAt: '2016-02-26T11:56:08.000Z' + campaignStats: + - campaignId: 15 + stats: + uniqueClicks: 701 + clickers: 789 + complaints: 0 + delivered: 6632 + sent: 6645 + softBounces: 34 + hardBounces: 4 + uniqueViews: 3442 + unsubscriptions: 4 + viewed: 4322 + deferred: 0 + - campaignId: 45 + stats: + uniqueClicks: 654 + clickers: 788 + complaints: 1 + delivered: 4078 + sent: 4334 + softBounces: 18 + hardBounces: 2 + uniqueViews: 987 + unsubscriptions: 4 + viewed: 1555 + deferred: 0 + dynamicList: false + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Contacts + summary: Update a list + operationId: updateList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a list + content: + application/json: + schema: + $ref: '#/components/schemas/updateList' + required: true + responses: + '204': + description: List updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Contacts + summary: Delete a list + operationId: deleteList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: List deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/segments: + get: + tags: + - Contacts + summary: Get all the segments + operationId: getSegments + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Segments informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSegments' + examples: + response: + value: + segments: + - id: 53 + segmentName: Segment1 + categoryName: Name1 + updatedAt: '2017-03-12T12:30:00.000Z' + - id: 50 + segmentName: Segment2 + categoryName: Name2 + updatedAt: '2017-03-12T12:30:00.000Z' + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts: + get: + tags: + - Contacts + summary: Get contacts in a list + operationId: getContactsFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + - name: modifiedSince + in: query + description: > + Filter (urlencoded) the contacts modified after a given UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone + in date-time format for accurate result.** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 500 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Contact informations + content: + application/json: + schema: + $ref: '#/components/schemas/getContacts' + examples: + response: + value: + contacts: + - email: alex.pain@example.com + id: 45 + emailBlacklisted: false + smsBlacklisted: true + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + - 2 + attributes: + LASTNAME: Pain + FIRSTNAME: Alex + DOB: '2010-12-31T00:00:00.000Z' + GENDER: Kid + - email: john.smith@example.com + id: 32 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Smith + FIRSTNAME: John + DOB: '1986-06-21T00:00:00.000Z' + GENDER: Men + - email: helen.rose@example.com + id: 65 + emailBlacklisted: true + smsBlacklisted: false + createdAt: '2017-05-12T12:30:00.000Z' + modifiedAt: '2017-05-12T12:30:00.000Z' + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + attributes: + LASTNAME: Rose + FIRSTNAME: Helen + DOB: '1988-11-02T00:00:00.000Z' + GENDER: Women + SMS: '3375599887766' + count: 17655 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/add: + post: + tags: + - Contacts + summary: Add existing contacts to a list + operationId: addContactToList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails addresses OR IDs of the contacts + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/addContactToListByEmails' + - $ref: '#/components/schemas/addContactToListByIDs' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + required: true + responses: + '201': + description: >- + All contacts have been added successfully to the list with details + of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/lists/{listId}/contacts/remove: + post: + tags: + - Contacts + summary: Delete a contact from a list + operationId: removeContactFromList + parameters: + - name: listId + in: path + description: Id of the list + required: true + schema: + type: integer + format: int64 + requestBody: + description: Emails adresses OR IDs of the contacts OR 'all' true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/removeContactFromListByEmails' + - $ref: '#/components/schemas/removeContactFromListByIDs' + - $ref: '#/components/schemas/removeContactFromListByAll' + examples: + emailsArray: + summary: Passing emails array + value: + emails: + - jeff32@example.com + - jim56@example.com + idsArray: + summary: Passing ids array + value: + ids: + - 1 + - 2 + allTrue: + summary: Passing 'all' true + value: + all: true + required: true + responses: + '201': + description: >- + All contacts have been removed successfully from the list with + details of failed ones + content: + application/json: + schema: + $ref: '#/components/schemas/postContactInfo' + examples: + emailsArray: + summary: Response example when emails array is passed + value: + success: + - jeff32@example.com + - jim56@example.com + failure: + - david@example.com + idsArray: + summary: Response example when ids array is paased + value: + success: + - 1 + - 2 + failure: + - 5 + allTrue: + summary: Response example when 'all' is passed as true + value: + total: 23 + processId: 5 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: List ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: contactEmails + /contacts/export: + post: + tags: + - Contacts + summary: Export contacts + description: >- + 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. + operationId: requestContactExport + requestBody: + description: Values to request a contact export + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactExport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /contacts/import: + post: + tags: + - Contacts + summary: Import contacts + description: > + It returns the background process ID which on completion calls + + the notify URL that you have set in the input. + + + **Note**: + + - Any contact attribute that doesn't exist in your account will be + ignored at import end. + operationId: importContacts + requestBody: + description: >- + Values to import contacts in Brevo. To know more about the expected + format, please have a look at + ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + content: + application/json: + schema: + $ref: '#/components/schemas/requestContactImport' + required: true + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns: + get: + tags: + - SMS Campaigns + summary: Returns the information for all your created SMS campaigns + operationId: getSmsCampaigns + parameters: + - name: status + in: query + description: Status of campaign. + schema: + type: string + enum: + - suspended + - archive + - sent + - queued + - draft + - inProcess + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms + campaigns. **Prefer to pass your timezone in date-time format for + accurate result** ( only available if either 'status' not passed and + if passed is set to 'sent' ) + schema: + type: string + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 1000 + minimum: 0 + type: integer + format: int64 + default: 500 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: SMS campaigns informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaigns' + examples: + response: + value: + campaigns: + - id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + - id: 10 + name: SUMMER SALE + status: draft + content: >- + Summer Sale is starting tomorrow. Get extra 10% with + this code:SUM17 + scheduledAt: '2017-08-04T12:30:00.000Z' + testSent: false + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + sentDate: '2017-06-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + count: 12 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - SMS Campaigns + summary: Creates an SMS campaign + operationId: createSmsCampaign + requestBody: + description: Values to create an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createSmsCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}: + get: + tags: + - SMS Campaigns + summary: Get an SMS campaign + operationId: getSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: SMS campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsCampaign' + examples: + response: + value: + id: 2 + name: PROMO CODE + status: sent + content: Visit our Store and get some discount ! + scheduledAt: '2017-06-01T12:30:00.000Z' + testSent: true + sender: MyCompany + createdAt: '2017-06-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - SMS Campaigns + summary: Update an SMS campaign + operationId: updateSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update an SMS Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateSmsCampaign' + required: true + responses: + '204': + description: SMS campaign updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - SMS Campaigns + summary: Delete an SMS campaign + operationId: deleteSmsCampaign + parameters: + - name: campaignId + in: path + description: id of the SMS campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/sendNow: + post: + tags: + - SMS Campaigns + summary: Send your SMS campaign immediately + operationId: sendSmsCampaignNow + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: SMS campaign has been scheduled + content: {} + '400': + description: SMS Campaign could not be sent + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your campaign. Please update + your plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/status: + put: + tags: + - SMS Campaigns + summary: Update a campaign's status + operationId: updateSmsCampaignStatus + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Status of the campaign. + content: + application/json: + schema: + $ref: '#/components/schemas/updateCampaignStatus' + required: true + responses: + '204': + description: The campaign status has been updated successfully + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: status + /smsCampaigns/{campaignId}/sendTest: + post: + tags: + - SMS Campaigns + summary: Send a test SMS campaign + operationId: sendTestSms + parameters: + - name: campaignId + in: path + description: Id of the SMS campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: > + 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** + content: + application/json: + schema: + $ref: '#/components/schemas/sendTestSms' + required: true + responses: + '204': + description: Test SMS has been sent successfully to the recipient + content: {} + '400': + description: Test SMS could not be sent to the following email addresses + content: + application/json: + schema: + $ref: '#/components/schemas/postSendSmsTestFailed' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /smsCampaigns/{campaignId}/exportRecipients: + post: + tags: + - SMS Campaigns + summary: Export an SMS campaign's recipients + description: >- + It returns the background process ID which on completion calls the + notify URL that you have set in the input. + operationId: requestSmsRecipientExport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to send for a recipient export request + content: + application/json: + schema: + $ref: '#/components/schemas/requestSmsRecipientExport' + required: false + responses: + '202': + $ref: '#/components/responses/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: recipientExport + /smsCampaigns/{campaignId}/sendReport: + post: + tags: + - SMS Campaigns + summary: Send an SMS campaign's report + description: >- + Send report of Sent and Archived campaign, to the specified email + addresses, with respective data and a pdf attachment in detail. + operationId: sendSmsReport + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values for send a report + content: + application/json: + schema: + $ref: '#/components/schemas/sendReport' + required: true + responses: + '204': + description: Report has been successfully sent to the defined recipients + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/sms: + post: + tags: + - Transactional SMS + summary: Send SMS message to a mobile number + operationId: sendTransacSms + requestBody: + description: Values to send a transactional SMS + content: + application/json: + schema: + $ref: '#/components/schemas/sendTransacSms' + required: true + responses: + '201': + description: SMS has been sent successfully to the recipient + content: + application/json: + schema: + $ref: '#/components/schemas/sendSms' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '402': + description: >- + You don't have enough credit to send your SMS. Please update your + plan + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sendTransacSms + /transactionalSMS/statistics/aggregatedReport: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated over a period of time + operationId: getTransacAggregatedSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with startDate and endDate** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacAggregatedSmsReport' + examples: + response: + value: + range: 2015-05-22|2017-11-29 + requests: 54 + delivered: 16 + hardBounces: 5 + softBounces: 26 + blocked: 4 + unsubscribed: 10 + replied: 8 + accepted: 6 + rejected: 14 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/reports: + get: + tags: + - Transactional SMS + summary: Get your SMS activity aggregated per day + operationId: getTransacSmsReport + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: tag + in: query + description: Filter on a tag + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Aggregated SMS report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getTransacSmsReport' + examples: + response: + value: + reports: + - date: '2017-04-30T00:00:00.000Z' + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + blocked: 1026 + unsubscribed: 720 + replied: 5091 + accepted: 2318 + rejected: 0 + - date: '2017-05-01T00:00:00.000Z' + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + blocked: 1514 + unsubscribed: 1090 + replied: 10089 + accepted: 4393 + rejected: 0 + - date: '2017-05-02T00:00:00.000Z' + requests: 14321 + delivered: 13427 + hardBounces: 16 + softBounces: 176 + blocked: 1646 + unsubscribed: 1170 + replied: 11563 + accepted: 4689 + rejected: 0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /transactionalSMS/statistics/events: + get: + tags: + - Transactional SMS + summary: Get all your SMS activity (unaggregated events) + operationId: getSmsEvents + parameters: + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: startDate + in: query + description: > + **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the + report + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the + report + schema: + type: string + - name: offset + in: query + description: Index of the first document of the page + schema: + type: integer + format: int64 + default: 0 + - name: days + in: query + description: > + Number of days in the past including today (positive integer). **Not + compatible with 'startDate' and 'endDate'** + schema: + type: integer + format: int64 + - name: phoneNumber + in: query + description: Filter the report for a specific phone number + schema: + type: string + - name: event + in: query + description: Filter the report for specific events + schema: + type: string + enum: + - bounces + - hardBounces + - softBounces + - delivered + - sent + - accepted + - unsubscription + - replies + - blocked + - rejected + - name: tags + in: query + description: >- + Filter the report for specific tags passed as a serialized + urlencoded array + schema: + type: string + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: Sms events report informations + content: + application/json: + schema: + $ref: '#/components/schemas/getSmsEventReport' + examples: + response: + value: + events: + - phoneNumber: '00911059469013' + date: '2015-05-20T12:30:00.000Z' + messageId: '1473139351170140' + event: sent + reason: Recipient is currently unreachable + tag: cabWaiting + - phoneNumber: '00911059469013' + date: '2015-05-20T16:30:00.000Z' + messageId: '1473139351170140' + event: delivered + reason: Recipient is currently unreachable + tag: cabRequest + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/{campaignId}: + get: + tags: + - WhatsApp Campaigns + summary: Get a WhatsApp campaign + operationId: getWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: Id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Get WhatsApp campaign information on the basis of campaignId + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaignOverview' + examples: + response: + value: + id: 1672035851100690 + campaignName: Test WhatsApp Campaign + campaignStatus: sent + scheduledAt: '2022-12-26T09:50:00.000Z' + senderNumber: 9368207029 + recipients: + type: list + includedLists: + - 22 + excludedLists: + - 45 + template: + name: official_campaign8 + category: MARKETING + language: en + contains_button: true + display_header: false + components: + - type: BODY + text: making it look like readable English. + - type: BUTTONS + buttons: + - type: URL + text: vLorem Ipsum is simply du + url: app.brevo + - type: PHONE_NUMBER + text: Lorem Ipsum is simply dum + phone_number: '+918800613137' + header_variables: + - name: FIRSTNAME + default: INVALID HEADER + index: 1 + datatype: text + header_type: text + body_variable: [] + button_type: CALL_TO_ACTION + header_footer: true + stats: + sent: 3, + delivered: 3, + read: 2, + unsubscribe: 0, + notSent: 4 + createdAt: '2022-12-26T06:50:00.000Z' + modifiedAt: '2022-12-26T08:50:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - WhatsApp Campaigns + summary: Delete a WhatsApp campaign + operationId: deleteWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Campaign Id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - WhatsApp Campaigns + summary: Update a WhatsApp campaign + operationId: updateWhatsAppCampaign + parameters: + - name: campaignId + in: path + description: id of the campaign + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/updateWhatsAppCampaign' + required: true + responses: + '204': + description: WhatsApp campaign has been deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template-list: + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp templates + operationId: getWhatsAppTemplates + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates + created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + - name: source + in: query + description: source of the template + required: false + schema: + type: string + enum: + - Automation + - Conversations + responses: + '200': + description: WhatsApp templates informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappTemplates' + examples: + response: + value: + count: 2 + templates: + - id: 235 + name: campaign_22 + type: whatsapp + status: approved + language: en + category: MARKETING + errorReason: NONE + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + - id: 124 + name: test-template + type: whatsapp + status: draft + language: '' + category: MARKETING + errorReason: NONE + createdAt: 2017-0 + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns: + post: + tags: + - WhatsApp Campaigns + summary: Create and Send a WhatsApp campaign + operationId: createWhatsAppCampaign + requestBody: + description: Values to create a WhatsApp Campaign + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppCampaign' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - WhatsApp Campaigns + summary: Return all your created WhatsApp campaigns + operationId: getWhatsAppCampaigns + parameters: + - name: startDate + in: query + description: > + **Mandatory if endDate is used**. Starting (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: endDate + in: query + description: > + **Mandatory if startDate is used**. Ending (urlencoded) UTC + date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp + campaigns created. + + **Prefer to pass your timezone in date-time format for accurate + result** + schema: + type: string + - name: limit + in: query + description: Number of documents per page + schema: + maximum: 100 + minimum: 0 + type: integer + format: int64 + default: 50 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + modification. Default order is **descending** if `sort` is not + passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: WhatsApp campaigns information + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsappCampaigns' + examples: + response: + value: + count: 23 + campaigns: + - id: 1672035851100690 + campaignName: campaign_22 + campaignStatus: sent + templateId: 637660278078655 + scheduledAt: '2022-12-27T09:50:00.000Z' + errorReason: '' + invalidatedContacts: 0 + stats: + sent: 3 + delivered: 3 + read: 2 + unsubscribe: 0 + notSent: 4 + readPercentage: 28.57 + createdAt: '2017-05-01T12:30:00.000Z' + modifiedAt: '2017-05-01T12:30:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template: + post: + tags: + - WhatsApp Campaigns + summary: Create a WhatsApp template + operationId: createWhatsAppTemplate + requestBody: + description: Values to create a WhatsApp template + content: + application/json: + schema: + $ref: '#/components/schemas/createWhatsAppTemplate' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/template/approval/{templateId}: + post: + tags: + - WhatsApp Campaigns + summary: Send your WhatsApp template for approval + operationId: sendWhatsAppTemplateApproval + parameters: + - name: templateId + in: path + description: id of the template + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: WhatsApp template sent for approval + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /whatsappCampaigns/config: + get: + tags: + - WhatsApp Campaigns + summary: Get your WhatsApp API account information + operationId: getWhatsAppConfig + responses: + '200': + description: Get all the information of your WhatsApp API account + content: + application/json: + schema: + $ref: '#/components/schemas/getWhatsAppConfig' + examples: + response: + value: + whatsappBusinessAccountID: 105569359072383 + sendingLimit: TIER_1K + phoneNumberQuality: GREEN + whatsappBusinessAccountStatus: APPROVED + businessStatus: verified + phoneNumberNameStatus: APPROVED + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders: + get: + tags: + - Senders + summary: Get the list of all your senders + operationId: getSenders + parameters: + - name: ip + in: query + description: > + Filter your senders for a specific ip. **Available for dedicated IP + usage only** + schema: + type: string + - name: domain + in: query + description: Filter your senders for a specific domain + schema: + type: string + responses: + '200': + description: list of senders + content: + application/json: + schema: + $ref: '#/components/schemas/getSendersList' + examples: + response: + value: + senders: + - id: 1 + name: Marketing + email: marketing@mycompany.com + active: true + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 100 + - id: 2 + name: Newsletter + email: newsletter@mycompany.com + active: false + ips: + - ip: 123.98.689.7 + domain: mycompany.com + weight: 50 + - ip: 123.98.643.2 + domain: news.mycompany.com + weight: 50 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Senders + summary: Create a new sender + operationId: createSender + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/createSender' + required: false + responses: + '201': + description: sender created + content: + application/json: + schema: + $ref: '#/components/schemas/createSenderModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}: + put: + tags: + - Senders + summary: Update a sender + operationId: updateSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: sender's name + content: + application/json: + schema: + $ref: '#/components/schemas/updateSender' + required: false + responses: + '204': + description: sender updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + delete: + tags: + - Senders + summary: Delete a sender + operationId: deleteSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: sender deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/{senderId}/validate: + put: + tags: + - Senders + summary: Validate Sender using OTP + operationId: validateSenderByOTP + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + requestBody: + description: otp + content: + application/json: + schema: + $ref: '#/components/schemas/otp' + required: false + responses: + '204': + description: Sender verified + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: sender + /senders/{senderId}/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for a sender + operationId: getIpsFromSender + parameters: + - name: senderId + in: path + description: Id of the sender + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIpsFromSender' + examples: + response: + value: + ips: + - id: 3 + ip: 123.65.8.22 + domain: mailing.myshop.dom + weight: 40 + - id: 5 + ip: 123.43.21.3 + domain: newsletter.myshop.dom + weight: 60 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Sender ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/ips: + get: + tags: + - Senders + summary: Get all the dedicated IPs for your account + operationId: getIps + responses: + '200': + description: list of dedicated IPs + content: + application/json: + schema: + $ref: '#/components/schemas/getIps' + examples: + response: + value: + ips: + - id: 3 + ip: 67.145.89.3 + active: true + domain: mailing.myshop.com + - id: 5 + ip: 76.76.125.9 + active: true + domain: newsletter.myshop.com + - id: 6 + ip: 123.65.8.22 + active: false + domain: notifications.myshop.com + /senders/domains: + get: + tags: + - Domains + summary: Get the list of all your domains + operationId: getDomains + responses: + '200': + description: list of domains + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainsList' + examples: + response: + value: + domains: + - id: 1 + domain_name: mycompany.com + authenticated: true + verified: true + ip: 123.98.689.7 + - id: 2 + domain_name: myexample.com + authenticated: false + verified: true + ip: null + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Domains + summary: Create a new domain + operationId: createDomain + requestBody: + description: domain's name + content: + application/json: + schema: + $ref: '#/components/schemas/createDomain' + required: false + responses: + '200': + description: domain created + content: + application/json: + schema: + $ref: '#/components/schemas/createDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: domain + /senders/domains/{domainName}: + delete: + tags: + - Domains + summary: Delete a domain + operationId: deleteDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + get: + tags: + - Domains + summary: Validate domain configuration + operationId: getDomainConfiguration + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain configuration + content: + application/json: + schema: + $ref: '#/components/schemas/getDomainConfigurationModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /senders/domains/{domainName}/authenticate: + put: + tags: + - Domains + summary: Authenticate a domain + operationId: authenticateDomain + parameters: + - name: domainName + in: path + description: Domain name + required: true + schema: + type: string + responses: + '200': + description: domain authenticated + content: + application/json: + schema: + $ref: '#/components/schemas/authenticateDomainModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Domain does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks: + get: + tags: + - Webhooks + summary: Get all webhooks + operationId: getWebhooks + parameters: + - name: type + in: query + description: Filter on webhook type + schema: + type: string + default: transactional + enum: + - marketing + - transactional + - inbound + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of webhook + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: Webhooks informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhooks' + examples: + response: + value: + webhooks: + - url: >- + https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1 + id: 9864 + description: Webhook triggered on campaign openings + events: + - opened + type: transac + createdAt: '2016-07-18T12:30:09.000Z' + modifiedAt: '2016-07-18T16:00:50.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + - url: http://exmaple.domain.com/15kxxxxxn1 + id: 22770 + description: Webhook triggered on campaign hard bounces + events: + - hardBounces + type: marketing + createdAt: '2017-02-20T14:30:00.000Z' + modifiedAt: '2017-02-20T19:00:00.000Z' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Webhooks + summary: Create a webhook + operationId: createWebhook + requestBody: + description: Values to create a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/createWebhook' + required: true + responses: + '201': + $ref: '#/components/responses/createModel' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/{webhookId}: + get: + tags: + - Webhooks + summary: Get a webhook details + operationId: getWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Webhook informations + content: + application/json: + schema: + $ref: '#/components/schemas/getWebhook' + examples: + response: + value: + url: http://example.domain.com/1brxxxxxx5p1 + id: 7287 + description: >- + Webhook triggered on campaign openings and addition of + lists + events: + - listAdditions + - opened + type: marketing + createdAt: '2016-06-07T09:10:10.000Z' + modifiedAt: '2016-06-08T11:30:00.000Z' + batched: true + auth: + type: bearer + token: test-auth-token1234 + headers: + - key: cf-secret + value: test-header-value + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Webhooks + summary: Update a webhook + operationId: updateWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + requestBody: + description: Values to update a webhook + content: + application/json: + schema: + $ref: '#/components/schemas/updateWebhook' + required: true + responses: + '204': + description: Webhook updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: updateWebhook + delete: + tags: + - Webhooks + summary: Delete a webhook + operationId: deleteWebhook + parameters: + - name: webhookId + in: path + description: Id of the webhook + required: true + schema: + type: integer + format: int64 + responses: + '204': + description: Webhook deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Webhook ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /webhooks/export: + post: + tags: + - Webhooks + summary: Export all webhook events + description: >- + This endpoint will submit a request to get the history of webhooks in + the CSV file. The link to download the CSV file will be sent to the + webhook that was provided in the notifyURL. + operationId: exportWebhooksHistory + requestBody: + description: Values to submit for webhooks history + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/exportWebhooksHistory' + required: true + responses: + '202': + description: Request accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children: + get: + tags: + - Reseller + summary: Get the list of all children accounts + operationId: getResellerChilds + parameters: + - name: limit + in: query + description: Number of documents for child accounts information per page + schema: + maximum: 20 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Index of the first document in the page + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of children + content: + application/json: + schema: + $ref: '#/components/schemas/getChildrenList' + examples: + response: + value: + children: + - email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187588 + - email: alex.pain@example.com + firstName: Alex + lastName: Pain + companyName: MyStore + credits: + emailCredits: 2000 + smsCredits: 0 + statistics: + previousMonthTotalSent: 654 + currentMonthTotalSent: 300 + totalSent: 6553 + password: abC0xxxxx64kL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 187669 + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Creates a reseller child + operationId: createResellerChild + requestBody: + description: reseller child to add + content: + application/json: + schema: + $ref: '#/components/schemas/createChild' + required: false + responses: + '201': + description: child created + content: + application/json: + schema: + $ref: '#/components/schemas/createReseller' + examples: + response: + value: + authKey: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + id: 1234567 + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}: + get: + tags: + - Reseller + summary: Get a child account's details + operationId: getChildInfo + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Information for the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildInfo' + examples: + response: + value: + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyCompany + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: abC0xxxxx3jkL + ips: + - 176.2.39.4 + - 231.43.21.7 + apiKeys: + v2: + - name: N˚2 + key: nOpxxxxxy7z + v3: + - name: N˚3 + key: xkeysib-21881axxxxxcc92e04-mIrexxxx7z + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + put: + tags: + - Reseller + summary: Update info of reseller's child based on the child identifier supplied + operationId: updateResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child profile + content: + application/json: + schema: + $ref: '#/components/schemas/updateChild' + required: true + responses: + '204': + description: reseller's child updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: resellerChild + delete: + tags: + - Reseller + summary: Delete a single reseller child based on the child identifier supplied + operationId: deleteResellerChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or child id of reseller's child + required: true + schema: + type: string + responses: + '204': + description: child deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountStatus: + put: + tags: + - Reseller + summary: >- + Update info of reseller's child account status based on the identifier + supplied + operationId: updateChildAccountStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: values to update in child account status + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildAccountStatus' + required: true + responses: + '204': + description: reseller's child account status updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/accountCreationStatus: + get: + tags: + - Reseller + summary: >- + Get the status of a reseller's child account creation, whether it is + successfully created (exists) or not based on the childIdentifier + supplied + operationId: getChildAccountCreationStatus + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: status of reseller's child account + content: + application/json: + schema: + $ref: '#/components/schemas/getChildAccountCreationStatus' + examples: + response: + value: + childAccountCreated: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/ips/associate: + post: + tags: + - Reseller + summary: Associate a dedicated IP to the child + operationId: associateIpToChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to associate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is associated to the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/ips/dissociate: + post: + tags: + - Reseller + summary: Dissociate a dedicated IP to the child + operationId: dissociateIpFromChild + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: IP to dissociate + content: + application/json: + schema: + $ref: '#/components/schemas/manageIp' + required: true + responses: + '204': + description: Dedicated IP is dissociated from the child + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: ip + /reseller/children/{childIdentifier}/credits/add: + post: + tags: + - Reseller + summary: Add Email and/or SMS credits to a specific child account + operationId: addCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: Values to post to add credit to a specific child account + content: + application/json: + schema: + $ref: '#/components/schemas/addCredits' + required: true + responses: + '200': + description: Credits added + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/credits/remove: + post: + tags: + - Reseller + summary: Remove Email and/or SMS credits from a specific child account + operationId: removeCredits + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Values to post to remove email or SMS credits from a specific child + account + content: + application/json: + schema: + $ref: '#/components/schemas/removeCredits' + required: true + responses: + '200': + description: Credits removed + content: + application/json: + schema: + $ref: '#/components/schemas/remainingCreditModel' + examples: + response: + value: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + x-codegen-request-body-name: removeCredits + /reseller/children/{childIdentifier}/domains: + get: + tags: + - Reseller + summary: Get all sender domains for a specific child account + operationId: getChildDomains + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Sender domains of the child + content: + application/json: + schema: + $ref: '#/components/schemas/getChildDomains' + examples: + response: + value: + - domain: mycustomdomain.com + active: true + - domain: mynewdomain.com + active: true + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + post: + tags: + - Reseller + summary: Create a domain for a child account + operationId: createChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + requestBody: + description: >- + Sender domain to add for a specific child account. This will not be + displayed to the parent account. + content: + application/json: + schema: + $ref: '#/components/schemas/addChildDomain' + required: true + responses: + '201': + description: Domain added + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/domains/{domainName}: + put: + tags: + - Reseller + summary: >- + Update the sender domain of reseller's child based on the + childIdentifier and domainName passed + operationId: updateChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be updated + required: true + schema: + type: string + requestBody: + description: value to update for sender domain + content: + application/json: + schema: + $ref: '#/components/schemas/updateChildDomain' + required: true + responses: + '204': + description: reseller's child domain updated + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + delete: + tags: + - Reseller + summary: >- + Delete the sender domain of the reseller child based on the + childIdentifier and domainName passed + operationId: deleteChildDomain + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + - name: domainName + in: path + description: Pass the existing domain that needs to be deleted + required: true + schema: + type: string + responses: + '204': + description: child domain deleted + content: {} + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /reseller/children/{childIdentifier}/auth: + get: + tags: + - Reseller + summary: Get session token to access Brevo (SSO) + description: >- + 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 => + https:/email.mydomain.com/login/sso?token=[token] + operationId: getSsoToken + parameters: + - name: childIdentifier + in: path + description: Either auth key or id of reseller's child + required: true + schema: + type: string + responses: + '200': + description: Session token + content: + application/json: + schema: + $ref: '#/components/schemas/getSsoToken' + examples: + response: + value: + token: 5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '403': + description: Current account is not a reseller + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Child auth key or child id not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /account: + get: + tags: + - Account + summary: Get your account information, plan and credits details + operationId: getAccount + responses: + '200': + description: account informations + content: + application/json: + schema: + $ref: '#/components/schemas/getAccount' + examples: + response: + value: + plan: + - type: payAsYouGo + credits: 5000 + creditsType: sendLimit + - type: subscription + credits: 39983 + creditsType: sendLimit + startDate: '2017-03-11T00:00:00.000Z' + endDate: '2017-04-11T00:00:00.000Z' + - type: sms + credits: 999.5360000000001 + creditsType: sendLimit + relay: + enabled: true + data: + userName: john.smith@example.com + relay: smtp-relay.domain.com + port: 587 + marketingAutomation: + key: kzfr5xxxxxxttuyo1 + enabled: true + email: john.smith@example.com + firstName: John + lastName: Smith + companyName: MyShop + address: + city: New-York + street: 1677B 8th Avenue + zipCode: '7665' + country: USA + /organization/activities: + get: + tags: + - Account + - Master account + summary: Get user activity logs + operationId: getAccountActivity + parameters: + - name: startDate + description: >- + Mandatory if endDate is used. Enter start date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. Additionally, you can + retrieve activity logs from the past 12 months from the date of your + search. + in: query + required: false + schema: + type: string + - name: endDate + description: >- + Mandatory if startDate is used. Enter end date in UTC date + (YYYY-MM-DD) format to filter the activity in your account. Maximum + time period that can be selected is one month. + in: query + required: false + schema: + type: string + - name: limit + description: Number of documents per page + in: query + required: false + schema: + type: integer + format: int64 + default: 10 + maximum: 100 + minimum: 1 + - name: offset + description: Index of the first document in the page. + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: list of user activity logs + content: + application/json: + schema: + $ref: '#/components/schemas/getAccountActivity' + examples: + response: + value: + logs: + - action: login-success + date: '2023-03-16T11:19:23.000Z' + user_email: test@mycompany.com + user_ip: 192.158.1.34 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + - action: update-profile + date: '2023-03-15T11:19:23.000Z' + user_email: test@myexample.com + user_ip: 192.158.1.38 + user_agent: >- + Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; + en-us) + count: 2 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/invited/users: + get: + tags: + - User + summary: Get the list of all your users + operationId: getInvitedUsersList + responses: + '200': + description: list of all your users + content: + application/json: + schema: + $ref: '#/components/schemas/getInvitedUsersList' + examples: + response: + value: + users: + - email: owner@company.com + is_owner: true + status: active + feature_access: + marketing: owner + conversations: owner + crm: owner + - email: pendingInvitedUser@company.com + is_owner: false + status: pending + feature_access: + marketing: custom + conversations: none + crm: full + - email: connectedInvitedUser@company.com + is_owner: false + status: active + feature_access: + marketing: none + conversations: full + crm: none + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/{email}/permissions: + get: + tags: + - User + summary: Check user permission + operationId: getUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: list of all the user's permissions + content: + application/json: + schema: + $ref: '#/components/schemas/getUserPermission' + examples: + response: + value: + email: invitedUser@company.com + status: active + privileges: + - feature: Email campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Templates + permissions: + - Create / edit / delete + - Activate / deactivate + - feature: SMS campaign + permissions: + - Create / edit / delete + - Send / schedule / suspend + - feature: Facebook Ads + permissions: + - Schedule / pause + - feature: Landing pages + permissions: + - All + - feature: Workflows + permissions: + - Create / edit / delete + - Activate / deactivate / Pause + - feature: Contacts + permissions: + - View + - Contact forms + - feature: SMTP & API + permissions: + - SMTP + - API Keys + - Authorized IPs + - feature: User management + permissions: + - None + - feature: Sales Platform + permissions: + - Manage Owned Deals / Tasks / Companies + - Manage Others Deals / Tasks / Companies + - Reports + - Settings + - feature: Conversations + permissions: + - None + - feature: Senders, Domains & Dedicated IPs + permissions: + - Senders management + - Domains management + - Dedicated IPs management + - feature: Push + permissions: + - View + - Create / edit / delete + - Send + - Settings + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/revoke/{email}: + put: + tags: + - User + summary: Revoke user permission + operationId: putRevokeUserPermission + parameters: + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Credit note exists + content: + application/json: + schema: + $ref: '#/components/schemas/putRevokeUserPermissionResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/{action}/{email}: + put: + tags: + - User + summary: Resend / Cancel invitation + operationId: putresendcancelinvitation + parameters: + - name: action + description: action + in: path + required: true + schema: + type: string + enum: + - resend + - cancel + - name: email + description: Email of the invited user. + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/putresendcancelinvitationResponse' + '403': + description: Unauthorized access + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/invitation/send: + post: + tags: + - User + summary: Send invitation to user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - If `all_features_access: false` then only privileges are required + otherwise if `true` then it's assumed that all permissions will be there + for the invited user. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: inviteuser + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /organization/user/update/permissions: + post: + tags: + - User + summary: Update permission for a user + description: > + `Feature` - A Feature represents a specific functionality like Email + campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a + user, determine which feature you want to manage access to. You must + specify the feature accurately to avoid errors. + + + `Permission` - A Permission defines the level of access or control a + user has over a specific feature. While inviting user, decide on the + permission level required for the selected feature. Make sure the chosen + permission is related to the selected feature. + + + Features and their respective permissions are as below: + + + - `email_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `sms_campaigns`: + - "create_edit_delete" + - "send_schedule_suspend" + - `contacts`: + - "view" + - "create_edit_delete" + - "import" + - "export" + - "list_and_attributes" + - "forms" + - `templates`: + - "create_edit_delete" + - "activate_deactivate" + - `workflows`: + - "create_edit_delete" + - "activate_deactivate_pause" + - "settings" + - `facebook_ads`: + - "create_edit_delete" + - "schedule_pause" + - `landing_pages`: + - "all" + - `transactional_emails`: + - "settings" + - "logs" + - `smtp_api`: + - "smtp" + - "api_keys" + - "authorized_ips" + - `user_management`: + - "all" + - `sales_platform`: + - "manage_owned_deals_tasks_companies" + - "manage_others_deals_tasks_companies" + - "reports" + - "settings" + - `phone`: + - "all" + - `conversations`: + - "access" + - "assign" + - "configure" + - `senders_domains_dedicated_ips`: + - "senders_management" + - "domains_management" + - "dedicated_ips_management" + - `push_notifications`: + - "view" + - "create_edit_delete" + - "send" + - "settings" + + **Note**: + + - The privileges array remains the same as in the send invitation; the + user simply needs to provide the permissions that need to be updated. + + - The availability of feature and its permission depends on your current + plan. Please select the features and permissions accordingly. + operationId: EditUserPermission + requestBody: + description: Values to create an invitation + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/inviteuser' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/updateUserResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes: + get: + tags: + - Process + summary: Return all the processes for your account + operationId: getProcesses + parameters: + - name: limit + in: query + description: Number limitation for the result returned + schema: + maximum: 50 + minimum: 0 + type: integer + format: int64 + default: 10 + - name: offset + in: query + description: Beginning point in the list to retrieve from. + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation. Default order is **descending** if `sort` is not passed + required: false + schema: + type: string + default: desc + enum: + - asc + - desc + responses: + '200': + description: processes informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcesses' + examples: + response: + value: + processes: + - id: 40 + status: completed + name: TRANS-CALC + - id: 43 + status: queued + name: TRANS-GLOBAL-CALC + - id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + count: 3 + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /processes/{processId}: + get: + tags: + - Process + summary: Return the informations for a process + operationId: getProcess + parameters: + - name: processId + in: path + description: Id of the process + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: process informations + content: + application/json: + schema: + $ref: '#/components/schemas/getProcess' + examples: + response: + value: + id: 194 + status: completed + name: SEARCH_EXPORT_USERS + export_url: >- + filename.csv + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + '404': + description: Process ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + example: + code: invalid_parameter + message: processId is invalid + /inbound/events: + get: + tags: + - Inbound Parsing + summary: Get the list of all the events for the received emails. + description: >- + This endpoint will show the list of all the events for the received + emails. + operationId: getInboundEmailEvents + parameters: + - name: sender + description: Email address of the sender. + in: query + required: false + schema: + type: string + - name: startDate + description: >- + Mandatory if endDate is used. Starting date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: endDate + description: >- + Mandatory if startDate is used. Ending date (YYYY-MM-DD or + YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. + Maximum time period that can be selected is one month. + in: query + required: false + schema: + type: string + format: datetime + - name: limit + description: Number of documents returned per page + in: query + required: false + schema: + type: integer + format: int64 + default: 100 + maximum: 500 + minimum: 0 + - name: offset + description: Index of the first document on the page + in: query + required: false + schema: + type: integer + format: int64 + default: 0 + - name: sort + in: query + description: >- + Sort the results in the ascending/descending order of record + creation + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + responses: + '200': + description: List of events for received emails. + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEvents' + examples: + response: + value: + events: + - uuid: 1a825d56-029b-4a41-b8e4-1a825d56 + date: '2017-03-11T12:30:00.000Z' + sender: john@example.com + recipient: alexa@example.com + - uuid: 1a825d56-029b-4a41-b8e4-61670463431b + date: '2017-03-12T12:30:00.000Z' + sender: alice@example.com + recipient: bob@example.com + '400': + description: bad request + content: + application/json: + schema: + $ref: '#/components/schemas/errorModel' + /inbound/events/{uuid}: + get: + tags: + - Inbound Parsing + summary: Fetch all events history for one particular received email. + description: >- + This endpoint will show the list of all events history for one + particular received email. + operationId: getInboundEmailEventsByUuid + parameters: + - name: uuid + description: UUID to fetch events specific to recieved email + in: path + required: true + schema: + type: string + responses: + '200': + description: Email campaign informations + content: + application/json: + schema: + $ref: '#/components/schemas/getInboundEmailEventsByUuid' + examples: + response: + value: + receivedAt: '2017-03-12T12:30:00.000Z' + deliveredAt: '2017-03-12T12:31:00.000Z' + sender: alice@example.com + recipient: bob@example.com + messageId:Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + **Mandatory if htmlContent and templateId are empty**. Url to the + message (HTML). For example: + + **https://html.domain.com** + format: url + example: https://html.domain.com + templateId: + type: integer + description: > + **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. + format: int64 + scheduledAt: + type: string + description: > + 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). For example: + + **2017-06-01T12:30:00+02:00** + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: | + Subject of the campaign. **Mandatory if abTesting is false**. + Ignored if abTesting is true. + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which the campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact attributes must already exist in your Brevo account. If + input parameter **params** used please use **{{contact.FNAME}} + {{contact.LNAME}}** for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids to exclude from the campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + **Mandatory if scheduledAt is not empty**. List Ids to send the + campaign to + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **Mandatory if listIds are not used**. Segment ids to send the + campaign to. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_ + example: true + default: false + mirrorActive: + type: boolean + description: Use true to enable the mirror link + example: true + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: Set this to true if you want to send your campaign at best time. + example: true + default: false + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + **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. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + **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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + updateEmailCampaign: + type: object + properties: + tag: + type: string + description: Tag of the campaign + example: Newsletter + sender: + type: object + properties: + name: + type: string + description: Sender Name from which the campaign emails are sent + example: Mary from MyShop + email: + type: string + description: Sender email from which the campaign emails are sent + format: email + example: newsletter@myshop.com + id: + type: integer + description: > + 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)**. + format: int64 + example: 3 + description: > + Sender details including id or email and name (optional). Only one + of either Sender's email or Sender's ID shall be passed in one + request at a time. For example: + + **{"name":"xyz", "email":"example@abc.com"}** + + **{"name":"xyz", "id":123}** + name: + type: string + description: Name of the campaign + example: Newsletter - May 2017 + htmlContent: + type: string + description: > + 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** + example: >- +Please + confirm your email address by clicking on the link below
+ + htmlUrl: + type: string + description: > + Url which contents the body of the email message. **REQUIRED if + htmlContent is empty** + format: url + example: https://html.domain.com + scheduledAt: + type: string + description: > + 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). + example: '2017-06-01T10:30:00.000Z' + subject: + type: string + description: Subject of the campaign + example: Discover the New Collection ! + previewText: + type: string + description: Preview text or preheader of the email campaign + example: Thanks for your order! + replyTo: + type: string + description: Email on which campaign recipients will be able to reply to + format: email + example: support@myshop.com + toField: + type: string + description: > + To personalize the **To** Field. If you want to include the first + + name and last name of your recipient, add **{FNAME} {LNAME}**. These + contact + + attributes must already exist in your Brevo account. If input + parameter + + **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** + for personalization + example: '{FNAME} {LNAME}' + recipients: + type: object + properties: + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + format: int64 + example: 8 + listIds: + type: array + description: > + 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** + items: + type: integer + format: int64 + example: 32 + segmentIds: + description: > + **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. + type: array + items: + type: integer + format: int64 + example: 23 + description: Segment ids and List ids to include/exclude from campaign + attachmentUrl: + type: string + description: > + Absolute url of the attachment (no local file). + + Extension allowed: + + #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, + png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, + pptx, tar, ez, ics, mobi, msg, pub and eps' + format: url + example: https://attachment.domain.com + inlineImageActivation: + type: boolean + description: > + 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_. + example: true + default: false + mirrorActive: + type: boolean + description: >- + Status of mirror links in campaign. mirrorActive = false means + mirror links are deactivated, & mirrorActive = true means mirror + links are activated, in the campaign + example: true + recurring: + type: boolean + description: > + **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 + example: false + default: false + footer: + type: string + description: Footer of the email campaign + example: '[DEFAULT_FOOTER]' + header: + type: string + description: Header of the email campaign + example: '[DEFAULT_HEADER]' + utmCampaign: + type: string + description: >- + Customize the utm_campaign value. If this field is empty, the + campaign name will be used. Only alphanumeric characters and spaces + are allowed + example: NL_05_2017 + params: + type: object + additionalProperties: {} + description: > + 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** + example: + FNAME: Joe + LNAME: Doe + sendAtBestTime: + type: boolean + description: | + Set this to true if you want to send your campaign at best time. + Note:- **if true, warmup ip will be disabled.** + example: true + abTesting: + type: boolean + description: > + 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 + example: true + default: false + subjectA: + type: string + description: | + Subject A of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Discover the New Collection! + subjectB: + type: string + description: | + Subject B of the campaign. **Mandatory if abTesting = true**. + subjectA & subjectB should have unique value + example: Want to discover the New Collection? + splitRule: + maximum: 50 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + winnerCriteria: + type: string + description: > + Choose the metrics that will determinate the winning version. + **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, + `winnerCriteria` is ignored if passed + example: open + enum: + - open + - click + winnerDelay: + maximum: 168 + minimum: 1 + type: integer + description: > + 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 + format: int64 + example: 50 + ipWarmupEnable: + type: boolean + description: > + **Available for dedicated ip clients**. Set this to true if you wish + to warm up your ip. + example: true + default: false + initialQuota: + type: integer + description: > + Set an initial quota greater than 1 for warming up your ip. We + recommend you set a value of 3000. + format: int64 + example: 3000 + increaseRate: + maximum: 100 + minimum: 0 + type: integer + description: > + 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%. + format: int64 + example: 70 + unsubscriptionPageId: + description: > + 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. + type: string + example: 62cbb7fabbe85021021aac52 + updateFormId: + description: > + **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. + type: string + example: 6313436b9ad40e23b371d095 + getSharedTemplateUrl: + required: + - sharedUrl + type: object + properties: + sharedUrl: + type: string + description: >- + A unique URL for the email campaign or transactional template. This + URL can be shared with other Brevo users. + format: url + example: >- + https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx- + abTestCampaignResult: + type: object + properties: + winningVersion: + type: string + description: >- + 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. + example: A + enum: + - notAvailable + - pending + - tie + - A + - B + winningCriteria: + type: string + description: Criteria choosen for winning version (Open/Click) + example: Open + enum: + - Open + - Click + winningSubjectLine: + type: string + description: Subject Line of current winning version + example: Subject Line A + openRate: + type: string + description: Open rate for current winning version + example: 70% + clickRate: + type: string + description: Click rate for current winning version + example: 70% + winningVersionRate: + type: string + description: Open/Click rate for the winner version + example: 70% + statistics: + required: + - clicks + - complaints + - hardBounces + - openers + - softBounces + - unsubscribed + type: object + properties: + openers: + $ref: '#/components/schemas/abTestVersionStats' + clicks: + $ref: '#/components/schemas/abTestVersionStats' + unsubscribed: + $ref: '#/components/schemas/abTestVersionStats' + hardBounces: + $ref: '#/components/schemas/abTestVersionStats' + softBounces: + $ref: '#/components/schemas/abTestVersionStats' + complaints: + $ref: '#/components/schemas/abTestVersionStats' + clickedLinks: + required: + - Version A + - Version B + type: object + properties: + Version A: + $ref: '#/components/schemas/abTestVersionClicks' + Version B: + $ref: '#/components/schemas/abTestVersionClicks' + emailExportRecipients: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + Webhook called once the export process is finished. For reference, + https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Type of recipients to export for a campaign + example: openers + enum: + - all + - nonClickers + - nonOpeners + - clickers + - openers + - softBounces + - hardBounces + - unsubscribed + requestSmsRecipientExport: + required: + - recipientsType + type: object + properties: + notifyURL: + type: string + description: >- + URL that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + recipientsType: + type: string + description: Filter the recipients based on how they interacted with the campaign + example: answered + enum: + - all + - delivered + - answered + - softBounces + - hardBounces + - unsubscribed + sendReport: + required: + - email + type: object + properties: + language: + type: string + description: Language of email content for campaign report sending. + example: en + default: fr + enum: + - fr + - es + - pt + - it + - de + - en + email: + required: + - body + - to + type: object + properties: + to: + type: array + description: Email addresses of the recipients + items: + type: string + description: Email address of the recipient + format: email + example: jim.suehan@example.com + body: + type: string + description: Custom text message to be presented in the report email. + example: Please find attached the report of our last email campaign. + description: Custom attributes for the report email. + uploadImageToGallery: + required: + - imageUrl + type: object + properties: + imageUrl: + type: string + description: > + 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. + example: https://somedomain.com/image1.jpg + name: + type: string + description: Name of the image. + example: nature.jpg + sendSmtpEmail: + type: object + properties: + sender: + description: > + **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"}** + + **{"id":2}** + type: object + properties: + name: + type: string + description: > + description: Name of the sender from which the emails will be + sent. **Maximum allowed characters are 70**. Applicable only + when email is passed. + example: Mary from MyShop + email: + type: string + description: >- + Email of the sender from which the emails will be sent. + Mandatory if sender id is not passed. + format: email + example: no-reply@myshop.com + id: + type: integer + description: >- + 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. + format: int64 + example: 2 + to: + type: array + description: > + **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"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: | + Name of the recipient. **Maximum allowed characters are 70**. + example: Jimmy + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed characters are + 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the recipients in + cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed characters are + 70**. + example: Ann + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not passed, + ignored if 'templateId' is passed** + example: >- +Please + confirm your email address by clicking on the link below
+ + textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + subject: + type: string + description: | + Subject of the message. **Mandatory if 'templateId' is not passed** + example: Login Email confirmation + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + attachment: + type: array + description: > + 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 + items: + type: object + properties: + url: + type: string + description: | + Absolute url of the attachment (**no local file**). + format: url + example: https://attachment.domain.com/myAttachmentFromUrl.jpg + content: + pattern: >- + ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + description: >- + Base64 encoded chunk data of the attachment generated on the + fly + format: byte + example: b3JkZXIucGRm + name: + type: string + description: | + **Required if content is passed**. Name of the attachment + example: myAttachment.png + headers: + type: object + additionalProperties: {} + description: > + 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"}**. + example: + sender.ip: 1.2.3.4 + X-Mailin-custom: some_custom_header + idempotencyKey: abc-123 + templateId: + type: integer + description: Id of the template. + format: int64 + example: 2 + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + messageVersions: + type: array + description: > + 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** + items: + type: object + required: + - to + properties: + to: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients. For example, + + **[{"name":"Jimmy", "email":"jimmy98@example.com"}, + {"name":"Joe", "email":"joe@example.com"}]** + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient + format: email + example: jimmy98@example.com + name: + type: string + description: > + Name of the recipient. **Maximum allowed characters are + 70**. + example: Jimmy + params: + type: object + additionalProperties: {} + description: > + 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**. + example: + FNAME: Joe + LNAME: Doe + bcc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in bcc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in bcc + format: email + example: helen9766@example.com + name: + type: string + description: > + Name of the recipient in bcc. **Maximum allowed + characters are 70**. + example: Helen + cc: + type: array + description: > + List of email addresses and names (_optional_) of the + recipients in cc + items: + required: + - email + type: object + properties: + email: + type: string + description: Email address of the recipient in cc + format: email + example: ann6533@example.com + name: + type: string + description: > + Name of the recipient in cc. **Maximum allowed + characters are 70**. + example: Ann + replyTo: + required: + - email + type: object + properties: + email: + type: string + description: Email address in reply to + format: email + example: ann6533@example.com + name: + type: string + description: | + Name in reply to. **Maximum allowed characters are 70**. + example: Ann + description: > + 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"}** + subject: + type: string + description: | + Custom subject specific to message version + example: Login Email confirmation + htmlContent: + type: string + description: > + HTML body of the message. **Mandatory if 'templateId' is not + passed, ignored if 'templateId' is passed** + example: >- +Please confirm your email address by clicking on the link + below
+ textContent: + type: string + description: > + Plain Text body of the message. **Ignored if 'templateId' is + passed** + example: >- + Please confirm your email address by clicking on the link + https://text.domain.com + tags: + type: array + description: Tag your emails to find them more easily + items: + type: string + example: tag1 + scheduledAt: + type: string + description: >- + 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**. + format: date-time + example: '2022-04-05T12:30:00+02:00' + batchId: + type: string + description: >- + 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. + example: 5c6cfa04-eed9-42c2-8b5c-6d470d978e9d + deleteHardbounces: + type: object + properties: + startDate: + type: string + description: >- + Starting date (YYYY-MM-DD) of the time period for deletion. The + hardbounces occurred after this date will be deleted. Must be less + than or equal to the endDate + example: '2016-12-31T00:00:00.000Z' + endDate: + type: string + description: >- + Ending date (YYYY-MM-DD) of the time period for deletion. The + hardbounces until this date will be deleted. Must be greater than or + equal to the startDate + example: '2017-01-31T00:00:00.000Z' + contactEmail: + type: string + description: Target a specific email address + format: email + example: alex76@example.com + blockDomain: + type: object + required: + - domain + properties: + domain: + type: string + description: name of the domain to be blocked + example: example.com + createWebhook: + required: + - events + - url + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on unsubscription + events: + type: array + description: > + - 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` + items: + type: string + example: unsubscribed + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + type: + type: string + description: Type of the webhook + example: marketing + default: transactional + enum: + - transactional + - marketing + - inbound + domain: + type: string + description: Inbound domain of webhook, required in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + updateWebhook: + type: object + properties: + url: + type: string + description: URL of the webhook + format: url + example: http://requestb.in/173lyyx1 + description: + type: string + description: Description of the webhook + example: Webhook triggered on contact hardbounce + events: + type: array + description: > + - 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` + items: + type: string + example: hardBounce + enum: + - sent + - hardBounce + - softBounce + - blocked + - spam + - delivered + - request + - click + - invalid + - deferred + - opened + - uniqueOpened + - unsubscribed + - listAddition + - contactUpdated + - contactDeleted + - inboundEmailProcessed + domain: + type: string + description: Inbound domain of webhook, used in case of event type `inbound` + example: example.com + batched: + type: boolean + description: >- + Batching configuration of the webhook, we send batched webhooks if + its true + example: true + auth: + type: object + description: Authentication header to be send with the webhook requests + example: + type: bearer + token: test-auth-token1234 + headers: + type: array + items: + type: object + description: Headers send with the requests to the webhook + example: + key: cf-secret + value: test-header-value + createDoiContact: + required: + - email + - includeListIds + - redirectionUrl + - templateId + type: object + properties: + email: + type: string + description: >- + Email address where the confirmation email will be sent. This email + address will be the identifier for all other contact attributes. + format: email + example: elly@example.com + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. **These attributes must + be present in your Brevo account**. For eg. **{'FNAME':'Elly', + 'LNAME':'Roger'}** + example: + FNAME: Elly + LNAME: Roger + includeListIds: + type: array + description: Lists under user account where contact should be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + excludeListIds: + type: array + description: Lists under user account where contact should not be added + items: + type: integer + description: Id of the list + format: int64 + example: 36 + templateId: + type: integer + description: Id of the Double opt-in (DOI) template + format: int64 + example: 2 + redirectionUrl: + type: string + description: > + 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 }}**. + format: url + example: http://requestb.in/173lyyx1 + createContact: + type: object + properties: + email: + type: string + description: > + 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"}** + format: email + example: elly@example.com + ext_id: + description: Pass your own Id to create a contact. + type: string + example: externalId + attributes: + type: object + additionalProperties: {} + description: > + Pass the set of attributes and their values. The attribute's + parameter should be passed in capital letter while creating a + contact. Values that don't match the attribute type (e.g. text or + string in a date attribute) will be ignored. **These attributes must + be present in your Brevo account.**. For eg: + + **{"FNAME":"Elly", "LNAME":"Roger"}** + example: + FNAME: Elly + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for emails (emailBlacklisted + = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set this field to blacklist the contact for SMS (smsBlacklisted = + true) + example: false + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 36 + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing contact in the same request + (updateEnabled = true) + example: false + default: false + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact ( only available if updateEnabled = true ) + items: + type: string + format: email + updateContact: + type: object + properties: + attributes: + type: object + additionalProperties: {} + description: > + 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. Values that don't match the attribute type (e.g. + text or string in a date attribute) will be ignored. 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: updateExternalId + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for email + Contact + items: + type: string + format: email + updateBatchContacts: + type: object + properties: + contacts: + type: array + description: List of contacts to be updated + items: + type: object + properties: + email: + type: string + description: >- + Email address of the user to be updated (For each operation + only pass one of the supported contact identifiers. Email, id + or sms) + format: email + example: elly@example.com + id: + type: integer + description: >- + id of the user to be updated (For each operation only pass one + of the supported contact identifiers. Email, id or sms) + format: int64 + example: 31 + sms: + type: string + description: >- + SMS of the user to be updated (For each operation only pass + one of the supported contact identifiers. Email, id or sms) + example: +91xxxxxxxxxx + ext_id: + description: Pass your own Id to update ext_id of a contact. + type: string + example: UpdateExternalId + attributes: + type: object + additionalProperties: {} + description: > + 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"}** + example: + EMAIL: newemail@domain.com + FNAME: Ellie + LNAME: Roger + emailBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for emails + (emailBlacklisted = true) + example: false + smsBlacklisted: + type: boolean + description: >- + Set/unset this field to blacklist/allow the contact for SMS + (smsBlacklisted = true) + example: true + listIds: + type: array + description: Ids of the lists to add the contact to + items: + type: integer + description: Id of the list to add the contact to + format: int64 + example: 65 + unlinkListIds: + type: array + description: Ids of the lists to remove the contact from + items: + type: integer + description: Id of the list to remove the contact from + format: int64 + example: 36 + smtpBlacklistSender: + type: array + description: >- + transactional email forbidden sender for contact. Use only for + email Contact + items: + type: string + format: email + createAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + isRecurring: + type: boolean + description: > + Type of the attribute. **Use only if the attribute's category is + 'calculated' or 'global'** + example: true + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Women + type: + type: string + description: > + 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 + example: text + enum: + - text + - date + - float + - boolean + - id + - category + updateAttribute: + type: object + properties: + value: + type: string + description: > + Value of the attribute to update. **Use only if the attribute's + category is 'calculated' or 'global'** + example: COUNT[BLACKLISTED,BLACKLISTED,<,NOW()] + enumeration: + type: array + description: > + 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"}]** + items: + required: + - label + - value + type: object + properties: + value: + type: integer + description: Id of the value + example: 1 + label: + type: string + description: Label of the value + example: Men + createList: + required: + - folderId + - name + type: object + properties: + name: + type: string + description: Name of the list + example: Magento Customer - ES + folderId: + type: integer + description: Id of the parent folder in which this list is to be created + format: int64 + example: 2 + updateList: + type: object + properties: + name: + type: string + description: >- + Name of the list. Either of the two parameters (name, folderId) can + be updated at a time. + example: Magento Customer - ES + folderId: + type: integer + description: >- + 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. + format: int64 + example: 2 + requestContactExport: + type: object + required: + - customContactFilter + properties: + exportAttributes: + type: array + description: > + List of all the attributes that you want to export. **These + attributes must be present in your contact database.** For example: + + **['fname', 'lname', 'email']** + items: + type: string + example: NAME + customContactFilter: + type: object + properties: + actionForContacts: + type: string + description: > + **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. + enum: + - allContacts + - subscribed + - unsubscribed + - unsubscribedPerList + actionForEmailCampaigns: + type: string + description: > + **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). + enum: + - openers + - nonOpeners + - clickers + - nonClickers + - unsubscribed + - hardBounces + - softBounces + actionForSmsCampaigns: + type: string + description: > + **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. + enum: + - hardBounces + - softBounces + - unsubscribed + listId: + type: integer + description: > + **Mandatory if actionForContacts is passed, ignored otherwise.** + Id of the list for which the corresponding action shall be + applied in the filter. + format: int64 + example: 2 + emailCampaignId: + type: integer + description: > + 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. + format: int64 + example: 12 + smsCampaignId: + type: integer + description: > + Considered only if **actionForSmsCampaigns** is passed, ignored + otherwise. The id of sms campaign for which the corresponding + action shall be applied in the filter. + format: int64 + example: 12 + description: | + Set the filter for the contacts to be exported. + notifyUrl: + type: string + description: >- + Webhook that will be called once the export process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + requestContactImport: + type: object + properties: + fileUrl: + type: string + description: > + **Mandatory if fileBody and jsonBody is not defined.** URL of the + file to be imported (**no local file**). Possible file formats: + + #### .txt, .csv, .json + format: url + example: https://importfile.domain.com + fileBody: + type: string + description: > + **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. + example: |- + NAME;SURNAME;EMAIL + Smith;John;john.smith@example.com + Roger;Ellie;ellie36@example.com + jsonBody: + type: array + description: > + **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. + items: + type: object + properties: + email: + type: string + attributes: + type: object + additionalProperties: true + description: List of attributes to be imported + example: + email: ndicky0@ocn.ne.jp + attributes: + LNAME: Noemi + FNAME: Dicky + COUNTRY: DE + BIRTHDAY: 11/02/1989 + PREFERED_COLOR: BLACK + WHATSAPP: '33689965433' + LANDLINE_NUMBER: '33689965433' + SMS: '33689965433' + listIds: + type: array + description: > + **Mandatory if newList is not defined.** Ids of the lists in which + the contacts shall be imported. For example, **[2, 4, 7]**. + items: + type: integer + description: List Id in which the contacts shall be imported + format: int64 + example: 76 + notifyUrl: + type: string + description: >- + URL that will be called once the import process is finished. For + reference, https://help.brevo.com/hc/en-us/articles/360007666479 + format: url + example: http://requestb.in/173lyyx1 + newList: + type: object + properties: + listName: + type: string + description: > + List with listName will be created first and users will be + imported in it. **Mandatory if listIds is empty**. + example: ContactImport - 2017-05 + folderId: + type: integer + description: > + Id of the folder where this new list shall be created. + **Mandatory if listName is not empty** + format: int64 + example: 2 + description: >- + To create a new list and import the contacts into it, pass the + listName and an optional folderId. + emailBlacklist: + type: boolean + description: To blacklist all the contacts for email + example: false + default: false + disableNotification: + type: boolean + description: To disable email notification + example: false + default: false + smsBlacklist: + type: boolean + description: To blacklist all the contacts for sms + example: false + default: false + updateExistingContacts: + type: boolean + description: To facilitate the choice to update the existing contacts + example: true + default: true + emptyContactsAttributes: + type: boolean + description: > + 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 **) + example: true + default: false + createSmsCampaign: + required: + - content + - name + - sender + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + updateSmsCampaign: + type: object + properties: + name: + type: string + description: Name of the campaign + example: Spring Promo Code + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + content: + type: string + description: > + 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 + example: 'Get a discount by visiting our NY store and saying : Happy Spring!' + recipients: + required: + - listIds + type: object + properties: + listIds: + type: array + description: > + Lists Ids to send the campaign to. **REQUIRED if scheduledAt is + not empty** + items: + type: integer + description: List Id to send the campaign to + format: int64 + example: 54 + exclusionListIds: + type: array + description: List ids which have to be excluded from a campaign + items: + type: integer + description: List Id to exclude from the campaign + format: int64 + example: 15 + scheduledAt: + type: string + description: > + 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.** + example: '2017-05-05T10:30:00.000Z' + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + description: >- + 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.** + type: string + example: MyCompany + unsubscribeInstruction: + description: >- + 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.** + type: string + example: send Stop if you want to unsubscribe. + sendTransacSms: + required: + - content + - recipient + - sender + type: object + properties: + sender: + maxLength: 15 + type: string + description: > + Name of the sender. **The number of characters is limited to 11 for + alphanumeric characters and 15 for numeric characters** + example: MyShop + recipient: + type: string + description: Mobile number to send SMS with the country code + example: '33689965433' + content: + type: string + description: > + Content of the message. If more than **160 characters** long, will + be sent as multiple text messages + example: Enter this code:CCJJG8 to validate your account + type: + type: string + description: >- + 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. + example: marketing + default: transactional + enum: + - transactional + - marketing + tag: + type: string + description: Tag of the message + example: accountValidation + webUrl: + type: string + description: >- + Webhook to call for each event triggered by the message (delivered + etc.) + format: url + example: http://requestb.in/173lyyx1 + unicodeEnabled: + type: boolean + description: > + Format of the message. It indicates whether the content should be + treated as unicode or not. + example: true + default: false + organisationPrefix: + type: string + description: >- + 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.** + example: MyCompany + sendTestEmail: + type: object + properties: + emailTo: + type: array + description: > + List of the email addresses of the recipients whom you wish to send + the test mail. + + _If left empty, the test mail will be sent to your entire test list. + You can not send more than 50 test emails per day_. + items: + type: string + description: Email addres of the recipient + format: email + example: helen.jurger@example.com + sendTestSms: + type: object + properties: + phoneNumber: + type: string + description: > + 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** + example: '33689965433' + getTransacAggregatedSmsReport: + type: object + properties: + range: + type: string + description: Time frame of the report + example: 2016-09-08|2017-04-06 + requests: + type: integer + description: Number of requests for the timeframe + format: int64 + example: 263 + delivered: + type: integer + description: Number of delivered SMS for the timeframe + format: int64 + example: 249 + hardBounces: + type: integer + description: Number of hardbounces for the timeframe + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the timeframe + format: int64 + example: 4 + blocked: + type: integer + description: Number of blocked contact for the timeframe + format: int64 + example: 2 + unsubscribed: + type: integer + description: Number of unsubscription for the timeframe + format: int64 + example: 6 + replied: + type: integer + description: Number of answered SMS for the timeframe + format: int64 + example: 12 + accepted: + type: integer + description: Number of accepted for the timeframe + format: int64 + example: 252 + rejected: + type: integer + description: Number of rejected for the timeframe + format: int64 + example: 8 + getTransacSmsReport: + type: object + properties: + reports: + type: array + items: + type: object + properties: + date: + type: string + description: Date for which statistics are retrieved + format: date + example: '2017-03-17T00:00:00.000Z' + requests: + type: integer + description: Number of requests for the date + format: int64 + example: 87 + delivered: + type: integer + description: Number of delivered SMS for the date + format: int64 + example: 85 + hardBounces: + type: integer + description: Number of hardbounces for the date + format: int64 + example: 1 + softBounces: + type: integer + description: Number of softbounces for the date + format: int64 + example: 1 + blocked: + type: integer + description: Number of blocked contact for the date + format: int64 + example: 0 + unsubscribed: + type: integer + description: Number of unsubscription for the date + format: int64 + example: 1 + replied: + type: integer + description: Number of answered SMS for the date + format: int64 + example: 2 + accepted: + type: integer + description: Number of accepted for the date + format: int64 + example: 85 + rejected: + type: integer + description: Number of rejected for the date + format: int64 + example: 1 + getIp: + required: + - active + - domain + - id + - ip + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + active: + type: boolean + description: Status of the IP (true=active, false=inactive) + example: true + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.com + getIpsFromSender: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) linked to a sender + items: + $ref: '#/components/schemas/getIpFromSender' + getIps: + required: + - ips + type: object + properties: + ips: + type: array + description: Dedicated IP(s) available on your account + items: + $ref: '#/components/schemas/getIp' + getIpFromSender: + required: + - domain + - id + - ip + - weight + type: object + properties: + id: + type: integer + description: ID of the dedicated IP + format: int64 + example: 3 + ip: + type: string + description: Dedicated IP + example: 123.65.8.22 + domain: + type: string + description: Domain associated to the IP + example: mailing.myshop.dom + weight: + type: integer + description: Weight of the IP + format: int64 + example: 75 + manageIp: + type: object + properties: + ip: + type: string + description: Dedicated ID + example: 123.65.8.22 + getTransacEmailContent: + required: + - attachmentCount + - body + - date + - email + - events + - subject + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: abc@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + events: + type: array + description: Series of events which occurred on the transactional email + items: + required: + - name + - time + type: object + properties: + name: + type: string + description: Name of the event that occurred on the sent email + example: delivered + time: + type: string + description: Time at which the event occurred + example: '2017-03-12T12:30:00.000Z' + body: + type: string + description: Actual content of the transactional email that has been sent + example: >- +This is the actual html content sent
+ attachmentCount: + type: integer + description: Count of the attachments that were sent in the email + format: int64 + example: 2 + getTransacEmailsList: + type: object + properties: + count: + type: integer + description: >- + Total number of transactional emails available on your account + according to the passed filter + format: int64 + example: 5 + transactionalEmails: + type: array + items: + required: + - date + - email + - messageId + - subject + - uuid + type: object + properties: + email: + type: string + description: Email address to which transactional email has been sent + format: email + example: john.smith@example.com + subject: + type: string + description: Subject of the sent email + example: Summer Camp + templateId: + type: integer + description: Id of the template + format: int64 + example: 2 + messageId: + type: string + description: Message Id of the sent email + example: <201798300811.5700093@relay.domain.com> + uuid: + type: string + description: Unique id of the email sent to a particular contact + example: 5a78c-209ok98262910-s99a341 + date: + type: string + description: Date on which transactional email was sent + example: '2017-03-12T12:30:00.000Z' + from: + type: string + description: Email address of the sender from which the email was sent + format: email + example: diana.doe@example.com + tags: + type: array + description: Tags used for your email + items: + type: string + example: tag1 + getBlockedDomains: + type: object + required: + - domains + properties: + domains: + description: List of all blocked domains + type: array + items: + type: string + description: name of blocked domain + example: contact.com + abTestVersionStats: + required: + - Version A + - Version B + type: object + properties: + Version A: + type: string + description: percentage of an event for version A + example: 50% + Version B: + type: string + description: percentage of an event for version B + example: 50% + description: Percentage of a particular event for both versions + abTestVersionClicks: + type: array + description: Information on clicked links for a particular version + items: + required: + - clickRate + - clicksCount + - link + type: object + properties: + link: + type: string + description: URL of the link + example: https://facbook.com/versionA + clicksCount: + type: integer + description: Number of times a link is clicked + format: int64 + example: 3 + clickRate: + type: string + description: Percentage of clicks of link with respect to total clicks + example: 40% + getInboundEmailEvents: + type: object + properties: + events: + type: array + items: + type: object + required: + - uuid + - sender + - date + - recipient + properties: + uuid: + description: UUID that can be used to fetch additional data + type: string + format: uuid + date: + description: Date when email was received on SMTP relay + type: string + format: date-time + sender: + description: Sender’s email address + type: string + format: email + recipient: + description: Recipient’s email address + type: string + format: email + getInboundEmailEventsByUuid: + type: object + properties: + receivedAt: + description: Date when email was received on SMTP relay + type: string + format: date-time + example: '2019-05-25T11:53:26Z' + deliveredAt: + description: Date when email was delivered successfully to client’s webhook + type: string + nullable: true + format: date-time + recipient: + description: Recipient’s email address + type: string + format: email + sender: + description: Sender’s email address + type: string + format: email + messageId: + description: >- + Value of the Message-ID header. This will be present only after the + processing is done. + type: string + subject: + description: >- + Value of the Subject header. This will be present only after the + processing is done. + type: string + attachments: + description: >- + List of attachments of the email. This will be present only after + the processing is done. + type: array + items: + type: object + properties: + name: + description: >- + filename specified in the Content-Disposition header of the + attachment + type: string + contentType: + description: value of the Content-Type header of the attachment + type: string + contentId: + description: value of the Content-ID header of the attachment. + type: string + contentLength: + description: size of the attachment in bytes + type: integer + logs: + description: >- + List of events/logs that describe the lifecycle of the email on SIB + platform + type: array + items: + type: object + properties: + date: + description: Date of the event + type: string + format: date-time + type: + description: Type of the event + type: string + enum: + - received + - processed + - webhookFailed + - webhookDelivered + getScheduledEmailByBatchId: + type: object + properties: + count: + type: integer + description: Total number of batches + batches: + type: array + items: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the batch was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the batch was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled batch + type: string + enum: + - inProgress + - queued + - processed + - error + getScheduledEmailByMessageId: + type: object + required: + - scheduledAt + - createdAt + - status + properties: + scheduledAt: + description: Datetime for which the email was scheduled + type: string + format: date-time + createdAt: + description: Datetime on which the email was scheduled + type: string + format: date-time + status: + description: Current status of the scheduled email + type: string + enum: + - inProgress + - queued + - processed + - error + subAccountsResponse: + type: object + properties: + count: + type: integer + description: Total number of subaccounts + subAccounts: + type: array + items: + type: object + required: + - id + - companyName + - active + - createdAt + properties: + id: + description: id of the sub-account + type: integer + format: int64 + companyName: + description: Name of the sub-account company + type: string + active: + description: Whether the sub-account is active or not + type: boolean + createdAt: + description: Timestamp when the sub-account was created + type: integer + format: int64 + createSubAccount: + type: object + required: + - companyName + - email + properties: + companyName: + description: Set the name of the sub-account company + type: string + email: + description: Email address for the organization + type: string + language: + description: Set the language of the sub-account + type: string + enum: + - en + - fr + - it + - es + - pt + - de + timezone: + description: Set the timezone of the sub-account + type: string + example: + companyName: Test Sub-account + email: test-sub@example.com + timezone: Europe/Paris + language: en + createSubAccountResponse: + required: + - id + type: object + properties: + id: + type: integer + description: ID of the sub-account created + format: int64 + example: 5 + corporateGroupDetailsResponse: + type: object + properties: + group: + type: object + properties: + id: + type: string + description: Group id + groupName: + type: string + description: Name of the group + createdAt: + type: string + description: Group creation date + sub-accounts: + type: array + items: + type: object + properties: + id: + type: integer + format: int64 + description: Id of the sub-account organzation + companyName: + type: string + description: Name of the sub-account organzation + createdAt: + type: string + description: Creation date of the sub-account organzation + users: + type: array + items: + type: object + properties: + email: + type: string + description: Email address of the user + lastName: + type: string + description: Last name of the user + firstName: + type: string + description: First name of the user + masterDetailsResponse: + type: object + properties: + email: + type: string + description: Email id of master account + companyName: + type: string + description: Company name of master account organization + id: + type: integer + format: int64 + description: Unique identifier of the master account organization + currencyCode: + type: string + description: Currency code of the master account organization + timezone: + type: string + description: Timezone of the master account organization + billingInfo: + type: object + description: Billing details of the master account organization + properties: + email: + type: string + description: Billing email id of master account + companyName: + type: string + description: Company name of master account + name: + type: object + description: Billing name of master account holder + properties: + givenName: + type: string + description: First name for billing + familyName: + type: string + description: Last name for billing + address: + type: object + description: Billing address of master account + properties: + streetAddress: + type: string + description: Street address + locality: + type: string + description: Locality + postalCode: + type: string + description: Postal code + stateCode: + type: string + description: State code + countryCode: + type: string + description: Country code + planInfo: + type: object + description: Plan details + properties: + currencyCode: + type: string + description: Plan currency + nextBillingAt: + type: integer + format: int64 + description: Timestamp of next billing date + price: + type: number + description: Plan amount + planPeriod: + type: string + description: Plan period type + enum: + - month + - year + subAccounts: + type: integer + description: Number of sub-accounts + features: + type: array + description: List of provided features in the plan + items: + type: object + properties: + name: + type: string + description: Name of the feature + unitValue: + type: string + description: Unit value of the feature + quantity: + type: integer + format: int64 + description: Quantity provided in the plan + quantityWithOverages: + type: integer + format: int64 + description: >- + Quantity with overages provided in the plan (only + applicable on ENTv2) + used: + type: integer + format: int64 + description: Quantity consumed by master + usedOverages: + type: integer + format: int64 + description: >- + Quantity consumed by sub-organizations over the admin plan + limit (only applicable on ENTv2) + remaining: + type: integer + format: int64 + description: Quantity remaining in the plan + subAccountDetailsResponse: + type: object + properties: + name: + type: string + description: Name of the sub-account user + email: + type: string + description: Email id of the sub-account organization + companyName: + type: string + description: Sub-account company name + planInfo: + type: object + description: Sub-account plan details + properties: + credits: + type: object + description: Credits quota and remaining credits on the sub-account + properties: + sms: + type: integer + format: int64 + description: SMS credits remaining on the sub-account + emails: + type: object + description: Email credits remaining on the sub-account + properties: + quantity: + type: integer + format: int64 + description: Quantity of email messaging limits provided + remaining: + type: integer + format: int64 + description: Available email messaging limits for use + features: + type: object + description: Features available on the sub-account + properties: + inbox: + type: object + description: Inbox details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of inbox provided + remaining: + type: integer + format: int64 + description: Available inboxes for use + landingPage: + type: object + description: Landing page details / Not available on ENTv2 + properties: + quantity: + type: integer + format: int64 + description: Quantity of landing pages provided + remaining: + type: integer + format: int64 + description: Available landing pages for use + users: + type: object + description: Multi-account details + properties: + quantity: + type: integer + format: int64 + description: Quantity of multi-account's provided + remaining: + type: integer + format: int64 + description: Available multi-accounts for use + planType: + type: string + description: type of the plan + subAccountUpdatePlanRequest: + type: object + description: Details of the plan to be changed + properties: + credits: + type: object + description: Credit details to update + properties: + email: + type: integer + format: int64 + description: Number of email credits + features: + type: object + description: Features details to update + properties: + users: + type: integer + format: int64 + description: Number of multi-users + landingPage: + type: integer + format: int64 + description: Number of landing pages / Not required on ENTv2 + inbox: + type: integer + format: int64 + description: Number of inboxes / Not required on ENTv2 + example: + credits: + email: 5000 + features: + users: 15 + landingPage: 20 + inbox: 10 + subAccountAppsToggleRequest: + type: object + description: List of enable/disable applications on the sub-account + properties: + inbox: + type: boolean + description: >- + Set this field to enable or disable Inbox on the sub-account / Not + applicable on ENTv2 + whatsapp: + type: boolean + description: >- + Set this field to enable or disable Whatsapp campaigns on the + sub-account + automation: + type: boolean + description: Set this field to enable or disable Automation on the sub-account + email-campaigns: + type: boolean + description: >- + Set this field to enable or disable Email Campaigns on the + sub-account + sms-campaigns: + type: boolean + description: Set this field to enable or disable SMS Marketing on the sub-account + landing-pages: + type: boolean + description: Set this field to enable or disable Landing pages on the sub-account + transactional-emails: + type: boolean + description: >- + Set this field to enable or disable Transactional Email on the + sub-account + transactional-sms: + type: boolean + description: >- + Set this field to enable or disable Transactional SMS on the + sub-account + facebook-ads: + type: boolean + description: Set this field to enable or disable Facebook ads on the sub-account + web-push: + type: boolean + description: Set this field to enable or disable Web Push on the sub-account + meetings: + type: boolean + description: Set this field to enable or disable Meetings on the sub-account + conversations: + type: boolean + description: Set this field to enable or disable Conversations on the sub-account + crm: + type: boolean + description: Set this field to enable or disable Sales CRM on the sub-account + example: + landing-pages: true + sms-campaigns: false + whatsapp: true + meetings: true + web-push: false + TaskTypes: + type: object + description: Task types details + properties: + id: + type: string + description: Id of task type + example: 61a88a2eb7a574180261234 + title: + type: string + description: Title of task type + example: Email + Task: + required: + - taskTypeId + - name + - date + type: object + description: Task Details + properties: + id: + type: string + description: Unique task id + example: 61a5cd07ca1347c82306ad06 + taskTypeId: + type: string + description: Id for type of task e.g Call / Email / Meeting etc. + example: 61a5cd07ca1347c82306ad09 + name: + type: string + description: Name of task + example: 'Task: Connect with client' + contactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this task + example: + - 1 + - 2 + - 3 + dealsIds: + items: + type: string + type: array + description: Deal ids for deals a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + companiesIds: + items: + type: string + type: array + description: Companies ids for companies a task is linked to + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + TaskReminder: + required: + - value + - unit + - types + type: object + description: Task reminder date/time for a task + properties: + value: + type: integer + example: 10 + description: Value of time unit before reminder is to be sent + unit: + type: string + enum: + - minutes + - hours + - weeks + - days + description: Unit of time before reminder is to be sent + types: + items: + type: string + enum: + - email + - push + description: Type of task reminder e.g email, push + type: array + example: + - email + FileList: + type: array + description: List of files + items: + $ref: '#/components/schemas/FileData' + FileDownloadableLink: + type: object + description: Downloadable file link + properties: + fileUrl: + type: string + description: A unique link to download the requested file. + example: https://storage.googleapis.com/brevo-app-crm.......-sample.pdf + FileData: + type: object + description: File data that is uploaded + properties: + name: + type: string + description: Name of uploaded file + example: example.png + authorId: + type: string + description: Account id of user which created the file + example: 61a5ce58y5d4795761045991 + contactId: + type: integer + format: int64 + description: Contact id of contact on which file is uploaded + example: 1 + dealId: + type: string + description: Deal id linked to a file + example: 61a5ce58c5d4795761045991 + companyId: + type: string + description: Company id linked to a file + example: 61a5ce58c5d4795761045991 + size: + type: integer + format: int64 + description: Size of file in bytes + example: 10 + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: File created date/time + NoteData: + required: + - text + type: object + description: Note data to be saved + properties: + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact Ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + companyIds: + items: + type: string + description: Company Ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + Note: + required: + - text + type: object + description: Note Details + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + text: + type: string + maxLength: 3000 + minLength: 1 + example: In communication with client for resolution of queries. + description: Text content of a note + contactIds: + items: + type: integer + description: Contact ids linked to a note + type: array + example: + - 247 + - 1 + - 2 + dealIds: + items: + type: string + description: Deal ids linked to a note + type: array + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + authorId: + type: object + description: Account details of user which created the note + example: + id: 61a5ce58y5d4795761045991 + email: johndoe@example.com + locale: en_GB + timezone: Asia/Kolkata + name: + fullName: John Doe + createdAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note created date/time + updatedAt: + type: string + format: date-time + example: '2017-05-01T17:05:03.000Z' + description: Note updated date/time + NoteId: + type: object + description: Updated Note ID + properties: + id: + type: string + description: Unique note Id + example: 61a5cd07ca1347c82306ad09 + NoteList: + type: array + description: List of notes + items: + $ref: '#/components/schemas/Note' + TaskList: + type: object + description: List of tasks + properties: + items: + type: array + description: List of tasks + items: + $ref: '#/components/schemas/Task' + Pipelines: + type: array + description: List of pipeline + items: + $ref: '#/components/schemas/Pipeline' + PipelineStage: + type: object + description: List of stages + properties: + id: + type: string + description: Stage id + example: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + name: + type: string + description: Stage name + example: New + Pipeline: + type: object + description: List of stages + properties: + pipeline_name: + type: string + description: Pipeline name + example: Sales Pipeline + pipeline: + type: string + description: Pipeline id + example: 5ea675e3da0dd085acaea610 + stages: + type: array + description: List of stages + items: + $ref: '#/components/schemas/PipelineStage' + DealAttributes: + type: array + description: List of deal attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: deal_name + label: + type: string + example: Deal Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + DealsList: + type: object + description: List of Deals + properties: + items: + type: array + description: List of deals + items: + $ref: '#/components/schemas/Deal' + Deal: + type: object + description: Deal Details + properties: + id: + type: string + description: Unique deal id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Deal attributes with values + example: + deal_name: testname + deal_owner: 6093d2425a9b436e9519d034 + amount: 12 + pipeline: 6093d296ad1e9c5cf2140a58 + deal_stage: 9e577ff7-8e42-4ab3-be26-2b5e01b42518 + stage_updated_at: '2022-05-30T07:42:05.671Z' + created_at: '2022-05-30T07:42:05.671Z' + number_of_contacts: 1 + last_updated_date: '2022-06-06T08:38:36.761Z' + last_activity_date: '2022-06-06T08:38:36.000Z' + next_activity_date: null + number_of_activities: 0 + linkedContactsIds: + items: + type: integer + type: array + description: Contact ids for contacts linked to this deal + example: + - 1 + - 2 + - 3 + linkedCompaniesIds: + items: + type: string + type: array + description: Companies ids for companies linked to this deal + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompaniesList: + type: object + description: List of companies + properties: + items: + type: array + description: List of compaies + items: + $ref: '#/components/schemas/Company' + Company: + type: object + description: Company Details + properties: + id: + type: string + description: Unique comoany id + example: 629475917295261d9b1f4403 + attributes: + type: object + description: Company attributes with values + example: + created_at: '2022-01-13T19:04:24.376+05:30' + domain: xyz + last_updated_at: '2022-04-01T18:47:48.283+05:30' + name: text + number_of_contacts: 0 + owner: 62260474111b1101704a9d85 + owner_assign_date: '2022-04-01T18:21:13.379+05:30' + phone_number: 8171844192 + revenue: 10 + linkedContactsIds: + items: + type: integer + type: array + format: in64 + description: Contact ids for contacts linked to this company + example: + - 1 + - 2 + - 3 + linkedDealsIds: + items: + type: string + type: array + format: objectID + description: Deals ids for companies linked to this company + example: + - 61a5ce58c5d4795761045990 + - 61a5ce58c5d4795761045991 + - 61a5ce58c5d4795761045992 + CompanyAttributes: + type: array + description: List of company attributes + items: + type: object + description: List of attributes + properties: + internalName: + type: string + example: name + label: + type: string + example: Company Name + attributeTypeName: + type: string + example: text + attributeOptions: + type: array + items: + type: object + example: + key: custom key + value: custom label + isRequired: + type: boolean + example: true + ConversationsMessage: + type: object + description: a Conversations message + properties: + id: + type: string + description: >- + Message ID. It can be used for further manipulations with the + message. + example: eYBEm3gq3zc5ayE2g + type: + type: string + enum: + - agent + - visitor + description: '`"agent"` for agents’ messages, `"visitor"` for visitors’ messages.' + example: agent + text: + type: string + description: Message text or name of the attached file + example: Good morning! How can I help you? + visitorId: + type: string + description: visitor’s ID + example: kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg + agentId: + type: string + description: >- + ID of the agent on whose behalf the message was sent (only in + messages sent by an agent). + example: d9nKoegKSjmCtyK78 + agentName: + type: string + description: >- + Agent’s name as displayed to the visitor. Only in the messages sent + by an agent. + example: Liz + createdAt: + type: integer + format: int64 + minimum: 0 + description: Timestamp in milliseconds. + example: 1470222622433 + isPushed: + type: boolean + description: '`true` for pushed messages' + example: true + receivedFrom: + type: string + description: >- + 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. + example: SuperAwesomeHelpdesk + file: + type: object + properties: + filename: + type: string + description: Name of the file + example: conversations.png + size: + type: integer + format: int64 + minimum: 0 + description: Size in bytes + example: 15538 + isImage: + type: boolean + description: Whether the file is an image + example: true + url: + type: string + format: url + description: URL of the file + example: https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/ + imageInfo: + type: object + description: image info is passed in case the file is an image + properties: + width: + type: integer + format: int64 + minimum: 0 + description: Width of the image + example: 1129 + height: + type: integer + format: int64 + minimum: 0 + description: height of the image + example: 525 + previewUrl: + type: string + format: url + description: URL of the preview + example: >- + https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/ + event: + type: object + required: + - event_name + - identifiers + properties: + event_name: + description: >- + The name of the event that occurred. This is how you will find your + event in Brevo. Limited to 255 characters, alphanumerical characters + and - _ only. + type: string + example: video_played + event_date: + description: >- + Timestamp of when the event occurred (e.g. + "2024-01-24T17:39:57+01:00"). If no value is passed, the timestamp + of the event creation is used. + type: string + example: '2024-02-06T20:59:23.383Z' + identifiers: + description: Identifies the contact associated with the event. + type: object + required: + - email_id + properties: + email_id: + type: string + description: Email Id associated with the event + example: jane.doe@example.com + contact_properties: + description: >- + Properties defining the state of the contact associated to this + event. Useful to update contact attributes defined in your contacts + database while passing the event. For example: **"FIRSTNAME": "Jane" + , "AGE": 37** + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + example: + AGE: 32 + GENDER: FEMALE + event_properties: + description: >- + Properties of the event. Top level properties and nested properties + can be used to better segment contacts and personalise workflow + conditions. The following field type are supported: string, number, + boolean (true/false), date (Timestamp e.g. + "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, + alphanumerical characters and - _ only. Size is limited to 50Kb. + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + - type: object + - type: array + example: + video_title: Brevo — The most approachable CRM suite + vide_description: Create your free account today! + duration: 142 + autoplayed: false + upload_date: '2023-11-24T12:09:10+01:00' + order: + type: object + required: + - id + - createdAt + - updatedAt + - status + - amount + - products + properties: + id: + description: Unique ID of the order. + type: string + example: '14' + createdAt: + description: >- + Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is + actually created. + type: string + example: '2021-07-29T20:59:23.383Z' + updatedAt: + description: >- + Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status + of the order is actually changed/updated. + type: string + example: '2021-07-30T10:59:23.383Z' + status: + description: State of the order. + type: string + example: completed + amount: + description: >- + Total amount of the order, including all shipping expenses, tax and + the price of items. + type: number + example: 308.42 + products: + type: array + items: + type: object + required: + - productId + - quantity + - price + description: Details for the Products in an order. + properties: + productId: + type: string + description: ID of the product. + example: P1 + quantity: + type: number + description: >- + How many pieces of the product the visitor has added to the + cart. + example: 10 + variantId: + type: string + description: Product ID of the red color shirts. + example: P100 + price: + type: number + description: The price of a unit of product + example: 99.99 + email: + description: >- + Email of the contact, Mandatory if "phone" field is not passed in + "billing" parameter. + type: string + example: example@brevo.com + billing: + description: Billing details of an order. + type: object + properties: + address: + type: string + description: Full billing address. + example: 15 Somewhere Road, Brynmenyn + city: + type: string + description: Exact city of the address. + example: Basel + countryCode: + type: string + description: Billing country 2-letter ISO code. + example: CA + phone: + type: string + description: >- + Phone number to contact for further details about the order, + Mandatory if "email" field is not passed. + example: 01559 032133 + postCode: + type: string + description: Postcode for delivery and billing. + example: '4052' + paymentMethod: + type: string + description: >- + How the visitor will pay for the item(s), e.g. paypal, check, + etc. + example: PayPal + region: + type: string + description: Exact region (state/province) for delivery and billing. + example: Northwestern Switzerland + coupons: + description: Coupons applied to the order. Stored case insensitive. + type: array + example: + - EASTER15OFF + items: + type: string + orderBatch: + type: object + required: + - orders + properties: + orders: + description: array of order objects + type: array + items: + $ref: '#/components/schemas/order' + notifyUrl: + description: Notify Url provided by client to get the status of batch request + type: string + example: https://en.wikipedia.org/wiki/Webhook + historical: + description: >- + Defines wether you want your orders to be considered as live data or + as historical data (import of past data, synchronising data). True: + orders will not trigger any automation workflows. False: orders will + trigger workflows as usual. + type: boolean + default: true + example: true + createdBatchId: + type: object + required: + - batchId + properties: + batchId: + type: number + description: Batch ID of the request + example: '1' + count: + type: integer + description: Number of orders + format: int64 + example: 17655 + getCategories: + required: + - categories + - count + type: object + properties: + categories: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getCategoryDetails' + count: + type: integer + description: Number of categories + format: int64 + example: 17655 + getCategoryDetails: + required: + - id + - name + - createdAt + - modifiedAt + type: object + properties: + id: + type: string + description: Category ID for which you requested the details + format: string + example: C11 + name: + type: string + description: Name of the category for which you requested the details + format: string + example: Electronics + createdAt: + type: string + description: Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the category + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the category + format: string + example: http://mydomain.com/category/clothing + isDeleted: + type: boolean + description: category deleted from the shop's database + format: string + example: true + createUpdateCategory: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateCategories: + type: object + required: + - id + properties: + id: + type: string + description: | + Unique Category ID as saved in the shop + format: email + example: CAT123 + name: + type: string + description: > + **Mandatory in case of creation**. Name of the Category, as + displayed in the shop + example: Electronics + url: + type: string + description: URL to the category + example: http://mydomain.com/category/electronics + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted + from the shop's database + example: '2017-05-12T12:30:00.000Z' + createUpdateBatchCategory: + type: object + required: + - categories + properties: + categories: + description: array of categories objects + type: array + items: + $ref: '#/components/schemas/createUpdateCategories' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createCategoryModel: + type: object + properties: + id: + type: integer + description: ID of the category when a new category is created + format: int64 + example: 122 + createUpdateBatchCategoryModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created categories + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing categories updated + format: int64 + example: 5 + getProducts: + required: + - products + - count + type: object + properties: + products: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/getProductDetails' + count: + type: integer + description: Number of products + format: int64 + example: 17655 + getProductDetails: + required: + - id + - name + - createdAt + - modifiedAt + - s3ThumbAnalytics + - s3ThumbEditor + type: object + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: Name of the product for which you requested the details + format: string + example: Iphone 11 + createdAt: + type: string + description: Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + modifiedAt: + type: string + description: >- + Last modification UTC date-time of the product + (YYYY-MM-DDTHH:mm:ss.SSSZ) + example: '2017-05-12T12:30:00.000Z' + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + s3Original: + type: string + description: S3 url of original image + format: string + s3ThumbAnalytics: + type: string + description: >- + S3 thumbnail url of original image in 120x120 dimension for + analytics section + format: string + s3ThumbEditor: + type: string + description: >- + S3 thumbnail url of original image in 600x400 dimension for editor + section + format: string + metaInfo: + type: object + description: >- + Meta data of product such as description, vendor, producer, stock + level, etc. + example: + description: Shoes for sports + brand: addidas + isDeleted: + type: boolean + description: product deleted from the shop's database + example: true + createUpdateProduct: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing category in the same request + (updateEnabled = true) + example: false + default: false + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createUpdateBatchProducts: + type: object + required: + - products + properties: + products: + description: array of products objects + type: array + items: + $ref: '#/components/schemas/createUpdateProducts' + updateEnabled: + type: boolean + description: >- + Facilitate to update the existing categories in the same request + (updateEnabled = true) + createUpdateProducts: + type: object + required: + - id + - name + properties: + id: + type: string + description: Product ID for which you requested the details + format: string + example: P11 + name: + type: string + description: >- + Mandatory in case of creation**. Name of the product for which you + requested the details + format: string + example: Iphone 11 + url: + type: string + description: URL to the product + format: string + example: http://mydomain.com/product/electronics/product1 + imageUrl: + type: string + description: Absolute URL to the cover image of the product + format: string + example: http://mydomain.com/product-absoulte-url/img.jpeg + sku: + type: string + description: Product identifier from the shop + format: string + price: + type: number + description: Price of the product + format: float + categories: + type: array + items: + type: string + description: Category ID-s of the product + parentId: + type: string + description: Parent product id of the product + format: string + metaInfo: + type: object + additionalProperties: + oneOf: + - type: string + - type: integer + description: >- + 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. + example: + description: Shoes for sports + brand: addidas + deletedAt: + type: string + description: >- + UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from + the shop's database + createProductModel: + type: object + properties: + id: + type: integer + description: ID of the Product when a new product is created + format: int64 + example: 122 + createUpdateBatchProductsModel: + type: object + properties: + createdCount: + type: integer + description: Number of the new created products + format: int64 + example: 7 + updatedCount: + type: integer + description: Number of the existing products updated + format: int64 + example: 5 + getCouponCollection: + required: + - id + - name + - defaultCoupon + - createdAt + - totalCoupons + - remainingCoupons + type: object + properties: + id: + type: string + description: The id of the collection + format: uuidv4 + example: 23befbae-1505-47a8-bd27-e30ef739f32c + name: + type: string + description: The name of the collection + format: uuidv4 + example: SummerPromotions + defaultCoupon: + type: string + description: The default coupon of the collection + example: 10 OFF + createdAt: + description: Datetime on which the collection was created + type: string + format: date-time + example: '2023-01-06T05:03:47.053Z' + totalCoupons: + description: Total coupons in the collection + type: integer + format: int64 + example: 10000 + remainingCoupons: + description: Not sent coupons in the collection + type: integer + format: int64 + example: 5000 + sendWhatsappMessageTemplate: + required: + - senderNumber + - templateId + - contactNumbers + type: object + properties: + templateId: + type: integer + description: ID of the template to send + example: 123 + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + params: + type: object + description: >- + Pass the set of attributes to customize the template. For example, + {"FNAME":"Joe", "LNAME":"Doe"}. + example: + FNAME: Joe + LNAME: Doe + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + sendWhatsappMessageText: + required: + - senderNumber + - contactNumbers + - authType + - text + type: object + properties: + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + text: + type: string + description: >- + Text to be sent as message body (will be overridden if templateId is + passed in the same request) + example: Hi! There i am a message + contactNumbers: + type: array + description: List of phone numbers of the contacts + items: + type: string + description: WhatsApp Number with country code. Example, 85264318721 + format: mobile + example: 919876543210 + getWhatsappEventReport: + type: object + properties: + events: + type: array + items: + required: + - contactNumber + - date + - messageId + - event + - senderNumber + type: object + properties: + contactNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + date: + type: string + description: UTC date-time on which the event has been generated + example: '2017-03-12T12:30:00.000Z' + messageId: + type: string + description: Message ID which generated the event + example: 23befbae-1505-47a8-bd27-e30ef739f32c + event: + type: string + description: Event which occurred + example: delivered + enum: + - sent + - delivered + - read + - error + - unsubscribe + - reply + - soft-bounce + reason: + type: string + description: >- + Reason for the event (will be there in case of `error` and + `soft-bounce` events) + example: 23befbae-1505-47a8-bd27-e30ef739f32c + body: + type: string + description: >- + Text of the reply (will be there only in case of `reply` event + with text) + example: Hi! I am a reply + mediaUrl: + type: string + format: url + description: >- + Url of the media reply (will be there only in case of `reply` + event with media) + example: https://example.com/media.png + senderNumber: + type: string + format: mobile + description: WhatsApp Number with country code. Example, 85264318721 + example: 919876543210 + getExternalFeedByUUID: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + getAllExternalFeeds: + type: object + properties: + count: + type: integer + description: Total number of batches + feeds: + type: array + items: + type: object + required: + - id + - name + - url + - authType + - headers + - maxRetries + - cache + - createdAt + - modifiedAt + properties: + id: + description: ID of the feed + type: string + format: uuidv4 + example: 54377442-20a2-4c20-b761-d636c72de7b7 + name: + description: Name of the feed + type: string + example: New feed + url: + description: URL of the feed + type: string + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: * `basic` * `token` * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + createdAt: + description: Datetime on which the feed was created + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + modifiedAt: + description: Datetime on which the feed was modified + type: string + format: date-time + example: '2022-10-06T05:03:47.053000000Z' + createExternalFeed: + required: + - name + - url + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + default: noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + updateExternalFeed: + type: object + properties: + name: + type: string + description: Name of the feed + example: New feed + url: + type: string + description: URL of the feed + format: url + example: http://requestb.in/173lyyx1 + authType: + type: string + enum: + - basic + - token + - noAuth + description: | + Auth type of the feed: + * `basic` + * `token` + * `noAuth` + username: + type: string + description: Username for authType `basic` + example: user + password: + type: string + description: Password for authType `basic` + example: password + token: + type: string + description: Token for authType `token` + example: >- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + headers: + type: array + description: Custom headers for the feed + items: + type: object + properties: + name: + type: string + description: Name of the header + example: userId + value: + type: string + description: Value of the header + example: user12345 + example: + - name: header1 + value: value1 + - name: header2 + value: value2 + maxRetries: + type: integer + description: Maximum number of retries on the feed url + example: 5 + minimum: 0 + maximum: 5 + default: 5 + cache: + type: boolean + description: Toggle caching of feed url response + example: true + default: false + exportWebhooksHistory: + required: + - event + - notifyURL + - type + type: object + properties: + days: + type: integer + description: >- + Number of days in the past including today (positive integer). _Not + compatible with 'startDate' and 'endDate'_ + example: 7 + startDate: + type: string + description: >- + Mandatory if endDate is used. Starting date of the history + (YYYY-MM-DD). Must be lower than equal to endDate + example: '2023-02-13T00:00:00.000Z' + endDate: + type: string + description: >- + Mandatory if startDate is used. Ending date of the report + (YYYY-MM-DD). Must be greater than equal to startDate + example: '2023-02-17T00:00:00.000Z' + sort: + type: string + description: Sorting order of records (asc or desc) + example: desc + type: + type: string + description: Filter the history based on webhook type + example: transactional + enum: + - transactional + - marketing + event: + type: string + description: Filter the history for a specific event type + example: request + enum: + - invalid_parameter + - missing_parameter + - hardBounce + - softBounce + - delivered + - spam + - request + - opened + - click + - invalid + - deferred + - blocked + - unsubscribed + - error + - uniqueOpened + - loadedByProxy + - allEvents + notifyURL: + type: string + description: Webhook URL to receive CSV file link + example: https://brevo.com + webhookId: + type: integer + description: Filter the history for a specific webhook id + example: 2345 + email: + type: string + description: Filter the history for a specific email + example: example@brevo.com + messageId: + type: integer + description: >- + Filter the history for a specific message id. Applicable only for + transactional webhooks. + example: <23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib> + responses: + createModel: + description: successfully created + content: + application/json: + schema: + $ref: '#/components/schemas/createModel' + createdProcessId: + description: process id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdProcessId' + createdBatchId: + description: batch id created + content: + application/json: + schema: + $ref: '#/components/schemas/createdBatchId' + securitySchemes: + api-key: + type: apiKey + description: >- + The API key should be passed in the request headers as `api-key` for + authentication. + name: api-key + in: header +x-samples-languages: + - curl diff --git a/sdks/db/processed-custom-request-cache/brevo.com.yaml b/sdks/db/processed-custom-request-cache/brevo.com.yaml new file mode 100644 index 0000000000..99ff957777 --- /dev/null +++ b/sdks/db/processed-custom-request-cache/brevo.com.yaml @@ -0,0 +1,48 @@ +processed: + securitySchemes: + api-key: + type: apiKey + description: >- + The API key should be passed in the request headers as `api-key` for + authentication. + name: api-key + in: header + apiBaseUrl: https://api.brevo.com/v3 + apiVersion: 3.0.0 + apiDescription: > + Brevo provide a RESTFul API that can be used with any languages. With this + API, you will be able to : + - Manage your campaigns and get the statistics + - Manage your contacts + - Send transactional Emails and SMS + - and much more... + + You can download our wrappers at https://github.com/orgs/brevo + + + **Possible responses** + | Code | Message | + | :-------------: | ------------- | + | 200 | OK. Successful Request | + | 201 | OK. Successful Creation | + | 202 | OK. Request accepted | + | 204 | OK. Successful Update/Deletion | + | 400 | Error. Bad Request | + | 401 | Error. Authentication Needed | + | 402 | Error. Not enough credit, plan upgrade needed | + | 403 | Error. Permission denied | + | 404 | Error. Object does not exist | + | 405 | Error. Method not allowed | + | 406 | Error. Not Acceptable | + apiTitle: Brevo API + endpoints: 156 + sdkMethods: 221 + schemas: 213 + parameters: 772 + contactUrl: https://account.brevo.com/support + contactEmail: contact@brevo.com + originalCustomRequest: + type: GET + url: https://api.brevo.com/v3/swagger_definition_v3.yml + customRequestSpecFilename: brevo.com.yaml + difficultyScore: 520.5 diff --git a/sdks/db/progress/brevo-progress.yaml b/sdks/db/progress/brevo-progress.yaml new file mode 100644 index 0000000000..fd05f4bfa6 --- /dev/null +++ b/sdks/db/progress/brevo-progress.yaml @@ -0,0 +1,642 @@ +examples: {} +examples_2: {} +examples_3: {} +ignorePotentialIncorrectType: true +operationIds: + /account: + get: Account_informationDetails + /categories: + get: Ecommerce_getAllCategories + post: Ecommerce_createCategory + /categories/batch: + post: Ecommerce_createCategoriesBatch + /categories/{id}: + get: Ecommerce_getCategoryDetails + /companies: + get: Companies_getAll + post: Companies_createCompany + /companies/attributes: + get: Companies_getAttributes + /companies/link-unlink/{id}: + patch: Companies_linkUnlinkWithContactDeal + /companies/{id}: + delete: Companies_deleteCompany + get: Companies_getCompanyById + patch: Companies_updateCompany + /contacts: + get: Contacts_getAllContacts + post: Contacts_createNewContact + /contacts/attributes: + get: Contacts_listAttributes + /contacts/attributes/{attributeCategory}/{attributeName}: + delete: Contacts_removeAttribute + post: Contacts_createAttribute + put: Contacts_updateAttribute + /contacts/batch: + post: Contacts_updateMultiple + /contacts/doubleOptinConfirmation: + post: Contacts_createDoubleOptInContact + /contacts/export: + post: Contacts_exportProcessId + /contacts/folders: + get: Contacts_getAllFolders + post: Contacts_createFolder + /contacts/folders/{folderId}: + delete: Contacts_deleteFolder + get: Contacts_getFolderDetails + put: Contacts_updateFolder + /contacts/folders/{folderId}/lists: + get: Contacts_getFolderLists + /contacts/import: + post: Contacts_importContactsProcess + /contacts/lists: + get: Contacts_getAllLists + post: Contacts_createList + /contacts/lists/{listId}: + delete: Contacts_deleteList + get: Contacts_getListDetails + put: Contacts_updateList + /contacts/lists/{listId}/contacts: + get: Contacts_getListContacts + /contacts/lists/{listId}/contacts/add: + post: Contacts_addToList + /contacts/lists/{listId}/contacts/remove: + post: Contacts_removeContactFromList + /contacts/segments: + get: Contacts_getAllSegments + /contacts/{identifier}: + delete: Contacts_deleteContact + get: Contacts_getDetails + put: Contacts_updateContactById + /contacts/{identifier}/campaignStats: + get: Contacts_getEmailCampaignStats + /conversations/agentOnlinePing: + post: Conversations_setAgentOnlineStatus + /conversations/messages: + post: Conversations_sendMessageAsAgent + /conversations/messages/{id}: + delete: Conversations_deleteMessageSentByAgent + get: Conversations_getMessageById + put: Conversations_updateAgentMessage + /conversations/pushedMessages: + post: Conversations_sendAutomatedMessage + /conversations/pushedMessages/{id}: + delete: Conversations_deleteAutomatedMessage + get: Conversations_getAutomatedMessage + put: Conversations_updatePushedMessage + /corporate/group: + post: MasterAccount_createGroupOfSubAccounts + /corporate/group/unlink/{groupId}/subAccounts: + put: MasterAccount_unlinkSubAccountFromGroup + /corporate/group/{id}: + delete: MasterAccount_deleteGroup + get: MasterAccount_getGroupDetails + put: MasterAccount_updateGroupSubAccounts + /corporate/groups: + get: MasterAccount_listGroups + /corporate/invited/users: + get: MasterAccount_listAdminUsers + /corporate/masterAccount: + get: MasterAccount_getDetails + /corporate/ssoToken: + post: MasterAccount_generateSsoToken + /corporate/subAccount: + get: MasterAccount_listSubAccounts + post: MasterAccount_createSubAccount + /corporate/subAccount/key: + post: MasterAccount_createSubAccountKey + /corporate/subAccount/ssoToken: + post: MasterAccount_generateSsoToken + /corporate/subAccount/{id}: + delete: MasterAccount_deleteSubAccount + get: MasterAccount_getSubAccountDetails + /corporate/subAccount/{id}/applications/toggle: + put: MasterAccount_enableDisable + /corporate/subAccount/{id}/plan: + put: MasterAccount_updateSubAccountPlan + /corporate/user/invitation/send: + post: MasterAccount_sendInvitationToAdminUser + /corporate/user/invitation/{action}/{email}: + put: MasterAccount_resendCancelAdminUserInvitation + /corporate/user/revoke/{email}: + delete: MasterAccount_revokeAdminUser + /corporate/user/{email}/permissions: + get: MasterAccount_checkAdminUserPermissions + /couponCollections: + get: Coupons_listCouponCollections + post: Coupons_createCollection + /couponCollections/{id}: + get: Coupons_getById + patch: Coupons_updateCouponCollectionById + /coupons: + post: Coupons_createCouponCollection + /crm/attributes/deals: + get: Deals_getAttributes + /crm/deals: + get: Deals_getAllDeals + post: Deals_createNewDeal + /crm/deals/link-unlink/{id}: + patch: Deals_linkUnlinkPatch + /crm/deals/{id}: + delete: Deals_deleteDeal + get: Deals_getById + patch: Deals_updateDealById + /crm/files: + get: Files_getAllFiles + post: Files_uploadFile + /crm/files/{id}: + delete: Files_deleteFile + get: Files_downloadFile + /crm/files/{id}/data: + get: Files_getFileDetails + /crm/notes: + get: Notes_getAll + post: Notes_createNewNote + /crm/notes/{id}: + delete: Notes_removeById + get: Notes_getById + patch: Notes_updateNoteById + /crm/pipeline/details: + get: Deals_getPipelineStages + /crm/pipeline/details/all: + get: Deals_getAllPipelines + /crm/pipeline/details/{pipelineID}: + get: Deals_getDetails + /crm/tasks: + get: Tasks_getAll + post: Tasks_createNewTask + /crm/tasks/{id}: + delete: Tasks_removeTask + get: Tasks_getTaskById + patch: Tasks_updateTask + /crm/tasktypes: + get: Tasks_getAllTaskTypes + /ecommerce/activate: + post: Ecommerce_activateApp + /emailCampaigns: + get: EmailCampaigns_getAll + post: EmailCampaigns_createCampaign + /emailCampaigns/images: + post: EmailCampaigns_uploadImageToGallery + /emailCampaigns/{campaignId}: + delete: EmailCampaigns_removeCampaign + get: EmailCampaigns_getReport + put: EmailCampaigns_updateCampaign + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: EmailCampaigns_getAbTestResult + /emailCampaigns/{campaignId}/exportRecipients: + post: EmailCampaigns_exportRecipientsPost + /emailCampaigns/{campaignId}/sendNow: + post: EmailCampaigns_sendImmediate + /emailCampaigns/{campaignId}/sendReport: + post: EmailCampaigns_sendReport + /emailCampaigns/{campaignId}/sendTest: + post: EmailCampaigns_sendTestToTestList + /emailCampaigns/{campaignId}/sharedUrl: + get: EmailCampaigns_getSharedUrl + /emailCampaigns/{campaignId}/status: + put: EmailCampaigns_updateStatus + /events: + post: Event_trackInteraction + /feeds: + get: ExternalFeeds_getAllFeeds + post: ExternalFeeds_createFeed + /feeds/{uuid}: + delete: ExternalFeeds_deleteFeedByUUID + get: ExternalFeeds_getFeedByUuid + put: ExternalFeeds_updateFeedByUUID + /inbound/attachments/{downloadToken}: + get: InboundParsing_getAttachmentByToken + /inbound/events: + get: InboundParsing_getAllEvents + /inbound/events/{uuid}: + get: InboundParsing_getEmailEvents + /orders: + get: Ecommerce_getOrders + /orders/status: + post: Ecommerce_manageOrderStatus + /orders/status/batch: + post: Ecommerce_createOrderBatch + /organization/activities: + get: Account_getUserActivityLogs + /organization/invited/users: + get: User_getAllUsers + /organization/user/invitation/revoke/{email}: + put: User_revokePermissionByEmail + /organization/user/invitation/send: + post: User_sendInvitation + /organization/user/invitation/{action}/{email}: + put: User_resendInvitation + /organization/user/update/permissions: + post: User_updatePermissions + /organization/user/{email}/permissions: + get: User_checkPermission + /processes: + get: Process_getAllProcesses + /processes/{processId}: + get: Process_getProcessInformation + /products: + get: Ecommerce_listAllProducts + post: Ecommerce_createProduct + /products/batch: + post: Ecommerce_createProductsBatch + /products/{id}: + get: Ecommerce_getProductDetails + /reseller/children: + get: Reseller_listChildrenAccounts + post: Reseller_createChild + /reseller/children/{childIdentifier}: + delete: Reseller_deleteChildByIdentifier + get: Reseller_getChildDetails + put: Reseller_updateChildInfo + /reseller/children/{childIdentifier}/accountCreationStatus: + get: Reseller_getChildAccountCreationStatus + /reseller/children/{childIdentifier}/accountStatus: + put: Reseller_updateChildAccountStatus + /reseller/children/{childIdentifier}/auth: + get: Reseller_getSessionToken + /reseller/children/{childIdentifier}/credits/add: + post: Reseller_addChildCredits + /reseller/children/{childIdentifier}/credits/remove: + post: Reseller_removeCreditsFromChild + /reseller/children/{childIdentifier}/domains: + get: Reseller_getChildDomains + post: Reseller_createChildDomain + /reseller/children/{childIdentifier}/domains/{domainName}: + delete: Reseller_deleteSenderDomainByChildIdentifierAndDomainName + put: Reseller_updateSenderDomain + /reseller/children/{childIdentifier}/ips/associate: + post: Reseller_associateDedicatedIpToChild + /reseller/children/{childIdentifier}/ips/dissociate: + post: Reseller_dissociateIpToChild + /senders: + get: Senders_listAll + post: Senders_createNewSender + /senders/domains: + get: Domains_getAll + post: Domains_createNewDomain + /senders/domains/{domainName}: + delete: Domains_deleteDomain + get: Domains_validateConfiguration + /senders/domains/{domainName}/authenticate: + put: Domains_authenticateDomain + /senders/ips: + get: Senders_getDedicatedIps + /senders/{senderId}: + delete: Senders_removeSender + put: Senders_updateSenderById + /senders/{senderId}/ips: + get: Senders_getAllDedicatedIps + /senders/{senderId}/validate: + put: Senders_validateSenderUsingOtp + /smsCampaigns: + get: SmsCampaigns_getAllInformation + post: SmsCampaigns_createCampaign + /smsCampaigns/{campaignId}: + delete: SmsCampaigns_removeCampaignById + get: SmsCampaigns_getCampaignById + put: SmsCampaigns_updateCampaignById + /smsCampaigns/{campaignId}/exportRecipients: + post: SmsCampaigns_exportRecipientsProcess + /smsCampaigns/{campaignId}/sendNow: + post: SmsCampaigns_sendImmediately + /smsCampaigns/{campaignId}/sendReport: + post: SmsCampaigns_sendCampaignReport + /smsCampaigns/{campaignId}/sendTest: + post: SmsCampaigns_sendTestSms + /smsCampaigns/{campaignId}/status: + put: SmsCampaigns_updateStatus + /smtp/blockedContacts: + get: TransactionalEmails_listBlockedContacts + /smtp/blockedContacts/{email}: + delete: TransactionalEmails_unblockContact + /smtp/blockedDomains: + get: TransactionalEmails_getBlockedDomains + post: TransactionalEmails_addBlockedDomain + /smtp/blockedDomains/{domain}: + delete: TransactionalEmails_unblockDomain + /smtp/deleteHardbounces: + post: TransactionalEmails_removeHardbounces + /smtp/email: + post: TransactionalEmails_sendTransactionalEmail + /smtp/email/{identifier}: + delete: TransactionalEmails_deleteScheduledEmails + /smtp/emailStatus/{identifier}: + get: TransactionalEmails_getEmailStatusById + /smtp/emails: + get: TransactionalEmails_getList + /smtp/emails/{uuid}: + get: TransactionalEmails_getContentByUuid + /smtp/log/{identifier}: + delete: TransactionalEmails_deleteLog + /smtp/statistics/aggregatedReport: + get: TransactionalEmails_getAggregatedReport + /smtp/statistics/events: + get: TransactionalEmails_getAllActivity + /smtp/statistics/reports: + get: TransactionalEmails_getActivityPerDay + /smtp/templates: + get: TransactionalEmails_listTemplates + post: TransactionalEmails_createTemplate + /smtp/templates/{templateId}: + delete: TransactionalEmails_deleteTemplateById + get: TransactionalEmails_getTemplateInfo + put: TransactionalEmails_updateTemplate + /smtp/templates/{templateId}/sendTest: + post: TransactionalEmails_sendTestTemplate + /transactionalSMS/sms: + post: TransactionalSms_sendSmsMessageToMobile + /transactionalSMS/statistics/aggregatedReport: + get: TransactionalSms_getAggregatedReport + /transactionalSMS/statistics/events: + get: TransactionalSms_getAllEvents + /transactionalSMS/statistics/reports: + get: TransactionalSms_getSmsActivityAggregatedPerDay + /webhooks: + get: Webhooks_getAll + post: Webhooks_createHook + /webhooks/export: + post: Webhooks_exportAllEvents + /webhooks/{webhookId}: + delete: Webhooks_deleteWebhook + get: Webhooks_getDetails + put: Webhooks_updateWebhookById + /whatsapp/sendMessage: + post: TransactionalWhatsApp_sendMessage + /whatsapp/statistics/events: + get: TransactionalWhatsApp_getActivity + /whatsappCampaigns: + get: WhatsAppCampaigns_getAll + post: WhatsAppCampaigns_createAndSend + /whatsappCampaigns/config: + get: WhatsAppCampaigns_getAccountInfo + /whatsappCampaigns/template: + post: WhatsAppCampaigns_createTemplate + /whatsappCampaigns/template-list: + get: WhatsAppCampaigns_getTemplates + /whatsappCampaigns/template/approval/{templateId}: + post: WhatsAppCampaigns_sendTemplateForApproval + /whatsappCampaigns/{campaignId}: + delete: WhatsAppCampaigns_deleteCampaign + get: WhatsAppCampaigns_getCampaignById + put: WhatsAppCampaigns_updateCampaignById +operationTags: {} +renameTags: {} +requestSchemaNames: + /companies: + post: + application/json: CompaniesCreateCompanyRequest + /companies/link-unlink/{id}: + patch: + application/json: CompaniesLinkUnlinkWithContactDealRequest + /companies/{id}: + patch: + application/json: CompaniesUpdateCompanyRequest + /contacts/lists/{listId}/contacts/add: + post: + application/json: ContactsAddToListRequest + /contacts/lists/{listId}/contacts/remove: + post: + application/json: ContactsRemoveContactFromListRequest + /conversations/agentOnlinePing: + post: + application/json: ConversationsSetAgentOnlineStatusRequest + /conversations/messages: + post: + application/json: ConversationsSendMessageAsAgentRequest + /conversations/messages/{id}: + put: + application/json: ConversationsUpdateAgentMessageRequest + /conversations/pushedMessages: + post: + application/json: ConversationsSendAutomatedMessageRequest + /conversations/pushedMessages/{id}: + put: + application/json: ConversationsUpdatePushedMessageRequest + /corporate/group: + post: + application/json: MasterAccountCreateGroupOfSubAccountsRequest + /corporate/group/unlink/{groupId}/subAccounts: + put: + application/json: MasterAccountUnlinkSubAccountFromGroupRequest + /corporate/group/{id}: + put: + application/json: MasterAccountUpdateGroupSubAccountsRequest + /corporate/ssoToken: + post: + application/json: MasterAccountGenerateSsoTokenRequest + /corporate/subAccount/key: + post: + application/json: MasterAccountCreateSubAccountKeyRequest + /corporate/subAccount/ssoToken: + post: + application/json: MasterAccountGenerateSsoTokenRequest1 + /couponCollections: + post: + application/json: CouponsCreateCollectionRequest + /couponCollections/{id}: + patch: + application/json: CouponsUpdateCouponCollectionByIdRequest + /coupons: + post: + application/json: CouponsCreateCouponCollectionRequest + /crm/deals: + post: + application/json: DealsCreateNewDealRequest + /crm/deals/link-unlink/{id}: + patch: + application/json: DealsLinkUnlinkPatchRequest + /crm/deals/{id}: + patch: + application/json: DealsUpdateDealByIdRequest + /crm/files: + post: + multipart/form-data: FilesUploadFileRequest + /crm/tasks: + post: + application/json: TasksCreateNewTaskRequest + /crm/tasks/{id}: + patch: + application/json: TasksUpdateTaskRequest + /webhooks/export: + post: + application/json: WebhooksExportAllEventsRequest + /whatsapp/sendMessage: + post: + application/json: TransactionalWhatsAppSendMessageRequest +responseDescriptions: {} +responseSchemaNames: + /companies: + post: + '200': + application/json: CompaniesCreateCompanyResponse + /corporate/group: + post: + '201': + application/json: MasterAccountCreateGroupOfSubAccountsResponse + /corporate/groups: + get: + '200': + application/json: MasterAccountListGroupsResponse + /corporate/user/invitation/send: + post: + '201': + application/json: MasterAccountSendInvitationToAdminUserResponse + /corporate/user/invitation/{action}/{email}: + put: + '200': + application/json: MasterAccountResendCancelAdminUserInvitationResponse + /couponCollections: + post: + '201': + application/json: CouponsCreateCollectionResponse + /couponCollections/{id}: + patch: + '200': + application/json: CouponsUpdateCouponCollectionByIdResponse + /crm/deals: + post: + '201': + application/json: DealsCreateNewDealResponse + /crm/tasks: + post: + '201': + application/json: TasksCreateNewTaskResponse + /feeds: + post: + '201': + application/json: ExternalFeedsCreateFeedResponse + /inbound/attachments/{downloadToken}: + get: + '200': + application/octet-stream: InboundParsingGetAttachmentByTokenResponse + /orders: + get: + '200': + application/json: EcommerceGetOrdersResponse + /smtp/emailStatus/{identifier}: + get: + '200': + application/json: TransactionalEmailsGetEmailStatusByIdResponse + /whatsapp/sendMessage: + post: + '201': + application/json: TransactionalWhatsAppSendMessageResponse +securityParameters: + authType: + query: false + categories: + query: false + contactNumber: + query: false + createdSince: + query: false + dateFrom: + query: false + dateTo: + query: false + days: + query: false + domain: + query: false + email: + query: false + endDate: + query: false + entity: + query: false + entityIds: + query: false + event: + query: false + excludeHtmlContent: + query: false + filter[assignTo]: + query: false + filter[companies]: + query: false + filter[contacts]: + query: false + filter[date]: + query: false + filter[deals]: + query: false + filter[status]: + query: false + filter[type]: + query: false + filters: + query: false + filters[attributes.deal_name]: + query: false + filters[linkedCompaniesIds]: + query: false + filters[linkedContactsIds]: + query: false + ids: + query: false + ip: + query: false + limit: + query: false + linkedContactsIds: + query: false + linkedDealsIds: + query: false + listIds: + query: false + messageId: + query: false + modifiedSince: + query: false + name: + query: false + offset: + query: false + page: + query: false + phoneNumber: + query: false + price[eq]: + query: false + price[gt]: + query: false + price[gte]: + query: false + price[lt]: + query: false + price[lte]: + query: false + price[ne]: + query: false + search: + query: false + segmentId: + query: false + sender: + query: false + senders: + query: false + sort: + query: false + sortBy: + query: false + source: + query: false + startDate: + query: false + statistics: + query: false + status: + query: false + tag: + query: false + tags: + query: false + templateId: + query: false + templateStatus: + query: false + type: + query: false +validServerUrls: {} diff --git a/sdks/db/published/from-custom-request_brevo.com.json b/sdks/db/published/from-custom-request_brevo.com.json new file mode 100644 index 0000000000..b61ad8a5a6 --- /dev/null +++ b/sdks/db/published/from-custom-request_brevo.com.json @@ -0,0 +1,9724 @@ +{ + "securitySchemes": { + "api-key": { + "type": "apiKey", + "description": "The API key should be passed in the request headers as `api-key` for authentication.", + "name": "api-key", + "in": "header" + } + }, + "apiBaseUrl": "https://api.brevo.com/v3", + "apiVersion": "3.0.0", + "apiDescription": "Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to :\n - Manage your campaigns and get the statistics\n - Manage your contacts\n - Send transactional Emails and SMS\n - and much more...\n\nYou can download our wrappers at https://github.com/orgs/brevo\n\n**Possible responses**\n | Code | Message |\n | :-------------: | ------------- |\n | 200 | OK. Successful Request |\n | 201 | OK. Successful Creation |\n | 202 | OK. Request accepted |\n | 204 | OK. Successful Update/Deletion |\n | 400 | Error. Bad Request |\n | 401 | Error. Authentication Needed |\n | 402 | Error. Not enough credit, plan upgrade needed |\n | 403 | Error. Permission denied |\n | 404 | Error. Object does not exist |\n | 405 | Error. Method not allowed |\n | 406 | Error. Not Acceptable |\n", + "apiTitle": "Brevo API", + "endpoints": 156, + "sdkMethods": 221, + "schemas": 254, + "parameters": 772, + "contactUrl": "https://account.brevo.com/support", + "contactEmail": "contact@brevo.com", + "originalCustomRequest": { + "type": "GET", + "url": "https://api.brevo.com/v3/swagger_definition_v3.yml" + }, + "customRequestSpecFilename": "brevo.com.yaml", + "difficultyScore": 520.5, + "difficulty": "Hard", + "company": "Brevo", + "sdkName": "brevo-{language}-sdk", + "clientName": "Brevo", + "metaDescription": "Brevo, formerly known as Sendinblue, is the leading customer relationship management (CRM) suite designed to fully cultivate long-term customer relationships and to empower businesses to expand in a fast changing digital world. With Brevo, businesses have a unified view of the customer journey in one easy-to-use platform to grow meaningful relationships.\n\n🙌Brevo Fun Facts 🙌\n- Founded in 2012 by Armand Thiberge with a mission to help businesses of all sizes build stronger customer relationships and grow beyond their wildest dreams\n- 500,000 customers across 180 countries \n- Fully compliant with GDPR regulations\n- Service and platform available in six languages\n- Headquartered in Paris with eight other offices in Seattle, Toronto, Berlin, Vienna, Sofia, Noida, and Bengaluru\n- 700+ talented employees representing over 67 nationalities\n- Continuous efforts to reduce and monitor its carbon footprint\n- Achieved centaur status—$100M in ARR—in 2022 \n- Award wins include Top 100 Software Company by The Software Report (TSR), Stevie Award: Relationship Management Solution, MarTech Breakthrough Award: Best Overall Marketing Automation Platform, G2: Leader Winter, Leader Enterprise Winter, Best Results Mid-Market, Best Software Awards: Top 50 Marketing Products, Best Software Awards: Top 100 Fastest Growing Products", + "apiStatusUrls": "inherit", + "homepage": "brevo.com", + "developerDocumentation": "developers.brevo.com/", + "categories": [ + "email", + "sms", + "chat" + ], + "category": "CRM (Customer Relationship Management)", + "methods": [ + { + "url": "/emailCampaigns", + "method": "getAll", + "httpMethod": "get", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Return all your created email campaigns", + "parameters": [ + { + "name": "type", + "schema": "string", + "description": "Filter on the type of the campaigns" + }, + { + "name": "status", + "schema": "string", + "description": "Filter on the status of the campaign" + }, + { + "name": "statistics", + "schema": "string", + "description": "Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response." + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used**. Starting (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns.\n**Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used**. Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns.\n**Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "excludeHtmlContent", + "schema": "boolean", + "description": "Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns", + "method": "createCampaign", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Create an email campaign", + "parameters": [ + { + "name": "tag", + "schema": "string", + "required": false, + "description": "", + "example": "Newsletter" + }, + { + "name": "sender", + "schema": "object", + "required": true, + "description": "" + }, + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Newsletter - May 2017" + }, + { + "name": "htmlContent", + "schema": "string", + "required": false, + "description": "", + "example": "Please confirm your email address by clicking on the link below
" + }, + { + "name": "htmlUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://html.domain.com" + }, + { + "name": "templateId", + "schema": "integer", + "required": false, + "description": "" + }, + { + "name": "scheduledAt", + "schema": "string", + "required": false, + "description": "", + "example": "2017-06-01T10:30:00.000Z" + }, + { + "name": "subject", + "schema": "string", + "required": false, + "description": "", + "example": "Discover the New Collection !" + }, + { + "name": "previewText", + "schema": "string", + "required": false, + "description": "", + "example": "Thanks for your order!" + }, + { + "name": "replyTo", + "schema": "string", + "required": false, + "description": "", + "example": "support@myshop.com" + }, + { + "name": "toField", + "schema": "string", + "required": false, + "description": "", + "example": "{FNAME} {LNAME}" + }, + { + "name": "recipients", + "schema": "object", + "required": false, + "description": "" + }, + { + "name": "attachmentUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://attachment.domain.com" + }, + { + "name": "inlineImageActivation", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "mirrorActive", + "schema": "boolean", + "required": false, + "description": "", + "example": true + }, + { + "name": "footer", + "schema": "string", + "required": false, + "description": "", + "example": "[DEFAULT_FOOTER]" + }, + { + "name": "header", + "schema": "string", + "required": false, + "description": "", + "example": "[DEFAULT_HEADER]" + }, + { + "name": "utmCampaign", + "schema": "string", + "required": false, + "description": "", + "example": "NL_05_2017" + }, + { + "name": "params", + "schema": "object", + "required": false, + "description": "", + "example": { + "FNAME": "Joe", + "LNAME": "Doe" + } + }, + { + "name": "sendAtBestTime", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "abTesting", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "subjectA", + "schema": "string", + "required": false, + "description": "", + "example": "Discover the New Collection!" + }, + { + "name": "subjectB", + "schema": "string", + "required": false, + "description": "", + "example": "Want to discover the New Collection?" + }, + { + "name": "splitRule", + "schema": "integer", + "required": false, + "description": "", + "example": 50 + }, + { + "name": "winnerCriteria", + "schema": "string", + "required": false, + "description": "", + "example": "open" + }, + { + "name": "winnerDelay", + "schema": "integer", + "required": false, + "description": "", + "example": 50 + }, + { + "name": "ipWarmupEnable", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "initialQuota", + "schema": "integer", + "required": false, + "description": "", + "example": 3000 + }, + { + "name": "increaseRate", + "schema": "integer", + "required": false, + "description": "", + "example": 70 + }, + { + "name": "unsubscriptionPageId", + "schema": "string", + "required": false, + "description": "", + "example": "62cbb7fabbe85021021aac52" + }, + { + "name": "updateFormId", + "schema": "string", + "required": false, + "description": "", + "example": "6313436b9ad40e23b371d095" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}", + "method": "removeCampaign", + "httpMethod": "delete", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Delete an email campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}", + "method": "getReport", + "httpMethod": "get", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Get an email campaign report", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "statistics", + "schema": "string", + "required": false, + "description": "Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response." + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}", + "method": "updateCampaign", + "httpMethod": "put", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Update an email campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "tag", + "schema": "string", + "description": "", + "example": "Newsletter" + }, + { + "name": "sender", + "schema": "object", + "description": "" + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Newsletter - May 2017" + }, + { + "name": "htmlContent", + "schema": "string", + "description": "", + "example": "Please confirm your email address by clicking on the link below
" + }, + { + "name": "htmlUrl", + "schema": "string", + "description": "", + "example": "https://html.domain.com" + }, + { + "name": "scheduledAt", + "schema": "string", + "description": "", + "example": "2017-06-01T10:30:00.000Z" + }, + { + "name": "subject", + "schema": "string", + "description": "", + "example": "Discover the New Collection !" + }, + { + "name": "previewText", + "schema": "string", + "description": "", + "example": "Thanks for your order!" + }, + { + "name": "replyTo", + "schema": "string", + "description": "", + "example": "support@myshop.com" + }, + { + "name": "toField", + "schema": "string", + "description": "", + "example": "{FNAME} {LNAME}" + }, + { + "name": "recipients", + "schema": "object", + "description": "" + }, + { + "name": "attachmentUrl", + "schema": "string", + "description": "", + "example": "https://attachment.domain.com" + }, + { + "name": "inlineImageActivation", + "schema": "boolean", + "description": "", + "example": true, + "default": false + }, + { + "name": "mirrorActive", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "recurring", + "schema": "boolean", + "description": "", + "example": false, + "default": false + }, + { + "name": "footer", + "schema": "string", + "description": "", + "example": "[DEFAULT_FOOTER]" + }, + { + "name": "header", + "schema": "string", + "description": "", + "example": "[DEFAULT_HEADER]" + }, + { + "name": "utmCampaign", + "schema": "string", + "description": "", + "example": "NL_05_2017" + }, + { + "name": "params", + "schema": "object", + "description": "", + "example": { + "FNAME": "Joe", + "LNAME": "Doe" + } + }, + { + "name": "sendAtBestTime", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "abTesting", + "schema": "boolean", + "description": "", + "example": true, + "default": false + }, + { + "name": "subjectA", + "schema": "string", + "description": "", + "example": "Discover the New Collection!" + }, + { + "name": "subjectB", + "schema": "string", + "description": "", + "example": "Want to discover the New Collection?" + }, + { + "name": "splitRule", + "schema": "integer", + "description": "", + "example": 50 + }, + { + "name": "winnerCriteria", + "schema": "string", + "description": "", + "example": "open" + }, + { + "name": "winnerDelay", + "schema": "integer", + "description": "", + "example": 50 + }, + { + "name": "ipWarmupEnable", + "schema": "boolean", + "description": "", + "example": true, + "default": false + }, + { + "name": "initialQuota", + "schema": "integer", + "description": "", + "example": 3000 + }, + { + "name": "increaseRate", + "schema": "integer", + "description": "", + "example": 70 + }, + { + "name": "unsubscriptionPageId", + "schema": "string", + "description": "", + "example": "62cbb7fabbe85021021aac52" + }, + { + "name": "updateFormId", + "schema": "string", + "description": "", + "example": "6313436b9ad40e23b371d095" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/sendNow", + "method": "sendImmediate", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Send an email campaign immediately, based on campaignId", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "402", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/sendTest", + "method": "sendTestToTestList", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Send an email campaign to your test list", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "emailTo", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/status", + "method": "updateStatus", + "httpMethod": "put", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Update an email campaign status", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "status", + "schema": "string", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/sendReport", + "method": "sendReport", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Send the report of a campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "language", + "schema": "string", + "required": false, + "description": "", + "example": "en", + "default": "fr" + }, + { + "name": "email", + "schema": "object", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/abTestCampaignResult", + "method": "getAbTestResult", + "httpMethod": "get", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Get an A/B test email campaign results", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the A/B test campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/sharedUrl", + "method": "getSharedUrl", + "httpMethod": "get", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Get a shared template url", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign or template", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + }, + { + "statusCode": "405", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/{campaignId}/exportRecipients", + "method": "exportRecipientsPost", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Export the recipients of an email campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + }, + { + "name": "notifyURL", + "schema": "string", + "required": false, + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "recipientsType", + "schema": "string", + "required": true, + "description": "", + "example": "openers" + } + ], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/emailCampaigns/images", + "method": "uploadImageToGallery", + "httpMethod": "post", + "tag": "Email Campaigns", + "typeScriptTag": "emailCampaigns", + "description": "Upload an image to your account's image gallery", + "parameters": [ + { + "name": "imageUrl", + "schema": "string", + "required": true, + "description": "", + "example": "https://somedomain.com/image1.jpg" + }, + { + "name": "name", + "schema": "string", + "required": false, + "description": "", + "example": "nature.jpg" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/email", + "method": "sendTransactionalEmail", + "httpMethod": "post", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Send a transactional email", + "parameters": [ + { + "name": "tags", + "schema": "array", + "description": "" + }, + { + "name": "sender", + "schema": "object", + "description": "" + }, + { + "name": "to", + "schema": "array", + "description": "" + }, + { + "name": "bcc", + "schema": "array", + "description": "" + }, + { + "name": "cc", + "schema": "array", + "description": "" + }, + { + "name": "htmlContent", + "schema": "string", + "description": "", + "example": "Please confirm your email address by clicking on the link below
" + }, + { + "name": "textContent", + "schema": "string", + "description": "", + "example": "Please confirm your email address by clicking on the link https://text.domain.com" + }, + { + "name": "subject", + "schema": "string", + "description": "", + "example": "Login Email confirmation" + }, + { + "name": "replyTo", + "schema": "object", + "description": "" + }, + { + "name": "attachment", + "schema": "array", + "description": "" + }, + { + "name": "headers", + "schema": "object", + "description": "", + "example": { + "sender.ip": "1.2.3.4", + "X-Mailin-custom": "some_custom_header", + "idempotencyKey": "abc-123" + } + }, + { + "name": "templateId", + "schema": "integer", + "description": "", + "example": 2 + }, + { + "name": "params", + "schema": "object", + "description": "", + "example": { + "FNAME": "Joe", + "LNAME": "Doe" + } + }, + { + "name": "messageVersions", + "schema": "array", + "description": "" + }, + { + "name": "scheduledAt", + "schema": "string", + "description": "", + "example": "2022-04-05T12:30:00+02:00" + }, + { + "name": "batchId", + "schema": "string", + "description": "", + "example": "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/emails", + "method": "getList", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get the list of transactional emails on the basis of allowed filters", + "parameters": [ + { + "name": "email", + "schema": "string", + "description": "**Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent.\n" + }, + { + "name": "templateId", + "schema": "integer", + "description": "**Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email.\n" + }, + { + "name": "messageId", + "schema": "string", + "description": "**Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent.\n" + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ from which you want to fetch the list. **Maximum time period that can be selected is one month**.\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ till which you want to fetch the list. **Maximum time period that can be selected is one month.**\n" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents returned per page", + "default": 500 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/emails/{uuid}", + "method": "getContentByUuid", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get the personalized content of a sent transactional email", + "parameters": [ + { + "name": "uuid", + "schema": "string", + "required": true, + "description": "Unique id of the transactional email that has been sent to a particular contact", + "example": "UUID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/smtp/log/{identifier}", + "method": "deleteLog", + "httpMethod": "delete", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Delete an SMTP transactional log", + "parameters": [ + { + "name": "identifier", + "schema": "string", + "required": true, + "description": "MessageId or Email of the transactional log(https://developers.brevo.com/ to delete", + "example": "IDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/templates", + "method": "listTemplates", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get the list of email templates", + "parameters": [ + { + "name": "templateStatus", + "schema": "boolean", + "description": "Filter on the status of the template. Active = true, inactive = false" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents returned per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/templates", + "method": "createTemplate", + "httpMethod": "post", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Create an email template", + "parameters": [ + { + "name": "tag", + "schema": "string", + "required": false, + "description": "", + "example": "OrderConfirmation" + }, + { + "name": "sender", + "schema": "object", + "required": true, + "description": "" + }, + { + "name": "templateName", + "schema": "string", + "required": true, + "description": "", + "example": "Order Confirmation - EN" + }, + { + "name": "htmlContent", + "schema": "string", + "required": false, + "description": "", + "example": "The order n°xxxxx has been confirmed. Thanks for your purchase" + }, + { + "name": "htmlUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://html.domain.com" + }, + { + "name": "subject", + "schema": "string", + "required": true, + "description": "", + "example": "Thanks for your purchase !" + }, + { + "name": "replyTo", + "schema": "string", + "required": false, + "description": "", + "example": "support@myshop.com" + }, + { + "name": "toField", + "schema": "string", + "required": false, + "description": "", + "example": "{FNAME} {LNAME}" + }, + { + "name": "attachmentUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://attachment.domain.com" + }, + { + "name": "isActive", + "schema": "boolean", + "required": false, + "description": "", + "example": true + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/templates/{templateId}", + "method": "deleteTemplateById", + "httpMethod": "delete", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Delete an inactive email template", + "parameters": [ + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "id of the template", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/templates/{templateId}", + "method": "getTemplateInfo", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Returns the template information", + "parameters": [ + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "id of the template", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/templates/{templateId}", + "method": "updateTemplate", + "httpMethod": "put", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Update an email template", + "parameters": [ + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "id of the template", + "example": 0 + }, + { + "name": "tag", + "schema": "string", + "description": "", + "example": "OrderConfirmation" + }, + { + "name": "sender", + "schema": "object", + "description": "" + }, + { + "name": "templateName", + "schema": "string", + "description": "", + "example": "Order Confirmation - EN" + }, + { + "name": "htmlContent", + "schema": "string", + "description": "", + "example": "The order n°xxxxx has been confirmed. Thanks for your purchase" + }, + { + "name": "htmlUrl", + "schema": "string", + "description": "", + "example": "https://html.domain.com" + }, + { + "name": "subject", + "schema": "string", + "description": "", + "example": "Thanks for your purchase !" + }, + { + "name": "replyTo", + "schema": "string", + "description": "", + "example": "support@myshop.com" + }, + { + "name": "toField", + "schema": "string", + "description": "", + "example": "{FNAME} {LNAME}" + }, + { + "name": "attachmentUrl", + "schema": "string", + "description": "", + "example": "https://attachment.domain.com" + }, + { + "name": "isActive", + "schema": "boolean", + "description": "", + "example": true + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/templates/{templateId}/sendTest", + "method": "sendTestTemplate", + "httpMethod": "post", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Send a template to your test list", + "parameters": [ + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "Id of the template", + "example": 0 + }, + { + "name": "emailTo", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/statistics/aggregatedReport", + "method": "getAggregatedReport", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get your transactional email activity aggregated over a period of time", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date of the report (https://developers.brevo.com/. Must be lower than equal to endDate\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date of the report (https://developers.brevo.com/. Must be greater than equal to startDate\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_\n" + }, + { + "name": "tag", + "schema": "string", + "description": "Tag of the emails" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/statistics/reports", + "method": "getActivityPerDay", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get your transactional email activity aggregated per day", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents returned per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document on the page", + "default": 0 + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date of the report (https://developers.brevo.com/\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date of the report (https://developers.brevo.com/\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_\n" + }, + { + "name": "tag", + "schema": "string", + "description": "Tag of the emails" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/statistics/events", + "method": "getAllActivity", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get all your transactional email activity (unaggregated events)", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number limitation for the result returned", + "default": 2500 + }, + { + "name": "offset", + "schema": "integer", + "description": "Beginning point in the list to retrieve from.", + "default": 0 + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date of the report (https://developers.brevo.com/. Must be lower than equal to endDate\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date of the report (https://developers.brevo.com/. Must be greater than equal to startDate\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_\n" + }, + { + "name": "email", + "schema": "string", + "description": "Filter the report for a specific email addresses" + }, + { + "name": "event", + "schema": "string", + "description": "Filter the report for a specific event type" + }, + { + "name": "tags", + "schema": "string", + "description": "Filter the report for tags (serialized and urlencoded array)" + }, + { + "name": "messageId", + "schema": "string", + "description": "Filter on a specific message id" + }, + { + "name": "templateId", + "schema": "integer", + "description": "Filter on a specific template id" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/blockedContacts/{email}", + "method": "unblockContact", + "httpMethod": "delete", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Unblock or resubscribe a transactional contact", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "contact email (https://developers.brevo.com/ to unblock.", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/blockedContacts", + "method": "listBlockedContacts", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get the list of blocked or unsubscribed transactional contacts", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ from which you want to fetch the blocked or unsubscribed contacts\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ till which you want to fetch the blocked or unsubscribed contacts\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents returned per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document on the page", + "default": 0 + }, + { + "name": "senders", + "schema": "array", + "description": "Comma separated list of emails of the senders from which contacts are blocked or unsubscribed" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/blockedDomains", + "method": "getBlockedDomains", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Get the list of blocked domains", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/smtp/blockedDomains", + "method": "addBlockedDomain", + "httpMethod": "post", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Add a new domain to the list of blocked domains", + "parameters": [ + { + "name": "domain", + "schema": "string", + "required": true, + "description": "", + "example": "example.com" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/blockedDomains/{domain}", + "method": "unblockDomain", + "httpMethod": "delete", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Unblock an existing domain from the list of blocked domains", + "parameters": [ + { + "name": "domain", + "schema": "string", + "required": true, + "description": "The name of the domain to be deleted", + "example": "DOMAIN" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/deleteHardbounces", + "method": "removeHardbounces", + "httpMethod": "post", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Delete hardbounces", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "", + "example": "2016-12-31T00:00:00.000Z" + }, + { + "name": "endDate", + "schema": "string", + "description": "", + "example": "2017-01-31T00:00:00.000Z" + }, + { + "name": "contactEmail", + "schema": "string", + "description": "", + "example": "alex76@example.com" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smtp/emailStatus/{identifier}", + "method": "getEmailStatusById", + "httpMethod": "get", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Fetch scheduled emails by batchId or messageId", + "parameters": [ + { + "name": "identifier", + "schema": "string", + "required": true, + "description": "The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.", + "example": "IDENTIFIER" + }, + { + "name": "startDate", + "schema": "string", + "required": false, + "description": "Mandatory if `endDate` is used. Starting date (https://developers.brevo.com/ from which you want to fetch the list. Can be maximum 30 days older tha current date.", + "example": "2022-02-02" + }, + { + "name": "endDate", + "schema": "string", + "required": false, + "description": "Mandatory if `startDate` is used. Ending date (https://developers.brevo.com/ till which you want to fetch the list. Maximum time period that can be selected is one month.", + "example": "2022-03-02" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`.", + "default": "desc" + }, + { + "name": "status", + "schema": "string", + "required": false, + "description": "Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`." + }, + { + "name": "limit", + "schema": "integer", + "required": false, + "description": "Number of documents returned per page. Not valid when identifier is `messageId`.", + "example": 100, + "default": 100 + }, + { + "name": "offset", + "schema": "integer", + "required": false, + "description": "Index of the first document on the page. Not valid when identifier is `messageId`.", + "example": 0, + "default": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smtp/email/{identifier}", + "method": "deleteScheduledEmails", + "httpMethod": "delete", + "tag": "Transactional emails", + "typeScriptTag": "transactionalEmails", + "description": "Delete scheduled emails by batchId or messageId", + "parameters": [ + { + "name": "identifier", + "schema": "string", + "required": true, + "description": "The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.", + "example": "IDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts", + "method": "getAllContacts", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get all the contacts", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "modifiedSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "createdSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "segmentId", + "schema": "integer", + "description": "Id of the segment. **Either listIds or segmentId can be passed.**" + }, + { + "name": "listIds", + "schema": "array", + "description": "Ids of the list. **Either listIds or segmentId can be passed.**" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts", + "method": "createNewContact", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Create a contact", + "parameters": [ + { + "name": "email", + "schema": "string", + "description": "", + "example": "elly@example.com" + }, + { + "name": "ext_id", + "schema": "string", + "description": "", + "example": "externalId" + }, + { + "name": "attributes", + "schema": "object", + "description": "", + "example": { + "FNAME": "Elly", + "LNAME": "Roger" + } + }, + { + "name": "emailBlacklisted", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "smsBlacklisted", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "listIds", + "schema": "array", + "description": "" + }, + { + "name": "updateEnabled", + "schema": "boolean", + "description": "", + "example": false, + "default": false + }, + { + "name": "smtpBlacklistSender", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/doubleOptinConfirmation", + "method": "createDoubleOptInContact", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Create Contact via DOI (https://developers.brevo.com/ Flow", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "elly@example.com" + }, + { + "name": "attributes", + "schema": "object", + "required": false, + "description": "", + "example": { + "FNAME": "Elly", + "LNAME": "Roger" + } + }, + { + "name": "includeListIds", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "excludeListIds", + "schema": "array", + "required": false, + "description": "" + }, + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "", + "example": 2 + }, + { + "name": "redirectionUrl", + "schema": "string", + "required": true, + "description": "", + "example": "http://requestb.in/173lyyx1" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/{identifier}", + "method": "deleteContact", + "httpMethod": "delete", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Delete a contact", + "parameters": [ + { + "name": "identifier", + "schema": "undefined", + "required": true, + "description": "Email (https://developers.brevo.com/ OR ID of the contact" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + }, + { + "statusCode": "405", + "description": "" + } + ] + }, + { + "url": "/contacts/{identifier}", + "method": "getDetails", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get a contact's details", + "parameters": [ + { + "name": "identifier", + "schema": "undefined", + "required": true, + "description": "Email (https://developers.brevo.com/ OR ID of the contact OR its SMS attribute value" + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ of the statistic events specific to campaigns. Must be lower than equal to endDate\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ of the statistic events specific to campaigns. Must be greater than equal to startDate.\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/{identifier}", + "method": "updateContactById", + "httpMethod": "put", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Update a contact", + "parameters": [ + { + "name": "identifier", + "schema": "undefined", + "required": true, + "description": "Email (https://developers.brevo.com/ OR ID of the contact" + }, + { + "name": "attributes", + "schema": "object", + "description": "", + "example": { + "EMAIL": "newemail@domain.com", + "FNAME": "Ellie", + "LNAME": "Roger" + } + }, + { + "name": "ext_id", + "schema": "string", + "description": "", + "example": "updateExternalId" + }, + { + "name": "emailBlacklisted", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "smsBlacklisted", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "listIds", + "schema": "array", + "description": "" + }, + { + "name": "unlinkListIds", + "schema": "array", + "description": "" + }, + { + "name": "smtpBlacklistSender", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/batch", + "method": "updateMultiple", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Update multiple contacts", + "parameters": [ + { + "name": "contacts", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/{identifier}/campaignStats", + "method": "getEmailCampaignStats", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get email campaigns' statistics for a contact", + "parameters": [ + { + "name": "identifier", + "schema": "undefined", + "required": true, + "description": "Email (https://developers.brevo.com/ OR ID of the contact" + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ of the statistic events specific to campaigns. Must be lower than equal to endDate\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Campaign Statistics for the contact" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/attributes", + "method": "listAttributes", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "List all attributes", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/contacts/attributes/{attributeCategory}/{attributeName}", + "method": "removeAttribute", + "httpMethod": "delete", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Delete an attribute", + "parameters": [ + { + "name": "attributeCategory", + "schema": "string", + "required": true, + "description": "Category of the attribute", + "example": "ATTRIBUTECATEGORY" + }, + { + "name": "attributeName", + "schema": "string", + "required": true, + "description": "Name of the existing attribute", + "example": "ATTRIBUTENAME" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/attributes/{attributeCategory}/{attributeName}", + "method": "createAttribute", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Create contact attribute", + "parameters": [ + { + "name": "attributeCategory", + "schema": "string", + "required": true, + "description": "Category of the attribute", + "example": "ATTRIBUTECATEGORY" + }, + { + "name": "attributeName", + "schema": "string", + "required": true, + "description": "Name of the attribute", + "example": "ATTRIBUTENAME" + }, + { + "name": "value", + "schema": "string", + "description": "", + "example": "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + }, + { + "name": "isRecurring", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "enumeration", + "schema": "array", + "description": "" + }, + { + "name": "type", + "schema": "string", + "description": "", + "example": "text" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/attributes/{attributeCategory}/{attributeName}", + "method": "updateAttribute", + "httpMethod": "put", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Update contact attribute", + "parameters": [ + { + "name": "attributeCategory", + "schema": "string", + "required": true, + "description": "Category of the attribute", + "example": "ATTRIBUTECATEGORY" + }, + { + "name": "attributeName", + "schema": "string", + "required": true, + "description": "Name of the existing attribute", + "example": "ATTRIBUTENAME" + }, + { + "name": "value", + "schema": "string", + "description": "", + "example": "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + }, + { + "name": "enumeration", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/folders", + "method": "getAllFolders", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get all folders", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "required": true, + "description": "Number of documents per page", + "example": 0, + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "required": true, + "description": "Index of the first document of the page", + "example": 0, + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/folders", + "method": "createFolder", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Create a folder", + "parameters": [ + { + "name": "name", + "schema": "string", + "description": "", + "example": "Wordpress Contacts" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/folders/{folderId}", + "method": "deleteFolder", + "httpMethod": "delete", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Delete a folder (and all its lists)", + "parameters": [ + { + "name": "folderId", + "schema": "integer", + "required": true, + "description": "Id of the folder", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/folders/{folderId}", + "method": "getFolderDetails", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Returns a folder's details", + "parameters": [ + { + "name": "folderId", + "schema": "integer", + "required": true, + "description": "id of the folder", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/folders/{folderId}", + "method": "updateFolder", + "httpMethod": "put", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Update a folder", + "parameters": [ + { + "name": "folderId", + "schema": "integer", + "required": true, + "description": "Id of the folder", + "example": 0 + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Wordpress Contacts" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/folders/{folderId}/lists", + "method": "getFolderLists", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get lists in a folder", + "parameters": [ + { + "name": "folderId", + "schema": "integer", + "required": true, + "description": "Id of the folder", + "example": 0 + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/lists", + "method": "getAllLists", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get all the lists", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/lists", + "method": "createList", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Create a list", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Magento Customer - ES" + }, + { + "name": "folderId", + "schema": "integer", + "required": true, + "description": "", + "example": 2 + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}", + "method": "deleteList", + "httpMethod": "delete", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Delete a list", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}", + "method": "getListDetails", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get a list's details", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used**. Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used**. Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}", + "method": "updateList", + "httpMethod": "put", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Update a list", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Magento Customer - ES" + }, + { + "name": "folderId", + "schema": "integer", + "description": "", + "example": 2 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/segments", + "method": "getAllSegments", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get all the segments", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}/contacts", + "method": "getListContacts", + "httpMethod": "get", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Get contacts in a list", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + }, + { + "name": "modifiedSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}/contacts/add", + "method": "addToList", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Add existing contacts to a list", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/lists/{listId}/contacts/remove", + "method": "removeContactFromList", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Delete a contact from a list", + "parameters": [ + { + "name": "listId", + "schema": "integer", + "required": true, + "description": "Id of the list", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/contacts/export", + "method": "exportProcessId", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Export contacts", + "parameters": [ + { + "name": "exportAttributes", + "schema": "array", + "required": false, + "description": "" + }, + { + "name": "customContactFilter", + "schema": "object", + "required": true, + "description": "" + }, + { + "name": "notifyUrl", + "schema": "string", + "required": false, + "description": "", + "example": "http://requestb.in/173lyyx1" + } + ], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/contacts/import", + "method": "importContactsProcess", + "httpMethod": "post", + "tag": "Contacts", + "typeScriptTag": "contacts", + "description": "Import contacts", + "parameters": [ + { + "name": "fileUrl", + "schema": "string", + "description": "", + "example": "https://importfile.domain.com" + }, + { + "name": "fileBody", + "schema": "string", + "description": "", + "example": "NAME;SURNAME;EMAIL\nSmith;John;john.smith@example.com\nRoger;Ellie;ellie36@example.com" + }, + { + "name": "jsonBody", + "schema": "array", + "description": "" + }, + { + "name": "listIds", + "schema": "array", + "description": "" + }, + { + "name": "notifyUrl", + "schema": "string", + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "newList", + "schema": "object", + "description": "" + }, + { + "name": "emailBlacklist", + "schema": "boolean", + "description": "", + "example": false, + "default": false + }, + { + "name": "disableNotification", + "schema": "boolean", + "description": "", + "example": false, + "default": false + }, + { + "name": "smsBlacklist", + "schema": "boolean", + "description": "", + "example": false, + "default": false + }, + { + "name": "updateExistingContacts", + "schema": "boolean", + "description": "", + "example": true, + "default": true + }, + { + "name": "emptyContactsAttributes", + "schema": "boolean", + "description": "", + "example": true, + "default": false + } + ], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns", + "method": "getAllInformation", + "httpMethod": "get", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Returns the information for all your created SMS campaigns", + "parameters": [ + { + "name": "status", + "schema": "string", + "description": "Status of campaign." + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number limitation for the result returned", + "default": 500 + }, + { + "name": "offset", + "schema": "integer", + "description": "Beginning point in the list to retrieve from.", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns", + "method": "createCampaign", + "httpMethod": "post", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Creates an SMS campaign", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Spring Promo Code" + }, + { + "name": "sender", + "schema": "string", + "required": true, + "description": "", + "example": "MyShop" + }, + { + "name": "content", + "schema": "string", + "required": true, + "description": "", + "example": "Get a discount by visiting our NY store and saying : Happy Spring!" + }, + { + "name": "recipients", + "schema": "object", + "required": false, + "description": "" + }, + { + "name": "scheduledAt", + "schema": "string", + "required": false, + "description": "", + "example": "2017-05-05T10:30:00.000Z" + }, + { + "name": "unicodeEnabled", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "organisationPrefix", + "schema": "string", + "required": false, + "description": "", + "example": "MyCompany" + }, + { + "name": "unsubscribeInstruction", + "schema": "string", + "required": false, + "description": "", + "example": "send Stop if you want to unsubscribe." + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}", + "method": "removeCampaignById", + "httpMethod": "delete", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Delete an SMS campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the SMS campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}", + "method": "getCampaignById", + "httpMethod": "get", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Get an SMS campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the SMS campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}", + "method": "updateCampaignById", + "httpMethod": "put", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Update an SMS campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the SMS campaign", + "example": 0 + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Spring Promo Code" + }, + { + "name": "sender", + "schema": "string", + "description": "", + "example": "MyShop" + }, + { + "name": "content", + "schema": "string", + "description": "", + "example": "Get a discount by visiting our NY store and saying : Happy Spring!" + }, + { + "name": "recipients", + "schema": "object", + "description": "" + }, + { + "name": "scheduledAt", + "schema": "string", + "description": "", + "example": "2017-05-05T10:30:00.000Z" + }, + { + "name": "unicodeEnabled", + "schema": "boolean", + "description": "", + "example": true, + "default": false + }, + { + "name": "organisationPrefix", + "schema": "string", + "description": "", + "example": "MyCompany" + }, + { + "name": "unsubscribeInstruction", + "schema": "string", + "description": "", + "example": "send Stop if you want to unsubscribe." + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}/sendNow", + "method": "sendImmediately", + "httpMethod": "post", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Send your SMS campaign immediately", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "402", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}/status", + "method": "updateStatus", + "httpMethod": "put", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Update a campaign's status", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + }, + { + "name": "status", + "schema": "string", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}/sendTest", + "method": "sendTestSms", + "httpMethod": "post", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Send a test SMS campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the SMS campaign", + "example": 0 + }, + { + "name": "phoneNumber", + "schema": "string", + "description": "", + "example": "33689965433" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}/exportRecipients", + "method": "exportRecipientsProcess", + "httpMethod": "post", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Export an SMS campaign's recipients", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + }, + { + "name": "notifyURL", + "schema": "string", + "required": false, + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "recipientsType", + "schema": "string", + "required": true, + "description": "", + "example": "answered" + } + ], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/smsCampaigns/{campaignId}/sendReport", + "method": "sendCampaignReport", + "httpMethod": "post", + "tag": "SMS Campaigns", + "typeScriptTag": "smsCampaigns", + "description": "Send an SMS campaign's report", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + }, + { + "name": "language", + "schema": "string", + "required": false, + "description": "", + "example": "en", + "default": "fr" + }, + { + "name": "email", + "schema": "object", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/transactionalSMS/sms", + "method": "sendSmsMessageToMobile", + "httpMethod": "post", + "tag": "Transactional SMS", + "typeScriptTag": "transactionalSms", + "description": "Send SMS message to a mobile number", + "parameters": [ + { + "name": "sender", + "schema": "string", + "required": true, + "description": "", + "example": "MyShop" + }, + { + "name": "recipient", + "schema": "string", + "required": true, + "description": "", + "example": "33689965433" + }, + { + "name": "content", + "schema": "string", + "required": true, + "description": "", + "example": "Enter this code:CCJJG8 to validate your account" + }, + { + "name": "type", + "schema": "string", + "required": false, + "description": "", + "example": "marketing", + "default": "transactional" + }, + { + "name": "tag", + "schema": "string", + "required": false, + "description": "", + "example": "accountValidation" + }, + { + "name": "webUrl", + "schema": "string", + "required": false, + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "unicodeEnabled", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + }, + { + "name": "organisationPrefix", + "schema": "string", + "required": false, + "description": "", + "example": "MyCompany" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "402", + "description": "" + } + ] + }, + { + "url": "/transactionalSMS/statistics/aggregatedReport", + "method": "getAggregatedReport", + "httpMethod": "get", + "tag": "Transactional SMS", + "typeScriptTag": "transactionalSms", + "description": "Get your SMS activity aggregated over a period of time", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). **Not compatible with startDate and endDate**\n" + }, + { + "name": "tag", + "schema": "string", + "description": "Filter on a tag" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/transactionalSMS/statistics/reports", + "method": "getSmsActivityAggregatedPerDay", + "httpMethod": "get", + "tag": "Transactional SMS", + "typeScriptTag": "transactionalSms", + "description": "Get your SMS activity aggregated per day", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'**\n" + }, + { + "name": "tag", + "schema": "string", + "description": "Filter on a tag" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/transactionalSMS/statistics/events", + "method": "getAllEvents", + "httpMethod": "get", + "tag": "Transactional SMS", + "typeScriptTag": "transactionalSms", + "description": "Get all your SMS activity (unaggregated events)", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date (https://developers.brevo.com/ of the report\n" + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page", + "default": 0 + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'**\n" + }, + { + "name": "phoneNumber", + "schema": "string", + "description": "Filter the report for a specific phone number" + }, + { + "name": "event", + "schema": "string", + "description": "Filter the report for specific events" + }, + { + "name": "tags", + "schema": "string", + "description": "Filter the report for specific tags passed as a serialized urlencoded array" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/{campaignId}", + "method": "deleteCampaign", + "httpMethod": "delete", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Delete a WhatsApp campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/{campaignId}", + "method": "getCampaignById", + "httpMethod": "get", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Get a WhatsApp campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "Id of the campaign", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/{campaignId}", + "method": "updateCampaignById", + "httpMethod": "put", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Update a WhatsApp campaign", + "parameters": [ + { + "name": "campaignId", + "schema": "integer", + "required": true, + "description": "id of the campaign", + "example": 0 + }, + { + "name": "campaignName", + "schema": "string", + "description": "", + "example": "Test WhatsApp" + }, + { + "name": "campaignStatus", + "schema": "string", + "description": "", + "example": "scheduled", + "default": "scheduled" + }, + { + "name": "rescheduleFor", + "schema": "string", + "description": "", + "example": "2017-06-01T10:30:00.000Z" + }, + { + "name": "recipients", + "schema": "object", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/template-list", + "method": "getTemplates", + "httpMethod": "get", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Return all your created WhatsApp templates", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used**. Starting (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used**. Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "source", + "schema": "string", + "required": false, + "description": "source of the template" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns", + "method": "getAll", + "httpMethod": "get", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Return all your created WhatsApp campaigns", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used**. Starting (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used**. Ending (https://developers.brevo.com/ UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created.\n**Prefer to pass your timezone in date-time format for accurate result**\n" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns", + "method": "createAndSend", + "httpMethod": "post", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Create and Send a WhatsApp campaign", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Test Campaign" + }, + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "", + "example": 19 + }, + { + "name": "scheduledAt", + "schema": "string", + "required": true, + "description": "", + "example": "2017-06-01T10:30:00.000Z" + }, + { + "name": "recipients", + "schema": "object", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/template", + "method": "createTemplate", + "httpMethod": "post", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Create a WhatsApp template", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Test template" + }, + { + "name": "language", + "schema": "string", + "required": true, + "description": "", + "example": "en" + }, + { + "name": "category", + "schema": "string", + "required": true, + "description": "", + "example": "MARKETING" + }, + { + "name": "mediaUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://attachment.domain.com" + }, + { + "name": "bodyText", + "schema": "string", + "required": true, + "description": "", + "example": "making it look like readable English" + }, + { + "name": "headerText", + "schema": "string", + "required": false, + "description": "", + "example": "Test WhatsApp campaign" + }, + { + "name": "source", + "schema": "string", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/template/approval/{templateId}", + "method": "sendTemplateForApproval", + "httpMethod": "post", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Send your WhatsApp template for approval", + "parameters": [ + { + "name": "templateId", + "schema": "integer", + "required": true, + "description": "id of the template", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsappCampaigns/config", + "method": "getAccountInfo", + "httpMethod": "get", + "tag": "WhatsApp Campaigns", + "typeScriptTag": "whatsAppCampaigns", + "description": "Get your WhatsApp API account information", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/senders", + "method": "listAll", + "httpMethod": "get", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Get the list of all your senders", + "parameters": [ + { + "name": "ip", + "schema": "string", + "description": "Filter your senders for a specific ip. **Available for dedicated IP usage only**\n" + }, + { + "name": "domain", + "schema": "string", + "description": "Filter your senders for a specific domain" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/senders", + "method": "createNewSender", + "httpMethod": "post", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Create a new sender", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Newsletter" + }, + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "newsletter@mycompany.com" + }, + { + "name": "ips", + "schema": "array", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/senders/{senderId}", + "method": "removeSender", + "httpMethod": "delete", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Delete a sender", + "parameters": [ + { + "name": "senderId", + "schema": "integer", + "required": true, + "description": "Id of the sender", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/{senderId}", + "method": "updateSenderById", + "httpMethod": "put", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Update a sender", + "parameters": [ + { + "name": "senderId", + "schema": "integer", + "required": true, + "description": "Id of the sender", + "example": 0 + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Newsletter" + }, + { + "name": "email", + "schema": "string", + "description": "", + "example": "newsletter@mycompany.com" + }, + { + "name": "ips", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/{senderId}/validate", + "method": "validateSenderUsingOtp", + "httpMethod": "put", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Validate Sender using OTP", + "parameters": [ + { + "name": "senderId", + "schema": "integer", + "required": true, + "description": "Id of the sender", + "example": 0 + }, + { + "name": "otp", + "schema": "integer", + "required": true, + "description": "", + "example": 123456 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/{senderId}/ips", + "method": "getAllDedicatedIps", + "httpMethod": "get", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Get all the dedicated IPs for a sender", + "parameters": [ + { + "name": "senderId", + "schema": "integer", + "required": true, + "description": "Id of the sender", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/ips", + "method": "getDedicatedIps", + "httpMethod": "get", + "tag": "Senders", + "typeScriptTag": "senders", + "description": "Get all the dedicated IPs for your account", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/senders/domains", + "method": "getAll", + "httpMethod": "get", + "tag": "Domains", + "typeScriptTag": "domains", + "description": "Get the list of all your domains", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/senders/domains", + "method": "createNewDomain", + "httpMethod": "post", + "tag": "Domains", + "typeScriptTag": "domains", + "description": "Create a new domain", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "mycompany.com" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/senders/domains/{domainName}", + "method": "deleteDomain", + "httpMethod": "delete", + "tag": "Domains", + "typeScriptTag": "domains", + "description": "Delete a domain", + "parameters": [ + { + "name": "domainName", + "schema": "string", + "required": true, + "description": "Domain name", + "example": "DOMAINNAME" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/domains/{domainName}", + "method": "validateConfiguration", + "httpMethod": "get", + "tag": "Domains", + "typeScriptTag": "domains", + "description": "Validate domain configuration", + "parameters": [ + { + "name": "domainName", + "schema": "string", + "required": true, + "description": "Domain name", + "example": "DOMAINNAME" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/senders/domains/{domainName}/authenticate", + "method": "authenticateDomain", + "httpMethod": "put", + "tag": "Domains", + "typeScriptTag": "domains", + "description": "Authenticate a domain", + "parameters": [ + { + "name": "domainName", + "schema": "string", + "required": true, + "description": "Domain name", + "example": "DOMAINNAME" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/webhooks", + "method": "getAll", + "httpMethod": "get", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Get all webhooks", + "parameters": [ + { + "name": "type", + "schema": "string", + "description": "Filter on webhook type", + "default": "transactional" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of webhook creation", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/webhooks", + "method": "createHook", + "httpMethod": "post", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Create a webhook", + "parameters": [ + { + "name": "description", + "schema": "string", + "required": false, + "description": "", + "example": "Webhook triggered on unsubscription" + }, + { + "name": "url", + "schema": "string", + "required": true, + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "events", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "type", + "schema": "string", + "required": false, + "description": "", + "example": "marketing", + "default": "transactional" + }, + { + "name": "domain", + "schema": "string", + "required": false, + "description": "", + "example": "example.com" + }, + { + "name": "batched", + "schema": "boolean", + "required": false, + "description": "", + "example": true + }, + { + "name": "auth", + "schema": "object", + "required": false, + "description": "", + "example": { + "type": "bearer", + "token": "test-auth-token1234" + } + }, + { + "name": "headers", + "schema": "array", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/webhooks/{webhookId}", + "method": "deleteWebhook", + "httpMethod": "delete", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Delete a webhook", + "parameters": [ + { + "name": "webhookId", + "schema": "integer", + "required": true, + "description": "Id of the webhook", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/webhooks/{webhookId}", + "method": "getDetails", + "httpMethod": "get", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Get a webhook details", + "parameters": [ + { + "name": "webhookId", + "schema": "integer", + "required": true, + "description": "Id of the webhook", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/webhooks/{webhookId}", + "method": "updateWebhookById", + "httpMethod": "put", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Update a webhook", + "parameters": [ + { + "name": "webhookId", + "schema": "integer", + "required": true, + "description": "Id of the webhook", + "example": 0 + }, + { + "name": "description", + "schema": "string", + "description": "", + "example": "Webhook triggered on contact hardbounce" + }, + { + "name": "url", + "schema": "string", + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "events", + "schema": "array", + "description": "" + }, + { + "name": "domain", + "schema": "string", + "description": "", + "example": "example.com" + }, + { + "name": "batched", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "auth", + "schema": "object", + "description": "", + "example": { + "type": "bearer", + "token": "test-auth-token1234" + } + }, + { + "name": "headers", + "schema": "array", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/webhooks/export", + "method": "exportAllEvents", + "httpMethod": "post", + "tag": "Webhooks", + "typeScriptTag": "webhooks", + "description": "Export all webhook events", + "parameters": [], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/reseller/children", + "method": "listChildrenAccounts", + "httpMethod": "get", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Get the list of all children accounts", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents for child accounts information per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/reseller/children", + "method": "createChild", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Creates a reseller child", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "josh.cruise@example.com" + }, + { + "name": "firstName", + "schema": "string", + "required": true, + "description": "", + "example": "Josh" + }, + { + "name": "lastName", + "schema": "string", + "required": true, + "description": "", + "example": "Cruise" + }, + { + "name": "companyName", + "schema": "string", + "required": true, + "description": "", + "example": "Your Company" + }, + { + "name": "password", + "schema": "string", + "required": true, + "description": "", + "example": "Pa55w0rd65" + }, + { + "name": "language", + "schema": "string", + "required": false, + "description": "", + "example": "en" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}", + "method": "deleteChildByIdentifier", + "httpMethod": "delete", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Delete a single reseller child based on the child identifier supplied", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or child id of reseller's child", + "example": "CHILDIDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}", + "method": "getChildDetails", + "httpMethod": "get", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Get a child account's details", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}", + "method": "updateChildInfo", + "httpMethod": "put", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Update info of reseller's child based on the child identifier supplied", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "email", + "schema": "string", + "description": "", + "example": "josh.cruise@example.com" + }, + { + "name": "firstName", + "schema": "string", + "description": "", + "example": "Josh" + }, + { + "name": "lastName", + "schema": "string", + "description": "", + "example": "Cruise" + }, + { + "name": "companyName", + "schema": "string", + "description": "", + "example": "Your Company" + }, + { + "name": "password", + "schema": "string", + "description": "", + "example": "Pa55w0rd65" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/accountStatus", + "method": "updateChildAccountStatus", + "httpMethod": "put", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Update info of reseller's child account status based on the identifier supplied", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "transactionalEmail", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "transactionalSms", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "marketingAutomation", + "schema": "boolean", + "description": "", + "example": true + }, + { + "name": "smsCampaign", + "schema": "boolean", + "description": "", + "example": true + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/accountCreationStatus", + "method": "getChildAccountCreationStatus", + "httpMethod": "get", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Get the status of a reseller's child account creation, whether it is successfully created (https://developers.brevo.com/ or not based on the childIdentifier supplied", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/ips/associate", + "method": "associateDedicatedIpToChild", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Associate a dedicated IP to the child", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "ip", + "schema": "string", + "description": "", + "example": "123.65.8.22" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/ips/dissociate", + "method": "dissociateIpToChild", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Dissociate a dedicated IP to the child", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "ip", + "schema": "string", + "description": "", + "example": "123.65.8.22" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/credits/add", + "method": "addChildCredits", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Add Email and/or SMS credits to a specific child account", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "sms", + "schema": "integer", + "description": "", + "example": 450 + }, + { + "name": "email", + "schema": "integer", + "description": "", + "example": 1200 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/credits/remove", + "method": "removeCreditsFromChild", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Remove Email and/or SMS credits from a specific child account", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "sms", + "schema": "integer", + "description": "", + "example": 300 + }, + { + "name": "email", + "schema": "integer", + "description": "", + "example": 500 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/domains", + "method": "getChildDomains", + "httpMethod": "get", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Get all sender domains for a specific child account", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/domains", + "method": "createChildDomain", + "httpMethod": "post", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Create a domain for a child account", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "domain", + "schema": "string", + "description": "", + "example": "mychilddomain.com" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/domains/{domainName}", + "method": "deleteSenderDomainByChildIdentifierAndDomainName", + "httpMethod": "delete", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Delete the sender domain of the reseller child based on the childIdentifier and domainName passed", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "domainName", + "schema": "string", + "required": true, + "description": "Pass the existing domain that needs to be deleted", + "example": "DOMAINNAME" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/domains/{domainName}", + "method": "updateSenderDomain", + "httpMethod": "put", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Update the sender domain of reseller's child based on the childIdentifier and domainName passed", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + }, + { + "name": "domainName", + "schema": "string", + "required": true, + "description": "Pass the existing domain that needs to be updated", + "example": "DOMAINNAME" + }, + { + "name": "domain", + "schema": "string", + "description": "", + "example": "myupdateddomain.com" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/reseller/children/{childIdentifier}/auth", + "method": "getSessionToken", + "httpMethod": "get", + "tag": "Reseller", + "typeScriptTag": "reseller", + "description": "Get session token to access Brevo (https://developers.brevo.com/", + "parameters": [ + { + "name": "childIdentifier", + "schema": "string", + "required": true, + "description": "Either auth key or id of reseller's child", + "example": "CHILDIDENTIFIER" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/account", + "method": "informationDetails", + "httpMethod": "get", + "tag": "Account", + "typeScriptTag": "account", + "description": "Get your account information, plan and credits details", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/organization/activities", + "method": "getUserActivityLogs", + "httpMethod": "get", + "tag": "Account", + "typeScriptTag": "account", + "description": "Get user activity logs", + "parameters": [ + { + "name": "startDate", + "schema": "string", + "required": false, + "description": "Mandatory if endDate is used. Enter start date in UTC date (https://developers.brevo.com/ format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search." + }, + { + "name": "endDate", + "schema": "string", + "required": false, + "description": "Mandatory if startDate is used. Enter end date in UTC date (https://developers.brevo.com/ format to filter the activity in your account. Maximum time period that can be selected is one month." + }, + { + "name": "limit", + "schema": "integer", + "required": false, + "description": "Number of documents per page", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "required": false, + "description": "Index of the first document in the page.", + "default": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/organization/invited/users", + "method": "getAllUsers", + "httpMethod": "get", + "tag": "User", + "typeScriptTag": "user", + "description": "Get the list of all your users", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/organization/user/{email}/permissions", + "method": "checkPermission", + "httpMethod": "get", + "tag": "User", + "typeScriptTag": "user", + "description": "Check user permission", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email of the invited user.", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Check user permission" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/organization/user/invitation/revoke/{email}", + "method": "revokePermissionByEmail", + "httpMethod": "put", + "tag": "User", + "typeScriptTag": "user", + "description": "Revoke user permission", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email of the invited user.", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/organization/user/invitation/{action}/{email}", + "method": "resendInvitation", + "httpMethod": "put", + "tag": "User", + "typeScriptTag": "user", + "description": "Resend / Cancel invitation", + "parameters": [ + { + "name": "action", + "schema": "string", + "required": true, + "description": "action", + "example": "ACTION" + }, + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email of the invited user.", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/organization/user/invitation/send", + "method": "sendInvitation", + "httpMethod": "post", + "tag": "User", + "typeScriptTag": "user", + "description": "Send invitation to user", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "inviteuser@example.com" + }, + { + "name": "all_features_access", + "schema": "boolean", + "required": true, + "description": "", + "example": true + }, + { + "name": "privileges", + "schema": "array", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/organization/user/update/permissions", + "method": "updatePermissions", + "httpMethod": "post", + "tag": "User", + "typeScriptTag": "user", + "description": "Update permission for a user", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "inviteuser@example.com" + }, + { + "name": "all_features_access", + "schema": "boolean", + "required": true, + "description": "", + "example": true + }, + { + "name": "privileges", + "schema": "array", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/processes", + "method": "getAllProcesses", + "httpMethod": "get", + "tag": "Process", + "typeScriptTag": "process", + "description": "Return all the processes for your account", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number limitation for the result returned", + "default": 10 + }, + { + "name": "offset", + "schema": "integer", + "description": "Beginning point in the list to retrieve from.", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/processes/{processId}", + "method": "getProcessInformation", + "httpMethod": "get", + "tag": "Process", + "typeScriptTag": "process", + "description": "Return the informations for a process", + "parameters": [ + { + "name": "processId", + "schema": "integer", + "required": true, + "description": "Id of the process", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/inbound/events", + "method": "getAllEvents", + "httpMethod": "get", + "tag": "Inbound Parsing", + "typeScriptTag": "inboundParsing", + "description": "Get the list of all the events for the received emails.", + "parameters": [ + { + "name": "sender", + "schema": "string", + "required": false, + "description": "Email address of the sender." + }, + { + "name": "startDate", + "schema": "string", + "required": false, + "description": "Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month." + }, + { + "name": "endDate", + "schema": "string", + "required": false, + "description": "Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month." + }, + { + "name": "limit", + "schema": "integer", + "required": false, + "description": "Number of documents returned per page", + "default": 100 + }, + { + "name": "offset", + "schema": "integer", + "required": false, + "description": "Index of the first document on the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/inbound/events/{uuid}", + "method": "getEmailEvents", + "httpMethod": "get", + "tag": "Inbound Parsing", + "typeScriptTag": "inboundParsing", + "description": "Fetch all events history for one particular received email.", + "parameters": [ + { + "name": "uuid", + "schema": "string", + "required": true, + "description": "UUID to fetch events specific to recieved email", + "example": "UUID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/inbound/attachments/{downloadToken}", + "method": "getAttachmentByToken", + "httpMethod": "get", + "tag": "Inbound Parsing", + "typeScriptTag": "inboundParsing", + "description": "Retrieve inbound attachment with download token.", + "parameters": [ + { + "name": "downloadToken", + "schema": "string", + "required": true, + "description": "Token to fetch a particular attachment", + "example": "DOWNLOADTOKEN" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount", + "method": "listSubAccounts", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Get the list of all the sub-accounts of the master account.", + "parameters": [ + { + "name": "offset", + "schema": "integer", + "required": true, + "description": "Index of the first sub-account in the page", + "example": 0 + }, + { + "name": "limit", + "schema": "integer", + "required": true, + "description": "Number of sub-accounts to be displayed on each page", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount", + "method": "createSubAccount", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Create a new sub-account under a master account.", + "parameters": [ + { + "name": "companyName", + "schema": "string", + "required": true, + "description": "", + "example": "COMPANYNAME" + }, + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "EMAIL" + }, + { + "name": "language", + "schema": "string", + "required": false, + "description": "" + }, + { + "name": "timezone", + "schema": "string", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/{id}", + "method": "deleteSubAccount", + "httpMethod": "delete", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Delete a sub-account", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "Id of the sub-account organization to be deleted", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Returned when sub-account is deleted succesfully" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/{id}", + "method": "getSubAccountDetails", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Get sub-account details", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "Id of the sub-account organization", + "example": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/{id}/plan", + "method": "updateSubAccountPlan", + "httpMethod": "put", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Update sub-account plan", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "Id of the sub-account organization", + "example": 0 + }, + { + "name": "credits", + "schema": "object", + "description": "" + }, + { + "name": "features", + "schema": "object", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/corporate/ssoToken", + "method": "generateSsoToken", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Generate SSO token to access admin account", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "vipin+ent-user@brevo.com" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/ssoToken", + "method": "generateSsoToken", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Generate SSO token to access sub-account", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "", + "example": 3232323 + }, + { + "name": "email", + "schema": "string", + "required": false, + "description": "", + "example": "vipin+subaccount@brevo.com" + }, + { + "name": "target", + "schema": "string", + "required": false, + "description": "", + "example": "contacts" + }, + { + "name": "url", + "schema": "string", + "required": false, + "description": "", + "example": "https://app.brevo.com/senders/domain/list" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/corporate/masterAccount", + "method": "getDetails", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Get the details of requested master account", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/key", + "method": "createSubAccountKey", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Create an API key for a sub-account", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "", + "example": 3232323 + }, + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "My Api Key" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/subAccount/{id}/applications/toggle", + "method": "enableDisable", + "httpMethod": "put", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Enable/disable sub-account application(https://developers.brevo.com/", + "parameters": [ + { + "name": "id", + "schema": "integer", + "required": true, + "description": "Id of the sub-account organization (https://developers.brevo.com/", + "example": 0 + }, + { + "name": "inbox", + "schema": "boolean", + "description": "" + }, + { + "name": "whatsapp", + "schema": "boolean", + "description": "" + }, + { + "name": "automation", + "schema": "boolean", + "description": "" + }, + { + "name": "email-campaigns", + "schema": "boolean", + "description": "" + }, + { + "name": "sms-campaigns", + "schema": "boolean", + "description": "" + }, + { + "name": "landing-pages", + "schema": "boolean", + "description": "" + }, + { + "name": "transactional-emails", + "schema": "boolean", + "description": "" + }, + { + "name": "transactional-sms", + "schema": "boolean", + "description": "" + }, + { + "name": "facebook-ads", + "schema": "boolean", + "description": "" + }, + { + "name": "web-push", + "schema": "boolean", + "description": "" + }, + { + "name": "meetings", + "schema": "boolean", + "description": "" + }, + { + "name": "conversations", + "schema": "boolean", + "description": "" + }, + { + "name": "crm", + "schema": "boolean", + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "403", + "description": "" + } + ] + }, + { + "url": "/corporate/group", + "method": "createGroupOfSubAccounts", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Create a group of sub-accounts", + "parameters": [ + { + "name": "groupName", + "schema": "string", + "required": true, + "description": "", + "example": "My group" + }, + { + "name": "subAccountIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + 234322, + 325553, + 893432 + ] + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/group/{id}", + "method": "deleteGroup", + "httpMethod": "delete", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Delete a group", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Id of the group", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Group deleted" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/group/{id}", + "method": "getGroupDetails", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "GET a group details", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Id of the group of sub-organization", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/corporate/group/{id}", + "method": "updateGroupSubAccounts", + "httpMethod": "put", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Update a group of sub-accounts", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Id of the group", + "example": "ID" + }, + { + "name": "groupName", + "schema": "string", + "description": "", + "example": "My group" + }, + { + "name": "subAccountIds", + "schema": "array", + "description": "", + "example": [ + 234322, + 325553, + 893432 + ] + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/group/unlink/{groupId}/subAccounts", + "method": "unlinkSubAccountFromGroup", + "httpMethod": "put", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Delete sub-account from group", + "parameters": [ + { + "name": "groupId", + "schema": "string", + "required": true, + "description": "Group id", + "example": "GROUPID" + }, + { + "name": "subAccountIds", + "schema": "array", + "required": true, + "description": "", + "example": [ + 423432, + 234323, + 87678 + ] + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/user/invitation/send", + "method": "sendInvitationToAdminUser", + "httpMethod": "post", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Send invitation to an admin user", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "", + "example": "inviteuser@example.com" + }, + { + "name": "all_features_access", + "schema": "boolean", + "required": true, + "description": "", + "example": true + }, + { + "name": "groupIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "2baxxxxxxxxxxxxxxxxxxxxxcaa", + "65axxxxxxxxxxxxxxxxxxxxxc5a" + ] + }, + { + "name": "privileges", + "schema": "array", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/user/invitation/{action}/{email}", + "method": "resendCancelAdminUserInvitation", + "httpMethod": "put", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Resend / cancel admin user invitation", + "parameters": [ + { + "name": "action", + "schema": "string", + "required": true, + "description": "Action to be performed (cancel / resend)", + "example": "ACTION" + }, + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email address of the recipient", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/user/revoke/{email}", + "method": "revokeAdminUser", + "httpMethod": "delete", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Revoke an admin user", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email of the invited user", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "User revoked" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/invited/users", + "method": "listAdminUsers", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Get the list of all admin users", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/corporate/user/{email}/permissions", + "method": "checkAdminUserPermissions", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Check admin user permissions", + "parameters": [ + { + "name": "email", + "schema": "string", + "required": true, + "description": "Email of the invited user.", + "example": "EMAIL" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Check admin user permissions" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/corporate/groups", + "method": "listGroups", + "httpMethod": "get", + "tag": "Master account", + "typeScriptTag": "masterAccount", + "description": "Get the list of groups", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "" + } + ] + }, + { + "url": "/companies", + "method": "getAll", + "httpMethod": "get", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Get all Companies", + "parameters": [ + { + "name": "filters", + "schema": "string", + "description": "Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"}" + }, + { + "name": "linkedContactsIds", + "schema": "integer", + "description": "Filter by linked contacts ids" + }, + { + "name": "linkedDealsIds", + "schema": "string", + "description": "Filter by linked Deals ids" + }, + { + "name": "page", + "schema": "integer", + "description": "Index of the first document of the page" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page" + }, + { + "name": "sort", + "schema": "string", + "description": "Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed" + }, + { + "name": "sortBy", + "schema": "string", + "description": "The field used to sort field names." + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of companies" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/companies", + "method": "createCompany", + "httpMethod": "post", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Create a company", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "company" + }, + { + "name": "attributes", + "schema": "object", + "required": false, + "description": "", + "example": { + "domain": "https://example.com", + "industry": "Fabric", + "owner": "60e68d60582a3b006f524197" + } + }, + { + "name": "countryCode", + "schema": "integer", + "required": false, + "description": "", + "example": 91 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Created company id" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/companies/{id}", + "method": "deleteCompany", + "httpMethod": "delete", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Delete a company", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Company ID to delete", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "When company deleted" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/companies/{id}", + "method": "getCompanyById", + "httpMethod": "get", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Get a company", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Get Company Details", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Company Details" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/companies/{id}", + "method": "updateCompany", + "httpMethod": "patch", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Update a company", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "company" + }, + { + "name": "attributes", + "schema": "object", + "description": "", + "example": { + "category": "label_2", + "domain": "xyz", + "date": "2022-05-04T00:00:00+05:30", + "industry": "flipkart", + "number_of_contacts": 1, + "number_of_employees": 100, + "owner": "5b1a17d914b73d35a76ca0c7", + "phone_number": "81718441912", + "revenue": 10000.34222 + } + }, + { + "name": "countryCode", + "schema": "integer", + "description": "", + "example": 91 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Company Details" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/companies/attributes", + "method": "getAttributes", + "httpMethod": "get", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Get company attributes", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "List of company attributes" + } + ] + }, + { + "url": "/companies/link-unlink/{id}", + "method": "linkUnlinkWithContactDeal", + "httpMethod": "patch", + "tag": "Companies", + "typeScriptTag": "companies", + "description": "Link and Unlink company with contact and deal", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + }, + { + "name": "linkContactIds", + "schema": "array", + "description": "", + "example": [ + 1, + 2, + 3 + ] + }, + { + "name": "unlinkContactIds", + "schema": "array", + "description": "", + "example": [ + 4, + 5, + 6 + ] + }, + { + "name": "linkDealsIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "unlinkDealsIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045994", + "61a5ce58c5d479576104595", + "61a5ce58c5d4795761045996" + ] + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Successfully linked/unlinked contacts/deals with the company." + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/pipeline/details", + "method": "getPipelineStages", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get pipeline stages", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "List of stages" + } + ] + }, + { + "url": "/crm/pipeline/details/{pipelineID}", + "method": "getDetails", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get a pipeline", + "parameters": [ + { + "name": "pipelineId", + "schema": "string", + "required": true, + "description": "", + "example": "PIPELINEID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of pipeline" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/pipeline/details/all", + "method": "getAllPipelines", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get all pipelines", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "List of pipeline" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/attributes/deals", + "method": "getAttributes", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get deal attributes", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "List of deal attributes" + } + ] + }, + { + "url": "/crm/deals", + "method": "getAllDeals", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get all deals", + "parameters": [ + { + "name": "filters[attributesDealName]", + "schema": "string", + "description": "Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering." + }, + { + "name": "filters[linkedCompaniesIds]", + "schema": "string", + "description": "Filter by linked companies ids" + }, + { + "name": "filters[linkedContactsIds]", + "schema": "string", + "description": "Filter by linked companies ids" + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page" + }, + { + "name": "sort", + "schema": "string", + "description": "Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of Deals" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/deals", + "method": "createNewDeal", + "httpMethod": "post", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Create a deal", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Deal: Connect with company" + }, + { + "name": "attributes", + "schema": "object", + "required": false, + "description": "", + "example": { + "deal_owner": "6093d2425a9b436e9519d034", + "amount": 12 + } + } + ], + "responses": [ + { + "statusCode": "201", + "description": "Created deal id" + }, + { + "statusCode": "400", + "description": "Returned when invalid data posted" + } + ] + }, + { + "url": "/crm/deals/{id}", + "method": "deleteDeal", + "httpMethod": "delete", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Delete a deal", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Returned when item deleted" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/deals/{id}", + "method": "getById", + "httpMethod": "get", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Get a deal", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Deal Details" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/deals/{id}", + "method": "updateDealById", + "httpMethod": "patch", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Update a deal", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Deal: Connect with client" + }, + { + "name": "attributes", + "schema": "object", + "description": "", + "example": { + "deal_owner": "6093d2425a9b436e9519d034", + "amount": 12 + } + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Deal updated successfully" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/deals/link-unlink/{id}", + "method": "linkUnlinkPatch", + "httpMethod": "patch", + "tag": "Deals", + "typeScriptTag": "deals", + "description": "Link and Unlink a deal with contacts and companies", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + }, + { + "name": "linkContactIds", + "schema": "array", + "description": "", + "example": [ + 1, + 2, + 3 + ] + }, + { + "name": "unlinkContactIds", + "schema": "array", + "description": "", + "example": [ + 4, + 5, + 6 + ] + }, + { + "name": "linkCompanyIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "unlinkCompanyIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045994", + "61a5ce58c5d479576104595", + "61a5ce58c5d4795761045996" + ] + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Successfully linked/unlinked contacts/companies with the deal." + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/tasktypes", + "method": "getAllTaskTypes", + "httpMethod": "get", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Get all task types", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "Task types details" + } + ] + }, + { + "url": "/crm/tasks", + "method": "getAll", + "httpMethod": "get", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Get all tasks", + "parameters": [ + { + "name": "filter[type]", + "schema": "string", + "description": "Filter by task type (https://developers.brevo.com/" + }, + { + "name": "filter[status]", + "schema": "string", + "description": "Filter by task status" + }, + { + "name": "filter[date]", + "schema": "string", + "description": "Filter by date" + }, + { + "name": "filter[assignTo]", + "schema": "string", + "description": "Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute." + }, + { + "name": "filter[contacts]", + "schema": "string", + "description": "Filter by contact ids" + }, + { + "name": "filter[deals]", + "schema": "string", + "description": "Filter by deals ids" + }, + { + "name": "filter[companies]", + "schema": "string", + "description": "Filter by companies ids" + }, + { + "name": "dateFrom", + "schema": "integer", + "description": "dateFrom to date range filter type (timestamp in milliseconds)" + }, + { + "name": "dateTo", + "schema": "integer", + "description": "dateTo to date range filter type (timestamp in milliseconds)" + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "sort", + "schema": "string", + "description": "Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed" + }, + { + "name": "sortBy", + "schema": "string", + "description": "The field used to sort field names.", + "example": "name" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of tasks" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/tasks", + "method": "createNewTask", + "httpMethod": "post", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Create a task", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Task: Connect with client" + }, + { + "name": "duration", + "schema": "integer", + "required": false, + "description": "", + "example": 600000 + }, + { + "name": "taskTypeId", + "schema": "string", + "required": true, + "description": "", + "example": "61a5cd07ca1347c82306ad09" + }, + { + "name": "date", + "schema": "string", + "required": true, + "description": "", + "example": "2021-11-01T17:44:54.668Z" + }, + { + "name": "notes", + "schema": "string", + "required": false, + "description": "", + "example": "In communication with client for resolution of queries." + }, + { + "name": "done", + "schema": "boolean", + "required": false, + "description": "", + "example": false + }, + { + "name": "assignToId", + "schema": "string", + "required": false, + "description": "", + "example": "5faab4b7f195bb3c4c31e62a" + }, + { + "name": "contactsIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + 1, + 2, + 3 + ] + }, + { + "name": "dealsIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "companiesIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "reminder", + "schema": "object", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "Task Details" + }, + { + "statusCode": "400", + "description": "Returned when invalid data posted" + } + ] + }, + { + "url": "/crm/tasks/{id}", + "method": "removeTask", + "httpMethod": "delete", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Delete a task", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Returned when item deleted" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/tasks/{id}", + "method": "getTaskById", + "httpMethod": "get", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Get a task", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Task Details" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/tasks/{id}", + "method": "updateTask", + "httpMethod": "patch", + "tag": "Tasks", + "typeScriptTag": "tasks", + "description": "Update a task", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "ID" + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "Task: Connect with client" + }, + { + "name": "duration", + "schema": "integer", + "description": "", + "example": 600000 + }, + { + "name": "taskTypeId", + "schema": "string", + "description": "", + "example": "61a5cd07ca1347c82306ad09" + }, + { + "name": "date", + "schema": "string", + "description": "", + "example": "2021-11-01T17:44:54.668Z" + }, + { + "name": "notes", + "schema": "string", + "description": "", + "example": "In communication with client for resolution of queries." + }, + { + "name": "done", + "schema": "boolean", + "description": "", + "example": false + }, + { + "name": "assignToId", + "schema": "string", + "description": "", + "example": "5faab4b7f195bb3c4c31e62a" + }, + { + "name": "contactsIds", + "schema": "array", + "description": "", + "example": [ + 1, + 2, + 3 + ] + }, + { + "name": "dealsIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "companiesIds", + "schema": "array", + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991", + "61a5ce58c5d4795761045992" + ] + }, + { + "name": "reminder", + "schema": "object", + "description": "" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Task updated succussfully" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/notes", + "method": "getAll", + "httpMethod": "get", + "tag": "Notes", + "typeScriptTag": "notes", + "description": "Get all notes", + "parameters": [ + { + "name": "entity", + "schema": "string", + "description": "Filter by note entity type" + }, + { + "name": "entityIds", + "schema": "string", + "description": "Filter by note entity IDs" + }, + { + "name": "dateFrom", + "schema": "integer", + "description": "dateFrom to date range filter type (timestamp in milliseconds)" + }, + { + "name": "dateTo", + "schema": "integer", + "description": "dateTo to date range filter type (timestamp in milliseconds)" + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document of the page" + }, + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "sort", + "schema": "string", + "description": "Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of notes" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/notes", + "method": "createNewNote", + "httpMethod": "post", + "tag": "Notes", + "typeScriptTag": "notes", + "description": "Create a note", + "parameters": [ + { + "name": "text", + "schema": "string", + "required": true, + "description": "", + "example": "In communication with client for resolution of queries." + }, + { + "name": "contactIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + 247, + 1, + 2 + ] + }, + { + "name": "dealIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991" + ] + }, + { + "name": "companyIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991" + ] + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Updated Note ID" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "415", + "description": "" + } + ] + }, + { + "url": "/crm/notes/{id}", + "method": "removeById", + "httpMethod": "delete", + "tag": "Notes", + "typeScriptTag": "notes", + "description": "Delete a note", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Note ID to delete", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Returned when item deleted" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/notes/{id}", + "method": "getById", + "httpMethod": "get", + "tag": "Notes", + "typeScriptTag": "notes", + "description": "Get a note", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Note ID to get", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Note Details" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/notes/{id}", + "method": "updateNoteById", + "httpMethod": "patch", + "tag": "Notes", + "typeScriptTag": "notes", + "description": "Update a note", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Note ID to update", + "example": "ID" + }, + { + "name": "text", + "schema": "string", + "required": true, + "description": "", + "example": "In communication with client for resolution of queries." + }, + { + "name": "contactIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + 247, + 1, + 2 + ] + }, + { + "name": "dealIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991" + ] + }, + { + "name": "companyIds", + "schema": "array", + "required": false, + "description": "", + "example": [ + "61a5ce58c5d4795761045990", + "61a5ce58c5d4795761045991" + ] + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Note updated successfully" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + }, + { + "statusCode": "415", + "description": "" + } + ] + }, + { + "url": "/crm/files", + "method": "getAllFiles", + "httpMethod": "get", + "tag": "Files", + "typeScriptTag": "files", + "description": "Get all files", + "parameters": [ + { + "name": "entity", + "schema": "string", + "required": false, + "description": "Filter by file entity type" + }, + { + "name": "entityIds", + "schema": "string", + "required": false, + "description": "Filter by file entity IDs" + }, + { + "name": "dateFrom", + "schema": "integer", + "required": false, + "description": "dateFrom to date range filter type (timestamp in milliseconds)" + }, + { + "name": "dateTo", + "schema": "integer", + "required": false, + "description": "dateTo to date range filter type (timestamp in milliseconds)" + }, + { + "name": "offset", + "schema": "integer", + "required": false, + "description": "Index of the first document of the page" + }, + { + "name": "limit", + "schema": "integer", + "required": false, + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "List of files" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/files", + "method": "uploadFile", + "httpMethod": "post", + "tag": "Files", + "typeScriptTag": "files", + "description": "Upload a file", + "parameters": [ + { + "name": "file", + "schema": "string", + "required": true, + "description": "", + "example": "FILE" + }, + { + "name": "dealId", + "schema": "string", + "required": false, + "description": "" + }, + { + "name": "contactId", + "schema": "integer", + "required": false, + "description": "" + }, + { + "name": "companyId", + "schema": "string", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "File data that is uploaded" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/crm/files/{id}", + "method": "deleteFile", + "httpMethod": "delete", + "tag": "Files", + "typeScriptTag": "files", + "description": "Delete a file", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "File id to delete.", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "Returned when file is deleted." + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/files/{id}", + "method": "downloadFile", + "httpMethod": "get", + "tag": "Files", + "typeScriptTag": "files", + "description": "Download a file", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "File id to download.", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "Downloadable file link" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/crm/files/{id}/data", + "method": "getFileDetails", + "httpMethod": "get", + "tag": "Files", + "typeScriptTag": "files", + "description": "Get file details", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "File id to get file data.", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "File data that is uploaded" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/messages", + "method": "sendMessageAsAgent", + "httpMethod": "post", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Send a message as an agent", + "parameters": [ + { + "name": "visitorId", + "schema": "undefined", + "required": true, + "description": "" + }, + { + "name": "text", + "schema": "undefined", + "required": true, + "description": "" + }, + { + "name": "agentId", + "schema": "undefined", + "required": false, + "description": "" + }, + { + "name": "receivedFrom", + "schema": "undefined", + "required": false, + "description": "" + }, + { + "name": "agentEmail", + "schema": "undefined", + "required": false, + "description": "" + }, + { + "name": "agentName", + "schema": "undefined", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/conversations/messages/{id}", + "method": "deleteMessageSentByAgent", + "httpMethod": "delete", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Delete a message sent by an agent", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "The message was deleted from the conversation" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/messages/{id}", + "method": "getMessageById", + "httpMethod": "get", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Get a message", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/messages/{id}", + "method": "updateAgentMessage", + "httpMethod": "put", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Update a message sent by an agent", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message", + "example": "ID" + }, + { + "name": "text", + "schema": "string", + "required": true, + "description": "", + "example": "TEXT" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/pushedMessages", + "method": "sendAutomatedMessage", + "httpMethod": "post", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Send an automated message to a visitor", + "parameters": [ + { + "name": "visitorId", + "schema": "undefined", + "required": true, + "description": "" + }, + { + "name": "text", + "schema": "undefined", + "required": true, + "description": "" + }, + { + "name": "agentId", + "schema": "undefined", + "required": false, + "description": "" + }, + { + "name": "groupId", + "schema": "undefined", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/conversations/pushedMessages/{id}", + "method": "deleteAutomatedMessage", + "httpMethod": "delete", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Delete an automated message", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "204", + "description": "The message was deleted from the conversation" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/pushedMessages/{id}", + "method": "getAutomatedMessage", + "httpMethod": "get", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Get an automated message", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message sent previously", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/pushedMessages/{id}", + "method": "updatePushedMessage", + "httpMethod": "put", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Update an automated message", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "ID of the message", + "example": "ID" + }, + { + "name": "text", + "schema": "string", + "required": true, + "description": "", + "example": "TEXT" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "a Conversations message" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/conversations/agentOnlinePing", + "method": "setAgentOnlineStatus", + "httpMethod": "post", + "tag": "Conversations", + "typeScriptTag": "conversations", + "description": "Sets agent’s status to online for 2-3 minutes", + "parameters": [ + { + "name": "agentId", + "schema": "undefined", + "description": "" + }, + { + "name": "receivedFrom", + "schema": "undefined", + "description": "" + }, + { + "name": "agentEmail", + "schema": "undefined", + "description": "" + }, + { + "name": "agentName", + "schema": "undefined", + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "Status of the agent was set successfully. Response body will be empty." + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/ecommerce/activate", + "method": "activateApp", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Activate the eCommerce app", + "parameters": [], + "responses": [ + { + "statusCode": "200", + "description": "eCommerce activation is in process, please wait for 5 minutes." + }, + { + "statusCode": "401", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/orders", + "method": "getOrders", + "httpMethod": "get", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Get order details", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "modifiedSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "createdSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/orders/status", + "method": "manageOrderStatus", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Managing the status of the order", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "14" + }, + { + "name": "createdAt", + "schema": "string", + "required": true, + "description": "", + "example": "2021-07-29T20:59:23.383Z" + }, + { + "name": "updatedAt", + "schema": "string", + "required": true, + "description": "", + "example": "2021-07-30T10:59:23.383Z" + }, + { + "name": "status", + "schema": "string", + "required": true, + "description": "", + "example": "completed" + }, + { + "name": "amount", + "schema": "number", + "required": true, + "description": "", + "example": 308.42 + }, + { + "name": "products", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "email", + "schema": "string", + "required": false, + "description": "", + "example": "example@brevo.com" + }, + { + "name": "billing", + "schema": "object", + "required": false, + "description": "" + }, + { + "name": "coupons", + "schema": "array", + "required": false, + "description": "", + "example": [ + "EASTER15OFF" + ] + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/orders/status/batch", + "method": "createOrderBatch", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Create orders in batch", + "parameters": [ + { + "name": "orders", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "notifyUrl", + "schema": "string", + "required": false, + "description": "", + "example": "https://en.wikipedia.org/wiki/Webhook" + }, + { + "name": "historical", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": true + } + ], + "responses": [ + { + "statusCode": "202", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/events", + "method": "trackInteraction", + "httpMethod": "post", + "tag": "Event", + "typeScriptTag": "event", + "description": "Create an event", + "parameters": [ + { + "name": "event_name", + "schema": "string", + "required": true, + "description": "", + "example": "video_played" + }, + { + "name": "event_date", + "schema": "string", + "required": false, + "description": "", + "example": "2024-02-06T20:59:23.383Z" + }, + { + "name": "identifiers", + "schema": "object", + "required": true, + "description": "" + }, + { + "name": "contact_properties", + "schema": "object", + "required": false, + "description": "", + "example": { + "AGE": 32, + "GENDER": "FEMALE" + } + }, + { + "name": "event_properties", + "schema": "object", + "required": false, + "description": "", + "example": { + "video_title": "Brevo — The most approachable CRM suite", + "vide_description": "Create your free account today!", + "duration": 142, + "autoplayed": false, + "upload_date": "2023-11-24T12:09:10+01:00" + } + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + } + ] + }, + { + "url": "/categories", + "method": "getAllCategories", + "httpMethod": "get", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Return all your categories", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "ids", + "schema": "array", + "description": "Filter by category ids" + }, + { + "name": "name", + "schema": "string", + "description": "Filter by category name" + }, + { + "name": "modifiedSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "createdSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/categories", + "method": "createCategory", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Create/Update a category", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "CAT123" + }, + { + "name": "name", + "schema": "string", + "required": false, + "description": "", + "example": "Electronics" + }, + { + "name": "url", + "schema": "string", + "required": false, + "description": "", + "example": "http://mydomain.com/category/electronics" + }, + { + "name": "updateEnabled", + "schema": "boolean", + "required": false, + "description": "", + "example": false, + "default": false + }, + { + "name": "deletedAt", + "schema": "string", + "required": false, + "description": "", + "example": "2017-05-12T12:30:00.000Z" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/categories/{id}", + "method": "getCategoryDetails", + "httpMethod": "get", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Get a category details", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Category ID", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/categories/batch", + "method": "createCategoriesBatch", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Create categories in batch", + "parameters": [ + { + "name": "categories", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "updateEnabled", + "schema": "boolean", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/products", + "method": "listAllProducts", + "httpMethod": "get", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Return all your products", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document in the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + }, + { + "name": "ids", + "schema": "array", + "description": "Filter by product ids" + }, + { + "name": "name", + "schema": "string", + "description": "Filter by product name, minimum 3 characters should be present for search" + }, + { + "name": "price[lte]", + "schema": "number", + "description": "Price filter for products less than and equals to particular amount" + }, + { + "name": "price[gte]", + "schema": "number", + "description": "Price filter for products greater than and equals to particular amount" + }, + { + "name": "price[lt]", + "schema": "number", + "description": "Price filter for products less than particular amount" + }, + { + "name": "price[gt]", + "schema": "number", + "description": "Price filter for products greater than particular amount" + }, + { + "name": "price[eq]", + "schema": "number", + "description": "Price filter for products equals to particular amount" + }, + { + "name": "price[ne]", + "schema": "number", + "description": "Price filter for products not equals to particular amount" + }, + { + "name": "categories", + "schema": "array", + "description": "Filter by product categories" + }, + { + "name": "modifiedSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + }, + { + "name": "createdSince", + "schema": "string", + "description": "Filter (https://developers.brevo.com/ the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/products", + "method": "createProduct", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Create/Update a product", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "", + "example": "P11" + }, + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "Iphone 11" + }, + { + "name": "url", + "schema": "string", + "required": false, + "description": "", + "example": "http://mydomain.com/product/electronics/product1" + }, + { + "name": "imageUrl", + "schema": "string", + "required": false, + "description": "", + "example": "http://mydomain.com/product-absoulte-url/img.jpeg" + }, + { + "name": "sku", + "schema": "string", + "required": false, + "description": "" + }, + { + "name": "price", + "schema": "number", + "required": false, + "description": "" + }, + { + "name": "categories", + "schema": "array", + "required": false, + "description": "" + }, + { + "name": "parentId", + "schema": "string", + "required": false, + "description": "" + }, + { + "name": "metaInfo", + "schema": "object", + "required": false, + "description": "", + "example": { + "description": "Shoes for sports", + "brand": "addidas" + } + }, + { + "name": "updateEnabled", + "schema": "boolean", + "required": false, + "description": "", + "example": false, + "default": false + }, + { + "name": "deletedAt", + "schema": "string", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "204", + "description": "Product updated" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/products/{id}", + "method": "getProductDetails", + "httpMethod": "get", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Get a product's details", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Product ID", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/products/batch", + "method": "createProductsBatch", + "httpMethod": "post", + "tag": "Ecommerce", + "typeScriptTag": "ecommerce", + "description": "Create products in batch", + "parameters": [ + { + "name": "products", + "schema": "array", + "required": true, + "description": "" + }, + { + "name": "updateEnabled", + "schema": "boolean", + "required": false, + "description": "" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/couponCollections", + "method": "listCouponCollections", + "httpMethod": "get", + "tag": "Coupons", + "typeScriptTag": "coupons", + "description": "Get all your coupon collections", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number of documents returned per page", + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "description": "Index of the first document on the page", + "default": 0 + }, + { + "name": "sort", + "schema": "string", + "description": "Sort the results by creation time in ascending/descending order", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + } + ] + }, + { + "url": "/couponCollections", + "method": "createCollection", + "httpMethod": "post", + "tag": "Coupons", + "typeScriptTag": "coupons", + "description": "Create а coupon collection", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "SummerPromotions" + }, + { + "name": "defaultCoupon", + "schema": "string", + "required": true, + "description": "", + "example": "10 OFF" + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + } + ] + }, + { + "url": "/couponCollections/{id}", + "method": "getById", + "httpMethod": "get", + "tag": "Coupons", + "typeScriptTag": "coupons", + "description": "Get a coupon collection by id", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Id of the collection to return", + "example": "ID" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/couponCollections/{id}", + "method": "updateCouponCollectionById", + "httpMethod": "patch", + "tag": "Coupons", + "typeScriptTag": "coupons", + "description": "Update a coupon collection by id", + "parameters": [ + { + "name": "id", + "schema": "string", + "required": true, + "description": "Id of the collection to update", + "example": "ID" + }, + { + "name": "defaultCoupon", + "schema": "string", + "required": true, + "description": "", + "example": "10 OFF" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + } + ] + }, + { + "url": "/coupons", + "method": "createCouponCollection", + "httpMethod": "post", + "tag": "Coupons", + "typeScriptTag": "coupons", + "description": "Create coupons for a coupon collection", + "parameters": [ + { + "name": "collectionId", + "schema": "string", + "required": true, + "description": "", + "example": "23befbae-1505-47a8-bd27-e30ef739f32c" + }, + { + "name": "coupons", + "schema": "array", + "required": true, + "description": "" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "401", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/whatsapp/sendMessage", + "method": "sendMessage", + "httpMethod": "post", + "tag": "Transactional WhatsApp", + "typeScriptTag": "transactionalWhatsApp", + "description": "Send a WhatsApp message", + "parameters": [], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/whatsapp/statistics/events", + "method": "getActivity", + "httpMethod": "get", + "tag": "Transactional WhatsApp", + "typeScriptTag": "transactionalWhatsApp", + "description": "Get all your WhatsApp activity (unaggregated events)", + "parameters": [ + { + "name": "limit", + "schema": "integer", + "description": "Number limitation for the result returned", + "default": 2500 + }, + { + "name": "offset", + "schema": "integer", + "description": "Beginning point in the list to retrieve from", + "default": 0 + }, + { + "name": "startDate", + "schema": "string", + "description": "**Mandatory if endDate is used.** Starting date of the report (https://developers.brevo.com/. Must be lower than equal to endDate\n" + }, + { + "name": "endDate", + "schema": "string", + "description": "**Mandatory if startDate is used.** Ending date of the report (https://developers.brevo.com/. Must be greater than equal to startDate\n" + }, + { + "name": "days", + "schema": "integer", + "description": "Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_\n" + }, + { + "name": "contactNumber", + "schema": "string", + "description": "Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721)" + }, + { + "name": "event", + "schema": "string", + "description": "Filter the report for a specific event type" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed", + "default": "desc" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/feeds", + "method": "getAllFeeds", + "httpMethod": "get", + "tag": "External Feeds", + "typeScriptTag": "externalFeeds", + "description": "Fetch all external feeds", + "parameters": [ + { + "name": "search", + "schema": "string", + "required": false, + "description": "Can be used to filter records by search keyword on feed name", + "example": "search" + }, + { + "name": "startDate", + "schema": "string", + "required": false, + "description": "Mandatory if `endDate` is used. Starting date (https://developers.brevo.com/ from which you want to fetch the list. Can be maximum 30 days older than current date.", + "example": "2022-09-04" + }, + { + "name": "endDate", + "schema": "string", + "required": false, + "description": "Mandatory if `startDate` is used. Ending date (https://developers.brevo.com/ till which you want to fetch the list. Maximum time period that can be selected is one month.", + "example": "2022-10-01" + }, + { + "name": "sort", + "schema": "string", + "required": false, + "description": "Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed.", + "default": "desc" + }, + { + "name": "authType", + "schema": "string", + "required": false, + "description": "Filter the records by `authType` of the feed." + }, + { + "name": "limit", + "schema": "integer", + "required": false, + "description": "Number of documents returned per page.", + "example": 100, + "default": 50 + }, + { + "name": "offset", + "schema": "integer", + "required": false, + "description": "Index of the first document on the page.", + "example": 0, + "default": 0 + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/feeds", + "method": "createFeed", + "httpMethod": "post", + "tag": "External Feeds", + "typeScriptTag": "externalFeeds", + "description": "Create an external feed", + "parameters": [ + { + "name": "name", + "schema": "string", + "required": true, + "description": "", + "example": "New feed" + }, + { + "name": "url", + "schema": "string", + "required": true, + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "authType", + "schema": "string", + "required": false, + "description": "", + "default": "noAuth" + }, + { + "name": "username", + "schema": "string", + "required": false, + "description": "", + "example": "user" + }, + { + "name": "password", + "schema": "string", + "required": false, + "description": "", + "example": "password" + }, + { + "name": "token", + "schema": "string", + "required": false, + "description": "", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + { + "name": "headers", + "schema": "array", + "required": false, + "description": "", + "example": [ + { + "name": "header1", + "value": "value1" + }, + { + "name": "header2", + "value": "value2" + } + ] + }, + { + "name": "maxRetries", + "schema": "integer", + "required": false, + "description": "", + "example": 5, + "default": 5 + }, + { + "name": "cache", + "schema": "boolean", + "required": false, + "description": "", + "example": true, + "default": false + } + ], + "responses": [ + { + "statusCode": "201", + "description": "" + }, + { + "statusCode": "400", + "description": "" + } + ] + }, + { + "url": "/feeds/{uuid}", + "method": "deleteFeedByUuid", + "httpMethod": "delete", + "tag": "External Feeds", + "typeScriptTag": "externalFeeds", + "description": "Delete an external feed", + "parameters": [ + { + "name": "uuid", + "schema": "string", + "required": true, + "description": "UUID of the feed to delete", + "example": "38f351fb-6e77-4b38-979a-a2465260449e" + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/feeds/{uuid}", + "method": "getFeedByUuid", + "httpMethod": "get", + "tag": "External Feeds", + "typeScriptTag": "externalFeeds", + "description": "Get an external feed by UUID", + "parameters": [ + { + "name": "uuid", + "schema": "string", + "required": true, + "description": "UUID of the feed to fetch", + "example": "38f351fb-6e77-4b38-979a-a2465260449e" + } + ], + "responses": [ + { + "statusCode": "200", + "description": "" + }, + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + }, + { + "url": "/feeds/{uuid}", + "method": "updateFeedByUuid", + "httpMethod": "put", + "tag": "External Feeds", + "typeScriptTag": "externalFeeds", + "description": "Update an external feed", + "parameters": [ + { + "name": "uuid", + "schema": "string", + "required": true, + "description": "UUID of the feed to update", + "example": "38f351fb-6e77-4b38-979a-a2465260449e" + }, + { + "name": "name", + "schema": "string", + "description": "", + "example": "New feed" + }, + { + "name": "url", + "schema": "string", + "description": "", + "example": "http://requestb.in/173lyyx1" + }, + { + "name": "authType", + "schema": "string", + "description": "" + }, + { + "name": "username", + "schema": "string", + "description": "", + "example": "user" + }, + { + "name": "password", + "schema": "string", + "description": "", + "example": "password" + }, + { + "name": "token", + "schema": "string", + "description": "", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + { + "name": "headers", + "schema": "array", + "description": "", + "example": [ + { + "name": "header1", + "value": "value1" + }, + { + "name": "header2", + "value": "value2" + } + ] + }, + { + "name": "maxRetries", + "schema": "integer", + "description": "", + "example": 5, + "default": 5 + }, + { + "name": "cache", + "schema": "boolean", + "description": "", + "example": true, + "default": false + } + ], + "responses": [ + { + "statusCode": "400", + "description": "" + }, + { + "statusCode": "404", + "description": "" + } + ] + } + ], + "repositoryDescription": "Brevo, formerly Sendinblue, is a leading CRM suite empowering businesses to grow in a digital world. Unified view of customer journey to foster meaningful relationships. Founded in 2012, 500,000+ customers in 180 countries. HQ in Paris, 700+ employees, focused on sustainability. Brevo's {language} SDK generated by Konfig (https://konfigthis.com/).", + "logo": "https://raw.githubusercontent.com/konfig-sdks/openapi-examples/HEAD/brevo/logo.png", + "openApiRaw": "https://raw.githubusercontent.com/konfig-sdks/openapi-examples/HEAD/brevo/openapi.yaml", + "openApiGitHubUi": "https://github.com/konfig-sdks/openapi-examples/tree/HEAD/brevo/openapi.yaml", + "previewLinkImage": "https://raw.githubusercontent.com/konfig-sdks/openapi-examples/HEAD/brevo/imagePreview.jpg", + "faviconUrl": "https://raw.githubusercontent.com/konfig-sdks/openapi-examples/HEAD/brevo/favicon.png", + "clientNameCamelCase": "brevo", + "lastUpdated": "2024-03-28T23:18:32.345Z", + "typescriptSdkUsageCode": "import { Brevo } from 'brevo-typescript-sdk';\n\nconst brevo = new Brevo({\n // The API key should be passed in the request headers as `api-key` for authentication.\n apiKey: \"API_KEY\"\n})", + "typescriptSdkFirstRequestCode": "// Return all your created email campaigns\nconst getAllResponse = brevo.emailCampaigns.getAll({\n limit: 50\n sort: \"desc\"\n})", + "fixedSpecFileName": "brevo-fixed-spec.yaml" +} \ No newline at end of file diff --git a/sdks/db/spec-data/from-custom-request_brevo.com.json b/sdks/db/spec-data/from-custom-request_brevo.com.json new file mode 100644 index 0000000000..8ea29471b4 --- /dev/null +++ b/sdks/db/spec-data/from-custom-request_brevo.com.json @@ -0,0 +1,27 @@ +{ + "securitySchemes": { + "api-key": { + "type": "apiKey", + "description": "The API key should be passed in the request headers as `api-key` for authentication.", + "name": "api-key", + "in": "header" + } + }, + "apiBaseUrl": "https://api.brevo.com/v3", + "apiVersion": "3.0.0", + "apiDescription": "Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to :\n - Manage your campaigns and get the statistics\n - Manage your contacts\n - Send transactional Emails and SMS\n - and much more...\n\nYou can download our wrappers at https://github.com/orgs/brevo\n\n**Possible responses**\n | Code | Message |\n | :-------------: | ------------- |\n | 200 | OK. Successful Request |\n | 201 | OK. Successful Creation |\n | 202 | OK. Request accepted |\n | 204 | OK. Successful Update/Deletion |\n | 400 | Error. Bad Request |\n | 401 | Error. Authentication Needed |\n | 402 | Error. Not enough credit, plan upgrade needed |\n | 403 | Error. Permission denied |\n | 404 | Error. Object does not exist |\n | 405 | Error. Method not allowed |\n | 406 | Error. Not Acceptable |\n", + "apiTitle": "Brevo API", + "endpoints": 156, + "sdkMethods": 221, + "schemas": 213, + "parameters": 772, + "contactUrl": "https://account.brevo.com/support", + "contactEmail": "contact@brevo.com", + "originalCustomRequest": { + "type": "GET", + "url": "https://api.brevo.com/v3/swagger_definition_v3.yml" + }, + "customRequestSpecFilename": "brevo.com.yaml", + "difficultyScore": 520.5, + "difficulty": "Hard" +} \ No newline at end of file diff --git a/sdks/db/spec-data/taxamo.com_1.json b/sdks/db/spec-data/taxamo.com_1.json index ee5c9c9e5d..d5ae4829c9 100644 --- a/sdks/db/spec-data/taxamo.com_1.json +++ b/sdks/db/spec-data/taxamo.com_1.json @@ -22,5 +22,5 @@ "schemas": 97, "parameters": 126, "difficultyScore": 116, - "difficulty": "Medium" + "difficulty": "Easy" } \ No newline at end of file diff --git a/sdks/publish.yaml b/sdks/publish.yaml index 2f9942af98..4099f0dc87 100644 --- a/sdks/publish.yaml +++ b/sdks/publish.yaml @@ -6972,3 +6972,50 @@ publish: serviceName: false sdkName: podium-{language}-sdk clientName: Podium + from-custom-request_brevo.com: + homepage: brevo.com + company: Brevo + developerDocumentation: developers.brevo.com/ + apiStatusUrls: inherit + metaDescription: >- + Brevo, formerly known as Sendinblue, is the leading customer relationship + management (CRM) suite designed to fully cultivate long-term customer + relationships and to empower businesses to expand in a fast changing + digital world. With Brevo, businesses have a unified view of the customer + journey in one easy-to-use platform to grow meaningful relationships. + + + 🙌Brevo Fun Facts 🙌 + + - Founded in 2012 by Armand Thiberge with a mission to help businesses of + all sizes build stronger customer relationships and grow beyond their + wildest dreams + + - 500,000 customers across 180 countries + + - Fully compliant with GDPR regulations + + - Service and platform available in six languages + + - Headquartered in Paris with eight other offices in Seattle, Toronto, + Berlin, Vienna, Sofia, Noida, and Bengaluru + + - 700+ talented employees representing over 67 nationalities + + - Continuous efforts to reduce and monitor its carbon footprint + + - Achieved centaur status—$100M in ARR—in 2022 + + - Award wins include Top 100 Software Company by The Software Report + (TSR), Stevie Award: Relationship Management Solution, MarTech + Breakthrough Award: Best Overall Marketing Automation Platform, G2: Leader + Winter, Leader Enterprise Winter, Best Results Mid-Market, Best Software + Awards: Top 50 Marketing Products, Best Software Awards: Top 100 Fastest + Growing Products + categories: + - email + - sms + - chat + serviceName: false + sdkName: brevo-{language}-sdk + clientName: Brevo diff --git a/sdks/src/collect-from-custom-requests.ts b/sdks/src/collect-from-custom-requests.ts index b34f078236..1fbcad9749 100644 --- a/sdks/src/collect-from-custom-requests.ts +++ b/sdks/src/collect-from-custom-requests.ts @@ -2204,6 +2204,10 @@ const customRequests: Record