Brevo

Email marketing and transactional email platform

developers.brevo.com ↗
Version
3.0.0
OpenAPI
3.0.1
Endpoints
227
Schemas
264
76
Quality
Updated
3 days ago
Email email marketing communications
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.brevo.com/v3

Endpoints

Clear filters

Contacts 4 endpoints

PUT /contacts/attributes/{attributeCategory}/{attributeName}
operationId: Contacts_updateAttribute

Parameters

Name In Required Type Description
attributeCategory path required string

Category of the attribute

attributeName path required string

Name of the existing attribute

Request Body

required

Values to update an attribute

application/json
schema updateAttribute
Property Type Required
value string optional
enumeration array optional
label string required
value integer required

Responses

204

Attribute updated

400

bad request

404

Attribute not found

PUT /contacts/attributes/{attributeCategory}/{attributeName}
PUT /contacts/folders/{folderId}
operationId: Contacts_updateFolder

Parameters

Name In Required Type Description
folderId path required integer

Id of the folder

Request Body

required

Name of the folder

application/json
schema createUpdateFolder
Property Type Required
name string optional

Responses

204

Folder updated

400

bad request

404

Folder ID not found

PUT /contacts/folders/{folderId}
PUT /contacts/lists/{listId}
operationId: Contacts_updateList

Parameters

Name In Required Type Description
listId path required integer

Id of the list

Request Body

required

Values to update a list

application/json
schema updateList
Property Type Required
name string optional
folderId integer optional

Responses

204

List updated

400

bad request

404

List ID not found

PUT /contacts/lists/{listId}
PUT /contacts/{identifier}
operationId: Contacts_updateContactById

Parameters

Name In Required Type Description
identifier path required

Email (urlencoded) OR ID of the contact

Request Body

required

Values to update a contact

application/json
schema updateContact
Property Type Required
ext_id string optional
listIds array optional
attributes object optional
unlinkListIds array optional
smsBlacklisted boolean optional
emailBlacklisted boolean optional
smtpBlacklistSender array optional

Responses

204

Contact updated

400

bad request

404

Contact’s email not found

PUT /contacts/{identifier}

Conversations 2 endpoints

PUT /conversations/messages/{id}

Only agents’ messages can be edited.

operationId: Conversations_updateAgentMessage

Parameters

Name In Required Type Description
id path required string

ID of the message

Request Body

required
application/json
schema ConversationsUpdateAgentMessageRequest
Property Type Required
text string required

Responses

200

Updated message is returned as a response

400

Returned when invalid data posted

404

Returned when item not found

PUT /conversations/messages/{id}
PUT /conversations/pushedMessages/{id}
operationId: Conversations_updatePushedMessage

Parameters

Name In Required Type Description
id path required string

ID of the message

Request Body

required
application/json
schema ConversationsUpdatePushedMessageRequest
Property Type Required
text string required

Responses

200

Updated message is returned as a response

400

Returned when invalid data posted

404

Returned when item not found

PUT /conversations/pushedMessages/{id}

Domains 1 endpoints

PUT /senders/domains/{domainName}/authenticate
operationId: Domains_authenticateDomain

Parameters

Name In Required Type Description
domainName path required string

Domain name

Responses

200

domain authenticated

400

bad request

404

Domain does not exist

PUT /senders/domains/{domainName}/authenticate

Emailcampaigns 2 endpoints

PUT /emailCampaigns/{campaignId}
operationId: EmailCampaigns_updateCampaign

Parameters

Name In Required Type Description
campaignId path required integer

Id of the campaign

Request Body

required

Values to update a campaign

application/json
schema updateEmailCampaign
Property Type Required
tag string optional
name string optional
footer string optional
header string optional
params object optional
sender object optional
id integer optional
name string optional
email string optional
htmlUrl string optional
replyTo string optional
subject string optional
toField string optional
subjectA string optional
subjectB string optional
abTesting boolean optional
recurring boolean optional
splitRule integer optional
recipients object optional
listIds array optional
segmentIds array optional
exclusionListIds array optional
htmlContent string optional
previewText string optional
scheduledAt string optional
utmCampaign string optional
…11 more object optional

Responses

204

Email campaign updated

400

bad request

404

Campaign ID not found

PUT /emailCampaigns/{campaignId}
PUT /emailCampaigns/{campaignId}/status
operationId: EmailCampaigns_updateStatus

Parameters

Name In Required Type Description
campaignId path required integer

Id of the campaign

Request Body

required

Status of the campaign

application/json
schema updateCampaignStatus
Property Type Required
status string optional

Responses

204

The campaign status has been updated successfully

400

bad request

404

Campaign ID not found

PUT /emailCampaigns/{campaignId}/status

Externalfeeds 1 endpoints

PUT /feeds/{uuid}

This endpoint will update an external feed.

operationId: ExternalFeeds_updateFeedByUUID

Parameters

Name In Required Type Description
uuid path required string

UUID of the feed to update

Request Body

required

Values to update a feed

application/json
schema updateExternalFeed
Property Type Required
url string optional
name string optional
cache boolean optional
token string optional
headers array optional
name string optional
value string optional
authType string optional
password string optional
username string optional
maxRetries integer optional

Responses

204

Feed updated

400

bad request

404

Feed not found

PUT /feeds/{uuid}

Masteraccount 5 endpoints

PUT /corporate/group/unlink/{groupId}/subAccounts

This endpoint allows you to remove a sub-organization from a group.

operationId: MasterAccount_unlinkSubAccountFromGroup

Parameters

Name In Required Type Description
groupId path required string

Group id

Request Body

required

List of sub-account ids

application/json
schema MasterAccountUnlinkSubAccountFromGroupRequest
Property Type Required
subAccountIds array required

Responses

204

SubAccounts removed from the group

400

bad request

PUT /corporate/group/unlink/{groupId}/subAccounts
PUT /corporate/group/{id}

This endpoint allows to update a group of sub-accounts

operationId: MasterAccount_updateGroupSubAccounts

Parameters

Name In Required Type Description
id path required string

Id of the group

Request Body

required

Group details to be updated.

application/json
schema MasterAccountUpdateGroupSubAccountsRequest
Property Type Required
groupName string optional
subAccountIds array optional

Responses

204

Group details updated

400

bad request

PUT /corporate/group/{id}
PUT /corporate/subAccount/{id}/applications/toggle

API endpoints for the Corporate owner to enable/disable applications on the sub-account

operationId: MasterAccount_enableDisable

Parameters

Name In Required Type Description
id path required integer

Id of the sub-account organization (mandatory)

Request Body

required

List of applications to activate or deactivate on a sub-account

application/json
schema subAccountAppsToggleRequest
Property Type Required
crm boolean optional
inbox boolean optional
meetings boolean optional
web-push boolean optional
whatsapp boolean optional
automation boolean optional
facebook-ads boolean optional
conversations boolean optional
landing-pages boolean optional
sms-campaigns boolean optional
email-campaigns boolean optional
transactional-sms boolean optional
transactional-emails boolean optional

Responses

204

Sub-account application(s) enabled/disabled

400

bad request

403

Current account is not a master account

PUT /corporate/subAccount/{id}/applications/toggle
PUT /corporate/subAccount/{id}/plan

This endpoint will update the sub-account plan

operationId: MasterAccount_updateSubAccountPlan

Parameters

Name In Required Type Description
id path required integer

Id of the sub-account organization

Request Body

required

Values to update a sub-account plan

application/json
schema subAccountUpdatePlanRequest
Property Type Required
credits object optional
email integer optional
features object optional
inbox integer optional
users integer optional
landingPage integer optional

Responses

204

Sub account plan updated

400

bad request

403

Current account is not a master account

PUT /corporate/subAccount/{id}/plan
PUT /corporate/user/invitation/{action}/{email}

This endpoint will allow the user to:

  • Resend an admin user invitation
  • Cancel an admin user invitation
operationId: MasterAccount_resendCancelAdminUserInvitation

Parameters

Name In Required Type Description
action path required string

Action to be performed (cancel / resend)

email path required string

Email address of the recipient

Responses

200

Response of the action performed

400

bad request

PUT /corporate/user/invitation/{action}/{email}

Reseller 3 endpoints

PUT /reseller/children/{childIdentifier}
operationId: Reseller_updateChildInfo

Parameters

Name In Required Type Description
childIdentifier path required string

Either auth key or id of reseller’s child

Request Body

required

values to update in child profile

application/json
schema updateChild
Property Type Required
email string optional
lastName string optional
password string optional
firstName string optional
companyName string optional

Responses

204

reseller’s child updated

400

bad request

403

Current account is not a reseller

404

Child auth key or child id not found

PUT /reseller/children/{childIdentifier}
PUT /reseller/children/{childIdentifier}/accountStatus
operationId: Reseller_updateChildAccountStatus

Parameters

Name In Required Type Description
childIdentifier path required string

Either auth key or id of reseller’s child

Request Body

required

values to update in child account status

application/json
schema updateChildAccountStatus
Property Type Required
smsCampaign boolean optional
transactionalSms boolean optional
transactionalEmail boolean optional
marketingAutomation boolean optional

Responses

204

reseller’s child account status updated

400

bad request

403

Current account is not a reseller

404

Child auth key or child id not found

PUT /reseller/children/{childIdentifier}/accountStatus
PUT /reseller/children/{childIdentifier}/domains/{domainName}
operationId: Reseller_updateSenderDomain

Parameters

Name In Required Type Description
childIdentifier path required string

Either auth key or id of reseller’s child

domainName path required string

Pass the existing domain that needs to be updated

Request Body

required

value to update for sender domain

application/json
schema updateChildDomain
Property Type Required
domain string optional

Responses

204

reseller’s child domain updated

400

bad request

403

Current account is not a reseller

404

Child auth key or child id not found

PUT /reseller/children/{childIdentifier}/domains/{domainName}

Smscampaigns 2 endpoints

PUT /smsCampaigns/{campaignId}
operationId: SmsCampaigns_updateCampaignById

Parameters

Name In Required Type Description
campaignId path required integer

id of the SMS campaign

Request Body

required

Values to update an SMS Campaign

application/json
schema updateSmsCampaign
Property Type Required
name string optional
sender string optional
content string optional
recipients object optional
listIds array required
exclusionListIds array optional
scheduledAt string optional
unicodeEnabled boolean optional
organisationPrefix string optional
unsubscribeInstruction string optional

Responses

204

SMS campaign updated

400

bad request

404

Campaign ID not found

PUT /smsCampaigns/{campaignId}
PUT /smsCampaigns/{campaignId}/status
operationId: SmsCampaigns_updateStatus

Parameters

Name In Required Type Description
campaignId path required integer

id of the campaign

Request Body

required

Status of the campaign.

application/json
schema updateCampaignStatus
Property Type Required
status string optional

Responses

204

The campaign status has been updated successfully

400

bad request

404

Campaign ID not found

PUT /smsCampaigns/{campaignId}/status

Senders 2 endpoints

PUT /senders/{senderId}
operationId: Senders_updateSenderById

Parameters

Name In Required Type Description
senderId path required integer

Id of the sender

Request Body

sender’s name

application/json
schema updateSender
Property Type Required
ips array optional
ip string required
domain string required
weight integer optional
name string optional
email string optional

Responses

204

sender updated

400

bad request

404

Sender ID not found

PUT /senders/{senderId}
PUT /senders/{senderId}/validate
operationId: Senders_validateSenderUsingOtp

Parameters

Name In Required Type Description
senderId path required integer

Id of the sender

Request Body

otp

application/json
schema otp
Property Type Required
otp integer required

Responses

204

Sender verified

400

bad request

404

Sender ID not found

PUT /senders/{senderId}/validate

Transactionalemails 1 endpoints

PUT /smtp/templates/{templateId}
operationId: TransactionalEmails_updateTemplate

Parameters

Name In Required Type Description
templateId path required integer

id of the template

Request Body

required

values to update in transactional email template

application/json
schema updateSmtpTemplate
Property Type Required
tag string optional
sender object optional
id integer optional
name string optional
email string optional
htmlUrl string optional
replyTo string optional
subject string optional
toField string optional
isActive boolean optional
htmlContent string optional
templateName string optional
attachmentUrl string optional

Responses

204

transactional email template updated

400

bad request

404

Template ID not found

PUT /smtp/templates/{templateId}

User 2 endpoints

PUT /organization/user/invitation/revoke/{email}
operationId: User_revokePermissionByEmail

Parameters

Name In Required Type Description
email path required string

Email of the invited user.

Responses

200

Credit note exists

403

Unauthorized access

PUT /organization/user/invitation/revoke/{email}
PUT /organization/user/invitation/{action}/{email}
operationId: User_resendInvitation

Parameters

Name In Required Type Description
action path required string

action

email path required string

Email of the invited user.

Responses

200

Success

403

Unauthorized access

PUT /organization/user/invitation/{action}/{email}

Webhooks 1 endpoints

PUT /webhooks/{webhookId}
operationId: Webhooks_updateWebhookById

Parameters

Name In Required Type Description
webhookId path required integer

Id of the webhook

Request Body

required

Values to update a webhook

application/json
schema updateWebhook
Property Type Required
url string optional
auth object optional
domain string optional
events array optional
batched boolean optional
headers array optional
description string optional

Responses

204

Webhook updated

400

bad request

404

Webhook ID not found

PUT /webhooks/{webhookId}

Whatsappcampaigns 1 endpoints

PUT /whatsappCampaigns/{campaignId}
operationId: WhatsAppCampaigns_updateCampaignById

Parameters

Name In Required Type Description
campaignId path required integer

id of the campaign

Request Body

required

Values to update a WhatsApp Campaign

application/json
schema updateWhatsAppCampaign
Property Type Required
recipients object optional
listIds array optional
segments array optional
excludedListIds array optional
campaignName string optional
rescheduleFor string optional
campaignStatus string optional

Responses

204

WhatsApp campaign has been deleted

400

bad request

PUT /whatsappCampaigns/{campaignId}

Schemas

object CompaniesCreateCompanyRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "company",
      "description": "Name of company"
    },
    "attributes": {
      "type": "object",
      "example": {
        "owner": "60e68d60582a3b006f524197",
        "domain": "https://example.com",
        "industry": "Fabric"
      },
      "description": "Attributes for company creation"
    },
    "countryCode": {
      "type": "integer",
      "format": "int64",
      "example": 91,
      "description": "Country code if phone_number is passed in attributes."
    }
  }
}
object CompaniesCreateCompanyResponse
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "61a5cd07ca1347c82306ad06",
      "description": "Unique company id"
    }
  },
  "description": "Created company id"
}
object CompaniesLinkUnlinkWithContactDealRequest
{
  "type": "object",
  "properties": {
    "linkDealsIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045990",
        "61a5ce58c5d4795761045991",
        "61a5ce58c5d4795761045992"
      ],
      "description": "Deal ids for deals to be linked with company"
    },
    "linkContactIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        1,
        2,
        3
      ],
      "description": "Contact ids for contacts to be linked with company"
    },
    "unlinkDealsIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045994",
        "61a5ce58c5d479576104595",
        "61a5ce58c5d4795761045996"
      ],
      "description": "Deal ids for deals to be unlinked from company"
    },
    "unlinkContactIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        4,
        5,
        6
      ],
      "description": "Contact ids for contacts to be unlinked from company"
    }
  }
}
object CompaniesList
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Company"
      },
      "description": "List of compaies"
    }
  },
  "description": "List of companies"
}
object CompaniesUpdateCompanyRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "company",
      "description": "Name of company"
    },
    "attributes": {
      "type": "object",
      "example": {
        "date": "2022-05-04T00:00:00+05:30",
        "owner": "5b1a17d914b73d35a76ca0c7",
        "domain": "xyz",
        "revenue": 10000.34222,
        "category": "label_2",
        "industry": "flipkart",
        "phone_number": "81718441912",
        "number_of_contacts": 1,
        "number_of_employees": 100
      },
      "description": "Attributes for company update"
    },
    "countryCode": {
      "type": "integer",
      "format": "int64",
      "example": 91,
      "description": "Country code if phone_number is passed in attributes."
    }
  }
}
object Company
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "629475917295261d9b1f4403",
      "description": "Unique comoany id"
    },
    "attributes": {
      "type": "object",
      "example": {
        "name": "text",
        "owner": "62260474111b1101704a9d85",
        "domain": "xyz",
        "revenue": 10,
        "created_at": "2022-01-13T19:04:24.376+05:30",
        "phone_number": 8171844192,
        "last_updated_at": "2022-04-01T18:47:48.283+05:30",
        "owner_assign_date": "2022-04-01T18:21:13.379+05:30",
        "number_of_contacts": 0
      },
      "description": "Company attributes with values"
    },
    "linkedDealsIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "format": "objectID",
      "example": [
        "61a5ce58c5d4795761045990",
        "61a5ce58c5d4795761045991",
        "61a5ce58c5d4795761045992"
      ],
      "description": "Deals ids for companies linked to this company"
    },
    "linkedContactsIds": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "format": "in64",
      "example": [
        1,
        2,
        3
      ],
      "description": "Contact ids for contacts linked to this company"
    }
  },
  "description": "Company Details"
}
array CompanyAttributes
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "label": {
        "type": "string",
        "example": "Company Name"
      },
      "isRequired": {
        "type": "boolean",
        "example": true
      },
      "internalName": {
        "type": "string",
        "example": "name"
      },
      "attributeOptions": {
        "type": "array",
        "items": {
          "type": "object",
          "example": {
            "key": "custom key",
            "value": "custom label"
          }
        }
      },
      "attributeTypeName": {
        "type": "string",
        "example": "text"
      }
    },
    "description": "List of attributes"
  },
  "description": "List of company attributes"
}
object ContactsAddToListRequest
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/addContactToListByEmails"
    },
    {
      "$ref": "#/components/schemas/addContactToListByIDs"
    }
  ]
}
object ContactsRemoveContactFromListRequest
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/removeContactFromListByEmails"
    },
    {
      "$ref": "#/components/schemas/removeContactFromListByIDs"
    },
    {
      "$ref": "#/components/schemas/removeContactFromListByAll"
    }
  ]
}
object ConversationsMessage
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "eYBEm3gq3zc5ayE2g",
      "description": "Message ID. It can be used for further manipulations with the message."
    },
    "file": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "url",
          "example": "https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/",
          "description": "URL of the file"
        },
        "size": {
          "type": "integer",
          "format": "int64",
          "example": 15538,
          "minimum": 0,
          "description": "Size in bytes"
        },
        "isImage": {
          "type": "boolean",
          "example": true,
          "description": "Whether the file is an image"
        },
        "filename": {
          "type": "string",
          "example": "conversations.png",
          "description": "Name of the file"
        },
        "imageInfo": {
          "type": "object",
          "properties": {
            "width": {
              "type": "integer",
              "format": "int64",
              "example": 1129,
              "minimum": 0,
              "description": "Width of the image"
            },
            "height": {
              "type": "integer",
              "format": "int64",
              "example": 525,
              "minimum": 0,
              "description": "height of the image"
            },
            "previewUrl": {
              "type": "string",
              "format": "url",
              "example": "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/",
              "description": "URL of the preview"
            }
          },
          "description": "image info is passed in case the file is an image"
        }
      }
    },
    "text": {
      "type": "string",
      "example": "Good morning! How can I help you?",
      "description": "Message text or name of the attached file"
    },
    "type": {
      "enum": [
        "agent",
        "visitor"
      ],
      "type": "string",
      "example": "agent",
      "description": "`\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages."
    },
    "agentId": {
      "type": "string",
      "example": "d9nKoegKSjmCtyK78",
      "description": "ID of the agent on whose behalf the message was sent (only in messages sent by an agent)."
    },
    "isPushed": {
      "type": "boolean",
      "example": true,
      "description": "`true` for pushed messages"
    },
    "agentName": {
      "type": "string",
      "example": "Liz",
      "description": "Agent’s name as displayed to the visitor. Only in the messages sent by an agent."
    },
    "createdAt": {
      "type": "integer",
      "format": "int64",
      "example": 1470222622433,
      "minimum": 0,
      "description": "Timestamp in milliseconds."
    },
    "visitorId": {
      "type": "string",
      "example": "kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg",
      "description": "visitor’s ID"
    },
    "receivedFrom": {
      "type": "string",
      "example": "SuperAwesomeHelpdesk",
      "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."
    }
  },
  "description": "a Conversations message"
}
object ConversationsSendAutomatedMessageRequest
{
  "type": "object",
  "required": [
    "visitorId",
    "text"
  ],
  "properties": {
    "text": {
      "description": "message text"
    },
    "agentId": {
      "description": "agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>."
    },
    "groupId": {
      "description": "group ID. It can be found on group’s page."
    },
    "visitorId": {
      "description": "visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>"
    }
  }
}
object ConversationsSendMessageAsAgentRequest
{
  "type": "object",
  "required": [
    "visitorId",
    "text"
  ],
  "properties": {
    "text": {
      "description": "message text"
    },
    "agentId": {
      "description": "agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required)."
    },
    "agentName": {
      "description": "agent name"
    },
    "visitorId": {
      "description": "visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>"
    },
    "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."
    },
    "receivedFrom": {
      "description": "mark your messages to distinguish messages created by you from the others."
    }
  }
}
object ConversationsSetAgentOnlineStatusRequest
{
  "type": "object",
  "properties": {
    "agentId": {
      "description": "agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required)."
    },
    "agentName": {
      "description": "agent name"
    },
    "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."
    },
    "receivedFrom": {
      "description": "mark your messages to distinguish messages created by you from the others."
    }
  }
}
object ConversationsUpdateAgentMessageRequest
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "edited message text"
    }
  }
}
object ConversationsUpdatePushedMessageRequest
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "edited message text"
    }
  }
}
object ConversionSourceMetrics
{
  "type": "object",
  "required": [
    "id",
    "conversionSource",
    "ordersCount",
    "revenue",
    "averageBasket"
  ],
  "properties": {
    "id": {
      "type": "number",
      "format": "integer"
    },
    "revenue": {
      "type": "number",
      "format": "float"
    },
    "ordersCount": {
      "type": "number",
      "format": "integer"
    },
    "averageBasket": {
      "type": "number",
      "format": "float"
    },
    "conversionSource": {
      "enum": [
        "email_campaign"
      ],
      "type": "string"
    }
  }
}
object ConversionSourceProduct
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "1"
    },
    "sku": {
      "type": "string",
      "example": "sku-1"
    },
    "url": {
      "type": "string",
      "example": "https://mydomain.com/products/alpina-panoma-classic"
    },
    "name": {
      "type": "string",
      "example": "Milky Way Galaxy"
    },
    "price": {
      "type": "number",
      "format": "float",
      "example": 1000
    },
    "revenue": {
      "type": "number",
      "format": "float",
      "example": 999.99
    },
    "imageUrl": {
      "type": "string",
      "example": "http://mydomain.com/product-absoulte-url/img.jpeg"
    },
    "ordersCount": {
      "type": "integer",
      "example": 200
    }
  }
}
object CouponsCreateCollectionRequest
{
  "type": "object",
  "required": [
    "name",
    "defaultCoupon"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "10%OFF",
      "description": "Name of the coupons collection"
    },
    "defaultCoupon": {
      "type": "string",
      "example": "Winter",
      "description": "Default coupons collection name"
    },
    "expirationDate": {
      "type": "string",
      "format": "date-time",
      "example": "2022-01-02T00:00:00Z",
      "description": "Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date."
    },
    "remainingDaysAlert": {
      "type": "integer",
      "example": 5,
      "description": "Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts."
    },
    "remainingCouponsAlert": {
      "type": "integer",
      "example": 5,
      "description": "Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts."
    }
  }
}
object CouponsCreateCollectionResponse
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuidv4",
      "example": "23befbae-1505-47a8-bd27-e30ef739f32c",
      "description": "The id of the created collection"
    }
  }
}
object CouponsCreateCouponCollectionRequest
{
  "type": "object",
  "required": [
    "collectionId",
    "coupons"
  ],
  "properties": {
    "coupons": {
      "type": "array",
      "items": {
        "type": "string",
        "example": "Uf12AF",
        "description": "Name of the coupon"
      },
      "maxItems": 1000,
      "minItems": 1,
      "uniqueItems": true
    },
    "collectionId": {
      "type": "string",
      "format": "uuidv4",
      "example": "23befbae-1505-47a8-bd27-e30ef739f32c",
      "description": "The id of the coupon collection for which the coupons will be created"
    }
  }
}
object CouponsUpdateCouponCollectionByIdRequest
{
  "type": "object",
  "properties": {
    "defaultCoupon": {
      "type": "string",
      "example": "10 OFF",
      "description": "A default coupon to be used in case there are no coupons left"
    },
    "expirationDate": {
      "type": "string",
      "format": "date-time",
      "example": "2024-01-01T00:00:00Z",
      "description": "Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date."
    },
    "remainingDaysAlert": {
      "type": "integer",
      "example": 5,
      "description": "Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts."
    },
    "remainingCouponsAlert": {
      "type": "integer",
      "example": 5,
      "description": "Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts."
    }
  }
}
object CouponsUpdateCouponCollectionByIdResponse
{
  "type": "object",
  "required": [
    "id",
    "name",
    "defaultCoupon"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuidv4",
      "example": "23befbae-1505-47a8-bd27-e30ef739f32c",
      "description": "The id of the collection"
    },
    "name": {
      "type": "string",
      "format": "uuidv4",
      "example": "SummerPromotions",
      "description": "The name of the collection"
    },
    "defaultCoupon": {
      "type": "string",
      "example": "10 OFF",
      "description": "The default coupon of the collection"
    }
  }
}
object Deal
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "629475917295261d9b1f4403",
      "description": "Unique deal id"
    },
    "attributes": {
      "type": "object",
      "example": {
        "amount": 12,
        "pipeline": "6093d296ad1e9c5cf2140a58",
        "deal_name": "testname",
        "created_at": "2022-05-30T07:42:05.671Z",
        "deal_owner": "6093d2425a9b436e9519d034",
        "deal_stage": "9e577ff7-8e42-4ab3-be26-2b5e01b42518",
        "stage_updated_at": "2022-05-30T07:42:05.671Z",
        "last_updated_date": "2022-06-06T08:38:36.761Z",
        "last_activity_date": "2022-06-06T08:38:36.000Z",
        "next_activity_date": null,
        "number_of_contacts": 1,
        "number_of_activities": 0
      },
      "description": "Deal attributes with values"
    },
    "linkedContactsIds": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "example": [
        1,
        2,
        3
      ],
      "description": "Contact ids for contacts linked to this deal"
    },
    "linkedCompaniesIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045990",
        "61a5ce58c5d4795761045991",
        "61a5ce58c5d4795761045992"
      ],
      "description": "Companies ids for companies linked to this deal"
    }
  },
  "description": "Deal Details"
}
array DealAttributes
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "label": {
        "type": "string",
        "example": "Deal Name"
      },
      "isRequired": {
        "type": "boolean",
        "example": true
      },
      "internalName": {
        "type": "string",
        "example": "deal_name"
      },
      "attributeOptions": {
        "type": "array",
        "items": {
          "type": "object",
          "example": {
            "key": "custom key",
            "value": "custom label"
          }
        }
      },
      "attributeTypeName": {
        "type": "string",
        "example": "text"
      }
    },
    "description": "List of attributes"
  },
  "description": "List of deal attributes"
}
object DealsCreateNewDealRequest
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Deal: Connect with company",
      "description": "Name of deal"
    },
    "attributes": {
      "type": "object",
      "example": {
        "amount": 12,
        "deal_owner": "6093d2425a9b436e9519d034"
      },
      "description": "Attributes for deal creation\n\nTo assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID.\n\nIf you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`.\n\nPipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}`\n"
    }
  }
}
object DealsCreateNewDealResponse
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "61a5cd07ca1347c82306ad06",
      "description": "Unique deal id"
    }
  },
  "description": "Created deal id"
}
object DealsLinkUnlinkPatchRequest
{
  "type": "object",
  "properties": {
    "linkCompanyIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045990",
        "61a5ce58c5d4795761045991",
        "61a5ce58c5d4795761045992"
      ],
      "description": "Company ids to be linked with deal"
    },
    "linkContactIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        1,
        2,
        3
      ],
      "description": "Contact ids for contacts to be linked with deal"
    },
    "unlinkCompanyIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045994",
        "61a5ce58c5d479576104595",
        "61a5ce58c5d4795761045996"
      ],
      "description": "Company ids to be unlinked from deal"
    },
    "unlinkContactIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        4,
        5,
        6
      ],
      "description": "Contact ids for contacts to be unlinked from deal"
    }
  }
}
object DealsList
{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Deal"
      },
      "description": "List of deals"
    }
  },
  "description": "List of Deals"
}
object DealsUpdateDealByIdRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Deal: Connect with client",
      "description": "Name of deal"
    },
    "attributes": {
      "type": "object",
      "example": {
        "amount": 12,
        "deal_owner": "6093d2425a9b436e9519d034"
      },
      "description": "Attributes for deal update\n\nTo assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID.\n\nIf you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage`\n\nPipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}`\n"
    }
  }
}
object EcommerceGetAttributedProductSalesResponse
{
  "type": "object",
  "required": [
    "products"
  ],
  "properties": {
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConversionSourceProduct",
        "type": "object"
      },
      "description": "List of attributed products"
    }
  }
}
object EcommerceGetAttributionMetrics200Response
{
  "allOf": [
    {
      "$ref": "#/components/schemas/ConversionSourceMetrics"
    },
    {
      "type": "object",
      "required": [
        "newCustomersCount"
      ],
      "properties": {
        "newCustomersCount": {
          "type": "number",
          "format": "integer"
        }
      }
    }
  ]
}
object EcommerceGetAttributionMetricsResponse
{
  "type": "object",
  "required": [
    "results",
    "totals"
  ],
  "properties": {
    "totals": {
      "type": "object",
      "example": {
        "revenue": 1700,
        "ordersCount": 500,
        "averageBasket": 3.4
      },
      "required": [
        "ordersCount",
        "revenue",
        "averageBasket"
      ],
      "properties": {
        "revenue": {
          "type": "number",
          "format": "float"
        },
        "ordersCount": {
          "type": "number",
          "format": "integer"
        },
        "averageBasket": {
          "type": "number",
          "format": "float"
        }
      },
      "description": "Attribution list aggregated totals"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ConversionSourceMetrics",
        "type": "object"
      },
      "example": [
        {
          "id": 2,
          "revenue": 900,
          "ordersCount": 300,
          "averageBasket": 3,
          "conversionSource": "email_campaign"
        },
        {
          "id": 1,
          "revenue": 800,
          "ordersCount": 200,
          "averageBasket": 4,
          "conversionSource": "email_campaign"
        }
      ],
      "description": "List of conversion attribution metrics"
    }
  }
}
object EcommerceGetOrdersResponse
{
  "type": "object",
  "example": {
    "count": 1,
    "orders": [
      {
        "id": "order1803X",
        "email": "testvisitor@sendinblue.com",
        "amount": 2000,
        "status": "complete",
        "billing": {
          "city": "Noida",
          "phone": 9238283982,
          "region": "North India",
          "address": "Sec 62, Noida",
          "postCode": 110001,
          "countryCode": "IN",
          "paymentMethod": "Net banking"
        },
        "coupons": [
          "flat50",
          "flat40"
        ],
        "products": [
          {
            "price": 100,
            "quantity": 2,
            "productId": 21,
            "variantId": "P100"
          },
          {
            "price": 100,
            "quantity": 2,
            "productId": 21,
            "variantId": "P15756"
          }
        ],
        "createdAt": "2021-12-31T11:42:35.638Z",
        "updatedAt": "2022-03-03T14:48:31.867Z",
        "contact_id": 2
      }
    ]
  },
  "properties": {
    "count": {
      "type": "number",
      "example": 1
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "order1803"
          },
          "email": {
            "type": "string",
            "example": "testvisitor@sendinblue.com"
          },
          "amount": {
            "type": "number",
            "example": 2000
          },
          "status": {
            "type": "string",
            "example": "complete"
          },
          "billing": {
            "type": "object",
            "properties": {
              "city": {
                "type": "string",
                "example": "Noida"
              },
              "phone": {
                "type": "number",
                "example": 9238283982
              },
              "region": {
                "type": "string",
                "example": "North India"
              },
              "address": {
                "type": "string",
                "example": "Sec 62, Noida"
              },
              "postCode": {
                "type": "number",
                "example": 110001
              },
              "countryCode": {
                "type": "string",
                "example": "IN"
              },
              "paymentMethod": {
                "type": "string",
                "example": "Net banking"
              }
            }
          },
          "coupons": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "flat50"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "price": {
                  "type": "number",
                  "example": 100
                },
                "quantity": {
                  "type": "number",
                  "example": 2
                },
                "productId": {
                  "type": "number",
                  "example": 21
                },
                "variantId": {
                  "type": "string",
                  "example": "P100"
                }
              }
            }
          },
          "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
          }
        }
      }
    }
  }
}
object ExternalFeedsCreateFeedResponse
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuidv4",
      "example": "23befbae-1505-47a8-bd27-e30ef739f32c",
      "description": "ID of the object created"
    }
  }
}
object FileData
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "example.png",
      "description": "Name of uploaded file"
    },
    "size": {
      "type": "integer",
      "format": "int64",
      "example": 10,
      "description": "Size of file in bytes"
    },
    "dealId": {
      "type": "string",
      "example": "61a5ce58c5d4795761045991",
      "description": "Deal id linked to a file"
    },
    "authorId": {
      "type": "string",
      "example": "61a5ce58y5d4795761045991",
      "description": "Account id of user which created the file"
    },
    "companyId": {
      "type": "string",
      "example": "61a5ce58c5d4795761045991",
      "description": "Company id linked to a file"
    },
    "contactId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "description": "Contact id of contact on which file is uploaded"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2017-05-01T17:05:03.000Z",
      "description": "File created date/time"
    }
  },
  "description": "File data that is uploaded"
}
object FileDownloadableLink
{
  "type": "object",
  "properties": {
    "fileUrl": {
      "type": "string",
      "example": "https://storage.googleapis.com/brevo-app-crm.......-sample.pdf",
      "description": "A unique link to download the requested file."
    }
  },
  "description": "Downloadable file link"
}
array FileList
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/FileData"
  },
  "description": "List of files"
}
object FilesUploadFileRequest
{
  "type": "object",
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "File data to create a file."
    },
    "dealId": {
      "type": "string"
    },
    "companyId": {
      "type": "string"
    },
    "contactId": {
      "type": "integer",
      "format": "int64"
    }
  }
}
string InboundParsingGetAttachmentByTokenResponse
{
  "type": "string",
  "format": "binary"
}
object MasterAccountCreateGroupOfSubAccountsRequest
{
  "type": "object",
  "required": [
    "groupName"
  ],
  "properties": {
    "groupName": {
      "type": "string",
      "example": "My group",
      "description": "The name of the group of sub-accounts"
    },
    "subAccountIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        234322,
        325553,
        893432
      ],
      "description": "Pass the list of sub-account Ids to be included in the group"
    }
  }
}
object MasterAccountCreateGroupOfSubAccountsResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  }
}
object MasterAccountCreateSubAccountKeyRequest
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 3232323,
      "description": "Id of the sub-account organization"
    },
    "name": {
      "type": "string",
      "example": "My Api Key",
      "description": "Name of the API key"
    }
  }
}
object MasterAccountGenerateSsoTokenRequest
{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "example": "vipin+ent-user@brevo.com",
      "description": "User email of admin account"
    }
  }
}
object MasterAccountGenerateSsoTokenRequest1
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 3232323,
      "description": "Id of the sub-account organization"
    },
    "url": {
      "type": "string",
      "example": "https://app.brevo.com/senders/domain/list",
      "description": "Set the full target URL after login success. The user will land directly on this target URL after login"
    },
    "email": {
      "type": "string",
      "example": "vipin+subaccount@brevo.com",
      "description": "User email of sub-account organization"
    },
    "target": {
      "enum": [
        "automation",
        "email_campaign",
        "contacts",
        "landing_pages",
        "email_transactional",
        "senders",
        "sms_campaign",
        "sms_transactional"
      ],
      "type": "string",
      "example": "contacts",
      "description": "**Set target after login success**\n* **automation** - Redirect to Automation after login\n* **email_campaign** - Redirect to Email Campaign after login\n* **contacts** - Redirect to Contacts after login\n* **landing_pages** - Redirect to Landing Pages after login\n* **email_transactional** - Redirect to Email Transactional after login\n* **senders** - Redirect to Senders after login\n* **sms_campaign** - Redirect to Sms Campaign after login\n* **sms_transactional** - Redirect to Sms Transactional after login\n"
    }
  }
}
array MasterAccountListGroupsResponse
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Unique id of the group"
      },
      "groupName": {
        "type": "string",
        "description": "The name of the group of sub-accounts"
      }
    }
  }
}
object MasterAccountResendCancelAdminUserInvitationResponse
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Action success message"
    }
  }
}
object MasterAccountSendInvitationToAdminUserResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  }
}
object MasterAccountUnlinkSubAccountFromGroupRequest
{
  "type": "object",
  "required": [
    "subAccountIds"
  ],
  "properties": {
    "subAccountIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        423432,
        234323,
        87678
      ],
      "description": "List of sub-account ids"
    }
  }
}
object MasterAccountUpdateGroupSubAccountsRequest
{
  "type": "object",
  "properties": {
    "groupName": {
      "type": "string",
      "example": "My group",
      "description": "The name of the group of sub-accounts"
    },
    "subAccountIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "example": [
        234322,
        325553,
        893432
      ],
      "description": "Pass the list of sub-account Ids to be included in the group"
    }
  }
}
object Note
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "61a5cd07ca1347c82306ad09",
      "description": "Unique note Id"
    },
    "text": {
      "type": "string",
      "example": "In communication with client for resolution of queries.",
      "maxLength": 3000,
      "minLength": 1,
      "description": "Text content of a note"
    },
    "dealIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "61a5ce58c5d4795761045990",
        "61a5ce58c5d4795761045991"
      ],
      "description": "Deal ids linked to a note"
    },
    "authorId": {
      "type": "object",
      "example": {
        "id": "61a5ce58y5d4795761045991",
        "name": {
          "fullName": "John Doe"
        },
        "email": "johndoe@example.com",
        "locale": "en_GB",
        "timezone": "Asia/Kolkata"
      },
      "description": "Account details of user which created the note"
    },
    "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"
    },
    "contactIds": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "example": [
        247,
        1,
        2
      ],
      "description": "Contact ids linked to a note"
    }
  },
  "description": "Note Details"
}