getWebhook
{
"type": "object",
"required": [
"createdAt",
"description",
"events",
"id",
"modifiedAt",
"type",
"url"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 654,
"description": "ID of the webhook"
},
"url": {
"type": "string",
"format": "url",
"example": "http://requestb.in/173lyyx1",
"description": "URL of the webhook"
},
"auth": {
"type": "object",
"example": {
"type": "bearer",
"token": "test-auth-token1234"
},
"description": "Authentication header to be send with the webhook requests"
},
"type": {
"enum": [
"marketing",
"transactional"
],
"type": "string",
"example": "marketing",
"description": "Type of webhook (marketing or transactional)"
},
"events": {
"type": "array",
"items": {
"type": "string",
"example": "opens,clicks",
"description": "Events which will trigger the webhook when they occure"
}
},
"batched": {
"type": "boolean",
"example": true,
"description": "Batching configuration of the webhook, we send batched webhooks if its true"
},
"headers": {
"type": "array",
"items": {
"type": "object",
"example": {
"key": "cf-secret",
"value": "test-header-value"
},
"description": "Headers send with the requests to the webhook"
}
},
"createdAt": {
"type": "string",
"example": "2016-12-01T12:50:00.000Z",
"description": "Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"modifiedAt": {
"type": "string",
"example": "2017-05-12T13:15:00.000Z",
"description": "Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"description": {
"type": "string",
"example": "Webhook triggered on campaign openings",
"description": "Description of the webhook"
}
}
}
getWebhooks
{
"type": "object",
"required": [
"webhooks"
],
"properties": {
"webhooks": {
"type": "array",
"items": {
"$ref": "#/components/schemas/getWebhook"
}
}
}
}
getWhatsAppConfig
{
"type": "object",
"properties": {
"sendingLimit": {
"type": "string",
"example": "TIER_1K",
"description": "Sending limit Information of the WhatsApp API account"
},
"businessStatus": {
"type": "string",
"example": "verified",
"description": "Verification status information of the Business account"
},
"phoneNumberQuality": {
"enum": [
"GREEN",
"YELLOW",
"RED"
],
"type": "string",
"example": "GREEN",
"description": "Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)**"
},
"phoneNumberNameStatus": {
"enum": [
"APPROVED",
"PENDING",
"REJECTED"
],
"type": "string",
"example": "APPROVED",
"description": "Status of the name associated with WhatsApp Phone number"
},
"whatsappBusinessAccountId": {
"type": "string",
"example": 105569359072383,
"description": "Id of the WhatsApp business account"
},
"whatsappBusinessAccountStatus": {
"enum": [
"APPROVED",
"PENDING",
"REJECTED"
],
"type": "string",
"example": "APPROVED",
"description": "Status information related to WhatsApp API account"
}
}
}
getWhatsappCampaignOverview
{
"type": "object",
"required": [
"id",
"campaignName",
"campaignStatus",
"senderNumber",
"recipients",
"createdAt",
"template",
"modifiedAt"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 1672035851100690,
"description": "ID of the WhatsApp Campaign"
},
"stats": {
"$ref": "#/components/schemas/WhatsappCampStats"
},
"template": {
"$ref": "#/components/schemas/WhatsappCampTemplate"
},
"createdAt": {
"type": "string",
"example": "2017-06-01T12:30:00.000Z",
"description": "Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"modifiedAt": {
"type": "string",
"example": "2017-05-01T12:30:00.000Z",
"description": "UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"scheduledAt": {
"type": "string",
"example": "2017-06-01T12:30:00.000Z",
"description": "UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format"
},
"campaignName": {
"type": "string",
"example": "Test Campaign",
"description": "Name of the WhatsApp Campaign"
},
"senderNumber": {
"type": "string",
"example": 9368207029,
"description": "Sender of the WhatsApp Campaign"
},
"campaignStatus": {
"enum": [
"draft",
"scheduled",
"pending",
"approved",
"running",
"suspended",
"rejected",
"sent"
],
"type": "string",
"example": "draft",
"description": "Status of the WhatsApp Campaign"
}
}
}
getWhatsappCampaigns
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int64",
"example": 40,
"description": "Number of WhatsApp campaigns retrieved"
},
"campaigns": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"campaignName",
"campaignStatus",
"templateId",
"scheduledAt",
"createdAt",
"modifiedAt"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 1672035851100690,
"description": "ID of the WhatsApp Campaign"
},
"stats": {
"$ref": "#/components/schemas/WhatsappCampStats"
},
"createdAt": {
"type": "string",
"example": "2017-06-01T12:30:00.000Z",
"description": "Creation UTC date-time of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"modifiedAt": {
"type": "string",
"example": "2017-05-01T12:30:00.000Z",
"description": "UTC date-time of last modification of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"templateId": {
"type": "string",
"example": 637660278078655,
"description": "Id of the WhatsApp template"
},
"errorReason": {
"type": "string",
"description": "Error Reason associated with the WhatsApp campaign sending"
},
"scheduledAt": {
"type": "string",
"example": "2017-06-01T12:30:00.000Z",
"description": "UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format"
},
"campaignName": {
"type": "string",
"example": "Test Campaign",
"description": "Name of the WhatsApp Campaign"
},
"campaignStatus": {
"enum": [
"draft",
"scheduled",
"pending",
"approved",
"running",
"suspended",
"rejected",
"sent"
],
"type": "string",
"example": "draft",
"description": "Status of the WhatsApp Campaign"
},
"readPercentage": {
"type": "number",
"format": "float",
"example": 28.57,
"description": "Read percentage of the the WhatsApp campaign created"
},
"invalidatedContacts": {
"type": "integer",
"format": "int64",
"example": 0,
"description": "Count of invalidated contacts"
}
}
}
}
}
}
getWhatsappEventReport
{
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"contactNumber",
"date",
"messageId",
"event",
"senderNumber"
],
"properties": {
"body": {
"type": "string",
"example": "Hi! I am a reply",
"description": "Text of the reply (will be there only in case of `reply` event with text)"
},
"date": {
"type": "string",
"example": "2017-03-12T12:30:00.000Z",
"description": "UTC date-time on which the event has been generated"
},
"event": {
"enum": [
"sent",
"delivered",
"read",
"error",
"unsubscribe",
"reply",
"soft-bounce"
],
"type": "string",
"example": "delivered",
"description": "Event which occurred"
},
"reason": {
"type": "string",
"example": "23befbae-1505-47a8-bd27-e30ef739f32c",
"description": "Reason for the event (will be there in case of `error` and `soft-bounce` events)"
},
"mediaUrl": {
"type": "string",
"format": "url",
"example": "https://example.com/media.png",
"description": "Url of the media reply (will be there only in case of `reply` event with media)"
},
"messageId": {
"type": "string",
"example": "23befbae-1505-47a8-bd27-e30ef739f32c",
"description": "Message ID which generated the event"
},
"senderNumber": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
},
"contactNumber": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
}
}
}
}
}
}
getWhatsappTemplates
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int64",
"example": 24,
"description": "Number of WhatsApp templates retrieved"
},
"templates": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"status",
"type",
"language",
"category",
"createdAt",
"modifiedAt"
],
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 235,
"description": "ID of the WhatsApp template"
},
"name": {
"type": "string",
"example": "Test template",
"description": "Name of the WhatsApp template"
},
"status": {
"type": "string",
"example": "approved",
"description": "Status of the WhatsApp template"
},
"category": {
"type": "string",
"example": "MARKETING",
"description": "category of the template"
},
"language": {
"type": "string",
"example": "en",
"description": "Language in which template exists"
},
"createdAt": {
"type": "string",
"example": "2017-06-01T12:30:00.000Z",
"description": "Creation UTC date-time of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"modifiedAt": {
"type": "string",
"example": "2017-05-01T12:30:00.000Z",
"description": "UTC date-time of last modification of the WhatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)"
},
"errorReason": {
"type": "string",
"example": "NONE",
"description": "Error reason in the template creation"
}
}
}
}
}
}
inviteAdminUser
{
"type": "object",
"required": [
"email",
"all_features_access",
"privileges"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "inviteuser@example.com",
"description": "Email address for the organization"
},
"groupIds": {
"type": "array",
"items": {
"type": "string",
"description": "Group Id"
},
"example": [
"2baxxxxxxxxxxxxxxxxxxxxxcaa",
"65axxxxxxxxxxxxxxxxxxxxxc5a"
],
"description": "Ids of Group"
},
"privileges": {
"type": "array",
"items": {
"type": "object",
"example": [
{
"feature": "my_plan",
"permissions": [
"all"
]
},
{
"feature": "api",
"permissions": [
"none"
]
}
],
"properties": {
"feature": {
"enum": [
"my_plan",
"api",
"user_management",
"app_management"
],
"type": "string",
"example": "user_management",
"description": "Feature name"
},
"permissions": {
"type": "array",
"items": {
"enum": [
"all",
"none"
],
"type": "string",
"example": "'all', 'none'"
},
"description": "Permissions for a given feature"
}
},
"description": "Privileges given to the user"
}
},
"all_features_access": {
"enum": [
true,
false
],
"type": "boolean",
"example": true,
"description": "All access to the features"
}
}
}
inviteuser
{
"type": "object",
"required": [
"email",
"all_features_access",
"privileges"
],
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "inviteuser@example.com",
"description": "Email address for the organization"
},
"privileges": {
"type": "array",
"items": {
"type": "object",
"example": [
{
"feature": "email_campaigns",
"permissions": [
"create_edit_delete",
"send_schedule_suspend"
]
},
{
"feature": "sms_campaigns",
"permissions": [
"create_edit_delete",
"send_schedule_suspend"
]
},
{
"feature": "facebook_ads",
"permissions": [
"create_edit_delete",
"schedule_pause"
]
}
],
"properties": {
"feature": {
"enum": [
"email_campaigns",
"sms_campaigns",
"contacts",
"templates",
"workflows",
"facebook_ads",
"landing_pages",
"transactional_emails",
"smtp_api",
"user_management",
"sales_platform",
"phone",
"conversations",
"senders_domains_dedicated_ips",
"push_notifications"
],
"type": "string",
"example": "email_campaigns",
"description": "Feature name"
},
"permissions": {
"type": "array",
"items": {
"enum": [
"create_edit_delete",
"send_schedule_suspend",
"view",
"import",
"export",
"list_and_attributes",
"forms",
"activate_deactivate",
"activate_deactivate_pause",
"settings",
"schedule_pause",
"all",
"logs",
"access",
"assign",
"configure",
"manage_owned_deals_tasks_companies",
"manage_others_deals_tasks_companies",
"reports",
"senders_management",
"domains_management",
"dedicated_ips_management",
"send",
"smtp",
"api_keys",
"authorized_ips",
"none"
],
"type": "string",
"example": "'create_edit_delete', 'send_schedule_suspend'"
},
"description": "Permissions for a given feature"
}
},
"description": "Privileges given to the user"
}
},
"all_features_access": {
"enum": [
true,
false
],
"type": "boolean",
"example": true,
"description": "All access to the features"
}
}
}
inviteuserResponse
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"example": "OK",
"description": "Status of the API operation."
},
"invoice_id": {
"type": "string",
"items": {
"type": "string",
"example": "TEST-ID"
},
"description": "Invoice id"
}
}
}
manageIp
{
"type": "object",
"properties": {
"ip": {
"type": "string",
"example": "123.65.8.22",
"description": "Dedicated ID"
}
}
}
masterDetailsResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "Unique identifier of the master account organization"
},
"email": {
"type": "string",
"description": "Email id of master account"
},
"planInfo": {
"type": "object",
"properties": {
"price": {
"type": "number",
"description": "Plan amount"
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the feature"
},
"used": {
"type": "integer",
"format": "int64",
"description": "Quantity consumed by master"
},
"quantity": {
"type": "integer",
"format": "int64",
"description": "Quantity provided in the plan"
},
"remaining": {
"type": "integer",
"format": "int64",
"description": "Quantity remaining in the plan"
},
"unitValue": {
"type": "string",
"description": "Unit value of the feature"
},
"usedOverages": {
"type": "integer",
"format": "int64",
"description": "Quantity consumed by sub-organizations over the admin plan limit (only applicable on ENTv2)"
},
"quantityWithOverages": {
"type": "integer",
"format": "int64",
"description": "Quantity with overages provided in the plan (only applicable on ENTv2)"
}
}
},
"description": "List of provided features in the plan"
},
"planPeriod": {
"enum": [
"month",
"year"
],
"type": "string",
"description": "Plan period type"
},
"subAccounts": {
"type": "integer",
"description": "Number of sub-accounts"
},
"currencyCode": {
"type": "string",
"description": "Plan currency"
},
"nextBillingAt": {
"type": "integer",
"format": "int64",
"description": "Timestamp of next billing date"
}
},
"description": "Plan details"
},
"timezone": {
"type": "string",
"description": "Timezone of the master account organization"
},
"billingInfo": {
"type": "object",
"properties": {
"name": {
"type": "object",
"properties": {
"givenName": {
"type": "string",
"description": "First name for billing"
},
"familyName": {
"type": "string",
"description": "Last name for billing"
}
},
"description": "Billing name of master account holder"
},
"email": {
"type": "string",
"description": "Billing email id of master account"
},
"address": {
"type": "object",
"properties": {
"locality": {
"type": "string",
"description": "Locality"
},
"stateCode": {
"type": "string",
"description": "State code"
},
"postalCode": {
"type": "string",
"description": "Postal code"
},
"countryCode": {
"type": "string",
"description": "Country code"
},
"streetAddress": {
"type": "string",
"description": "Street address"
}
},
"description": "Billing address of master account"
},
"companyName": {
"type": "string",
"description": "Company name of master account"
}
},
"description": "Billing details of the master account organization"
},
"companyName": {
"type": "string",
"description": "Company name of master account organization"
},
"currencyCode": {
"type": "string",
"description": "Currency code of the master account organization"
}
}
}
notification
{
"type": "object",
"required": [
"channel",
"text"
],
"properties": {
"text": {
"type": "string",
"example": "Please pay for your yoga class.",
"description": "Use this field if you want to give more context to your contact about the payment request.\n"
},
"channel": {
"enum": [
"email"
],
"type": "string",
"example": "email",
"description": "Channel used to send the notifications.\n"
}
},
"description": "Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent.\n"
}
order
{
"type": "object",
"required": [
"id",
"createdAt",
"updatedAt",
"status",
"amount",
"products"
],
"properties": {
"id": {
"type": "string",
"example": "14",
"description": "Unique ID of the order."
},
"email": {
"type": "string",
"example": "example@brevo.com",
"description": "Email of the contact, Mandatory if \"phone\" field is not passed in \"billing\" parameter."
},
"amount": {
"type": "number",
"example": 308.42,
"description": "Total amount of the order, including all shipping expenses, tax and the price of items."
},
"status": {
"type": "string",
"example": "completed",
"description": "State of the order."
},
"billing": {
"type": "object",
"properties": {
"city": {
"type": "string",
"example": "Basel",
"description": "Exact city of the address."
},
"phone": {
"type": "string",
"example": "01559 032133",
"description": "Phone number to contact for further details about the order, Mandatory if \"email\" field is not passed."
},
"region": {
"type": "string",
"example": "Northwestern Switzerland",
"description": "Exact region (state/province) for delivery and billing."
},
"address": {
"type": "string",
"example": "15 Somewhere Road, Brynmenyn",
"description": "Full billing address."
},
"postCode": {
"type": "string",
"example": "4052",
"description": "Postcode for delivery and billing."
},
"countryCode": {
"type": "string",
"example": "CA",
"description": "Billing country 2-letter ISO code."
},
"paymentMethod": {
"type": "string",
"example": "PayPal",
"description": "How the visitor will pay for the item(s), e.g. paypal, check, etc."
}
},
"description": "Billing details of an order."
},
"coupons": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"EASTER15OFF"
],
"description": "Coupons applied to the order. Stored case insensitive."
},
"products": {
"type": "array",
"items": {
"type": "object",
"required": [
"productId",
"quantity",
"price"
],
"properties": {
"price": {
"type": "number",
"example": 99.99,
"description": "The price of a unit of product"
},
"quantity": {
"type": "number",
"example": 10,
"description": "How many pieces of the product the visitor has added to the cart."
},
"productId": {
"type": "string",
"example": "P1",
"description": "ID of the product."
},
"variantId": {
"type": "string",
"example": "P100",
"description": "Product ID of the red color shirts."
}
},
"description": "Details for the Products in an order."
}
},
"createdAt": {
"type": "string",
"example": "2021-07-29T20:59:23.383Z",
"description": "Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created."
},
"updatedAt": {
"type": "string",
"example": "2021-07-30T10:59:23.383Z",
"description": "Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated."
}
}
}
orderBatch
{
"type": "object",
"required": [
"orders"
],
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/order"
},
"description": "array of order objects"
},
"notifyUrl": {
"type": "string",
"example": "https://en.wikipedia.org/wiki/Webhook",
"description": "Notify Url provided by client to get the status of batch request"
},
"historical": {
"type": "boolean",
"default": true,
"example": true,
"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."
}
}
}
otp
{
"type": "object",
"required": [
"otp"
],
"properties": {
"otp": {
"type": "integer",
"example": 123456,
"description": "6 digit OTP received on email"
}
}
}
postContactInfo
{
"type": "object",
"required": [
"contacts"
],
"properties": {
"contacts": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int64",
"example": 27,
"description": "Displays the count of total number of contacts removed from list when user opts for \"all\" option."
},
"failure": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "jeff32@example.com, jim56@example.com",
"description": "Email addresses which can not be imported/removed, could be already in/out list and/or doesn't exist"
}
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"example": 5,
"description": "IDs which can not be imported/removed, could be already in/out list and/or doesn't exist"
}
}
]
},
"success": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"format": "email",
"description": "Email addresses which are successfully imported/removed"
},
"example": "jeff32@example.com, jim56@example.com"
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"description": "IDs which are successfully imported/removed"
},
"example": "1, 2"
}
]
},
"processId": {
"type": "integer",
"format": "int64",
"example": 78,
"description": "Id of the process created to remove contacts from list when user opts for \"all\" option."
}
}
}
}
}
postSendFailed
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "invalid_parameter",
"description": "Response code"
},
"message": {
"type": "string",
"example": "The email could not be sent to all recipients",
"description": "Response message"
},
"unexistingEmails": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "matthew.dow@example.com, elisa.carrely@example.com",
"description": "Email addresses you tried to sent an email to, but not existing in your contacts"
}
},
"blackListedEmails": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "jeff.dean@example.com, jim.sue@example.com",
"description": "Email addresses which are blacklisted. ONLY FOR email-campign's sendTest OR smtp-template's sendTest api's."
}
},
"withoutListEmails": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "jeff.dean@example.com, jim.sue@example.com",
"description": "Email addresses you sent an email to, without a contact list"
}
}
}
}
postSendSmsTestFailed
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"example": "invalid_parameter",
"description": "Response code"
},
"message": {
"type": "string",
"example": "The SMS could not be sent to all recipients",
"description": "Response message"
},
"unexistingSms": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "337699086644@mailin.com, 41778899954@mailin.com",
"description": "Email addresses you tried to sent a SMS to, but not existing in your contacts"
}
},
"withoutListSms": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "3542388988@mailin.com, 10976444477@mailin.com",
"description": "Email addresses you sent a SMS to, without a contact list"
}
}
}
}
putRevokeUserPermission
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"example": "invitedUser@company.com",
"description": "Email address of the user."
}
},
"description": "Revoke user permission"
}
putRevokeUserPermissionResponse
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"example": "OK",
"description": "Status of the API operation."
},
"credit_notes": {
"type": "array",
"items": {
"type": "string",
"example": "TEST-123"
},
"description": "Credit note"
}
}
}
putresendcancelinvitation
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"example": "invitedUser@company.com",
"description": "Email address of the user."
}
},
"description": "Revoke user permission"
}
putresendcancelinvitationResponse
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"example": "OK",
"description": "Status of the API operation."
},
"credit_notes": {
"type": "array",
"items": {
"type": "string",
"example": "TEST-123"
},
"description": "Credit note"
}
}
}
remainingCreditModel
{
"type": "object",
"required": [
"child",
"reseller"
],
"properties": {
"child": {
"type": "object",
"required": [
"email",
"sms"
],
"properties": {
"sms": {
"type": "number",
"format": "double",
"example": 500,
"description": "SMS Credits remaining for child account"
},
"email": {
"type": "number",
"format": "double",
"example": 2000,
"description": "Email Credits remaining for child account"
}
},
"description": "Credits remaining for child account"
},
"reseller": {
"type": "object",
"required": [
"email",
"sms"
],
"properties": {
"sms": {
"type": "number",
"format": "double",
"example": 12900,
"description": "SMS Credits remaining for reseller account"
},
"email": {
"type": "number",
"format": "double",
"example": 2000000,
"description": "Email Credits remaining for reseller account"
}
}
}
}
}
removeContactFromListByAll
{
"type": "object",
"properties": {
"all": {
"type": "boolean",
"example": true,
"description": "**Required if 'emails' and 'ids' are empty.** Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress\n"
}
}
}
removeContactFromListByEmails
{
"type": "object",
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "john.smith@contact.com",
"description": "Email to remove from a list"
},
"maxItems": 150,
"minItems": 1,
"description": "**Required if 'all' is false and 'ids' is empty.** Emails to remove from a list. You can pass a **maximum of 150 emails** for removal in one request.\n"
}
}
}
removeContactFromListByIDs
{
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"example": 10,
"description": "ID to remove from a list"
},
"maxItems": 150,
"minItems": 1,
"description": "**Required if 'all' is false and 'emails' is empty.** IDs to remove from a list. You can pass a **maximum of 150 IDs** for removal in one request.\n"
}
}
}
removeCredits
{
"type": "object",
"properties": {
"sms": {
"type": "integer",
"format": "int64",
"example": 300,
"description": "**Required if email credits are empty.** SMS credits to be removed from the child account\n"
},
"email": {
"type": "integer",
"format": "int64",
"example": 500,
"description": "**Required if sms credits are empty.** Email credits to be removed from the child account\n"
}
}
}
requestContactExport
{
"type": "object",
"required": [
"customContactFilter"
],
"properties": {
"notifyUrl": {
"type": "string",
"format": "url",
"example": "http://requestb.in/173lyyx1",
"description": "Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479"
},
"exportAttributes": {
"type": "array",
"items": {
"type": "string",
"example": "NAME"
},
"description": "List of all the attributes that you want to export. **These attributes must be present in your contact database.** For example:\n**['fname', 'lname', 'email']**\n"
},
"customContactFilter": {
"type": "object",
"properties": {
"listId": {
"type": "integer",
"format": "int64",
"example": 2,
"description": "**Mandatory if actionForContacts is passed, ignored otherwise.** Id of the list for which the corresponding action shall be applied in the filter.\n"
},
"smsCampaignId": {
"type": "integer",
"format": "int64",
"example": 12,
"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.\n"
},
"emailCampaignId": {
"type": "integer",
"format": "int64",
"example": 12,
"description": "Considered only if **actionForEmailCampaigns** is passed, ignored otherwise. **Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed.**\nThe id of the email campaign for which the corresponding action shall be applied in the filter.\n"
},
"actionForContacts": {
"enum": [
"allContacts",
"subscribed",
"unsubscribed",
"unsubscribedPerList"
],
"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.\n* **allContacts** - Fetch the list of all contacts for a particular list.\n* **subscribed & unsubscribed** - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list.\n* **unsubscribedPerList** - Fetch the list of contacts that are unsubscribed from a particular list only.\n"
},
"actionForSmsCampaigns": {
"enum": [
"hardBounces",
"softBounces",
"unsubscribed"
],
"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.\n* **unsubscribed** - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns.\n* **hardBounces & softBounces** - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns.\n"
},
"actionForEmailCampaigns": {
"enum": [
"openers",
"nonOpeners",
"clickers",
"nonClickers",
"unsubscribed",
"hardBounces",
"softBounces"
],
"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.\n* **openers & nonOpeners** - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign.\n* **clickers & nonClickers** - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign.\n* **unsubscribed** - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign.\n* **hardBounces & softBounces** - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s).\n"
}
},
"description": "Set the filter for the contacts to be exported.\n"
}
}
}
requestContactImport
{
"type": "object",
"properties": {
"fileUrl": {
"type": "string",
"format": "url",
"example": "https://importfile.domain.com",
"description": "**Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats:\n#### .txt, .csv, .json\n"
},
"listIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"example": 76,
"description": "List Id in which the contacts shall be imported"
},
"description": "**Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**.\n"
},
"newList": {
"type": "object",
"properties": {
"folderId": {
"type": "integer",
"format": "int64",
"example": 2,
"description": "Id of the folder where this new list shall be created. **Mandatory if listName is not empty**\n"
},
"listName": {
"type": "string",
"example": "ContactImport - 2017-05",
"description": "List with listName will be created first and users will be imported in it. **Mandatory if listIds is empty**.\n"
}
},
"description": "To create a new list and import the contacts into it, pass the listName and an optional folderId."
},
"fileBody": {
"type": "string",
"example": "NAME;SURNAME;EMAIL\nSmith;John;john.smith@example.com\nRoger;Ellie;ellie36@example.com",
"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.\n"
},
"jsonBody": {
"type": "array",
"items": {
"type": "object",
"example": {
"email": "ndicky0@ocn.ne.jp",
"attributes": {
"SMS": "33689965433",
"FNAME": "Dicky",
"LNAME": "Noemi",
"COUNTRY": "DE",
"BIRTHDAY": "11/02/1989",
"WHATSAPP": "33689965433",
"PREFERED_COLOR": "BLACK",
"LANDLINE_NUMBER": "33689965433"
}
},
"properties": {
"email": {
"type": "string"
},
"attributes": {
"type": "object",
"description": "List of attributes to be imported",
"additionalProperties": true
}
}
},
"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.\n"
},
"notifyUrl": {
"type": "string",
"format": "url",
"example": "http://requestb.in/173lyyx1",
"description": "URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479"
},
"smsBlacklist": {
"type": "boolean",
"default": false,
"example": false,
"description": "To blacklist all the contacts for sms"
},
"emailBlacklist": {
"type": "boolean",
"default": false,
"example": false,
"description": "To blacklist all the contacts for email"
},
"disableNotification": {
"type": "boolean",
"default": false,
"example": false,
"description": "To disable email notification"
},
"updateExistingContacts": {
"type": "boolean",
"default": true,
"example": true,
"description": "To facilitate the choice to update the existing contacts"
},
"emptyContactsAttributes": {
"type": "boolean",
"default": false,
"example": true,
"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 **)\n"
}
}
}
requestSmsRecipientExport
{
"type": "object",
"required": [
"recipientsType"
],
"properties": {
"notifyURL": {
"type": "string",
"format": "url",
"example": "http://requestb.in/173lyyx1",
"description": "URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479"
},
"recipientsType": {
"enum": [
"all",
"delivered",
"answered",
"softBounces",
"hardBounces",
"unsubscribed"
],
"type": "string",
"example": "answered",
"description": "Filter the recipients based on how they interacted with the campaign"
}
}
}
scheduleSmtpEmail
{
"type": "object",
"properties": {
"batchId": {
"type": "string",
"example": "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d",
"description": "Batch ID of the batch transactional email scheduled"
},
"messageId": {
"type": "string",
"example": "<201798300811.5787683@relay.domain.com>",
"description": "Message ID of the transactional email scheduled"
},
"messageIds": {
"type": "array",
"items": {
"type": "string",
"description": "version wise message ID's of the transactional emails scheduled"
}
}
}
}
sendReport
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "object",
"required": [
"body",
"to"
],
"properties": {
"to": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "jim.suehan@example.com",
"description": "Email address of the recipient"
},
"description": "Email addresses of the recipients"
},
"body": {
"type": "string",
"example": "Please find attached the report of our last email campaign.",
"description": "Custom text message to be presented in the report email."
}
},
"description": "Custom attributes for the report email."
},
"language": {
"enum": [
"fr",
"es",
"pt",
"it",
"de",
"en"
],
"type": "string",
"default": "fr",
"example": "en",
"description": "Language of email content for campaign report sending."
}
}
}
sendSms
{
"type": "object",
"required": [
"messageId",
"reference"
],
"properties": {
"smsCount": {
"type": "integer",
"format": "int64",
"example": 2,
"description": "Count of SMS's to send multiple text messages"
},
"messageId": {
"type": "integer",
"format": "int64",
"example": 1511882900176220
},
"reference": {
"type": "string",
"example": "ab1cde2fgh3i4jklmno"
},
"usedCredits": {
"type": "number",
"format": "float",
"example": 0.7,
"description": "SMS credits used per text message"
},
"remainingCredits": {
"type": "number",
"format": "float",
"example": 82.85,
"description": "Remaining SMS credits of the user"
}
}
}
sendSmtpEmail
{
"type": "object",
"properties": {
"cc": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Ann",
"description": "Name of the recipient in cc. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "ann6533@example.com",
"description": "Email address of the recipient in cc"
}
}
},
"description": "List of email addresses and names (_optional_) of the recipients in cc\n"
},
"to": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Jimmy",
"description": "Name of the recipient. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "jimmy98@example.com",
"description": "Email address of the recipient"
}
}
},
"description": "**Mandatory if messageVersions are not passed, ignored if messageVersions are passed**\nList of email addresses and names (_optional_) of the recipients. For example,\n**[{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]**\n"
},
"bcc": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Helen",
"description": "Name of the recipient in bcc. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "helen9766@example.com",
"description": "Email address of the recipient in bcc"
}
}
},
"description": "List of email addresses and names (_optional_) of the recipients in bcc\n"
},
"tags": {
"type": "array",
"items": {
"type": "string",
"example": "tag1"
},
"description": "Tag your emails to find them more easily"
},
"params": {
"type": "object",
"example": {
"FNAME": "Joe",
"LNAME": "Doe"
},
"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**.\n",
"additionalProperties": {}
},
"sender": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 2,
"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."
},
"name": {
"type": "string",
"example": "Mary from MyShop",
"description": "description: Name of the sender from which the emails will be sent. **Maximum allowed characters are 70**. Applicable only when email is passed.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "no-reply@myshop.com",
"description": "Email of the sender from which the emails will be sent. Mandatory if sender id is not passed."
}
},
"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,\n**{\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"}**\n**{\"id\":2}**\n"
},
"batchId": {
"type": "string",
"example": "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d",
"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."
},
"headers": {
"type": "object",
"example": {
"sender.ip": "1.2.3.4",
"idempotencyKey": "abc-123",
"X-Mailin-custom": "some_custom_header"
},
"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,\n**{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}**.\n",
"additionalProperties": {}
},
"replyTo": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Ann",
"description": "Name in reply to. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "ann6533@example.com",
"description": "Email address in reply to"
}
},
"description": "Email (**required**), along with name (_optional_), on which transactional mail recipients will be able to reply back. For example,\n**{\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}**\n"
},
"subject": {
"type": "string",
"example": "Login Email confirmation",
"description": "Subject of the message. **Mandatory if 'templateId' is not passed**\n"
},
"attachment": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "url",
"example": "https://attachment.domain.com/myAttachmentFromUrl.jpg",
"description": "Absolute url of the attachment (**no local file**).\n"
},
"name": {
"type": "string",
"example": "myAttachment.png",
"description": "**Required if content is passed**. Name of the attachment\n"
},
"content": {
"type": "string",
"format": "byte",
"example": "b3JkZXIucGRm",
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$",
"description": "Base64 encoded chunk data of the attachment generated on the fly"
}
}
},
"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,\n**[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]**.\nAllowed extensions for attachment file:\n#### 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.\nIf `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\n"
},
"templateId": {
"type": "integer",
"format": "int64",
"example": 2,
"description": "Id of the template."
},
"htmlContent": {
"type": "string",
"example": "<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>",
"description": "HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed**\n"
},
"scheduledAt": {
"type": "string",
"format": "date-time",
"example": "2022-04-05T12:30:00+02:00",
"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**."
},
"textContent": {
"type": "string",
"example": "Please confirm your email address by clicking on the link https://text.domain.com",
"description": "Plain Text body of the message. **Ignored if 'templateId' is passed**\n"
},
"messageVersions": {
"type": "array",
"items": {
"type": "object",
"required": [
"to"
],
"properties": {
"cc": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Ann",
"description": "Name of the recipient in cc. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "ann6533@example.com",
"description": "Email address of the recipient in cc"
}
}
},
"description": "List of email addresses and names (_optional_) of the recipients in cc\n"
},
"to": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Jimmy",
"description": "Name of the recipient. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "jimmy98@example.com",
"description": "Email address of the recipient"
}
}
},
"description": "List of email addresses and names (_optional_) of the recipients. For example,\n**[{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]**\n"
},
"bcc": {
"type": "array",
"items": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Helen",
"description": "Name of the recipient in bcc. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "helen9766@example.com",
"description": "Email address of the recipient in bcc"
}
}
},
"description": "List of email addresses and names (_optional_) of the recipients in bcc\n"
},
"params": {
"type": "object",
"example": {
"FNAME": "Joe",
"LNAME": "Doe"
},
"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**.\n",
"additionalProperties": {}
},
"replyTo": {
"type": "object",
"required": [
"email"
],
"properties": {
"name": {
"type": "string",
"example": "Ann",
"description": "Name in reply to. **Maximum allowed characters are 70**.\n"
},
"email": {
"type": "string",
"format": "email",
"example": "ann6533@example.com",
"description": "Email address in reply to"
}
},
"description": "Email (**required**), along with name (_optional_), on which transactional mail recipients will be able to reply back. For example,\n**{\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}**\n"
},
"subject": {
"type": "string",
"example": "Login Email confirmation",
"description": "Custom subject specific to message version\n"
},
"htmlContent": {
"type": "string",
"example": "<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>",
"description": "HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed**\n"
},
"textContent": {
"type": "string",
"example": "Please confirm your email address by clicking on the link https://text.domain.com",
"description": "Plain Text body of the message. **Ignored if 'templateId' is passed**\n"
}
}
},
"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.\nTotal number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version.\nThe size of individual params in all the messageVersions shall not exceed **100 KB** limit and that of cumulative params shall not exceed **1000 KB**.\nYou 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**\n"
}
}
}
sendTestEmail
{
"type": "object",
"properties": {
"emailTo": {
"type": "array",
"items": {
"type": "string",
"format": "email",
"example": "helen.jurger@example.com",
"description": "Email addres of the recipient"
},
"description": "List of the email addresses of the recipients whom you wish to send the test mail.\n_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_.\n"
}
}
}
sendTestSms
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"example": "33689965433",
"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**\n"
}
}
}
sendTransacSms
{
"type": "object",
"required": [
"content",
"recipient",
"sender"
],
"properties": {
"tag": {
"type": "string",
"example": "accountValidation",
"description": "Tag of the message"
},
"type": {
"enum": [
"transactional",
"marketing"
],
"type": "string",
"default": "transactional",
"example": "marketing",
"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."
},
"sender": {
"type": "string",
"example": "MyShop",
"maxLength": 15,
"description": "Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**\n"
},
"webUrl": {
"type": "string",
"format": "url",
"example": "http://requestb.in/173lyyx1",
"description": "Webhook to call for each event triggered by the message (delivered etc.)"
},
"content": {
"type": "string",
"example": "Enter this code:CCJJG8 to validate your account",
"description": "Content of the message. If more than **160 characters** long, will be sent as multiple text messages\n"
},
"recipient": {
"type": "string",
"example": "33689965433",
"description": "Mobile number to send SMS with the country code"
},
"unicodeEnabled": {
"type": "boolean",
"default": false,
"example": true,
"description": "Format of the message. It indicates whether the content should be treated as unicode or not.\n"
},
"organisationPrefix": {
"type": "string",
"example": "MyCompany",
"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.**"
}
}
}
sendWhatsappMessageTemplate
{
"type": "object",
"required": [
"senderNumber",
"templateId",
"contactNumbers"
],
"properties": {
"params": {
"type": "object",
"example": {
"FNAME": "Joe",
"LNAME": "Doe"
},
"description": "Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}."
},
"templateId": {
"type": "integer",
"example": 123,
"description": "ID of the template to send"
},
"senderNumber": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
},
"contactNumbers": {
"type": "array",
"items": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
},
"description": "List of phone numbers of the contacts"
}
}
}
sendWhatsappMessageText
{
"type": "object",
"required": [
"senderNumber",
"contactNumbers",
"authType",
"text"
],
"properties": {
"text": {
"type": "string",
"example": "Hi! There i am a message",
"description": "Text to be sent as message body (will be overridden if templateId is passed in the same request)"
},
"senderNumber": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
},
"contactNumbers": {
"type": "array",
"items": {
"type": "string",
"format": "mobile",
"example": 919876543210,
"description": "WhatsApp Number with country code. Example, 85264318721"
},
"description": "List of phone numbers of the contacts"
}
}
}
subAccountAppsToggleRequest
{
"type": "object",
"example": {
"meetings": true,
"web-push": false,
"whatsapp": true,
"landing-pages": true,
"sms-campaigns": false
},
"properties": {
"crm": {
"type": "boolean",
"description": "Set this field to enable or disable Sales CRM on the sub-account"
},
"inbox": {
"type": "boolean",
"description": "Set this field to enable or disable Inbox on the sub-account / Not applicable on ENTv2"
},
"meetings": {
"type": "boolean",
"description": "Set this field to enable or disable Meetings on the sub-account"
},
"web-push": {
"type": "boolean",
"description": "Set this field to enable or disable Web Push on the sub-account"
},
"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"
},
"facebook-ads": {
"type": "boolean",
"description": "Set this field to enable or disable Facebook ads on the sub-account"
},
"conversations": {
"type": "boolean",
"description": "Set this field to enable or disable Conversations on the sub-account"
},
"landing-pages": {
"type": "boolean",
"description": "Set this field to enable or disable Landing pages on the sub-account"
},
"sms-campaigns": {
"type": "boolean",
"description": "Set this field to enable or disable SMS Marketing on the sub-account"
},
"email-campaigns": {
"type": "boolean",
"description": "Set this field to enable or disable Email Campaigns on the sub-account"
},
"transactional-sms": {
"type": "boolean",
"description": "Set this field to enable or disable Transactional SMS on the sub-account"
},
"transactional-emails": {
"type": "boolean",
"description": "Set this field to enable or disable Transactional Email on the sub-account"
}
},
"description": "List of enable/disable applications on the sub-account"
}
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"
},
"planInfo": {
"type": "object",
"properties": {
"credits": {
"type": "object",
"properties": {
"sms": {
"type": "integer",
"format": "int64",
"description": "SMS credits remaining on the sub-account"
},
"emails": {
"type": "object",
"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"
}
},
"description": "Email credits remaining on the sub-account"
}
},
"description": "Credits quota and remaining credits on the sub-account"
},
"features": {
"type": "object",
"properties": {
"inbox": {
"type": "object",
"properties": {
"quantity": {
"type": "integer",
"format": "int64",
"description": "Quantity of inbox provided"
},
"remaining": {
"type": "integer",
"format": "int64",
"description": "Available inboxes for use"
}
},
"description": "Inbox details / Not available on ENTv2"
},
"users": {
"type": "object",
"properties": {
"quantity": {
"type": "integer",
"format": "int64",
"description": "Quantity of multi-account's provided"
},
"remaining": {
"type": "integer",
"format": "int64",
"description": "Available multi-accounts for use"
}
},
"description": "Multi-account details"
},
"landingPage": {
"type": "object",
"properties": {
"quantity": {
"type": "integer",
"format": "int64",
"description": "Quantity of landing pages provided"
},
"remaining": {
"type": "integer",
"format": "int64",
"description": "Available landing pages for use"
}
},
"description": "Landing page details / Not available on ENTv2"
}
},
"description": "Features available on the sub-account"
},
"planType": {
"type": "string",
"description": "type of the plan"
}
},
"description": "Sub-account plan details"
},
"companyName": {
"type": "string",
"description": "Sub-account company name"
}
}
}
subAccountUpdatePlanRequest
{
"type": "object",
"example": {
"credits": {
"email": 5000
},
"features": {
"inbox": 10,
"users": 15,
"landingPage": 20
}
},
"properties": {
"credits": {
"type": "object",
"properties": {
"email": {
"type": "integer",
"format": "int64",
"description": "Number of email credits"
}
},
"description": "Credit details to update"
},
"features": {
"type": "object",
"properties": {
"inbox": {
"type": "integer",
"format": "int64",
"description": "Number of inboxes / Not required on ENTv2"
},
"users": {
"type": "integer",
"format": "int64",
"description": "Number of multi-users"
},
"landingPage": {
"type": "integer",
"format": "int64",
"description": "Number of landing pages / Not required on ENTv2"
}
},
"description": "Features details to update"
}
},
"description": "Details of the plan to be changed"
}
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": {
"type": "integer",
"format": "int64",
"description": "id of the sub-account"
},
"active": {
"type": "boolean",
"description": "Whether the sub-account is active or not"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "Timestamp when the sub-account was created"
},
"companyName": {
"type": "string",
"description": "Name of the sub-account company"
}
}
}
}
}
}
updateAttribute
{
"type": "object",
"properties": {
"value": {
"type": "string",
"example": "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]",
"description": "Value of the attribute to update. **Use only if the attribute's category is 'calculated' or 'global'**\n"
},
"enumeration": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"value"
],
"properties": {
"label": {
"type": "string",
"example": "Men",
"description": "Label of the value"
},
"value": {
"type": "integer",
"example": 1,
"description": "Id of the value"
}
}
},
"description": "List of the values and labels that the attribute can take. **Use only if the attribute's category is \"category\"**. For example,\n**[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]**\n"
}
}
}
updateBatchContacts
{
"type": "object",
"properties": {
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"example": 31,
"description": "id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)"
},
"sms": {
"type": "string",
"example": "+91xxxxxxxxxx",
"description": "SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)"
},
"email": {
"type": "string",
"format": "email",
"example": "elly@example.com",
"description": "Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)"
},
"ext_id": {
"type": "string",
"example": "UpdateExternalId",
"description": "Pass your own Id to update ext_id of a contact."
},
"listIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"example": 65,
"description": "Id of the list to add the contact to"
},
"description": "Ids of the lists to add the contact to"
},
"attributes": {
"type": "object",
"example": {
"EMAIL": "newemail@domain.com",
"FNAME": "Ellie",
"LNAME": "Roger"
},
"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\"}**.\nKeep 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\"}**\n",
"additionalProperties": {}
},
"unlinkListIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"example": 36,
"description": "Id of the list to remove the contact from"
},
"description": "Ids of the lists to remove the contact from"
},
"smsBlacklisted": {
"type": "boolean",
"example": true,
"description": "Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)"
},
"emailBlacklisted": {
"type": "boolean",
"example": false,
"description": "Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)"
},
"smtpBlacklistSender": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"description": "transactional email forbidden sender for contact. Use only for email Contact"
}
}
},
"description": "List of contacts to be updated"
}
}
}
updateBatchContactsModel
{
"type": "object",
"properties": {
"failureIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"description": "IDs which are not updated"
},
"example": 34
},
"successIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64",
"description": "IDs which are successfully updated"
},
"example": 12
}
}
}
updateCampaignStatus
{
"type": "object",
"example": "draft",
"properties": {
"status": {
"enum": [
"suspended",
"archive",
"darchive",
"sent",
"queued",
"replicate",
"replicateTemplate",
"draft"
],
"type": "string",
"description": "Note:- **replicateTemplate** status will be available **only for template type campaigns.**\n"
}
},
"description": "Status of the campaign"
}
updateChild
{
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "josh.cruise@example.com",
"description": "New Email address to update the child account"
},
"lastName": {
"type": "string",
"example": "Cruise",
"description": "New Last name to use to update the child account"
},
"password": {
"type": "string",
"format": "password",
"example": "Pa55w0rd65",
"description": "New password for the child account to login"
},
"firstName": {
"type": "string",
"example": "Josh",
"description": "New First name to use to update the child account"
},
"companyName": {
"type": "string",
"example": "Your Company",
"description": "New Company name to use to update the child account"
}
}
}
updateChildAccountStatus
{
"type": "object",
"properties": {
"smsCampaign": {
"type": "boolean",
"example": true,
"description": "Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled)"
},
"transactionalSms": {
"type": "boolean",
"example": false,
"description": "Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled)"
},
"transactionalEmail": {
"type": "boolean",
"example": false,
"description": "Status of Transactional Email Platform activation for your account (true=enabled, false=disabled)"
},
"marketingAutomation": {
"type": "boolean",
"example": true,
"description": "Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled)"
}
}
}