object createSmsCampaign
{
  "type": "object",
  "required": [
    "content",
    "name",
    "sender"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Spring Promo Code",
      "description": "Name of the campaign"
    },
    "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"
    },
    "content": {
      "type": "string",
      "example": "Get a discount by visiting our NY store and saying : Happy Spring!",
      "description": "Content of the message. The **maximum characters used per SMS is 160**, if used more than that, it will be counted as more than one SMS\n"
    },
    "recipients": {
      "type": "object",
      "required": [
        "listIds"
      ],
      "properties": {
        "listIds": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "example": 54,
            "description": "List Id to send the campaign to"
          },
          "description": "Lists Ids to send the campaign to. **REQUIRED if scheduledAt is not empty**\n"
        },
        "exclusionListIds": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "example": 15,
            "description": "List Id to exclude from the campaign"
          },
          "description": "List ids which have to be excluded from a campaign"
        }
      }
    },
    "scheduledAt": {
      "type": "string",
      "example": "2017-05-05T10:30:00.000Z",
      "description": "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n"
    },
    "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.**"
    },
    "unsubscribeInstruction": {
      "type": "string",
      "example": "send Stop if you want to unsubscribe.",
      "description": "Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**"
    }
  }
}
object createSmtpEmail
{
  "type": "object",
  "properties": {
    "messageId": {
      "type": "string",
      "example": "<201798300811.5787683@relay.domain.com>",
      "description": "Message ID of the transactional email sent"
    },
    "messageIds": {
      "type": "array",
      "items": {
        "type": "string",
        "example": [
          "<201798300811.5787683@relay.domain.com>",
          "<201798300811.5787683@relay.domain.com>"
        ],
        "description": "version wise message ID's of the transactional emails sent"
      }
    }
  }
}
object createSmtpTemplate
{
  "type": "object",
  "required": [
    "sender",
    "subject",
    "templateName"
  ],
  "properties": {
    "tag": {
      "type": "string",
      "example": "OrderConfirmation",
      "description": "Tag of the template"
    },
    "sender": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 3,
          "description": "Select the sender for the template on the basis of sender id.\n_In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_.\n"
        },
        "name": {
          "type": "string",
          "example": "Mary from MyShop",
          "description": "Name of the sender. **If not passed, will be set to default**\n"
        },
        "email": {
          "type": "string",
          "format": "email",
          "example": "contact@myshop.com",
          "description": "Email of the sender"
        }
      },
      "description": "Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example:\n**{\"name\":\"xyz\", \"email\":\"example@abc.com\"}**\n**{\"name\":\"xyz\", \"id\":123}**\n"
    },
    "htmlUrl": {
      "type": "string",
      "format": "url",
      "example": "https://html.domain.com",
      "description": "Url which contents the body of the email message. REQUIRED if htmlContent is empty"
    },
    "replyTo": {
      "type": "string",
      "format": "email",
      "example": "support@myshop.com",
      "description": "Email on which campaign recipients will be able to reply to"
    },
    "subject": {
      "type": "string",
      "example": "Thanks for your purchase !",
      "description": "Subject of the template"
    },
    "toField": {
      "type": "string",
      "example": "{FNAME} {LNAME}",
      "description": "To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization\n"
    },
    "isActive": {
      "type": "boolean",
      "example": true,
      "description": "Status of template. isActive = true means template is active and isActive = false means template is inactive"
    },
    "htmlContent": {
      "type": "string",
      "example": "The order n°xxxxx has been confirmed. Thanks for your purchase",
      "description": "Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty**\n"
    },
    "templateName": {
      "type": "string",
      "example": "Order Confirmation - EN",
      "description": "Name of the template"
    },
    "attachmentUrl": {
      "type": "string",
      "format": "url",
      "example": "https://attachment.domain.com",
      "description": "Absolute url of the attachment (**no local file**). Extension allowed:\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 and eps'\n"
    }
  }
}
object createSubAccount
{
  "type": "object",
  "example": {
    "email": "test-sub@example.com",
    "language": "en",
    "timezone": "Europe/Paris",
    "companyName": "Test Sub-account"
  },
  "required": [
    "companyName",
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address for the organization"
    },
    "language": {
      "enum": [
        "en",
        "fr",
        "it",
        "es",
        "pt",
        "de"
      ],
      "type": "string",
      "description": "Set the language of the sub-account"
    },
    "timezone": {
      "type": "string",
      "description": "Set the timezone of the sub-account"
    },
    "companyName": {
      "type": "string",
      "description": "Set the name of the sub-account company"
    }
  }
}
object createSubAccountResponse
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 5,
      "description": "ID of the sub-account created"
    }
  }
}
object createUpdateBatchCategory
{
  "type": "object",
  "required": [
    "categories"
  ],
  "properties": {
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/createUpdateCategories"
      },
      "description": "array of categories objects"
    },
    "updateEnabled": {
      "type": "boolean",
      "description": "Facilitate to update the existing categories in the same request (updateEnabled = true)"
    }
  }
}
object createUpdateBatchCategoryModel
{
  "type": "object",
  "properties": {
    "createdCount": {
      "type": "integer",
      "format": "int64",
      "example": 7,
      "description": "Number of the new created categories"
    },
    "updatedCount": {
      "type": "integer",
      "format": "int64",
      "example": 5,
      "description": "Number of the existing categories updated"
    }
  }
}
object createUpdateBatchProducts
{
  "type": "object",
  "required": [
    "products"
  ],
  "properties": {
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/createUpdateProducts"
      },
      "description": "array of products objects"
    },
    "updateEnabled": {
      "type": "boolean",
      "description": "Facilitate to update the existing categories in the same request (updateEnabled = true)"
    }
  }
}
object createUpdateBatchProductsModel
{
  "type": "object",
  "properties": {
    "createdCount": {
      "type": "integer",
      "format": "int64",
      "example": 7,
      "description": "Number of the new created products"
    },
    "updatedCount": {
      "type": "integer",
      "format": "int64",
      "example": 5,
      "description": "Number of the existing products updated"
    }
  }
}
object createUpdateCategories
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "email",
      "example": "CAT123",
      "description": "Unique Category ID as saved in the shop\n"
    },
    "url": {
      "type": "string",
      "example": "http://mydomain.com/category/electronics",
      "description": "URL to the category"
    },
    "name": {
      "type": "string",
      "example": "Electronics",
      "description": "**Mandatory in case of creation**. Name of the Category, as displayed in the shop\n"
    },
    "deletedAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database"
    }
  }
}
object createUpdateCategory
{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "email",
      "example": "CAT123",
      "description": "Unique Category ID as saved in the shop\n"
    },
    "url": {
      "type": "string",
      "example": "http://mydomain.com/category/electronics",
      "description": "URL to the category"
    },
    "name": {
      "type": "string",
      "example": "Electronics",
      "description": "**Mandatory in case of creation**. Name of the Category, as displayed in the shop\n"
    },
    "deletedAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database"
    },
    "updateEnabled": {
      "type": "boolean",
      "default": false,
      "example": false,
      "description": "Facilitate to update the existing category in the same request (updateEnabled = true)"
    }
  }
}
object createUpdateContactModel
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 122,
      "description": "ID of the contact when a new contact is created"
    }
  }
}
object createUpdateFolder
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "example": "Wordpress Contacts",
      "description": "Name of the folder"
    }
  }
}
object createUpdateProduct
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "string",
      "example": "P11",
      "description": "Product ID for which you requested the details"
    },
    "sku": {
      "type": "string",
      "format": "string",
      "description": "Product identifier from the shop"
    },
    "url": {
      "type": "string",
      "format": "string",
      "example": "http://mydomain.com/product/electronics/product1",
      "description": "URL to the product"
    },
    "name": {
      "type": "string",
      "format": "string",
      "example": "Iphone 11",
      "description": "Mandatory in case of creation**. Name of the product for which you requested the details"
    },
    "price": {
      "type": "number",
      "format": "float",
      "description": "Price of the product"
    },
    "imageUrl": {
      "type": "string",
      "format": "string",
      "example": "http://mydomain.com/product-absoulte-url/img.jpeg",
      "description": "Absolute URL to the cover image of the product"
    },
    "metaInfo": {
      "type": "object",
      "example": {
        "brand": "addidas",
        "description": "Shoes for sports"
      },
      "description": "Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      }
    },
    "parentId": {
      "type": "string",
      "format": "string",
      "description": "Parent product id of the product"
    },
    "deletedAt": {
      "type": "string",
      "description": "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Category ID-s of the product"
    },
    "updateEnabled": {
      "type": "boolean",
      "default": false,
      "example": false,
      "description": "Facilitate to update the existing category in the same request (updateEnabled = true)"
    }
  }
}
object createUpdateProducts
{
  "type": "object",
  "required": [
    "id",
    "name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "string",
      "example": "P11",
      "description": "Product ID for which you requested the details"
    },
    "sku": {
      "type": "string",
      "format": "string",
      "description": "Product identifier from the shop"
    },
    "url": {
      "type": "string",
      "format": "string",
      "example": "http://mydomain.com/product/electronics/product1",
      "description": "URL to the product"
    },
    "name": {
      "type": "string",
      "format": "string",
      "example": "Iphone 11",
      "description": "Mandatory in case of creation**. Name of the product for which you requested the details"
    },
    "price": {
      "type": "number",
      "format": "float",
      "description": "Price of the product"
    },
    "imageUrl": {
      "type": "string",
      "format": "string",
      "example": "http://mydomain.com/product-absoulte-url/img.jpeg",
      "description": "Absolute URL to the cover image of the product"
    },
    "metaInfo": {
      "type": "object",
      "example": {
        "brand": "addidas",
        "description": "Shoes for sports"
      },
      "description": "Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 10.",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      }
    },
    "parentId": {
      "type": "string",
      "format": "string",
      "description": "Parent product id of the product"
    },
    "deletedAt": {
      "type": "string",
      "description": "UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Category ID-s of the product"
    }
  }
}
object createWebhook
{
  "type": "object",
  "required": [
    "events",
    "url"
  ],
  "properties": {
    "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": [
        "transactional",
        "marketing",
        "inbound"
      ],
      "type": "string",
      "default": "transactional",
      "example": "marketing",
      "description": "Type of the webhook"
    },
    "domain": {
      "type": "string",
      "example": "example.com",
      "description": "Inbound domain of webhook, required in case of event type `inbound`"
    },
    "events": {
      "type": "array",
      "items": {
        "enum": [
          "sent",
          "hardBounce",
          "softBounce",
          "blocked",
          "spam",
          "delivered",
          "request",
          "click",
          "invalid",
          "deferred",
          "opened",
          "uniqueOpened",
          "unsubscribed",
          "listAddition",
          "contactUpdated",
          "contactDeleted",
          "inboundEmailProcessed"
        ],
        "type": "string",
        "example": "unsubscribed"
      },
      "description": "- Events triggering the webhook. Possible values for **Transactional** type webhook:\n#### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed`\n- Possible values for **Marketing** type webhook:\n#### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered`\n- Possible values for **Inbound** type webhook:\n#### `inboundEmailProcessed`\n"
    },
    "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"
      }
    },
    "description": {
      "type": "string",
      "example": "Webhook triggered on unsubscription",
      "description": "Description of the webhook"
    }
  }
}
object createWhatsAppCampaign
{
  "type": "object",
  "required": [
    "name",
    "templateId",
    "scheduledAt",
    "recipients"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Test Campaign",
      "description": "Name of the WhatsApp campaign creation"
    },
    "recipients": {
      "type": "object",
      "properties": {
        "listIds": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "example": 32
          },
          "description": "**Mandatory if scheduledAt is not empty**. List Ids to send the campaign to\n"
        },
        "segments": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "example": 23
          },
          "description": "**Mandatory if listIds are not used**. Segment ids to send the campaign to.\n"
        },
        "excludedListIds": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "example": 8
          },
          "description": "List ids to exclude from the campaign"
        }
      },
      "description": "Segment ids and List ids to include/exclude from campaign"
    },
    "templateId": {
      "type": "integer",
      "example": 19,
      "description": "Id of the WhatsApp template in **approved** state"
    },
    "scheduledAt": {
      "type": "string",
      "example": "2017-06-01T10:30:00.000Z",
      "description": "Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**\n"
    }
  }
}
object createWhatsAppTemplate
{
  "type": "object",
  "required": [
    "name",
    "language",
    "category",
    "bodyText"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Test template",
      "description": "Name of the template"
    },
    "source": {
      "enum": [
        "Automation",
        "Conversations"
      ],
      "type": "string",
      "description": "source of the template"
    },
    "bodyText": {
      "type": "string",
      "example": "making it look like readable English",
      "description": "Body of the template. **Maximum allowed characters are 1024**"
    },
    "category": {
      "enum": [
        "MARKETING",
        "UTILITY"
      ],
      "type": "string",
      "example": "MARKETING",
      "description": "Category of the template"
    },
    "language": {
      "type": "string",
      "example": "en",
      "description": "Language of the template. For Example :\n**en** for English\n"
    },
    "mediaUrl": {
      "type": "string",
      "example": "https://attachment.domain.com",
      "description": "Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty**.\nAllowed extensions for media files are:\n#### jpeg | png | mp4 | pdf\n"
    },
    "headerText": {
      "type": "string",
      "example": "Test WhatsApp campaign",
      "description": "Text content of the header in the template. **Maximum allowed characters are 45**\n**Use this field to add text content in template header and if mediaUrl is empty**\n"
    }
  }
}
object createdBatchId
{
  "type": "object",
  "required": [
    "batchId"
  ],
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64",
      "example": 17655,
      "description": "Number of orders"
    },
    "batchId": {
      "type": "number",
      "example": 1,
      "description": "Batch ID of the request"
    }
  }
}
object createdProcessId
{
  "type": "object",
  "required": [
    "processId"
  ],
  "properties": {
    "processId": {
      "type": "integer",
      "format": "int64",
      "example": 78,
      "description": "Id of the process created"
    }
  }
}
object deleteHardbounces
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "example": "2017-01-31T00:00:00.000Z",
      "description": "Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate"
    },
    "startDate": {
      "type": "string",
      "example": "2016-12-31T00:00:00.000Z",
      "description": "Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate"
    },
    "contactEmail": {
      "type": "string",
      "format": "email",
      "example": "alex76@example.com",
      "description": "Target a specific email address"
    }
  }
}
object emailExportRecipients
{
  "type": "object",
  "required": [
    "recipientsType"
  ],
  "properties": {
    "notifyURL": {
      "type": "string",
      "format": "url",
      "example": "http://requestb.in/173lyyx1",
      "description": "Webhook called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479"
    },
    "recipientsType": {
      "enum": [
        "all",
        "nonClickers",
        "nonOpeners",
        "clickers",
        "openers",
        "softBounces",
        "hardBounces",
        "unsubscribed"
      ],
      "type": "string",
      "example": "openers",
      "description": "Type of recipients to export for a campaign"
    }
  }
}
object errorModel
{
  "type": "object",
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "enum": [
        "invalid_parameter",
        "missing_parameter",
        "out_of_range",
        "campaign_processing",
        "campaign_sent",
        "document_not_found",
        "reseller_permission_denied",
        "not_enough_credits",
        "permission_denied",
        "duplicate_parameter",
        "duplicate_request",
        "method_not_allowed",
        "unauthorized",
        "account_under_validation",
        "not_acceptable",
        "bad_request"
      ],
      "type": "string",
      "example": "method_not_allowed",
      "description": "Error code displayed in case of a failure"
    },
    "message": {
      "type": "string",
      "example": "POST Method is not allowed on this path",
      "description": "Readable message associated to the failure"
    }
  }
}
object event
{
  "type": "object",
  "required": [
    "event_name",
    "identifiers"
  ],
  "properties": {
    "event_date": {
      "type": "string",
      "example": "2024-02-06T20:59:23.383Z",
      "description": "Timestamp of when the event occurred (e.g. \"2024-01-24T17:39:57+01:00\"). If no value is passed, the timestamp of the event creation is used."
    },
    "event_name": {
      "type": "string",
      "example": "video_played",
      "description": "The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only."
    },
    "identifiers": {
      "type": "object",
      "properties": {
        "sms": {
          "type": "string",
          "example": "+91xxxxxxxxxx",
          "description": "SMS associated with the event"
        },
        "ext_id": {
          "type": "string",
          "example": "abc123",
          "description": "ext_id associated with the event"
        },
        "email_id": {
          "type": "string",
          "example": "jane.doe@example.com",
          "description": "Email Id associated with the event"
        },
        "whatsapp": {
          "type": "string",
          "example": "+91xxxxxxxxxx",
          "description": "whatsapp associated with the event"
        },
        "landline_number": {
          "type": "string",
          "example": "+91xxxxxxxxxx",
          "description": "landline_number associated with the event"
        }
      },
      "description": "Identifies the contact associated with the event. At least one identifier is required.",
      "minProperties": 1
    },
    "event_properties": {
      "type": "object",
      "example": {
        "duration": 142,
        "autoplayed": false,
        "upload_date": "2023-11-24T12:09:10+01:00",
        "video_title": "Brevo — The most approachable CRM suite",
        "vide_description": "Create your free account today!"
      },
      "description": "Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb.",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          },
          {
            "type": "object"
          },
          {
            "type": "array",
            "items": {
              "description": "WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema."
            }
          }
        ]
      }
    },
    "contact_properties": {
      "type": "object",
      "example": {
        "AGE": 32,
        "GENDER": "FEMALE"
      },
      "description": "Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37**",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "integer"
          }
        ]
      }
    }
  }
}
object exportWebhooksHistory
{
  "type": "object",
  "required": [
    "event",
    "notifyURL",
    "type"
  ],
  "properties": {
    "days": {
      "type": "integer",
      "example": 7,
      "description": "Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_"
    },
    "sort": {
      "type": "string",
      "example": "desc",
      "description": "Sorting order of records (asc or desc)"
    },
    "type": {
      "enum": [
        "transactional",
        "marketing"
      ],
      "type": "string",
      "example": "transactional",
      "description": "Filter the history based on webhook type"
    },
    "email": {
      "type": "string",
      "example": "example@brevo.com",
      "description": "Filter the history for a specific email"
    },
    "event": {
      "enum": [
        "invalid_parameter",
        "missing_parameter",
        "hardBounce",
        "softBounce",
        "delivered",
        "spam",
        "request",
        "opened",
        "click",
        "invalid",
        "deferred",
        "blocked",
        "unsubscribed",
        "error",
        "uniqueOpened",
        "loadedByProxy",
        "allEvents"
      ],
      "type": "string",
      "example": "request",
      "description": "Filter the history for a specific event type"
    },
    "endDate": {
      "type": "string",
      "example": "2023-02-17T00:00:00.000Z",
      "description": "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate"
    },
    "messageId": {
      "type": "integer",
      "example": null,
      "description": "Filter the history for a specific message id. Applicable only for transactional webhooks."
    },
    "notifyURL": {
      "type": "string",
      "example": "https://brevo.com",
      "description": "Webhook URL to receive CSV file link"
    },
    "startDate": {
      "type": "string",
      "example": "2023-02-13T00:00:00.000Z",
      "description": "Mandatory if endDate is used. Starting date of the history (YYYY-MM-DD). Must be lower than equal to endDate"
    },
    "webhookId": {
      "type": "integer",
      "example": 2345,
      "description": "Filter the history for a specific webhook id"
    }
  }
}
object getAccount
{
  "allOf": [
    {
      "$ref": "#/components/schemas/getExtendedClient"
    },
    {
      "type": "object",
      "required": [
        "plan",
        "relay"
      ],
      "properties": {
        "plan": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "credits",
              "creditsType",
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "payAsYouGo",
                  "free",
                  "subscription",
                  "sms",
                  "reseller"
                ],
                "type": "string",
                "example": "subscription",
                "description": "Displays the plan type of the user"
              },
              "credits": {
                "type": "number",
                "format": "float",
                "example": 8755,
                "description": "Remaining credits of the user"
              },
              "endDate": {
                "type": "string",
                "format": "date",
                "example": "2017-01-31T00:00:00.000Z",
                "description": "Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type)"
              },
              "startDate": {
                "type": "string",
                "format": "date",
                "example": "2016-12-31T00:00:00.000Z",
                "description": "Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type)"
              },
              "userLimit": {
                "type": "integer",
                "example": 10,
                "description": "Only in case of reseller account. It implies the total number of child accounts you can add to your account."
              },
              "creditsType": {
                "enum": [
                  "sendLimit"
                ],
                "type": "string",
                "example": "sendLimit",
                "description": "This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account."
              }
            }
          },
          "description": "Information about your plans and credits"
        },
        "relay": {
          "type": "object",
          "required": [
            "data",
            "enabled"
          ],
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "port",
                "relay",
                "userName"
              ],
              "properties": {
                "port": {
                  "type": "integer",
                  "example": 125,
                  "description": "Port used for SMTP Relay"
                },
                "relay": {
                  "type": "string",
                  "example": "relay.domain.com",
                  "description": "URL of the SMTP Relay"
                },
                "userName": {
                  "type": "string",
                  "format": "email",
                  "example": "john.smith@example.com",
                  "description": "Email to use as login on transactional platform"
                }
              },
              "description": "Data regarding the transactional email account"
            },
            "enabled": {
              "type": "boolean",
              "example": true,
              "description": "Status of your transactional email Account (true=Enabled, false=Disabled)"
            }
          },
          "description": "Information about your transactional email account"
        },
        "marketingAutomation": {
          "type": "object",
          "required": [
            "enabled"
          ],
          "properties": {
            "key": {
              "type": "string",
              "example": "iso05aopqych87ysy0jymf",
              "description": "Marketing Automation Tracker ID"
            },
            "enabled": {
              "type": "boolean",
              "example": false,
              "description": "Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled)"
            }
          }
        }
      }
    }
  ]
}
object getAccountActivity
{
  "type": "object",
  "properties": {
    "logs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "action",
          "date",
          "user_email",
          "user_ip",
          "user_agent"
        ],
        "properties": {
          "date": {
            "type": "string",
            "example": "2023-03-27T16:30:00Z",
            "description": "Time of the activity."
          },
          "action": {
            "type": "string",
            "example": "login-success",
            "description": "Type of activity in the account."
          },
          "user_ip": {
            "type": "string",
            "example": "192.158.1.38",
            "description": "IP address of the user who performed activity in the account."
          },
          "user_agent": {
            "type": "string",
            "example": "Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)",
            "description": "Browser details of the user who performed the activity."
          },
          "user_email": {
            "type": "string",
            "example": "test@mycompany.com",
            "description": "Email address of the user who performed activity in the account."
          }
        }
      },
      "description": "Get user activity logs"
    }
  }
}
object getAggregatedReport
{
  "type": "object",
  "properties": {
    "opens": {
      "type": "integer",
      "format": "int64",
      "example": 47,
      "description": "Number of openings for the timeframe"
    },
    "range": {
      "type": "string",
      "example": "2016-09-08|2017-04-06",
      "description": "Time frame of the report"
    },
    "clicks": {
      "type": "integer",
      "format": "int64",
      "example": 12,
      "description": "Number of clicks for the timeframe"
    },
    "blocked": {
      "type": "integer",
      "format": "int64",
      "example": 2,
      "description": "Number of blocked contact emails for the timeframe"
    },
    "invalid": {
      "type": "integer",
      "format": "int64",
      "example": 0,
      "description": "Number of invalid emails for the timeframe"
    },
    "requests": {
      "type": "integer",
      "format": "int64",
      "example": 263,
      "description": "Number of requests for the timeframe"
    },
    "delivered": {
      "type": "integer",
      "format": "int64",
      "example": 249,
      "description": "Number of delivered emails for the timeframe"
    },
    "hardBounces": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "description": "Number of hardbounces for the timeframe"
    },
    "softBounces": {
      "type": "integer",
      "format": "int64",
      "example": 4,
      "description": "Number of softbounces for the timeframe"
    },
    "spamReports": {
      "type": "integer",
      "format": "int64",
      "example": 0,
      "description": "Number of complaint (spam report) for the timeframe"
    },
    "uniqueOpens": {
      "type": "integer",
      "format": "int64",
      "example": 37,
      "description": "Number of unique openings for the timeframe"
    },
    "uniqueClicks": {
      "type": "integer",
      "format": "int64",
      "example": 8,
      "description": "Number of unique clicks for the timeframe"
    },
    "unsubscribed": {
      "type": "integer",
      "format": "int64",
      "example": 0,
      "description": "Number of unsubscribed emails for the timeframe"
    }
  }
}
object getAllExternalFeeds
{
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "Total number of batches"
    },
    "feeds": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "url",
          "authType",
          "headers",
          "maxRetries",
          "cache",
          "createdAt",
          "modifiedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuidv4",
            "example": "54377442-20a2-4c20-b761-d636c72de7b7",
            "description": "ID of the feed"
          },
          "url": {
            "type": "string",
            "format": "url",
            "example": "http://requestb.in/173lyyx1",
            "description": "URL of the feed"
          },
          "name": {
            "type": "string",
            "example": "New feed",
            "description": "Name of the feed"
          },
          "cache": {
            "type": "boolean",
            "example": true,
            "description": "Toggle caching of feed url response"
          },
          "token": {
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
            "description": "Token for authType `token`"
          },
          "headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "userId",
                  "description": "Name of the header"
                },
                "value": {
                  "type": "string",
                  "example": "user12345",
                  "description": "Value of the header"
                }
              }
            },
            "description": "Custom headers for the feed"
          },
          "authType": {
            "enum": [
              "basic",
              "token",
              "noAuth"
            ],
            "type": "string",
            "description": "Auth type of the feed: * `basic` * `token` * `noAuth`\n"
          },
          "password": {
            "type": "string",
            "example": "password",
            "description": "Password for authType `basic`"
          },
          "username": {
            "type": "string",
            "example": "user",
            "description": "Username for authType `basic`"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T05:03:47.053000000Z",
            "description": "Datetime on which the feed was created"
          },
          "maxRetries": {
            "type": "integer",
            "default": 5,
            "example": 5,
            "maximum": 5,
            "minimum": 0,
            "description": "Maximum number of retries on the feed url"
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T05:03:47.053000000Z",
            "description": "Datetime on which the feed was modified"
          }
        }
      }
    }
  }
}
object getAttributes
{
  "type": "object",
  "required": [
    "attributes"
  ],
  "properties": {
    "attributes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "category",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "LASTNAME",
            "description": "Name of the attribute"
          },
          "type": {
            "enum": [
              "text",
              "date",
              "float",
              "id",
              "boolean"
            ],
            "type": "string",
            "example": "text",
            "description": "Type of the attribute"
          },
          "category": {
            "enum": [
              "normal",
              "transactional",
              "category",
              "calculated",
              "global"
            ],
            "type": "string",
            "example": "category",
            "description": "Category of the attribute"
          },
          "enumeration": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "label",
                "value"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "example": "Women",
                  "description": "Label of the \"category\" type attribute"
                },
                "value": {
                  "type": "integer",
                  "format": "int64",
                  "example": 1,
                  "description": "ID of Value of the \"category\" type attribute"
                }
              }
            },
            "description": "Parameter only available for \"category\" type attributes."
          },
          "calculatedValue": {
            "type": "string",
            "example": "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]",
            "description": "Calculated value formula"
          }
        }
      },
      "description": "Listing of available contact attributes in your account"
    }
  }
}
object getBlockedDomains
{
  "type": "object",
  "required": [
    "domains"
  ],
  "properties": {
    "domains": {
      "type": "array",
      "items": {
        "type": "string",
        "example": "contact.com",
        "description": "name of blocked domain"
      },
      "description": "List of all blocked domains"
    }
  }
}
object getCampaignOverview
{
  "type": "object",
  "required": [
    "id",
    "name",
    "status",
    "type"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 12,
      "description": "ID of the campaign"
    },
    "name": {
      "type": "string",
      "example": "EN - Sales Summer 2017",
      "description": "Name of the campaign"
    },
    "type": {
      "enum": [
        "classic",
        "trigger"
      ],
      "type": "string",
      "example": "classic",
      "description": "Type of campaign"
    },
    "status": {
      "enum": [
        "draft",
        "sent",
        "archive",
        "queued",
        "suspended",
        "in_process"
      ],
      "type": "string",
      "example": "sent",
      "description": "Status of the campaign"
    },
    "subject": {
      "type": "string",
      "example": "20% OFF for 2017 Summer Sales",
      "description": "Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`"
    },
    "subjectA": {
      "type": "string",
      "example": "Discover the New Collection!",
      "description": "Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`"
    },
    "subjectB": {
      "type": "string",
      "example": "Want to discover the New Collection?",
      "description": "Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`"
    },
    "abTesting": {
      "type": "boolean",
      "example": true,
      "description": "Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled."
    },
    "splitRule": {
      "type": "integer",
      "example": 25,
      "description": "The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`"
    },
    "previewText": {
      "type": "string",
      "example": "Thanks for your order!",
      "description": "Preview text or preheader of the email campaign"
    },
    "scheduledAt": {
      "type": "string",
      "example": "2017-06-01T12:30:00.000Z",
      "description": "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)"
    },
    "winnerDelay": {
      "type": "integer",
      "example": 50,
      "description": "The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`"
    },
    "sendAtBestTime": {
      "type": "boolean",
      "example": true,
      "description": "It is true if you have chosen to send your campaign at best time, otherwise it is false"
    },
    "winnerCriteria": {
      "type": "string",
      "example": "open",
      "description": "Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`"
    }
  }
}
object getCampaignRecipients
{
  "type": "object",
  "required": [
    "exclusionLists",
    "lists"
  ],
  "properties": {
    "lists": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64",
        "example": 21,
        "description": "List IDs included in the campaign"
      }
    },
    "exclusionLists": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64",
        "example": 13,
        "description": "List IDs excluded of the campaign"
      }
    }
  }
}
object getCampaignStats
{
  "type": "object",
  "required": [
    "clickers",
    "complaints",
    "delivered",
    "hardBounces",
    "sent",
    "softBounces",
    "uniqueClicks",
    "uniqueViews",
    "unsubscriptions",
    "viewed",
    "trackableViews"
  ],
  "properties": {
    "sent": {
      "type": "integer",
      "format": "int64",
      "example": 19887,
      "description": "Number of sent emails for the campaign"
    },
    "listId": {
      "type": "integer",
      "format": "int64",
      "example": 2,
      "description": "List Id of email campaign (only in case of get email campaign(s)(not for global stats))"
    },
    "viewed": {
      "type": "integer",
      "format": "int64",
      "example": 8999,
      "description": "Number of openings for the campaign"
    },
    "clickers": {
      "type": "integer",
      "format": "int64",
      "example": 2665,
      "description": "Number of total clicks for the campaign"
    },
    "deferred": {
      "type": "integer",
      "format": "int64",
      "example": 30,
      "description": "Number of deferred emails for the campaign"
    },
    "delivered": {
      "type": "integer",
      "format": "int64",
      "example": 19765,
      "description": "Number of delivered emails for the campaign"
    },
    "complaints": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "description": "Number of complaints (Spam reports) for the campaign"
    },
    "hardBounces": {
      "type": "integer",
      "format": "int64",
      "example": 87,
      "description": "Number of harbounce for the campaign"
    },
    "softBounces": {
      "type": "integer",
      "format": "int64",
      "example": 100,
      "description": "Number of softbounce for the campaign"
    },
    "uniqueViews": {
      "type": "integer",
      "format": "int64",
      "example": 7779,
      "description": "Number of unique openings for the campaign"
    },
    "returnBounce": {
      "type": "integer",
      "format": "int64",
      "example": 5,
      "description": "Total number of non-delivered campaigns for a particular campaign id."
    },
    "uniqueClicks": {
      "type": "integer",
      "format": "int64",
      "example": 2300,
      "description": "Number of unique clicks for the campaign"
    },
    "estimatedViews": {
      "type": "integer",
      "format": "int64",
      "example": 560,
      "description": "Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails"
    },
    "trackableViews": {
      "type": "integer",
      "format": "int64",
      "example": 5661,
      "description": "Recipients without any privacy protection option enabled in their email client"
    },
    "unsubscriptions": {
      "type": "integer",
      "format": "int64",
      "example": 2,
      "description": "Number of unsubscription for the campaign"
    },
    "trackableViewsRate": {
      "type": "number",
      "format": "float",
      "example": 23.45,
      "description": "Rate of recipients without any privacy protection option enabled in their email client"
    }
  }
}
object getCategories
{
  "type": "object",
  "required": [
    "categories",
    "count"
  ],
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64",
      "example": 17655,
      "description": "Number of categories"
    },
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/getCategoryDetails"
      }
    }
  }
}
object getCategoryDetails
{
  "type": "object",
  "required": [
    "id",
    "name",
    "createdAt",
    "modifiedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "string",
      "example": "C11",
      "description": "Category ID for which you requested the details"
    },
    "url": {
      "type": "string",
      "format": "string",
      "example": "http://mydomain.com/category/clothing",
      "description": "URL to the category"
    },
    "name": {
      "type": "string",
      "format": "string",
      "example": "Electronics",
      "description": "Name of the category for which you requested the details"
    },
    "createdAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)"
    },
    "isDeleted": {
      "type": "boolean",
      "format": "string",
      "example": true,
      "description": "category deleted from the shop's database"
    },
    "modifiedAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)"
    }
  }
}
object getChildAccountCreationStatus
{
  "type": "object",
  "required": [
    "childAccountCreated"
  ],
  "properties": {
    "childAccountCreated": {
      "type": "boolean",
      "example": true,
      "description": "Status of child account creation whether it is successfully created (exists) or not."
    }
  }
}
object getChildDomain
{
  "type": "object",
  "properties": {
    "active": {
      "type": "boolean",
      "example": true,
      "description": "indicates whether a domain is verified or not"
    },
    "domain": {
      "type": "string",
      "example": "mycustomdomain.com",
      "description": "Sender domain"
    }
  }
}
array getChildDomains
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/getChildDomain"
  }
}
object getChildInfo
{
  "allOf": [
    {
      "$ref": "#/components/schemas/getClient"
    },
    {
      "type": "object",
      "required": [
        "password"
      ],
      "properties": {
        "ips": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "",
            "description": "IP(s) associated to the user"
          },
          "description": "IP(s) associated to a child account user"
        },
        "apiKeys": {
          "type": "object",
          "required": [
            "v2"
          ],
          "properties": {
            "v2": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "name"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "example": "nOpxxxxxy7z",
                    "description": "API Key for version 2"
                  },
                  "name": {
                    "type": "string",
                    "example": "N˚2",
                    "description": "Name of the key for version 2"
                  }
                }
              }
            },
            "v3": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "key",
                  "name"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "example": "xkeysib-21881axxxxxcc92e04-mIrexxxx7z",
                    "description": "API Key for version 3"
                  },
                  "name": {
                    "type": "string",
                    "example": "N˚3",
                    "description": "Name of the key for version 3"
                  }
                }
              }
            }
          },
          "description": "API Keys associated to child account"
        },
        "credits": {
          "type": "object",
          "properties": {
            "smsCredits": {
              "type": "integer",
              "format": "int64",
              "example": 87556,
              "description": "SMS credits available for your child"
            },
            "emailCredits": {
              "type": "integer",
              "format": "int64",
              "example": 98555,
              "description": "Email credits available for your child"
            }
          },
          "description": "Credits available for your child"
        },
        "password": {
          "type": "string",
          "format": "password",
          "example": "abC01De2fGHI3jkL",
          "description": "The encrypted password of child account"
        },
        "statistics": {
          "type": "object",
          "properties": {
            "totalSent": {
              "type": "integer",
              "format": "int64",
              "example": 987554,
              "description": "Overall emails sent for since the account exists"
            },
            "currentMonthTotalSent": {
              "type": "integer",
              "format": "int64",
              "example": 4566,
              "description": "Overall emails sent for current month"
            },
            "previousMonthTotalSent": {
              "type": "integer",
              "format": "int64",
              "example": 7654,
              "description": "Overall emails sent for the previous month"
            }
          },
          "description": "Statistics about your child account activity"
        }
      }
    }
  ]
}
object getChildrenList
{
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64",
      "example": 24,
      "description": "Number of child accounts"
    },
    "children": {
      "type": "array",
      "items": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/getChildInfo"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int64",
                "example": 187588,
                "description": "ID of the child"
              }
            }
          }
        ]
      },
      "description": "Your children's account information"
    }
  }
}
object getClient
{
  "type": "object",
  "required": [
    "companyName",
    "email",
    "firstName",
    "lastName"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "example": "john.smith@example.com",
      "description": "Login Email"
    },
    "lastName": {
      "type": "string",
      "example": "Smith",
      "description": "Last Name"
    },
    "firstName": {
      "type": "string",
      "example": "John",
      "description": "First Name"
    },
    "companyName": {
      "type": "string",
      "example": "MyCompany",
      "description": "Name of the company"
    }
  }
}
object getContactCampaignStats
{
  "type": "object",
  "properties": {
    "opened": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "count",
          "eventTime",
          "ip"
        ],
        "properties": {
          "ip": {
            "type": "string",
            "example": "165.87.3.15",
            "description": "IP from which the user has opened the campaign"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "Number of openings of the campaign"
          },
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "clicked": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "links"
        ],
        "properties": {
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "count",
                "eventTime",
                "ip",
                "url"
              ],
              "properties": {
                "ip": {
                  "type": "string",
                  "example": "165.87.3.15",
                  "description": "IP from which the user has clicked on the link"
                },
                "url": {
                  "type": "string",
                  "example": "www.myshop.com",
                  "description": "URL of the clicked link"
                },
                "count": {
                  "type": "integer",
                  "format": "int64",
                  "example": 1,
                  "description": "Number of clicks on this link for the campaign"
                },
                "eventTime": {
                  "type": "string",
                  "example": "2017-03-12T20:15:13.000Z",
                  "description": "UTC date-time of the event"
                }
              }
            }
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "delivered": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "eventTime"
        ],
        "properties": {
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "complaints": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "eventTime"
        ],
        "properties": {
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "hardBounces": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "eventTime"
        ],
        "properties": {
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "softBounces": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "eventTime"
        ],
        "properties": {
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "messagesSent": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "campaignId",
          "eventTime"
        ],
        "properties": {
          "eventTime": {
            "type": "string",
            "example": "2017-03-12T20:15:13.000Z",
            "description": "UTC date-time of the event"
          },
          "campaignId": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "ID of the campaign which generated the event"
          }
        }
      }
    },
    "unsubscriptions": {
      "type": "object",
      "required": [
        "adminUnsubscription",
        "userUnsubscription"
      ],
      "properties": {
        "userUnsubscription": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "campaignId",
              "eventTime"
            ],
            "properties": {
              "ip": {
                "type": "string",
                "example": "165.87.3.15",
                "description": "IP from which the user has unsubscribed"
              },
              "eventTime": {
                "type": "string",
                "example": "2017-03-12T20:15:13.000Z",
                "description": "UTC date-time of the event"
              },
              "campaignId": {
                "type": "integer",
                "format": "int64",
                "example": 3,
                "description": "ID of the campaign which generated the event"
              }
            }
          },
          "description": "Contact has unsubscribed via the unsubscription link in the email"
        },
        "adminUnsubscription": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "eventTime"
            ],
            "properties": {
              "ip": {
                "type": "string",
                "example": "165.87.3.15",
                "description": "IP from which the user has been unsubscribed"
              },
              "eventTime": {
                "type": "string",
                "example": "2017-03-12T20:15:13.000Z",
                "description": "UTC date-time of the event"
              }
            }
          },
          "description": "Contact has been unsubscribed from the administrator"
        }
      }
    },
    "transacAttributes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "orderDate",
          "orderId",
          "orderPrice"
        ],
        "properties": {
          "orderId": {
            "type": "integer",
            "format": "int64",
            "example": 248,
            "description": "ID of the order"
          },
          "orderDate": {
            "type": "string",
            "format": "date",
            "example": "2017-03-12T00:00:00.000Z",
            "description": "Date of the order"
          },
          "orderPrice": {
            "type": "number",
            "format": "float",
            "example": 24.99,
            "description": "Price of the order"
          }
        }
      }
    }
  },
  "description": "Campaign Statistics for the contact"
}
object getContactDetails
{
  "type": "object",
  "required": [
    "attributes",
    "createdAt",
    "emailBlacklisted",
    "id",
    "listIds",
    "modifiedAt",
    "smsBlacklisted"
  ],
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 32,
      "description": "ID of the contact for which you requested the details"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "john.smith@example.com",
      "description": "Email address of the contact for which you requested the details"
    },
    "listIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64",
        "description": "List(s) in which the contact is included"
      }
    },
    "createdAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)"
    },
    "attributes": {
      "type": "object",
      "example": {
        "name": "Joe",
        "email": "joe@example.com"
      },
      "properties": {},
      "description": "Set of attributes of the contact"
    },
    "modifiedAt": {
      "type": "string",
      "example": "2017-05-12T12:30:00.000Z",
      "description": "Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)"
    },
    "smsBlacklisted": {
      "type": "boolean",
      "example": true,
      "description": "Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)"
    },
    "emailBlacklisted": {
      "type": "boolean",
      "example": false,
      "description": "Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)"
    },
    "listUnsubscribed": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int64",
        "description": "List(s) in which the contact is included (only available if unsubscription per list is activated for the account)"
      }
    }
  }
}
object getContacts
{
  "type": "object",
  "required": [
    "contacts",
    "count"
  ],
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64",
      "example": 17655,
      "description": "Number of contacts"
    },
    "contacts": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/getContactDetails"
      }
    }
  }
}
object getCorporateInvitedUsersList
{
  "type": "object",
  "properties": {
    "users": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "email",
          "is_owner",
          "status",
          "feature_access"
        ],
        "properties": {
          "email": {
            "type": "string",
            "example": "pendingInvitedUser@company.com",
            "description": "Email address of the user."
          },
          "groups": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "a5c4f22c08d9ed37ef1ca342",
                "description": "group id"
              },
              "name": {
                "type": "string",
                "example": "My group",
                "description": "group name"
              }
            },
            "description": "Admin user groups list"
          },
          "status": {
            "type": "string",
            "example": "active",
            "description": "Status of the invited user."
          },
          "is_owner": {
            "type": "string",
            "example": false,
            "description": "Flag for indicating is user owner of the organization."
          },
          "feature_access": {
            "type": "object",
            "properties": {
              "my_plan": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "all / none"
                },
                "description": "My plan accessiblity."
              },
              "api_keys": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "all / none"
                },
                "description": "Api keys accessiblity."
              },
              "apps_management": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "all / none"
                },
                "description": "Apps management accessiblity | Not available in ENTv2"
              },
              "user_management": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "all / none"
                },
                "description": "User management accessiblity."
              }
            },
            "description": "Feature accessiblity given to the user. (Required only if status is active)"
          }
        }
      },
      "description": "Get invited users list"
    }
  }
}
object getCorporateUserPermission
{
  "type": "object",
  "required": [
    "email",
    "status",
    "groups",
    "feature_access"
  ],
  "properties": {
    "email": {
      "type": "string",
      "example": "invitedUser@company.com",
      "description": "Email address of the user."
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "6cbcxxxxxxxxxxxxxxxx457a",
            "description": "group identifier"
          },
          "name": {
            "type": "string",
            "example": "Staff",
            "description": "Group name"
          }
        },
        "description": "Groups details"
      }
    },
    "status": {
      "type": "string",
      "example": "active / pending",
      "description": "Status of the invited user."
    },
    "feature_access": {
      "type": "object",
      "properties": {
        "my_plan": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "all",
            "description": "Permission details"
          },
          "description": "Permission on my plan"
        },
        "api_keys": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "all",
            "description": "Permission details"
          },
          "description": "Permission on api keys"
        },
        "apps_management": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "all",
            "description": "Permission details"
          },
          "description": "Permission on apps management"
        },
        "user_management": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "none",
            "description": "Permission details"
          },
          "description": "Permission on user management"
        }
      },
      "description": "Granular feature permissions given to the user."
    }
  },
  "description": "Check admin user permissions"
}
object getCouponCollection
{
  "type": "object",
  "required": [
    "id",
    "name",
    "defaultCoupon",
    "createdAt",
    "totalCoupons",
    "remainingCoupons"
  ],
  "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."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-06T05:03:47.053Z",
      "description": "Datetime on which the collection was created."
    },
    "totalCoupons": {
      "type": "integer",
      "format": "int64",
      "example": 10000,
      "description": "Total number of coupons in the collection."
    },
    "defaultCoupon": {
      "type": "string",
      "example": "10 OFF",
      "description": "The default coupon of the collection."
    },
    "expirationDate": {
      "type": "string",
      "format": "date-time",
      "example": "2024-01-01T00:00:00Z",
      "description": "Expiration date for the coupon collection in RFC3339 format."
    },
    "remainingCoupons": {
      "type": "integer",
      "format": "int64",
      "example": 5000,
      "description": "Number of coupons that have not been sent yet."
    },
    "remainingDaysAlert": {
      "type": "integer",
      "example": 5,
      "description": "If present, an email notification is going to be sent the defined amount of days before to the expiration date."
    },
    "remainingCouponsAlert": {
      "type": "integer",
      "example": 5,
      "description": "If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold."
    }
  }
}
object getDeviceBrowserStats
{
  "type": "object",
  "required": [
    "clickers",
    "uniqueClicks",
    "uniqueViews",
    "viewed"
  ],
  "properties": {
    "viewed": {
      "type": "integer",
      "format": "int64",
      "example": 8999,
      "description": "Number of openings for the campaign using the particular browser"
    },
    "clickers": {
      "type": "integer",
      "format": "int64",
      "example": 2665,
      "description": "Number of total clicks for the campaign using the particular browser"
    },
    "uniqueViews": {
      "type": "integer",
      "format": "int64",
      "example": 7779,
      "description": "Number of unique openings for the campaign using the particular browser"
    },
    "uniqueClicks": {
      "type": "integer",
      "format": "int64",
      "example": 2300,
      "description": "Number of unique clicks for the campaign using the particular browser"
    }
  }
}
object getDomainConfigurationModel
{
  "type": "object",
  "required": [
    "domain",
    "verified",
    "authenticated",
    "dns_records"
  ],
  "properties": {
    "domain": {
      "type": "string",
      "example": "myexample.com",
      "description": "Domain"
    },
    "verified": {
      "type": "boolean",
      "example": true,
      "description": "Status of domain verification (true=verified, false=non verified)"
    },
    "dns_records": {
      "type": "object",
      "properties": {
        "brevo_code": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "status": {
              "type": "boolean"
            },
            "host_name": {
              "type": "string"
            }
          }
        },
        "dkim_record": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "status": {
              "type": "boolean"
            },
            "host_name": {
              "type": "string"
            }
          }
        },
        "dmarc_record": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "status": {
              "type": "boolean"
            },
            "host_name": {
              "type": "string"
            }
          }
        }
      }
    },
    "authenticated": {
      "type": "boolean",
      "example": false,
      "description": "Status of domain authentication (true=authenticated, false=non authenticated)"
    }
  }
}
Load more schemas