{"openapi":"3.0.1","info":{"title":"Inklura — Brevo-compatible API","version":"3.0.0","description":"Wire-compatible subset of the Brevo API v3 served by every Inklura site at /api/brevo/v3."},"servers":[{"url":"https://{siteDomain}/api/brevo/v3","variables":{"siteDomain":{"default":"infra.wd29.net"}}}],"components":{"schemas":{"ConsentGroupItem":{"type":"object","description":"A contact's membership status in a single consent group.","properties":{"id":{"type":"integer","format":"int64","description":"ID of the consent group","example":42},"status":{"type":"string","enum":["subscribed","unsubscribed"],"description":"The contact's subscription status within this consent group","example":"subscribed"}},"required":["id","status"]},"contactErrorModel":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","document_not_found","account_in_process","duplicate_parameter","method_not_allowed","out_of_range"],"example":"duplicate_parameter","type":"string"},"message":{"description":"Readable message associated to the failure","example":"email is already associated with another Contact","type":"string"},"metadata":{"description":"Additional information about the error","example":{"duplicate_identifiers":["email"]},"type":"object"}},"required":["code","message"],"type":"object"},"createUpdateFolder":{"properties":{"name":{"description":"Name of the folder","example":"Wordpress Contacts","type":"string"}},"type":"object"},"errorModel":{"properties":{"code":{"description":"Error code displayed in case of a failure","example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["message"],"type":"object"},"getCampaignStats":{"properties":{"appleMppOpens":{"description":"Numbers of times your email has been opened automatically through Apple MPP.","example":10,"format":"int64","type":"integer"},"clickers":{"description":"Number of total clicks for the campaign","example":2665,"format":"int64","type":"integer"},"complaints":{"description":"Number of complaints (Spam reports) for the campaign","example":1,"format":"int64","type":"integer"},"deferred":{"description":"Number of deferred emails for the campaign","example":30,"format":"int64","type":"integer"},"delivered":{"description":"Number of delivered emails for the campaign","example":19765,"format":"int64","type":"integer"},"estimatedViews":{"description":"Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails","example":560,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hard bounces for the campaign","example":87,"format":"int64","type":"integer"},"listId":{"description":"List Id of email campaign (only in case of get email campaign(s)(not for global stats))","example":2,"format":"int64","type":"integer"},"opensRate":{"description":"Percentage of recipients who open the email out of your total number of recipients. Depending on your Campaign settings, they may include Apple MPP opens.","example":29.54,"format":"float","type":"number"},"returnBounce":{"description":"Total number of non-delivered campaigns for a particular campaign id.","example":5,"format":"int64","type":"integer"},"sent":{"description":"Number of sent emails for the campaign","example":19887,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounce for the campaign","example":100,"format":"int64","type":"integer"},"trackableViews":{"description":"Recipients without any privacy protection option enabled in their email email client","example":5661,"format":"int64","type":"integer"},"trackableViewsRate":{"description":"Rate of recipients without any privacy protection option enabled in their email client","example":23.45,"format":"float","type":"number"},"uniqueClicks":{"description":"Number of unique clicks for the campaign","example":2300,"format":"int64","type":"integer"},"uniqueViews":{"description":"Number of unique openings for the campaign","example":7779,"format":"int64","type":"integer"},"unsubscriptions":{"description":"Number of unsubscription for the campaign","example":2,"format":"int64","type":"integer"},"viewed":{"description":"Number of openings for the campaign","example":8999,"format":"int64","type":"integer"}},"required":["clickers","complaints","delivered","hardBounces","sent","softBounces","uniqueClicks","uniqueViews","unsubscriptions","viewed","trackableViews","opensRate","appleMppOpens"],"type":"object"},"getContactDetails":{"properties":{"attributes":{"description":"Set of attributes of the contact","example":{"email":"joe@example.com","name":"Joe"},"properties":{},"type":"object"},"createdAt":{"description":"Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"email":{"description":"Email address of the contact for which you requested the details","example":"john.smith@example.com","format":"email","type":"string"},"emailBlacklisted":{"description":"Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)","example":false,"type":"boolean"},"id":{"description":"ID of the contact for which you requested the details","example":32,"format":"int64","type":"integer"},"listIds":{"items":{"description":"List(s) in which the contact is included","format":"int64","type":"integer"},"type":"array"},"listUnsubscribed":{"items":{"description":"List(s) in which the contact is included (only available if unsubscription per list is activated for the account)","format":"int64","type":"integer"},"type":"array"},"modifiedAt":{"description":"Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"smsBlacklisted":{"description":"Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)","example":true,"type":"boolean"},"whatsappBlacklisted":{"description":"Blacklist status for WhatsApp campaigns (true=blacklisted, false=not blacklisted)","example":false,"type":"boolean"},"consentGroups":{"type":"array","description":"Consent groups the contact belongs to, with their subscription status. Only present when the Consent Groups feature is enabled for your account.","items":{"$ref":"#/components/schemas/ConsentGroupItem"}}},"required":["attributes","createdAt","emailBlacklisted","id","listIds","modifiedAt","smsBlacklisted","whatsappBlacklisted"],"type":"object"},"getContacts":{"properties":{"contacts":{"items":{"allOf":[{"$ref":"#/components/schemas/getContactDetails"}],"type":"object"},"type":"array"},"count":{"description":"Number of contacts","example":17655,"format":"int64","type":"integer"}},"required":["contacts","count"],"type":"object"},"getFolder":{"properties":{"id":{"description":"ID of the folder","example":2,"format":"int64","type":"integer"},"name":{"description":"Name of the folder","example":"Magento Customers","type":"string"},"totalBlacklisted":{"description":"Number of blacklisted contacts in the folder","example":32,"format":"int64","type":"integer"},"totalSubscribers":{"description":"Number of contacts in the folder","example":19777,"format":"int64","type":"integer"},"uniqueSubscribers":{"description":"Number of unique contacts in the folder","example":16222,"format":"int64","type":"integer"}},"required":["id","name","totalBlacklisted","totalSubscribers","uniqueSubscribers"],"type":"object"},"getList":{"properties":{"id":{"description":"ID of the list","example":23,"format":"int64","type":"integer"},"name":{"description":"Name of the list","example":"Magento Customers - EN","type":"string"},"totalBlacklisted":{"description":"Number of blacklisted contacts in the list","example":13,"format":"int64","type":"integer"},"totalSubscribers":{"description":"Number of contacts in the list","example":1776,"format":"int64","type":"integer"},"uniqueSubscribers":{"description":"Number of unique contacts in the list","example":1789,"format":"int64","type":"integer"}},"required":["id","name","totalBlacklisted","totalSubscribers","uniqueSubscribers"],"type":"object"},"getSmtpTemplateOverview":{"properties":{"createdAt":{"description":"Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"doiTemplate":{"description":"It is true if template is a valid Double opt-in (DOI) template, otherwise it is false. This field will be available only in case of single template detail call.","example":false,"type":"boolean"},"htmlContent":{"description":"HTML content of the template","example":"Your order n°xxxxx has been confirmed. Thanks for your purchase.","type":"string"},"id":{"description":"ID of the template","example":4,"format":"int64","type":"integer"},"isActive":{"description":"Status of template (true=active, false=inactive)","example":true,"type":"boolean"},"modifiedAt":{"description":"Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"name":{"description":"Name of the template","example":"Order Confirmation - EN","type":"string"},"replyTo":{"description":"Email defined as the \"Reply to\" for the template","example":"replyto@domain.com","format":"email","type":"string"},"sender":{"properties":{"email":{"description":"From email for the template","example":"contact@myshop.fr","format":"email","type":"string"},"id":{"description":"Sender id of the template","example":43,"type":"string"},"name":{"description":"Sender name for the template","example":"Mary from MyShop","type":"string"}},"type":"object"},"subject":{"description":"Subject of the template","example":"Thanks for your order !","type":"string"},"tag":{"description":"Tag of the template","example":"sports","type":"string"},"testSent":{"description":"Status of test sending for the template (true=test email has been sent, false=test email has not been sent)","example":true,"type":"boolean"},"toField":{"description":"Customisation of the \"to\" field for the template","example":"{FIRSTNAME} {LASTNAME}","type":"string"},"customTemplateId":{"description":"Custom template identifier, if one was assigned during template creation. Only present when the template has a custom ID.","example":"my-custom-template-001","type":"string"}},"required":["createdAt","htmlContent","id","isActive","modifiedAt","name","replyTo","sender","subject","tag","testSent","toField"],"type":"object"},"getWebhook":{"properties":{"auth":{"description":"Authentication header to be send with the webhook requests","example":{"token":"test-auth-token1234","type":"bearer"},"type":"object"},"batched":{"description":"Batching configuration of the webhook, we send batched webhooks if its\ntrue","example":true,"type":"boolean"},"createdAt":{"description":"Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2016-12-01T12:50:00Z","type":"string"},"description":{"description":"Description of the webhook","example":"Webhook triggered on campaign openings","type":"string"},"events":{"items":{"description":"Events which will trigger the webhook when they occure","example":"opens,clicks","type":"string"},"type":"array"},"headers":{"items":{"description":"Headers send with the requests to the webhook","example":{"key":"cf-secret","value":"test-header-value"},"type":"object"},"type":"array"},"id":{"description":"ID of the webhook","example":654,"format":"int64","type":"integer"},"modifiedAt":{"description":"Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T13:15:00Z","type":"string"},"type":{"description":"Type of webhook (marketing, transactional, or inbound)","enum":["marketing","transactional","inbound"],"example":"marketing","type":"string"},"domain":{"description":"Inbound domain of the webhook, only returned for inbound type webhooks","example":"example.com","type":"string"},"url":{"description":"URL of the webhook","example":"http://requestb.in/173lyyx1","format":"url","type":"string"}},"required":["createdAt","description","events","id","modifiedAt","type","url"],"type":"object"},"postContactInfo":{"properties":{"contacts":{"properties":{"failure":{"oneOf":[{"items":{"description":"Email addresses which can not be imported/removed, could be already in/out list and/or doesn't exist","example":"jeff32@example.com, jim56@example.com","format":"email","type":"string"},"type":"array"},{"items":{"description":"IDs which can not be imported/removed, could be already in/out list and/or doesn't exist","example":"5, 6","format":"int64","type":"integer"},"type":"array"}]},"processId":{"description":"Id of the process created to remove contacts from list when user opts for \"all\" option.","example":78,"format":"int64","type":"integer"},"success":{"oneOf":[{"example":"jeff32@example.com, jim56@example.com","items":{"description":"Email addresses which are successfully imported/removed","format":"email","type":"string"},"type":"array"},{"example":"1, 2","items":{"description":"IDs which are successfully imported/removed","format":"int64","type":"integer"},"type":"array"}]},"total":{"description":"Displays the count of total number of contacts removed from list when user opts for \"all\" option.","example":27,"format":"int64","type":"integer"}},"type":"object"}},"required":["contacts"],"type":"object"},"postSendFailed":{"properties":{"blackListedEmails":{"items":{"description":"Email addresses which are blacklisted. ONLY FOR email-campign's sendTest OR smtp-template's sendTest api's.","example":"jeff.dean@example.com, jim.sue@example.com","format":"email","type":"string"},"type":"array"},"code":{"description":"Response code","example":"invalid_parameter","type":"string"},"message":{"description":"Response message","example":"The email could not be sent to all recipients","type":"string"},"unexistingEmails":{"items":{"description":"Email addresses you tried to sent an email to, but not existing in your contacts","example":"matthew.dow@example.com, elisa.carrely@example.com","format":"email","type":"string"},"type":"array"},"withoutListEmails":{"items":{"description":"Email addresses you sent an email to, without a contact list","example":"jeff.dean@example.com, jim.sue@example.com","format":"email","type":"string"},"type":"array"}},"required":["code","message"],"type":"object"},"sendTestEmail":{"properties":{"emailTo":{"description":"List of the email addresses of the recipients whom you wish to send the test mail. _If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day_.\n","items":{"description":"Email addres of the recipient","example":"helen.jurger@example.com","format":"email","type":"string"},"type":"array"}},"type":"object"}},"securitySchemes":{"api-key":{"description":"The API key should be passed in the request headers as `api-key` for authentication.","in":"header","name":"api-key","type":"apiKey"}}},"security":[{"api-key":[]}],"tags":[],"paths":{"/account":{"get":{"operationId":"getAccount","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"organization_id":"5fa2b8c123456789abcdef01","user_id":1234567,"enterprise":false,"address":{"city":"New York","country":"United States","street":"456 Business Ave","zipCode":"10001"},"companyName":"Acme Marketing Corp","email":"michael.davis@example.com","firstName":"Michael","lastName":"Davis","marketingAutomation":{"enabled":true,"key":"ma8k2x9v4h7p3d6f1c5e8b2a"},"plan":[{"credits":250,"creditsType":"sendLimit","type":"free"},{"credits":15,"creditsType":"sendLimit","type":"sms"}],"planVerticals":[{"planCategory":"Marketing","planType":"free","name":"Free","status":"active","startDate":"1751234567","endDate":"1753826567","users":{"purchasedSeats":"1","usedSeats":"1"},"credits":"250"},{"planCategory":"Chat","planType":"free","name":"Free","status":"active","startDate":"1735678901","endDate":"1767214901","users":{"purchasedSeats":"1","usedSeats":"1"}},{"planCategory":"CRM","planType":"free","name":"Free","status":"active","startDate":"1735678900","endDate":"1767214900","users":{"purchasedSeats":"1","usedSeats":"1"}}],"relay":{"data":{"port":587,"relay":"smtp-relay.brevo.com","userName":"michael.davis@example.com"},"enabled":true}}}},"schema":{"allOf":[{"allOf":[{"properties":{"organization_id":{"description":"Unique identifier for the organization","example":"5fa2b8c123456789abcdef01","type":"string"},"user_id":{"description":"Unique identifier for the user","example":1234567,"type":"integer"},"enterprise":{"description":"Indicates if the account has enterprise features","example":false,"type":"boolean"},"companyName":{"description":"Name of the company","example":"Acme Marketing Corp","type":"string"},"email":{"description":"Login Email","example":"michael.davis@example.com","format":"email","type":"string"},"firstName":{"description":"First Name","example":"Michael","type":"string"},"lastName":{"description":"Last Name","example":"Davis","type":"string"}},"required":["organization_id","user_id","enterprise","companyName","email","firstName","lastName"],"type":"object"},{"properties":{"address":{"description":"Address informations","properties":{"city":{"description":"City information","example":"New York","type":"string"},"country":{"description":"Country information","example":"United States","type":"string"},"street":{"description":"Street information","example":"456 Business Ave","type":"string"},"zipCode":{"description":"Zip Code information","example":"10001","type":"string"}},"required":["city","country","street","zipCode"],"type":"object"}},"type":"object"}]},{"properties":{"marketingAutomation":{"properties":{"enabled":{"description":"Status of Marketing Automation Plateform activation\nfor your account (true=enabled, false=disabled)","example":false,"type":"boolean"},"key":{"description":"Marketing Automation Tracker ID","example":"ma8k2x9v4h7p3d6f1c5e8b2a","type":"string"}},"required":["enabled"],"type":"object"},"plan":{"description":"Information about your plans and credits","items":{"properties":{"credits":{"description":"Remaining credits of the user","example":250,"format":"float","type":"number"},"creditsType":{"description":"This is the type of the credit, \"Send Limit\" is one\nof the possible types of credit of a user. \"Send\nLimit\" implies the total number of emails you can\nsend to the subscribers in your account.","enum":["sendLimit"],"example":"sendLimit","type":"string"},"endDate":{"description":"Date of the period from which the plan will end\n(Unix timestamp format)","example":"1753826567","type":"string"},"startDate":{"description":"Date of the period from which the plan will start\n(Unix timestamp format)","example":"1751234567","type":"string"},"type":{"description":"Displays the plan type of the user","enum":["payAsYouGo","free","subscription","sms"],"example":"subscription","type":"string"}},"required":["credits","creditsType","type"],"type":"object"},"type":"array"},"planVerticals":{"description":"Detailed information about different plan categories","items":{"properties":{"planCategory":{"description":"Category of the plan","enum":["Marketing","Chat","CRM"],"example":"Marketing","type":"string"},"planType":{"description":"Type of plan within the category","example":"free","type":"string"},"name":{"description":"Name of the plan","example":"Free","type":"string"},"status":{"description":"Current status of the plan","enum":["active","inactive"],"example":"active","type":"string"},"startDate":{"description":"Plan start date (Unix timestamp)","example":"1751234567","type":"string"},"endDate":{"description":"Plan end date (Unix timestamp)","example":"1753826567","type":"string"},"users":{"description":"User seat information for the plan","properties":{"purchasedSeats":{"description":"Number of purchased user seats","example":"1","type":"string"},"usedSeats":{"description":"Number of used user seats","example":"1","type":"string"}},"required":["purchasedSeats","usedSeats"],"type":"object"},"credits":{"description":"Credits allocated for this plan category (optional, may not be present for all plan categories)","example":"250","type":"string"}},"required":["planCategory","planType","name","status"],"type":"object"},"type":"array"},"relay":{"description":"Information about your transactional email account","properties":{"data":{"description":"Data regarding the transactional email account","properties":{"port":{"description":"Port used for SMTP Relay","example":587,"type":"integer"},"relay":{"description":"URL of the SMTP Relay","example":"smtp-relay.brevo.com","type":"string"},"userName":{"description":"Email to use as login on transactional platform","example":"michael.davis@example.com","format":"email","type":"string"}},"required":["port","relay","userName"],"type":"object"},"enabled":{"description":"Status of your transactional email Account\n(true=Enabled, false=Disabled)","example":true,"type":"boolean"}},"required":["data","enabled"],"type":"object"}},"required":["plan","relay"],"type":"object"}]}}},"description":"Account information retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get account details","description":"Retrieves details of your Brevo account.\n\n**Use this to:**\n- Get account information (email, name, company, address)\n- Check plan details (type, credits, expiration)\n- Get relay information (for transactional emails)\n- Check Marketing Automation status\n- Access organization and user identifiers\n\n**Key information returned:**\n- Complete account details (organization ID, user ID, company information)\n- Address and contact information\n- Plan configurations and credit allocations across different verticals\n- Marketing Automation settings and tracker key (when enabled)\n- SMTP relay configuration for transactional emails\n- Enterprise features availability status\n\n**Important considerations:**\n- Provides comprehensive account overview for billing and configuration management\n- Essential for understanding current plan limitations and feature availability\n- Marketing Automation key is only returned when Marketing Automation is enabled on the account\n- Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories (only returned when plan verticals are available)\n- Relay configuration crucial for transactional email setup and deliverability\n- Enterprise status determines access to advanced features and sub-account management\n","tags":["Account"],"parameters":[]}},"/organization/activities":{"get":{"summary":"Get user activity logs","operationId":"getAccountActivity","parameters":[{"description":"Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD)\nformat to filter the activity in your account. Maximum time period that\ncan be selected is one month. Additionally, you can retrieve activity\nlogs from the past 12 months from the date of your search.","in":"query","name":"startDate","required":false,"schema":{"type":"string"}},{"description":"Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD)\nformat to filter the activity in your account. Maximum time period that\ncan be selected is one month.","in":"query","name":"endDate","required":false,"schema":{"type":"string"}},{"description":"Enter the user's email address to filter their activity in the account.","in":"query","name":"email","required":false,"schema":{"type":"string"}},{"description":"Number of documents per page","in":"query","name":"limit","required":false,"schema":{"default":10,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"description":"Index of the first document in the page.","in":"query","name":"offset","required":false,"schema":{"default":0,"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"logs":[{"action":"login-success","date":"2023-03-16T16:49:23+05:30","user_agent":"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)","user_email":"test@mycompany.com","user_ip":"192.158.1.34"},{"action":"update-profile","count":2,"date":"2023-03-15T16:49:23+05:30","user_agent":"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)","user_email":"test@myexample.com","user_ip":"192.158.1.38"}]}}},"schema":{"properties":{"logs":{"description":"Get user activity logs","items":{"properties":{"action":{"description":"Type of activity in the account.","example":"login-success","type":"string"},"date":{"description":"Time of the activity.","example":"2023-03-27T16:30:00Z","type":"string"},"user_agent":{"description":"Browser details of the user who performed the activity.","example":"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)","type":"string"},"user_email":{"description":"Email address of the user who performed activity in the\naccount.","example":"test@mycompany.com","type":"string"},"user_ip":{"description":"IP address of the user who performed activity in the\naccount.","example":"192.158.1.38","type":"string"}},"required":["action","date","user_email","user_ip","user_agent"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"list of user activity logs"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves user activity logs from your organization for security monitoring and audit compliance.\n\nUse this to:\n- Monitor user login activities and access patterns\n- Track account modifications and configuration changes\n- Generate security audit reports and compliance documentation\n- Investigate suspicious activities and unauthorized access\n- Monitor team member actions and account usage\n\nKey information returned:\n- Complete user activity details and timestamps\n- User identification (email, IP address, browser)\n- Action types and activity descriptions\n- Security-relevant events and access logs\n- Historical activity data for audit trails\n\nNote: Requires Enterprise plan for access to organization activity logs.","tags":["Account","Master account"]}},"/processes":{"get":{"operationId":"getProcesses","parameters":[{"description":"Number limitation for the result returned","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":50,"minimum":1,"type":"integer"}},{"description":"Beginning point in the list to retrieve from.","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation.\nDefault order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"processes_response":{"summary":"List of background processes with various statuses","value":{"count":198,"processes":[{"id":217,"name":"IMPORTUSER","status":"completed","info":{"import":{"invalid_emails":null,"duplicate_contact_id":null,"duplicate_ext_id":null,"duplicate_email_id":null,"duplicate_phone_id":null,"duplicate_whatsapp_id":null,"duplicate_landline_number_id":null}}},{"id":213,"name":"SEARCH_EXPORT_USERS","status":"completed","export_url":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv"},{"id":212,"name":"IMPORTUSER","status":"queued"}]}}},"schema":{"properties":{"count":{"description":"Total number of processes available on your account","example":198,"format":"int64","type":"integer"},"processes":{"description":"List of background processes on your account","items":{"properties":{"id":{"description":"Unique identifier of the process","example":217,"format":"int64","type":"integer"},"name":{"description":"Name/type of the process","enum":["IMPORTUSER","SEARCH_EXPORT_USERS","TRANS-CALC","TRANS-GLOBAL-CALC","CAMPAIGN_PROCESSING","LIST_EXPORT","CONTACT_EXPORT"],"example":"IMPORTUSER","type":"string"},"status":{"description":"Current status of the process","enum":["queued","processing","completed","failed","cancelled"],"example":"completed","type":"string"},"info":{"description":"Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records.","properties":{"import":{"description":"Import process details with URLs to CSV reports","properties":{"invalid_emails":{"description":"URL to CSV file containing invalid email addresses, or null if none","type":"string","nullable":true},"duplicate_contact_id":{"description":"URL to CSV file containing duplicate contact IDs, or null if none","type":"string","nullable":true},"duplicate_ext_id":{"description":"URL to CSV file containing duplicate external IDs, or null if none","type":"string","nullable":true},"duplicate_email_id":{"description":"URL to CSV file containing duplicate email IDs, or null if none","type":"string","nullable":true},"duplicate_phone_id":{"description":"URL to CSV file containing duplicate phone numbers, or null if none","type":"string","nullable":true},"duplicate_whatsapp_id":{"description":"URL to CSV file containing duplicate WhatsApp numbers, or null if none","type":"string","nullable":true},"duplicate_landline_number_id":{"description":"URL to CSV file containing duplicate landline numbers, or null if none","type":"string","nullable":true}},"type":"object"}},"type":"object"},"export_url":{"description":"Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types)","example":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv","format":"url","type":"string"}},"required":["id","name","status"],"type":"object"},"type":"array"}},"required":["count","processes"],"type":"object"}}},"description":"Background processes retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get background processes","description":"Retrieves a list of background processes from your Brevo account with filtering and pagination.\n\n**Use this to:**\n- Monitor background process activity and status\n- Track long-running operations and tasks\n- Find process IDs for detailed status checking\n- Review process history and performance\n- Identify failed or stuck processes for troubleshooting\n\n**Key information returned:**\n- Process details (ID, name, status)\n- Export download URLs for completed export processes\n- Import details with CSV report URLs for completed import processes\n- Total count of processes for pagination\n\n**Important considerations:**\n- Background processes handle long-running operations like imports and exports\n- Process status indicates current state (queued, processing, completed)\n- Export processes provide download URLs when completed\n- Import processes provide CSV report URLs with details about problematic records\n- Use pagination for accounts with many historical processes\n- Sort options available for creation order (ascending or descending)\n- Default limit is 10 results per page, maximum is 50\n","tags":["Process"]}},"/processes/{processId}":{"get":{"operationId":"getProcess","parameters":[{"description":"Id of the process","in":"path","name":"processId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"queued_process":{"summary":"Process currently in queue","value":{"id":217,"name":"IMPORTUSER","status":"queued"}},"completed_import_process":{"summary":"Completed import process with details","value":{"id":217,"name":"IMPORTUSER","status":"completed","info":{"import":{"invalid_emails":null,"duplicate_contact_id":null,"duplicate_ext_id":null,"duplicate_email_id":null,"duplicate_phone_id":null,"duplicate_whatsapp_id":null,"duplicate_landline_number_id":null}}}},"completed_export_process":{"summary":"Completed export process with download URL","value":{"id":213,"name":"SEARCH_EXPORT_USERS","status":"completed","export_url":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv"}}},"schema":{"properties":{"id":{"description":"Unique identifier of the process","example":217,"format":"int64","type":"integer"},"name":{"description":"Name/type of the process","enum":["IMPORTUSER","SEARCH_EXPORT_USERS","TRANS-CALC","TRANS-GLOBAL-CALC","CAMPAIGN_PROCESSING","LIST_EXPORT","CONTACT_EXPORT"],"example":"IMPORTUSER","type":"string"},"status":{"description":"Current status of the process","enum":["queued","processing","completed","failed","cancelled"],"example":"completed","type":"string"},"info":{"description":"Additional process information, only returned for completed IMPORTUSER processes. Contains URLs to CSV files with details about problematic records.","properties":{"import":{"description":"Import process details with URLs to CSV reports","properties":{"invalid_emails":{"description":"URL to CSV file containing invalid email addresses, or null if none","type":"string","nullable":true},"duplicate_contact_id":{"description":"URL to CSV file containing duplicate contact IDs, or null if none","type":"string","nullable":true},"duplicate_ext_id":{"description":"URL to CSV file containing duplicate external IDs, or null if none","type":"string","nullable":true},"duplicate_email_id":{"description":"URL to CSV file containing duplicate email IDs, or null if none","type":"string","nullable":true},"duplicate_phone_id":{"description":"URL to CSV file containing duplicate phone numbers, or null if none","type":"string","nullable":true},"duplicate_whatsapp_id":{"description":"URL to CSV file containing duplicate WhatsApp numbers, or null if none","type":"string","nullable":true},"duplicate_landline_number_id":{"description":"URL to CSV file containing duplicate landline numbers, or null if none","type":"string","nullable":true}},"type":"object"}},"type":"object"},"export_url":{"description":"Download URL for completed export processes (returned for SEARCH_EXPORT_USERS, SEARCH_EXPORT_USERS_API, CAMPAIGN_USER_DETAILS, and EXPORT_WEBHOOK process types)","example":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv","format":"url","type":"string"}},"required":["id","name","status"],"type":"object"}}},"description":"Process information retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"examples":{"process_not_found":{"summary":"Process ID not found","value":{"code":"document_not_found","message":"processId not found"}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Process ID not found"}},"summary":"Get process details","description":"Retrieves detailed information about a specific background process.\n\n**Use this to:**\n- Get detailed status of a specific process\n- Monitor process progress and completion\n- Download results from completed export processes\n- Check error details for failed processes\n- Track process execution times\n\n**Key information returned:**\n- Complete process details (ID, name, status)\n- Download URLs for completed export processes\n- Import details with CSV report URLs for completed import processes\n\n**Important considerations:**\n- Process ID must exist in your account and not be deleted\n- Completed export processes include download URLs\n- Completed import processes include CSV report URLs with details about problematic records\n- Different process types return different result structures\n","tags":["Process"]}},"/senders":{"get":{"operationId":"getSenders","parameters":[{"description":"Filter your senders for a specific ip. **Available for dedicated IP usage only**\n","in":"query","name":"ip","schema":{"type":"string"}},{"description":"Filter your senders for a specific domain","in":"query","name":"domain","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"standard_account_example":{"summary":"Typical response for standard accounts (no dedicated IPs)","value":{"senders":[{"active":true,"email":"support@example.com","id":1,"ips":[],"name":"Support Team"},{"active":false,"email":"hello@example.com","id":3,"ips":[],"name":"Customer Service"},{"active":false,"email":"marketing@testcompany.com","id":5,"ips":[],"name":"Marketing Team"}]}},"dedicated_ip_example":{"summary":"Example response for accounts with dedicated IPs","value":{"senders":[{"active":true,"email":"marketing@example.com","id":10,"ips":[{"domain":"example.com","ip":"203.0.113.100","weight":100}],"name":"Marketing"},{"active":false,"email":"newsletter@example.com","id":11,"ips":[{"domain":"example.com","ip":"203.0.113.100","weight":50},{"domain":"news.example.com","ip":"203.0.113.101","weight":50}],"name":"Newsletter"}]}}},"schema":{"properties":{"senders":{"description":"List of the senders available in your account","items":{"properties":{"active":{"description":"Status of sender (true=activated, false=deactivated)","example":true,"type":"boolean"},"email":{"description":"From Email associated to the sender","example":"support@example.com","format":"email","type":"string"},"id":{"description":"Id of the sender","example":1,"format":"int64","type":"integer"},"ips":{"description":"List of dedicated IP(s) available in the account. This\ndata is displayed only for dedicated IPs. For standard accounts,\nthis will be an empty array.","items":{"properties":{"domain":{"description":"Domain of the IP","example":"example.com","type":"string"},"ip":{"description":"Dedicated IP available in your account","example":"203.0.113.100","type":"string"},"weight":{"description":"Weight of the IP for this sender","example":50,"format":"int64","type":"integer"}},"required":["domain","ip","weight"],"type":"object"},"type":"array"},"name":{"description":"From Name associated to the sender","example":"Support Team","type":"string"}},"required":["active","email","id","name","ips"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"List of senders retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get email senders","description":"Retrieves a list of all email senders from your Brevo account with optional filtering.\n\n**Use this to:**\n- Get all available senders for email campaign setup\n- Find sender details including ID, name, and email address\n- Filter senders by IP address for dedicated IP users\n- Filter senders by domain for domain-specific configurations\n- Monitor sender configuration and status\n\n**Key information returned:**\n- Sender details (ID, name, email address)\n- Sender status and verification information\n- Associated IP addresses and domains (for dedicated IP accounts)\n- Sender configuration settings\n\n**Important considerations:**\n- Standard accounts show empty IP arrays, dedicated IP accounts show IP assignments\n- Filtering by IP only available for accounts with dedicated IPs\n- Domain filtering helps organize senders by business units or brands\n- Sender status indicates if sender is active and ready for campaign use\n- Email verification required before sender can be used in campaigns\n","tags":["Senders"]},"post":{"operationId":"createSender","requestBody":{"content":{"application/json":{"examples":{"basic_sender":{"summary":"Basic sender creation (standard account)","value":{"email":"support@example.com","name":"Support Team"}},"sender_with_dedicated_ip":{"summary":"Sender with dedicated IP configuration","value":{"email":"marketing@example.com","name":"Marketing Team","ips":[{"domain":"example.com","ip":"203.0.113.100","weight":100}]}},"sender_with_multiple_ips":{"summary":"Sender with multiple dedicated IPs and weight distribution","value":{"email":"newsletter@example.com","name":"Newsletter","ips":[{"domain":"example.com","ip":"203.0.113.100","weight":60},{"domain":"news.example.com","ip":"203.0.113.101","weight":40}]}}},"schema":{"properties":{"email":{"description":"From email to use for the sender. A verification email will be\nsent to this address.","example":"support@example.com","format":"email","type":"string"},"ips":{"description":"**Mandatory in case of dedicated IP**. IPs to associate to the\nsender. Not required for standard accounts.","items":{"properties":{"domain":{"description":"Domain of the IP","example":"example.com","type":"string"},"ip":{"description":"Dedicated IP available in your account","example":"203.0.113.100","type":"string"},"weight":{"description":"Weight to apply to the IP. Sum of all IP weights must be\n100. Should be passed for either ALL or NONE of the IPs.\nIf it's not passed, the sending will be equally balanced\non all IPs.","example":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},"required":["domain","ip"],"type":"object"},"type":"array"},"name":{"description":"From Name to use for the sender","example":"Support Team","type":"string"}},"required":["email","name"],"type":"object"}}},"description":"sender's configuration","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"successful_creation":{"summary":"Successful sender creation response","value":{"id":15,"dkimError":false,"spfError":false}},"creation_with_config_issues":{"summary":"Sender created but with configuration warnings","value":{"id":16,"dkimError":true,"spfError":false}}},"schema":{"properties":{"dkimError":{"description":"Status of DKIM configuration for the sender (true = DKIM not\nwell configured, false = DKIM well configured)","example":false,"type":"boolean"},"id":{"description":"ID of the Sender created","example":15,"format":"int64","type":"integer"},"spfError":{"description":"Status of SPF configuration for the sender (true = SPF not\nwell configured, false = SPF well configured)","example":false,"type":"boolean"}},"required":["id"],"type":"object"}}},"description":"Sender created successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create email sender","description":"Creates a new email sender in your Brevo account.\n\n**Use this to:**\n- Add new senders for email campaigns\n- Configure sender identity (name and email)\n- Associate dedicated IPs with the sender (for dedicated IP accounts)\n- Set up domain-based sender configurations\n\n**Key information returned:**\n- Created sender ID\n- DKIM and SPF configuration status\n- Success confirmation\n\n**Important considerations:**\n- Verification email sent to specified sender address\n- DKIM and SPF configuration affects deliverability\n- Dedicated IP accounts require IP association during creation\n- IP weights must sum to 100 when specified\n- Sender must be verified before use in campaigns\n","tags":["Senders"],"x-codegen-request-body-name":"sender","parameters":[]}},"/senders/domains":{"get":{"summary":"Get the list of all sender domains","operationId":"getDomains","responses":{"200":{"content":{"application/json":{"examples":{"domains_response":{"summary":"List of domains with various authentication states","value":{"domains":[{"id":"67e57b40130375f045064c45","domain_name":"mycompany.com","authenticated":true,"verified":true,"ip":"192.168.1.100","provider":"Cloudflare","creator":{"id":"62e4fce597550d0b0177cb0c","email":"admin@mycompany.com","creationDate":"2025-03-27T16:22:24+00:00"}},{"id":"67f778570dd65f97c70910ed","domain_name":"newsletter.mycompany.com","authenticated":false,"verified":true,"ip":null,"provider":"GoDaddy","creator":{"id":"62e4fce597550d0b0177cb0c","email":"admin@mycompany.com","creationDate":"2025-04-10T07:50:47+00:00"}},{"id":"688cd306d8893504e50ea615","domain_name":"test.example.com","authenticated":false,"verified":false,"ip":null,"provider":"Other","creator":{"id":"62e4fce597550d0b0177cb0c","email":"admin@mycompany.com","creationDate":"2025-08-01T14:45:26+00:00"}}],"count":3,"current_page":1,"total_pages":1}}},"schema":{"properties":{"domains":{"description":"List of the domains available in your account","items":{"properties":{"id":{"description":"Unique identifier of the domain","example":"67e57b40130375f045064c45","type":"string"},"domain_name":{"description":"Domain name","example":"mycompany.com","type":"string"},"authenticated":{"description":"Status of domain authentication (true=authenticated,\nfalse=non authenticated)","example":true,"type":"boolean"},"verified":{"description":"Status of domain verification (true=verified, false=non\nverified)","example":true,"type":"boolean"},"ip":{"description":"Dedicated IP associated with domain (null if none)","example":"192.168.1.100","type":"string","nullable":true},"provider":{"description":"DNS provider for the domain","example":"Cloudflare","type":"string"},"creator":{"description":"Information about who created the domain","properties":{"id":{"description":"Creator's user ID","example":"62e4fce597550d0b0177cb0c","type":"string"},"email":{"description":"Creator's email address","example":"admin@mycompany.com","type":"string"},"creationDate":{"description":"Domain creation date","example":"2025-03-27T16:22:24+00:00","type":"string","format":"date-time"}},"required":["id","email","creationDate"],"type":"object"}},"required":["id","domain_name","authenticated","verified","provider","creator"],"type":"object"},"type":"array"},"count":{"description":"Total number of domains","example":23,"type":"integer"},"current_page":{"description":"Current page number","example":1,"type":"integer"},"total_pages":{"description":"Total number of pages","example":1,"type":"integer"}},"required":["domains","count","current_page","total_pages"],"type":"object"}}},"description":"List of domains retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves all domains associated with the account.\n\nUse this to:\n- List all domains\n- Verify domain existence\n- Check domain authentication and verification status\n- Monitor domain configuration and provider information\n- Review domain creation history and ownership\n\nKey information returned:\n- Domain details (ID, name, authentication status)\n- Verification and authentication states\n- Associated IP addresses and DNS providers\n- Creator information and creation timestamps\n- Pagination information for large domain lists","tags":["Domains"],"parameters":[]},"post":{"summary":"Create a new sender domain","operationId":"createDomain","requestBody":{"content":{"application/json":{"examples":{"basic_domain":{"summary":"Create a basic domain","value":{"name":"mycompany.com"}},"subdomain":{"summary":"Create a subdomain","value":{"name":"newsletter.mycompany.com"}},"test_domain":{"summary":"Create a test domain","value":{"name":"test.example.com"}}},"schema":{"properties":{"name":{"description":"Domain name to be added","example":"mycompany.com","type":"string","format":"hostname"}},"required":["name"],"type":"object"}}},"description":"Domain configuration","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"successful_creation":{"summary":"Successful domain creation with DNS records","value":{"id":5,"domain_name":"mycompany.com","domain_provider":"Cloudflare","message":"Domain added successfully. To authenticate it, add following DNS records","dns_records":{"brevo_code":{"host_name":"@","type":"TXT","value":"brevo-code=abc123def456","status":false},"dkim_record":{"host_name":"mail._domainkey","type":"TXT","value":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","status":false},"dmarc_record":{"host_name":"_dmarc","type":"TXT","value":"v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com","status":false}}}},"creation_with_provider_detection":{"summary":"Domain creation with automatic provider detection","value":{"id":6,"domain_name":"example.com","domain_provider":"GoDaddy","message":"Domain added successfully. To authenticate it, add following DNS records","dns_records":{"brevo_code":{"host_name":"@","type":"TXT","value":"brevo-code=xyz789abc123","status":false},"dkim_record":{"host_name":"mail._domainkey","type":"TXT","value":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","status":false},"dmarc_record":{"host_name":"_dmarc","type":"TXT","value":"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com","status":false}}}}},"schema":{"properties":{"id":{"description":"ID of the Domain created","example":5,"format":"int64","type":"integer"},"domain_name":{"description":"Domain name","example":"mycompany.com","type":"string"},"domain_provider":{"description":"Detected domain provider","example":"Cloudflare","type":"string"},"message":{"description":"Success message with next steps","example":"Domain added successfully. To authenticate it, add following DNS records","type":"string"},"dns_records":{"description":"DNS records required for domain authentication","properties":{"brevo_code":{"description":"Brevo verification code record","properties":{"host_name":{"description":"DNS record hostname","example":"@","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"brevo-code=abc123def456","type":"string"},"status":{"description":"Whether the record is properly configured","example":false,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"},"dkim_record":{"description":"DKIM authentication record","properties":{"host_name":{"description":"DNS record hostname","example":"mail._domainkey","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","type":"string"},"status":{"description":"Whether the record is properly configured","example":false,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"},"dmarc_record":{"description":"DMARC policy record","properties":{"host_name":{"description":"DNS record hostname","example":"_dmarc","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"v=DMARC1; p=none; rua=mailto:dmarc@mycompany.com","type":"string"},"status":{"description":"Whether the record is properly configured","example":false,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"}},"required":["brevo_code","dkim_record","dmarc_record"],"type":"object"}},"required":["id","domain_name","message"],"type":"object"}}},"description":"Domain created successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Creates a new domain in Brevo.\n\nUse this to:\n- Add new domains for sending emails\n- Set up domain authentication for better deliverability\n- Configure DNS records for email authentication\n- Establish domain-based sender identities\n\nKey information returned:\n- Created domain ID and configuration\n- Required DNS records for authentication\n- Domain provider detection results\n- Setup instructions and next steps","tags":["Domains"],"x-codegen-request-body-name":"domain","parameters":[]}},"/senders/domains/{domainName}":{"delete":{"summary":"Delete a sender domain","operationId":"deleteDomain","parameters":[{"description":"Domain name","in":"path","name":"domainName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{},"description":"Domain deleted successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Deletes a domain from Brevo.\n\nUse this to:\n- Remove existing domains\n- Clean up unused domain configurations\n- Remove test domains\n\nKey information returned:\n- Success confirmation message","tags":["Domains"]},"get":{"summary":"Get a sender domain configuration","operationId":"getDomainConfiguration","parameters":[{"description":"Domain name","in":"path","name":"domainName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"authenticated_domain":{"summary":"Fully authenticated domain configuration","value":{"domain":"mycompany.com","verified":true,"authenticated":true,"dns_records":{"brevo_code":{"host_name":"@","type":"TXT","value":"brevo-code=abc123def456","status":true},"dkim_record":{"host_name":"mail._domainkey","type":"TXT","value":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","status":true},"dmarc_record":{"host_name":"_dmarc","type":"TXT","value":"v=DMARC1; p=quarantine; rua=mailto:dmarc@mycompany.com","status":true}}}},"partially_configured_domain":{"summary":"Domain with incomplete DNS configuration","value":{"domain":"test.example.com","verified":false,"authenticated":false,"dns_records":{"brevo_code":{"host_name":"@","type":"TXT","value":"brevo-code=xyz789abc123","status":false},"dkim_record":{"host_name":"mail._domainkey","type":"TXT","value":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","status":true},"dmarc_record":{"host_name":"_dmarc","type":"TXT","value":"v=DMARC1; p=none; rua=mailto:dmarc@example.com","status":false}}}}},"schema":{"properties":{"domain":{"description":"Domain name","example":"mycompany.com","type":"string"},"verified":{"description":"Status of domain verification (true=verified, false=non\nverified)","example":true,"type":"boolean"},"authenticated":{"description":"Status of domain authentication (true=authenticated, false=non\nauthenticated)","example":false,"type":"boolean"},"dns_records":{"description":"DNS records configuration and status","properties":{"brevo_code":{"description":"Brevo verification code record","properties":{"host_name":{"description":"DNS record hostname","example":"@","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"brevo-code=abc123def456","type":"string"},"status":{"description":"Whether the record is properly configured","example":true,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"},"dkim_record":{"description":"DKIM authentication record","properties":{"host_name":{"description":"DNS record hostname","example":"mail._domainkey","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GN...","type":"string"},"status":{"description":"Whether the record is properly configured","example":true,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"},"dmarc_record":{"description":"DMARC policy record","properties":{"host_name":{"description":"DNS record hostname","example":"_dmarc","type":"string"},"type":{"description":"DNS record type","example":"TXT","type":"string"},"value":{"description":"DNS record value","example":"v=DMARC1; p=quarantine; rua=mailto:dmarc@mycompany.com","type":"string"},"status":{"description":"Whether the record is properly configured","example":true,"type":"boolean"}},"required":["host_name","type","value","status"],"type":"object"}},"required":["brevo_code","dkim_record","dmarc_record"],"type":"object"}},"required":["domain","verified","authenticated","dns_records"],"type":"object"}}},"description":"Domain configuration retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves configuration of a specific domain, to know if the domain is valid or not.\n\nUse this to:\n- Check domain configuration\n- Validate a domain configuration\n- Monitor DNS record status\n- Troubleshoot authentication issues\n\nKey information returned:\n- Domain verification and authentication status\n- DNS records configuration and validation status\n- Detailed authentication requirements","tags":["Domains"]}},"/senders/domains/{domainName}/authenticate":{"put":{"summary":"Authenticate a sender domain","operationId":"authenticateDomain","parameters":[{"description":"Domain name","in":"path","name":"domainName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"successful_authentication":{"summary":"Successful domain authentication","value":{"domain_name":"mycompany.com","message":"Domain has been authenticated successfully."}},"authentication_completed":{"summary":"Authentication process completed","value":{"domain_name":"newsletter.example.com","message":"Domain authentication completed. Your domain is now ready for sending."}}},"schema":{"properties":{"domain_name":{"description":"Domain name that was authenticated","example":"mycompany.com","type":"string"},"message":{"description":"Success message confirming authentication","example":"Domain has been authenticated successfully.","type":"string"}},"required":["domain_name","message"],"type":"object"}}},"description":"Domain authenticated successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Authenticates a specific domain.\n\nUse this to:\n- Authenticate a domain\n- Verify DNS record configuration\n- Complete domain setup for sending\n- Enable domain for email authentication\n\nKey information returned:\n- Authentication success confirmation\n- Domain readiness status for email sending","tags":["Domains"]}},"/senders/ips":{"get":{"summary":"Get all the dedicated IPs for your account","operationId":"getIps","responses":{"200":{"content":{"application/json":{"examples":{"standard_account_response":{"summary":"Standard account with no dedicated IPs","value":{"ips":[]}},"dedicated_ip_account_response":{"summary":"Account with dedicated IPs configured","value":{"ips":[{"active":true,"domain":"mailing.enterprise.com","ip":"192.168.1.100"},{"active":true,"domain":"newsletter.enterprise.com","ip":"192.168.1.101"},{"active":false,"domain":"notifications.enterprise.com","ip":"192.168.1.102"}]}}},"schema":{"properties":{"ips":{"description":"Dedicated IP(s) available on your account. Returns empty array\nfor standard accounts without dedicated IPs.","items":{"properties":{"id":{"description":"ID of the dedicated IP","example":1,"format":"int64","type":"integer"},"active":{"description":"Status of the IP (true=active, false=inactive)","example":true,"type":"boolean"},"domain":{"description":"Domain associated to the IP","example":"mailing.enterprise.com","type":"string"},"ip":{"description":"Dedicated IP address","example":"192.168.1.100","type":"string"}},"required":["id","active","domain","ip"],"type":"object"},"type":"array"}},"required":["ips"],"type":"object"}}},"description":"List of dedicated IPs retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves all dedicated IPs associated with your Brevo account.\n\nUse this to:\n- List all your dedicated IPs\n- Check the status of your dedicated IPs (active/inactive)\n- Find IP addresses and associated domains for configuration purposes\n- Monitor your IP reputation and deliverability\n- Verify available IPs for sender configuration\n\nKey information returned:\n- IP ID and address\n- Associated domain\n- Active status\n- IP configuration details","tags":["Senders"],"parameters":[]}},"/senders/{senderId}":{"delete":{"summary":"Delete a sender","operationId":"deleteSender","parameters":[{"description":"Id of the sender","in":"path","name":"senderId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Sender deleted successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Sender ID not found"}},"description":"Deletes an email sender from your Brevo account.\n\nUse this to:\n- Remove senders that are no longer needed\n- Clean up sender configurations\n- Remove duplicate or test senders\n\nKey information returned:\n- Success confirmation message","tags":["Senders"]},"put":{"summary":"Update a sender","operationId":"updateSender","parameters":[{"description":"Id of the sender","in":"path","name":"senderId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"examples":{"update_name_only":{"summary":"Update sender name only","value":{"name":"New Support Team"}},"update_email_only":{"summary":"Update sender email only","value":{"email":"newsupport@mycompany.com"}},"update_name_and_email":{"summary":"Update both name and email","value":{"name":"Marketing Team","email":"marketing@mycompany.com"}},"update_with_dedicated_ip":{"summary":"Update sender with dedicated IP configuration","value":{"name":"Enterprise Marketing","email":"marketing@enterprise.com","ips":[{"domain":"enterprise.com","ip":"192.168.1.100","weight":100}]}},"update_multiple_ips":{"summary":"Update sender with multiple dedicated IPs","value":{"name":"Multi-IP Sender","email":"campaigns@enterprise.com","ips":[{"domain":"enterprise.com","ip":"192.168.1.100","weight":70},{"domain":"mail.enterprise.com","ip":"192.168.1.101","weight":30}]}}},"schema":{"properties":{"email":{"description":"From Email to update the sender","example":"newsupport@mycompany.com","format":"email","type":"string"},"ips":{"description":"**Only in case of dedicated IP**. IPs to associate to the\nsender. If passed, will replace all the existing IPs. Not required for standard accounts.","items":{"properties":{"domain":{"description":"Domain of the IP","example":"mycompany.com","type":"string"},"ip":{"description":"Dedicated IP available in your account","example":"192.168.1.100","type":"string"},"weight":{"description":"Weight to apply to the IP. Sum of all IP weights must be\n100. Should be passed for either ALL or NONE of the IPs.\nIf it's not passed, the sending will be equally balanced\non all IPs.","example":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},"required":["domain","ip"],"type":"object"},"type":"array"},"name":{"description":"From Name to update the sender","example":"Support Team","type":"string"}},"type":"object"}}},"description":"sender's configuration to update","required":false},"responses":{"204":{"content":{},"description":"Sender updated successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Sender ID not found"}},"description":"Updates an existing email sender's configuration.\n\nUse this to:\n- Modify sender display name or email address\n- Update dedicated IP associations\n- Change sender configuration settings\n- Correct sender information\n\nKey information returned:\n- Success confirmation\n- Updated sender details","tags":["Senders"],"x-codegen-request-body-name":"sender"}},"/senders/{senderId}/ips":{"get":{"summary":"Get all the dedicated IPs for a specific sender","operationId":"getIpsFromSender","parameters":[{"description":"Id of the sender","in":"path","name":"senderId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"standard_account_response":{"summary":"Response for standard accounts (no dedicated IPs)","value":{"ips":[]}},"dedicated_ip_response":{"summary":"Response for accounts with dedicated IPs","value":{"ips":[{"domain":"mailing.enterprise.com","id":3,"ip":"192.168.1.100","weight":40},{"domain":"newsletter.enterprise.com","id":5,"ip":"192.168.1.101","weight":60}]}}},"schema":{"properties":{"ips":{"description":"Dedicated IP(s) linked to a sender. Returns empty array for standard accounts\nwithout dedicated IPs.","items":{"properties":{"domain":{"description":"Domain associated to the IP","example":"mailing.enterprise.com","type":"string"},"id":{"description":"ID of the dedicated IP","example":3,"format":"int64","type":"integer"},"ip":{"description":"Dedicated IP address","example":"192.168.1.100","type":"string"},"weight":{"description":"Weight of the IP for this sender","example":75,"format":"int64","type":"integer"}},"required":["domain","id","ip","weight"],"type":"object"},"type":"array"}},"required":["ips"],"type":"object"}}},"description":"List of dedicated IPs retrieved successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Sender ID not found"}},"description":"Retrieves the dedicated IPs associated with a specific sender.\n\nUse this to:\n- Check IP configuration for a sender\n- Verify dedicated IP associations\n- Get IP details for troubleshooting\n- Monitor sender IP configuration\n\nKey information returned:\n- List of associated dedicated IPs\n- IP addresses and domain configurations\n- IP status and settings","tags":["Senders"]}},"/senders/{senderId}/validate":{"put":{"summary":"Validate a sender using OTP","operationId":"validateSenderByOTP","parameters":[{"description":"Id of the sender","in":"path","name":"senderId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"examples":{"valid_otp":{"summary":"Valid OTP for sender validation","value":{"otp":123456}},"another_valid_otp":{"summary":"Another valid OTP example","value":{"otp":789012}}},"schema":{"properties":{"otp":{"description":"6 digit OTP received on email","example":123456,"type":"integer","minimum":100000,"maximum":999999}},"required":["otp"],"type":"object"}}},"description":"OTP verification code","required":true},"responses":{"204":{"content":{},"description":"Sender verified successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Sender ID not found"}},"description":"Validates a sender using the OTP (One-Time Password) received via email.\n\nUse this to:\n- Complete sender verification process\n- Activate a newly created sender\n- Verify ownership of the sender email address\n- Enable the sender for use in email campaigns\n\nKey information returned:\n- Success confirmation of sender verification\n- Sender activation status","tags":["Senders"],"x-codegen-request-body-name":"sender"}},"/webhooks":{"get":{"summary":"Get all webhooks","operationId":"getWebhooks","parameters":[{"description":"Filter on webhook type","in":"query","name":"type","schema":{"default":"transactional","enum":["marketing","transactional","inbound"],"type":"string"}},{"description":"Sort the results in the ascending/descending order of webhook creation","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"webhooks":[{"auth":{"token":"test-auth-token1234","type":"bearer"},"batched":true,"createdAt":"2016-07-18T12:30:09Z","description":"Webhook triggered on campaign openings","events":["opened"],"headers":[{"key":"cf-secret","value":"test-header-value"}],"id":9864,"modifiedAt":"2016-07-18T16:00:50Z","type":"transactional","url":"https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1"},{"createdAt":"2017-02-20T14:30:00Z","description":"Webhook triggered on campaign hard bounces","events":["hardBounce"],"id":22770,"modifiedAt":"2017-02-20T19:00:00Z","type":"marketing","url":"http://exmaple.domain.com/15kxxxxxn1"}]}}},"schema":{"properties":{"webhooks":{"items":{"allOf":[{"$ref":"#/components/schemas/getWebhook"}],"type":"object"},"type":"array"}},"required":["webhooks"],"type":"object"}}},"description":"Webhooks informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves all webhooks from your Brevo account with filtering and sorting options.\n\nUse this to:\n- Monitor webhook configurations and event handling\n- List webhooks by type (transactional, marketing, inbound)\n- Review webhook endpoints and authentication\n- Track webhook creation and modification history\n- Audit webhook event subscriptions\n\nKey information returned:\n- Complete webhook details and configuration\n- Event types and channel subscriptions\n- Authentication and security settings\n- Webhook URLs and custom headers\n- Creation and modification timestamps","tags":["Webhooks"]},"post":{"summary":"Create a webhook","operationId":"createWebhook","requestBody":{"content":{"application/json":{"schema":{"properties":{"auth":{"description":"Add authentication on webhook url","properties":{"token":{"description":"Webhook authentication token","example":"test-auth-token1234","type":"string"},"type":{"description":"Type of authentication","example":"bearer","type":"string"}},"type":"object"},"batched":{"description":"To send batched webhooks","example":true,"type":"boolean"},"channel":{"default":"email","description":"Channel of the webhook","enum":["email","sms"],"example":"email","type":"string"},"description":{"description":"Description of the webhook","example":"Webhook triggered on unsubscription","type":"string"},"domain":{"description":"Inbound domain of webhook, required in case of event type\n`inbound`","example":"example.com","type":"string"},"events":{"description":"Events triggering the webhook. Required for transactional and\nmarketing types, optional for inbound type (defaults to\n`inboundEmailProcessed`). Possible values for **Transactional**\ntype webhook: `sent` OR `request`, `delivered`, `hardBounce`,\n`softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`,\n`opened`, `uniqueOpened` and `unsubscribed`. Possible values for\n**Marketing** type webhook: `spam`, `opened`, `click`,\n`hardBounce`, `softBounce`, `unsubscribed`, `listAddition`,\n`delivered`, `contactUpdated` & `contactDeleted`. Possible values\nfor **Inbound** type webhook: `inboundEmailProcessed`.","items":{"enum":["sent","hardBounce","softBounce","blocked","spam","delivered","request","click","invalid","deferred","opened","uniqueOpened","unsubscribed","listAddition","contactUpdated","contactDeleted","inboundEmailProcessed","reply"],"example":"unsubscribed","type":"string"},"type":"array"},"headers":{"description":"Custom headers to be send with webhooks","items":{"properties":{"key":{"description":"Header key name","example":"cf-secret","type":"string"},"value":{"description":"Header value","example":"test-header-value","type":"string"}},"type":"object"},"type":"array"},"type":{"default":"transactional","description":"Type of the webhook","enum":["transactional","marketing","inbound"],"example":"marketing","type":"string"},"url":{"description":"URL of the webhook","example":"http://requestb.in/173lyyx1","format":"url","type":"string"}},"required":["url"],"type":"object"}}},"description":"Values to create a webhook","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"ID of the object created","example":5,"format":"int64","type":"integer"}},"required":["id"],"type":"object"}}},"description":"successfully created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Creates a new webhook to receive real-time notifications for specified events.\n\nUse this to:\n- Set up event notifications for transactional or marketing emails\n- Configure webhook endpoints for campaign tracking\n- Enable real-time monitoring of email delivery status\n- Subscribe to contact list changes and updates\n- Implement custom event handling and automation\n\nKey information returned:\n- Created webhook ID and configuration\n- Success confirmation and setup details","tags":["Webhooks"],"parameters":[]}},"/webhooks/export":{"post":{"description":"<Note>This is an enterprise feature.\n\nTo have it activated please send us a request and we will activate it for your account.</Note>\n\nExports webhook event history to CSV format for analysis and reporting.\n\nUse this to:\n- Generate comprehensive webhook event reports\n- Analyze webhook delivery patterns and success rates\n- Export event data for external analysis tools\n- Create historical reports for compliance and auditing\n- Track webhook performance and reliability metrics\n\nKey information returned:\n- Process ID for tracking export completion\n- CSV file will be delivered to specified webhook URL","summary":"Export webhook event history as CSV file","operationId":"exportWebhooksHistory","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"days":{"description":"Number of days in the past including today (positive\ninteger). _Not compatible with 'startDate' and 'endDate'_","example":7,"type":"integer"},"email":{"description":"Filter the history for a specific email","example":"example@brevo.com","type":"string"},"endDate":{"description":"Mandatory if startDate is used. Ending date of the report\n(YYYY-MM-DD). Must be greater than equal to startDate","example":"2023-02-17","type":"string"},"event":{"description":"Filter the history for a specific event type","enum":["invalid_parameter","missing_parameter","hardBounce","softBounce","delivered","spam","request","opened","click","invalid","deferred","blocked","unsubscribed","error","uniqueOpened","loadedByProxy","allEvents"],"example":"request","type":"string"},"messageId":{"description":"Filter the history for a specific message id. Applicable\nonly for transactional webhooks.","example":"<23befbae-1505-47a8-bd27-e30ef739f32c@fr.sib>","type":"string"},"notifyURL":{"description":"Webhook URL to receive CSV file link","example":"https://brevo.com","type":"string"},"sort":{"description":"Sorting order of records (asc or desc)","example":"desc","type":"string"},"startDate":{"description":"Mandatory if endDate is used. Starting date of the history\n(YYYY-MM-DD). Must be lower than equal to endDate","example":"2023-02-13","type":"string"},"type":{"description":"Filter the history based on webhook type","enum":["transactional","marketing"],"example":"transactional","type":"string"},"webhookId":{"description":"Filter the history for a specific webhook id","example":2345,"type":"integer"}},"required":["event","notifyURL","type"],"type":"object"}]}}},"description":"Values to submit for webhooks history","required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"processId":{"description":"Id of the process created","example":78,"format":"int64","type":"integer"}},"required":["processId"],"type":"object"}}},"description":"process id created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"tags":["Webhooks"],"parameters":[]}},"/webhooks/{webhookId}":{"delete":{"summary":"Delete a webhook","operationId":"deleteWebhook","parameters":[{"description":"Id of the webhook","in":"path","name":"webhookId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Webhook deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Permanently deletes a webhook and stops all event notifications.\n\nUse this to:\n- Remove unused or obsolete webhook configurations\n- Clean up webhook endpoints and subscriptions\n- Stop event notifications to specific URLs\n- Maintain organized webhook management\n\nKey information returned:\n- Success confirmation of webhook deletion","tags":["Webhooks"]},"get":{"summary":"Get a webhook details","operationId":"getWebhook","parameters":[{"description":"Id of the webhook","in":"path","name":"webhookId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"auth":{"token":"test-auth-token1234","type":"bearer"},"batched":true,"createdAt":"2016-06-07T09:10:10Z","description":"Webhook triggered on campaign openings and addition of lists","events":["listAddition","opened"],"headers":[{"key":"cf-secret","value":"test-header-value"}],"id":7287,"modifiedAt":"2016-06-08T11:30:00Z","type":"marketing","url":"http://example.domain.com/1brxxxxxx5p1"}}},"schema":{"$ref":"#/components/schemas/getWebhook"}}},"description":"Webhook informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Retrieves detailed information about a specific webhook configuration.\n\nUse this to:\n- Get complete webhook configuration and settings\n- Check webhook event subscriptions and triggers\n- Review authentication and security settings\n- Verify webhook URL and custom headers\n- Access webhook creation and modification history\n\nKey information returned:\n- Complete webhook details and configuration\n- Event types and channel subscriptions\n- Authentication credentials and methods\n- Custom headers and request settings\n- Webhook status and activity information","tags":["Webhooks"]},"put":{"summary":"Update a webhook","operationId":"updateWebhook","parameters":[{"description":"Id of the webhook","in":"path","name":"webhookId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"auth":{"description":"Add authentication on webhook url","properties":{"token":{"description":"Webhook authentication token","example":"test-auth-token1234","type":"string"},"type":{"description":"Type of authentication","example":"bearer","type":"string"}},"type":"object"},"batched":{"description":"To send batched webhooks","example":true,"type":"boolean"},"description":{"description":"Description of the webhook","example":"Webhook triggered on contact hardbounce","type":"string"},"domain":{"description":"Inbound domain of webhook, used in case of event type `inbound`","example":"example.com","type":"string"},"events":{"description":"- Events triggering the webhook. Possible values for\n**Transactional** type webhook: #### `sent` OR `request`,\n`delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`,\n`invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and\n`unsubscribed` - Possible values for **Marketing** type webhook:\n#### `spam`, `opened`, `click`, `hardBounce`, `softBounce`,\n`unsubscribed`, `listAddition` & `delivered` - Possible values\nfor **Inbound** type webhook: #### `inboundEmailProcessed`\n#### `reply`","items":{"enum":["sent","hardBounce","softBounce","blocked","spam","delivered","request","click","invalid","deferred","opened","uniqueOpened","unsubscribed","listAddition","contactUpdated","contactDeleted","inboundEmailProcessed","reply"],"example":"hardBounce","type":"string"},"type":"array"},"headers":{"description":"Custom headers to be send with webhooks","items":{"properties":{"key":{"description":"Header key name","example":"cf-secret","type":"string"},"value":{"description":"Header value","example":"test-header-value","type":"string"}},"type":"object"},"type":"array"},"url":{"description":"URL of the webhook","example":"http://requestb.in/173lyyx1","format":"url","type":"string"}},"type":"object"}}},"description":"Values to update a webhook","required":true},"responses":{"204":{"content":{},"description":"Webhook updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"description":"Updates an existing webhook configuration and event subscriptions.\n\nUse this to:\n- Modify webhook event subscriptions and triggers\n- Update webhook URL and endpoint configuration\n- Change authentication settings and credentials\n- Adjust custom headers and request parameters\n- Enable or disable specific webhook events\n\nKey information returned:\n- Success confirmation of webhook updates","tags":["Webhooks"],"x-codegen-request-body-name":"updateWebhook"}},"/contacts":{"get":{"operationId":"getContacts","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":1000,"minimum":1,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"modifiedSince","schema":{"type":"string"}},{"description":"Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"createdSince","schema":{"type":"string"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Filter by a list of contact IDs. You can pass a **maximum of 20 IDs**. All elements must be integers.","in":"query","name":"ids","schema":{"items":{"format":"int64","type":"integer"},"maxItems":20,"type":"array"}},{"description":"Id of the segment. **Either listIds or segmentId can be passed.** Must be a positive integer (minimum value of 1).","in":"query","name":"segmentId","schema":{"format":"int64","minimum":1,"type":"integer"}},{"description":"Ids of the list. **Either listIds or segmentId can be passed.**","in":"query","name":"listIds","schema":{"items":{"format":"int64","type":"integer"},"type":"array"}},{"description":"Filter the contacts on the basis of attributes. **Allowed operator: equals. For multiple-choice options, the filter will apply an AND condition between the options. For category attributes, the filter will work with both id and value. (e.g. filter=equals(FIRSTNAME,\"Antoine\"), filter=equals(B1, true), filter=equals(DOB, \"1989-11-23\"), filter=equals(GENDER, \"1\"), filter=equals(GENDER, \"MALE\"), filter=equals(COUNTRY,\"USA, INDIA\")**\n","in":"query","name":"filter","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"contacts":[{"attributes":{"ACTION_CODE":"17HH98CH","ADDRESS":"1 5th avenue","CITY":"New-York","CIV":"MS","DOB":"1986-05-02","FIRST_NAME":"Meg","IDENTIFICATION":"1-3RHQ-259","LAST_NAME":"Brennon","SMS":"33058407250","ZIP_CODE":"44300"},"createdAt":"2017-05-01T17:05:03Z","email":"contact1@example.com","emailBlacklisted":true,"id":247,"listIds":[43,58],"modifiedAt":"2017-05-01T17:05:03Z","smsBlacklisted":true,"whatsappBlacklisted":false},{"attributes":{"ACTION_CODE":"17HU765","ADDRESS":"5 Flower Street","CITY":"Seattle","CIV":"MS","DOB":"1980-09-11","FIRST_NAME":"Sophia","IDENTIFICATION":"1-78JS-432","LAST_NAME":"Press","SMS":"33058407248","ZIP_CODE":"44119"},"createdAt":"2017-05-01T17:05:03Z","email":"33058407248@mailin-sms.com","emailBlacklisted":true,"whatsappBlacklisted":false,"id":245,"listIds":[43,61,58],"modifiedAt":"2017-05-01T17:05:03Z","smsBlacklisted":false}],"count":3}}},"schema":{"$ref":"#/components/schemas/getContacts"}}},"description":"All contacts listed"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Too Many Requests"}},"summary":"Get all the contacts","description":"Retrieve all contacts from your Brevo account with support for pagination, filtering, and sorting. Results default to 50 contacts per page (maximum 1000) sorted in descending order of creation, and can be filtered by modification date, creation date, contact IDs (up to 20), list IDs, segment ID, or contact attributes using the equals operator. Note that either listIds or segmentId can be passed but not both simultaneously.","tags":["Contacts"]},"post":{"description":"<Note>Follow this format when passing a \"SMS\" phone number as an attribute.\nAccepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx</Note>\nCreates new contacts on Brevo. Contacts can be created by passing either - <br><br> 1. email address of the contact (email_id),  <br> 2. phone number of the contact (to be passed as \"SMS\" field in \"attributes\" along with proper country code), For example- {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} <br> 3. ext_id <br>","operationId":"createContact","requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"additionalProperties":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"description":"Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account**. For eg: **{\"FNAME\":\"Elly\", \"LNAME\":\"Roger\", \"COUNTRIES\": [\"India\",\"China\"]}**\n","example":{"COUNTRIES":["India","China"],"FNAME":"Elly","LNAME":"Roger"},"type":"object"},"email":{"description":"Email address of the user. **Mandatory if \"ext_id\"  & \"SMS\" field is not passed.**\n","example":"elly@example.com","format":"email","type":"string"},"emailBlacklisted":{"description":"Set this field to blacklist the contact for emails (emailBlacklisted = true)","example":false,"type":"boolean"},"ext_id":{"description":"Pass your own Id to create a contact.","example":"externalId","type":"string"},"listIds":{"description":"Ids of the lists to add the contact to","items":{"description":"Id of the list to add the contact to","example":36,"format":"int64","type":"integer"},"type":"array"},"smsBlacklisted":{"description":"Set this field to blacklist the contact for SMS (smsBlacklisted = true)","example":false,"type":"boolean"},"smtpBlacklistSender":{"description":"transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )","items":{"format":"email","type":"string"},"type":"array"},"updateEnabled":{"default":false,"description":"Facilitate to update the existing contact in the same request (updateEnabled = true)","example":false,"type":"boolean"},"forceMerge":{"default":false,"description":"When true, if the contact being created shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict.","example":true,"type":"boolean"},"getId":{"default":false,"description":"When true, the response returns the `id` of the surviving contact after merge.","example":true,"type":"boolean"}},"type":"object"}}},"description":"Values to create a contact","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":21}}},"schema":{"properties":{"id":{"description":"ID of the contact when a new contact is created","example":122,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Contact created"},"204":{"content":{},"description":"Contact updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactErrorModel"}}},"description":"bad request"},"425":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactErrorModel"}}},"description":"Too Early"}},"summary":"Create a contact","tags":["Contacts"],"parameters":[]}},"/contacts/attributes":{"get":{"operationId":"getAttributes","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"attributes":[{"category":"normal","name":"LASTNAME","type":"text"},{"category":"normal","name":"FIRSTNAME","type":"text"},{"category":"normal","name":"DOB","type":"date"},{"category":"category","enumeration":[{"label":"Men","value":1,"valueStr":"1"},{"label":"Women","value":2,"valueStr":"2"},{"label":"Kid","value":3,"valueStr":"3"}],"name":"GENDER","type":"text"},{"category":"category","enumeration":[{"label":"English","value":0,"valueStr":"en"},{"label":"French","value":0,"valueStr":"fr"}],"name":"LANGUAGE","type":"text"},{"category":"normal","name":"BDO","type":"user"},{"category":"normal","multiCategoryOptions":["USA","India","France"],"name":"COUNTRY","type":"multiple-choice"}]}}},"schema":{"properties":{"attributes":{"description":"Listing of available contact attributes in your account","items":{"properties":{"calculatedValue":{"description":"Calculated value formula","example":"COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]","type":"string"},"category":{"description":"Category of the attribute","enum":["normal","transactional","category","calculated","global"],"example":"category","type":"string"},"enumeration":{"description":"Parameter only available for \"category\" type attributes.","items":{"properties":{"label":{"description":"Label of the \"category\" type attribute","example":"Women","type":"string"},"value":{"description":"Numeric ID of the \"category\" type attribute value. Set to 0 when the raw value cannot be converted to an integer (for example non-numeric values such as \"en\" or \"fr\"). Refer to `valueStr` for the original string representation.","example":1,"format":"int64","type":"integer"},"valueStr":{"description":"String representation of the \"category\" type attribute value. Always contains the original value as stored. Use this field when the attribute value is non-numeric (e.g. \"en\", \"fr\") or when you need the exact string form alongside the numeric `value`.","example":"1","type":"string"}},"required":["label","value","valueStr"],"type":"object"},"type":"array"},"multiCategoryOptions":{"description":"Parameter only available for \"multiple-choice\" type attributes.","items":{"description":"Options of the \"multiple-choice\" type attribute","example":"USA","type":"string"},"type":"array"},"name":{"description":"Name of the attribute","example":"LASTNAME","type":"string"},"type":{"description":"Type of the attribute","enum":["text","date","float","id","boolean","multiple-choice","user"],"example":"text","type":"string"}},"required":["category","name"],"type":"object"},"type":"array"}},"required":["attributes"],"type":"object"}}},"description":"Attributes listed"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"List all attributes","description":"Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes.","tags":["Contacts"],"parameters":[]}},"/contacts/attributes/{attributeCategory}/{attributeName}":{"delete":{"operationId":"deleteAttribute","parameters":[{"description":"Category of the attribute","in":"path","name":"attributeCategory","required":true,"schema":{"enum":["normal","transactional","category","calculated","global"],"type":"string"}},{"description":"Name of the existing attribute","in":"path","name":"attributeName","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Attribute deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Delete an attribute","description":"Permanently delete an existing contact attribute by its category and name. The attribute must exist in the specified category (normal, transactional, category, calculated, or global), otherwise a 404 error is returned.","tags":["Contacts"]},"post":{"operationId":"createAttribute","parameters":[{"description":"Category of the attribute","in":"path","name":"attributeCategory","required":true,"schema":{"enum":["normal","transactional","category","calculated","global"],"type":"string"}},{"description":"Name of the attribute","in":"path","name":"attributeName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"enumeration":{"description":"List of values and labels that the attribute can take. **Use only if the attribute's category is \"category\"**. None of the category options can exceed max 200 characters. For example: **[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]**\n","items":{"properties":{"label":{"description":"Label of the value","example":"Women","type":"string"},"value":{"description":"Id of the value","example":1,"type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"isRecurring":{"description":"Type of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**\n","example":true,"type":"boolean"},"multiCategoryOptions":{"description":"List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\". None of the multicategory options can exceed max 200 characters.** For example: **[\"USA\",\"INDIA\"]**\n","items":{"type":"string"},"type":"array"},"type":{"description":"Type of the attribute. **Use only if the attribute's category is 'normal', 'category' or 'transactional'** Type **user and multiple-choice** is only available if the category is **normal** attribute Type **id** is only available if the category is **transactional** attribute Type **category** is only available if the category is **category** attribute\n","enum":["text","date","float","boolean","id","category","multiple-choice","user"],"example":"text","type":"string"},"value":{"description":"Value of the attribute. **Use only if the attribute's category is 'calculated' or 'global'**\n","example":"COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]","type":"string"}},"type":"object"}}},"description":"Values to create an attribute","required":true},"responses":{"201":{"content":{},"description":"Attribute created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create contact attribute","description":"Create a new contact attribute under the specified category and name. The required body properties depend on the category: use \"type\" for normal, transactional, or category attributes; use \"value\" for calculated or global attributes; use \"enumeration\" for category attributes; and use \"multiCategoryOptions\" for normal multiple-choice attributes. None of the category or multicategory option values can exceed 200 characters.","tags":["Contacts"]},"put":{"operationId":"updateAttribute","parameters":[{"description":"Category of the attribute","in":"path","name":"attributeCategory","required":true,"schema":{"enum":["category","calculated","global","normal"],"type":"string"}},{"description":"Name of the existing attribute","in":"path","name":"attributeName","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"enumeration":{"description":"List of the values and labels that the attribute can take. **Use only if the attribute's category is \"category\"** None of the category options can exceed max 200 characters. For example, **[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]**\n","items":{"properties":{"label":{"description":"Label of the value","example":"Men","type":"string"},"value":{"description":"Id of the value","example":1,"type":"integer"}},"required":["label","value"],"type":"object"},"type":"array"},"multiCategoryOptions":{"description":"Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes. None of the multicategory options can exceed max 200 characters.**. For example: **[\"USA\",\"INDIA\"]**\n","items":{"type":"string"},"type":"array"},"value":{"description":"Value of the attribute to update. **Use only if the attribute's category is 'calculated' or 'global'**\n","example":"COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]","type":"string"}},"type":"object"}}},"description":"Values to update an attribute","required":true},"responses":{"204":{"content":{},"description":"Attribute updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Update contact attribute","description":"Update an existing contact attribute identified by its category and name. For category-type attributes, you can update the enumeration values; for calculated or global attributes, update the computed value formula; and for normal multiple-choice attributes, update the multicategory options. None of the category or multicategory option values can exceed 200 characters.","tags":["Contacts"],"x-codegen-request-body-name":"updateAttribute"}},"/contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption}":{"delete":{"operationId":"deleteMultiAttributeOptions","parameters":[{"description":"Type of the attribute","in":"path","name":"attributeType","required":true,"schema":{"enum":["multiple-choice"],"type":"string"}},{"description":"Name of the existing multiple-choice attribute","in":"path","name":"multipleChoiceAttribute","required":true,"schema":{"type":"string"}},{"description":"Name of the existing multiple-choice attribute option that you want to delete","in":"path","name":"multipleChoiceAttributeOption","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Multiple-Choice Attribute Option Deleted Successfully."},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Delete a multiple-choice attribute option","description":"Delete a specific option from an existing multiple-choice contact attribute. The attribute type must be \"multiple-choice\", and both the attribute name and the option to delete must already exist in your account.","tags":["Contacts"]}},"/contacts/batch":{"post":{"operationId":"updateBatchContacts","requestBody":{"content":{"application/json":{"schema":{"properties":{"contacts":{"description":"List of contacts to be updated","items":{"properties":{"attributes":{"additionalProperties":{},"description":"Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}**\n","example":{"EMAIL":"newemail@domain.com","FNAME":"Ellie","LNAME":"Roger"},"type":"object"},"email":{"description":"Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)","example":"elly@example.com","format":"email","type":"string"},"emailBlacklisted":{"description":"Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)","example":false,"type":"boolean"},"ext_id":{"description":"Pass your own Id to update ext_id of a contact.","example":"UpdateExternalId","type":"string"},"id":{"description":"id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)","example":31,"format":"int64","type":"integer"},"listIds":{"description":"Ids of the lists to add the contact to","items":{"description":"Id of the list to add the contact to","example":65,"format":"int64","type":"integer"},"type":"array"},"sms":{"description":"SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms)","example":"+91xxxxxxxxxx","type":"string"},"smsBlacklisted":{"description":"Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)","example":true,"type":"boolean"},"smtpBlacklistSender":{"description":"transactional email forbidden sender for contact. Use only for email Contact","items":{"format":"email","type":"string"},"type":"array"},"unlinkListIds":{"description":"Ids of the lists to remove the contact from","items":{"description":"Id of the list to remove the contact from","example":36,"format":"int64","type":"integer"},"type":"array"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Values to update multiple contacts","required":true},"responses":{"204":{"content":{},"description":"All contacts updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Update multiple contacts","description":"Update multiple contacts in a single API call by passing an array of contact objects. Each contact in the array must be identified by one of: email, id, or sms (only one identifier per contact). You can update attributes, blacklist status, list memberships, ext_id, and transactional email forbidden senders for each contact in the batch.","tags":["Contacts"],"parameters":[]}},"/contacts/doubleOptinConfirmation":{"post":{"description":"<Note title=\"How to use attributes param?\">attributes param in this endpoint is an object containing key-value pairs where values can be either a string, integer, array, or boolean. You can create key-value pairs with these four datatypes. When a value is an array, it should be an array of strings.</Note>","operationId":"createDoiContact","requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"additionalProperties":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"description":"Pass the set of attributes and their values. **These attributes must be present in your Brevo account**. For eg. **{'FNAME':'Elly', 'LNAME':'Roger', 'COUNTRIES': ['India','China']}**\n","example":{"COUNTRIES":["India","China"],"FNAME":"Elly","LNAME":"Roger"},"type":"object"},"contactPixelTrackingConsent":{"description":"Consent of the DOI recipient for open (pixel) and click tracking in the double opt-in confirmation email, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.","example":"elly@example.com","format":"email","type":"string"},"excludeListIds":{"description":"Lists under user account where contact should not be added","items":{"description":"Id of the list","example":36,"format":"int64","type":"integer"},"type":"array"},"includeListIds":{"description":"Lists under user account where contact should be added","items":{"description":"Id of the list","example":36,"format":"int64","type":"integer"},"type":"array"},"redirectionUrl":{"description":"URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag **{{ params.DOIurl }}**.\n","example":"http://requestb.in/173lyyx1","format":"url","type":"string"},"templateId":{"description":"Id of the Double opt-in (DOI) template","example":2,"format":"int64","type":"integer"}},"required":["email","includeListIds","redirectionUrl","templateId"],"type":"object"}}},"description":"Values to create the Double opt-in (DOI) contact","required":true},"responses":{"201":{"content":{},"description":"DOI Contact created"},"204":{"content":{},"description":"DOI Contact updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create Contact via DOI (Double-Opt-In) Flow","tags":["Contacts"],"x-codegen-request-body-name":"createDoiContact","parameters":[]}},"/contacts/export":{"post":{"description":"It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.","operationId":"requestContactExport","requestBody":{"content":{"application/json":{"schema":{"properties":{"customContactFilter":{"description":"Set the filter for the contacts to be exported.\n","properties":{"actionForContacts":{"description":"**Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed.** This will export the contacts on the basis of provided action applied on contacts as per the list id. * **allContacts** - Fetch the list of all contacts for a particular list. * **subscribed & unsubscribed** - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * **unsubscribedPerList** - Fetch the list of contacts that are unsubscribed from a particular list only.\n","enum":["allContacts","subscribed","unsubscribed","unsubscribedPerList"],"type":"string"},"actionForEmailCampaigns":{"description":"**Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed.** This will export the contacts on the basis of provided action applied on email campaigns. * **openers & nonOpeners** - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * **clickers & nonClickers** - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * **unsubscribed** - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * **hardBounces & softBounces** - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s).\n","enum":["openers","nonOpeners","clickers","nonClickers","unsubscribed","hardBounces","softBounces"],"type":"string"},"actionForSmsCampaigns":{"description":"**Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed.** This will export the contacts on the basis of provided action applied on sms campaigns. * **unsubscribed** - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * **hardBounces & softBounces** - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns.\n","enum":["hardBounces","softBounces","unsubscribed"],"type":"string"},"emailCampaignId":{"description":"Considered only if **actionForEmailCampaigns** is passed, ignored otherwise. **Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed.** The id of the email campaign for which the corresponding action shall be applied in the filter.\n","example":12,"format":"int64","type":"integer"},"listId":{"description":"ID of the list. This is mandatory if actionForContacts is specified and segmentId is not provided. Either segmentId or listId must be included.\n","example":2,"format":"int64","type":"integer"},"segmentId":{"description":"ID of the segment. This is mandatory if actionForContacts is specified and listId is not provided. Either segmentId or listId must be included.\n","example":2,"format":"int64","type":"integer"},"smsCampaignId":{"description":"Considered only if **actionForSmsCampaigns** is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter.\n","example":12,"format":"int64","type":"integer"}},"type":"object"},"disableNotification":{"default":false,"description":"To avoid generating the email notification upon contact export, pass **true**","example":false,"type":"boolean"},"exportAttributes":{"description":"List of all the attributes that you want to export. **These attributes must be present in your contact database. It is required if exportMandatoryAttributes is set false. ** For example: **['fname', 'lname', 'email']**\n","items":{"example":"NAME","type":"string"},"type":"array"},"exportMandatoryAttributes":{"default":true,"description":"To export mandatory attributes like EMAIL, ADDED_TIME, MODIFIED_TIME","example":false,"type":"boolean"},"exportMetadata":{"description":"Export metadata of contacts such as _listIds, ADDED_TIME, MODIFIED_TIME.","items":{"example":"_listIds","type":"string"},"type":"array"},"exportDateInUTC":{"type":"boolean","description":"Specifies whether the date fields createdAt, modifiedAt in the exported data should be returned in UTC format.","example":true,"default":false},"exportSubscriptionStatus":{"description":"Export subscription status of contacts for email & sms marketting. Pass email_marketing to obtain the marketing email subscription status & sms_marketing to retrieve the marketing SMS status of the contact.","items":{"example":"email_marketing","type":"string"},"type":"array"},"notifyUrl":{"description":"Webhook that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479","example":"http://requestb.in/173lyyx1","format":"url","type":"string"}},"required":["customContactFilter"],"type":"object"}}},"description":"Values to request a contact export","required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"processId":{"description":"Id of the process created","example":78,"format":"int64","type":"integer"}},"required":["processId"],"type":"object"}}},"description":"process id created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Too Many Requests"}},"summary":"Export contacts","tags":["Contacts"],"parameters":[]}},"/contacts/folders":{"get":{"description":"<Note>Ongoing changes for this endpoint\nWe're dropping support for the response attributes totalSubscribers and totalBlacklisted.\nThese are non breaking changes.\nThe default value for the attributes will be 0.\nThe uniqueSubscribers field is deprecated</Note>","operationId":"getFolders","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","required":false,"schema":{"default":10,"format":"int64","maximum":50,"minimum":0,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","required":false,"schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"folders":[{"id":42,"name":"Ninja_Form","totalBlacklisted":98,"totalSubscribers":4567,"uniqueSubscribers":4665},{"id":29,"name":"Prestashop","totalBlacklisted":10,"totalSubscribers":6543,"uniqueSubscribers":6553}]}}},"schema":{"properties":{"count":{"description":"Number of folders available in your account","example":10,"format":"int64","type":"integer"},"folders":{"items":{"allOf":[{"$ref":"#/components/schemas/getFolder"}],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Folders informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get all folders","tags":["Contacts"]},"post":{"operationId":"createFolder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createUpdateFolder"}}},"description":"Name of the folder","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"ID of the object created","example":5,"format":"int64","type":"integer"}},"required":["id"],"type":"object"}}},"description":"successfully created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create a folder","description":"Create a new folder to organize your contact lists. Folders serve as containers for grouping related lists together. The folder name is required and must be provided in the request body.","tags":["Contacts"],"x-codegen-request-body-name":"createFolder","parameters":[]}},"/contacts/folders/{folderId}":{"delete":{"operationId":"deleteFolder","parameters":[{"description":"Id of the folder","in":"path","name":"folderId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Folder deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Delete a folder (and all its lists)","description":"Permanently delete a folder identified by its ID. Deleting a folder will also delete all the contact lists contained within it. This action cannot be undone.","tags":["Contacts"]},"get":{"description":"<Note>Ongoing changes for this endpoint.\nWe're dropping support for the response attributes totalSubscribers and totalBlacklisted.\nThese are non breaking changes. The default value for the attributes will be 0.</Note>","operationId":"getFolder","parameters":[{"description":"id of the folder","in":"path","name":"folderId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"id":1,"name":"Client_Folder","totalBlacklisted":987,"totalSubscribers":16778,"uniqueSubscribers":17765}}},"schema":{"$ref":"#/components/schemas/getFolder"}}},"description":"Folder details"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Returns a folder's details","tags":["Contacts"]},"put":{"operationId":"updateFolder","parameters":[{"description":"Id of the folder","in":"path","name":"folderId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createUpdateFolder"}}},"description":"Name of the folder","required":true},"responses":{"204":{"content":{},"description":"Folder updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Update a folder","description":"Update the name of an existing folder identified by its ID. The new folder name must be provided in the request body. Returns a 404 error if the folder ID does not exist.","tags":["Contacts"],"x-codegen-request-body-name":"updateFolder"}},"/contacts/folders/{folderId}/lists":{"get":{"description":"<Note>Ongoing changes for this endpoint.\nWe're dropping support for the response attributes totalSubscribers and totalBlacklisted.\nThese are non breaking changes. The default value for the attributes will be 0.</Note>","operationId":"getFolderLists","parameters":[{"description":"Id of the folder","in":"path","name":"folderId","required":true,"schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":50,"minimum":0,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":3,"lists":[{"id":46,"name":"Reactiv","totalBlacklisted":0,"totalSubscribers":7655,"uniqueSubscribers":7655},{"id":41,"name":"NY_Area","totalBlacklisted":23,"totalSubscribers":3654,"uniqueSubscribers":3677},{"id":22,"name":"VIP_Customer","totalBlacklisted":72,"totalSubscribers":8753,"uniqueSubscribers":8826}]}}},"schema":{"properties":{"count":{"description":"Number of lists in the folder","example":6,"format":"int64","type":"integer"},"lists":{"items":{"allOf":[{"$ref":"#/components/schemas/getList"}],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Folder's Lists details"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Get lists in a folder","tags":["Contacts"]}},"/contacts/import":{"post":{"description":"It returns the background process ID which on completion calls the notify URL that you have set in the input. **Note**: - Any contact attribute that doesn't exist in your account will be ignored at import end.\n","operationId":"importContacts","requestBody":{"content":{"application/json":{"schema":{"properties":{"disableNotification":{"default":false,"description":"To disable email notification","example":false,"type":"boolean"},"emailBlacklist":{"default":false,"description":"To blacklist all the contacts for email","example":false,"type":"boolean"},"emptyContactsAttributes":{"default":false,"description":"To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in Brevo, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( **only available if `updateExistingContacts` set to true **)\n","example":true,"type":"boolean"},"fileBody":{"description":"**Mandatory if fileUrl and jsonBody is not defined.** CSV content to be imported. Use semicolon to separate multiple attributes. **Maximum allowed file body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.\n","example":"NAME;SURNAME;EMAIL\nSmith;John;john.smith@example.com\nRoger;Ellie;ellie36@example.com","type":"string"},"fileUrl":{"description":"**Mandatory if fileBody and jsonBody is not defined.** URL of the file to be imported (**no local file**). Possible file formats: #### .txt, .csv, .json\n","example":"https://importfile.domain.com","format":"url","type":"string"},"jsonBody":{"description":"**Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files.\n","items":{"example":{"attributes":{"BIRTHDAY":"11/02/1989","COUNTRY":"DE","FNAME":"Dicky","LANDLINE_NUMBER":"33689965433","LNAME":"Noemi","PREFERED_COLOR":"BLACK","SMS":"33689965433","WHATSAPP":"33689965433"},"email":"ndicky0@ocn.ne.jp"},"properties":{"attributes":{"additionalProperties":true,"description":"List of attributes to be imported","type":"object"},"email":{"type":"string"}},"type":"object"},"type":"array"},"listIds":{"description":"**Mandatory if newList is not defined.** Ids of the lists in which the contacts shall be imported. For example, **[2, 4, 7]**.\n","items":{"description":"List Id in which the contacts shall be imported","example":76,"format":"int64","type":"integer"},"type":"array"},"consentGroupIds":{"description":"**Optional.** Ids of the consent groups to which all imported contacts will be added. Requires consent groups to be enabled for the organisation. For example, **[1, 3]**.\n","items":{"description":"Consent group Id","example":1,"format":"int64","type":"integer"},"type":"array"},"newList":{"description":"To create a new list and import the contacts into it, pass the listName and an optional folderId.","properties":{"folderId":{"description":"Id of the folder where this new list shall be created. **Mandatory if listName is not empty**\n","example":2,"format":"int64","type":"integer"},"listName":{"description":"List with listName will be created first and users will be imported in it. **Mandatory if listIds is empty**.\n","example":"ContactImport - 2017-05","type":"string"}},"type":"object"},"notifyUrl":{"description":"URL that will be called once the import process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479","example":"http://requestb.in/173lyyx1","format":"url","type":"string"},"smsBlacklist":{"default":false,"description":"To blacklist all the contacts for sms","example":false,"type":"boolean"},"updateExistingContacts":{"default":true,"description":"To facilitate the choice to update the existing contacts","example":true,"type":"boolean"}},"type":"object"}}},"description":"Values to import contacts in Brevo. To know more about the expected format, please have a look at ``https://help.brevo.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``","required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"processId":{"description":"Id of the process created","example":78,"format":"int64","type":"integer"}},"required":["processId"],"type":"object"}}},"description":"process id created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Import contacts","tags":["Contacts"],"parameters":[]}},"/contacts/lists":{"get":{"description":"<Note>Ongoing changes for this endpoint.\nWe're dropping support for the response attributes totalSubscribers and totalBlacklisted.\nThese are non breaking changes. The default value for the attributes will be 0.</Note>","operationId":"getLists","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":50,"minimum":0,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"lists":[{"folderId":1,"id":53,"name":"Spanish_Speakers","totalBlacklisted":65,"totalSubscribers":5432,"uniqueSubscribers":5497},{"folderId":2,"id":50,"name":"Other","totalBlacklisted":765,"totalSubscribers":10976,"uniqueSubscribers":11741}]}}},"schema":{"properties":{"count":{"description":"Number of lists in your account","example":150,"format":"int64","type":"integer"},"lists":{"description":"Listing of all the lists available in your account","items":{"allOf":[{"$ref":"#/components/schemas/getList"},{"properties":{"folderId":{"description":"ID of the folder","example":2,"format":"int64","type":"integer"}},"required":["folderId"],"type":"object"}],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Lists informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get all the lists","tags":["Contacts"]},"post":{"operationId":"createList","requestBody":{"content":{"application/json":{"schema":{"properties":{"folderId":{"description":"Id of the parent folder in which this list is to be created","example":2,"format":"int64","type":"integer"},"name":{"description":"Name of the list","example":"Magento Customer - ES","type":"string"}},"required":["folderId","name"],"type":"object"}}},"description":"Values to create a list","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"ID of the object created","example":5,"format":"int64","type":"integer"}},"required":["id"],"type":"object"}}},"description":"successfully created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create a list","description":"Create a new contact list inside a specified folder. Both the list name and the parent folder ID are required. The newly created list will be empty and ready to receive contacts via the add contacts endpoint.","tags":["Contacts"],"parameters":[]}},"/contacts/lists/{listId}":{"delete":{"operationId":"deleteList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"List deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Delete a list","description":"Permanently delete a contact list identified by its ID. The contacts in the list are not deleted; they are only removed from this list. Returns a 404 error if the list ID does not exist.","tags":["Contacts"]},"get":{"operationId":"getList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}},{"description":"**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used**. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to aggregate the sent email campaigns for a specific list id. **Prefer to pass your timezone in date-time format for accurate result**\n","in":"query","name":"endDate","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"campaignStats":[{"campaignId":15,"stats":{"clickers":789,"complaints":0,"deferred":0,"delivered":6632,"hardBounces":4,"sent":6645,"softBounces":34,"uniqueClicks":701,"uniqueViews":3442,"unsubscriptions":4,"viewed":4322}},{"campaignId":45,"stats":{"clickers":788,"complaints":1,"deferred":0,"delivered":4078,"hardBounces":2,"sent":4334,"softBounces":18,"uniqueClicks":654,"uniqueViews":987,"unsubscriptions":4,"viewed":1555}}],"createdAt":"2016-02-26T11:56:08Z","dynamicList":false,"endDate":"2024-04-10T00:00:00Z","folderId":1,"id":12,"name":"Newsletter_Weekly","startDate":"2023-10-10T00:00:00Z","totalBlacklisted":63,"totalSubscribers":6533,"uniqueSubscribers":6596}}},"schema":{"allOf":[{"$ref":"#/components/schemas/getList"},{"properties":{"campaignStats":{"items":{"properties":{"campaignId":{"description":"ID of the campaign","example":143,"format":"int64","type":"integer"},"stats":{"$ref":"#/components/schemas/getCampaignStats"}},"required":["campaignId","stats"],"type":"object"},"type":"array"},"createdAt":{"description":"Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-03-13T17:05:09Z","type":"string"},"dynamicList":{"description":"Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)","example":false,"type":"boolean"},"folderId":{"description":"ID of the folder","example":2,"format":"int64","type":"integer"}},"required":["createdAt","folderId"],"type":"object"}]}}},"description":"List informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Get a list's details","description":"Retrieve the details of a specific contact list by its ID, including its name, folder ID, creation date, subscriber counts, and campaign statistics. You can optionally filter campaign statistics by providing startDate and endDate parameters (both must be used together in YYYY-MM-DD format).","tags":["Contacts"]},"put":{"operationId":"updateList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"folderId":{"description":"Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.","example":2,"format":"int64","type":"integer"},"name":{"description":"Name of the list. Either of the two parameters (name, folderId) can be updated at a time.","example":"Magento Customer - ES","type":"string"}},"type":"object"}}},"description":"Values to update a list","required":true},"responses":{"204":{"content":{},"description":"List updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Update a list","description":"Update an existing contact list identified by its ID. You can update the list name, move it to a different folder by providing a new folderId, or both. Only one of the two parameters (name, folderId) needs to be provided per request.","tags":["Contacts"]}},"/contacts/lists/{listId}/contacts":{"get":{"operationId":"getContactsFromList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}},{"description":"Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"modifiedSince","schema":{"type":"string"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"contacts":[{"attributes":{"DOB":"2010-12-31","FIRSTNAME":"Alex","GENDER":"Kid","LASTNAME":"Pain"},"createdAt":"2017-05-12T12:30:00Z","email":"alex.pain@example.com","emailBlacklisted":false,"id":45,"listIds":[12,9,20],"listUnsubscribed":[1,2],"modifiedAt":"2017-05-12T12:30:00Z","smsBlacklisted":true},{"attributes":{"DOB":"1986-06-21","FIRSTNAME":"John","GENDER":"Men","LASTNAME":"Smith"},"createdAt":"2017-05-12T12:30:00Z","email":"john.smith@example.com","emailBlacklisted":true,"id":32,"listIds":[12],"listUnsubscribed":[1],"modifiedAt":"2017-05-12T12:30:00Z","smsBlacklisted":false},{"attributes":{"DOB":"1988-11-02","FIRSTNAME":"Helen","GENDER":"Women","LASTNAME":"Rose","SMS":"3375599887766"},"createdAt":"2017-05-12T12:30:00Z","email":"helen.rose@example.com","emailBlacklisted":true,"id":65,"listIds":[12,9,20],"listUnsubscribed":[1],"modifiedAt":"2017-05-12T12:30:00Z","smsBlacklisted":false}],"count":17655}}},"schema":{"$ref":"#/components/schemas/getContacts"}}},"description":"Contact informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Too Many Requests"}},"summary":"Get contacts in a list","description":"Retrieve all contacts belonging to a specific list, identified by its list ID. Results are paginated with a default of 50 contacts per page (maximum 500) and sorted in descending order of creation. You can optionally filter contacts by their modification date using the modifiedSince parameter.","tags":["Contacts"]}},"/contacts/lists/{listId}/contacts/add":{"post":{"operationId":"addContactToList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"examples":{"emailsArray":{"summary":"Passing emails array","description":"Add existing contacts to a specific list by providing their email addresses, numeric IDs, or EXT_ID attributes. Only one type of identifier can be used per request, with a maximum of 150 contacts per call. The response includes separate arrays for successfully added and failed contacts. For bulk additions exceeding 150 contacts, use the /contacts/import endpoint instead.","value":{"emails":["jeff32@example.com","jim56@example.com"]}},"extIdsArray":{"summary":"Passing extIds array","value":{"extIds":["ext234","ext456"]}},"idsArray":{"summary":"Passing ids array","value":{"ids":[1,2]}}},"schema":{"oneOf":[{"properties":{"emails":{"description":"Emails to add to a list. You can pass a **maximum of 150 emails** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._**\n","items":{"description":"Email to add to a list","example":"john.smith@contact.com","format":"email","type":"string"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"},{"properties":{"ids":{"description":"IDs to add to a list. You can pass a **maximum of 150 IDs** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._**\n","items":{"description":"ID to add to a list","example":10,"format":"int64","type":"integer"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"},{"properties":{"extIds":{"description":"EXT_ID attributes to add to a list. You can pass a **maximum of 150 EXT_ID attributes** for addition in one request. **_If you need to add the emails in bulk, please prefer /contacts/import api._**\n","items":{"description":"EXT_ID to add to a list","example":"ext132","type":"string"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"}]}}},"description":"Emails addresses OR IDs OR EXT_ID attributes of the contacts","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"emailsArray":{"summary":"Response example when emails array is passed","value":{"failure":["david@example.com"],"success":["jeff32@example.com","jim56@example.com"]}},"extIdsArray":{"summary":"Response example when extIds array is passed","value":{"failure":["ext345"],"success":["ext123"]}},"idsArray":{"summary":"Response example when ids array is passed","value":{"failure":[5],"success":[1,2]}}},"schema":{"$ref":"#/components/schemas/postContactInfo"}}},"description":"All contacts have been added successfully to the list with details of failed ones"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Add existing contacts to a list","tags":["Contacts"]}},"/contacts/lists/{listId}/contacts/remove":{"post":{"operationId":"removeContactFromList","parameters":[{"description":"Id of the list","in":"path","name":"listId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"examples":{"allTrue":{"summary":"Passing 'all' true","description":"Remove contacts from a specific list by providing their email addresses, numeric IDs, EXT_ID attributes, or by setting \"all\" to true to remove all contacts from the list. Only one type of identifier can be used per request, with a maximum of 150 contacts per call. When \"all\" is set to true, a background process is created and a processId is returned to track progress.","value":{"all":true}},"emailsArray":{"summary":"Passing emails array","value":{"emails":["jeff32@example.com","jim56@example.com"]}},"extIdsArray":{"summary":"Passing extIds array","value":{"extIds":["ext234","ext456"]}},"idsArray":{"summary":"Passing ids array","value":{"ids":[1,2]}}},"schema":{"oneOf":[{"properties":{"emails":{"description":"**Required if 'all' is false and 'ids', 'extIds' are empty.** Emails to remove from a list. You can pass a **maximum of 150 emails** for removal in one request.\n","items":{"description":"Email to remove from a list","example":"john.smith@contact.com","format":"email","type":"string"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"},{"properties":{"ids":{"description":"**Required if 'all' is false and 'emails', 'extIds' are empty.** IDs to remove from a list. You can pass a **maximum of 150 IDs** for removal in one request.\n","items":{"description":"ID to remove from a list","example":10,"format":"int64","type":"integer"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"},{"properties":{"all":{"description":"**Required if 'emails', 'extIds' and 'ids' are empty.** Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress\n","example":true,"type":"boolean"}},"type":"object"},{"properties":{"extIds":{"description":"**Required if 'all' is false, 'ids' and 'emails' are empty.** EXT_ID attributes to remove from a list. You can pass a **maximum of 150 EXT_ID attributes** for removal in one request.\n","items":{"description":"EXT_ID to remove from a list","example":"ext132","type":"string"},"maxItems":150,"minItems":1,"type":"array"}},"type":"object"}]}}},"description":"Emails adresses OR IDs OR EXT_ID attributes of the contacts OR 'all' true","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"allTrue":{"summary":"Response example when 'all' is passed as true","value":{"processId":5,"total":23}},"emailsArray":{"summary":"Response example when emails array is passed","value":{"failure":["david@example.com"],"success":["jeff32@example.com","jim56@example.com"]}},"extIdsArray":{"summary":"Response example when extIds array is passed","value":{"failure":["ext345"],"success":["ext123"]}},"idsArray":{"summary":"Response example when ids array is passed","value":{"failure":[5],"success":[1,2]}}},"schema":{"$ref":"#/components/schemas/postContactInfo"}}},"description":"All contacts have been removed successfully from the list with details of failed ones"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Delete a contact from a list","tags":["Contacts"],"x-codegen-request-body-name":"contactEmails"}},"/contacts/segments":{"get":{"operationId":"getSegments","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":50,"minimum":0,"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"segments":[{"categoryName":"Name1","id":53,"segmentName":"Segment1","updatedAt":"2017-03-12T12:30:00Z"},{"categoryName":"Name2","id":50,"segmentName":"Segment2","updatedAt":"2017-03-12T12:30:00Z"}]}}},"schema":{"properties":{"count":{"description":"Number of Segments in your account","example":10,"format":"int64","type":"integer"},"segments":{"description":"Listing of all the segments available in your account","type":"array","items":{"type":"object","required":["id","segmentName","categoryName"],"properties":{"categoryName":{"description":"Name of the Segment Category","example":"New Category","type":"string"},"id":{"description":"ID of the segment","example":23,"format":"int64","type":"integer"},"segmentName":{"description":"Name of the Segment","example":"My Segment","type":"string"},"updatedAt":{"description":"Last update UTC date-time of the segment (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-03-13T17:05:09Z","type":"string"}}}}},"type":"object"}}},"description":"Segments informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get all the segments","description":"Retrieve all contact segments defined in your Brevo account with support for pagination and sorting. Results default to 10 segments per page (maximum 50) sorted in descending order of creation. Each segment includes its ID, name, category name, and last update timestamp.","tags":["Contacts"]}},"/contacts/{identifier}":{"delete":{"description":"There are 2 ways to delete a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.   <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute.","operationId":"deleteContact","parameters":[{"description":"Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded)","in":"path","name":"identifier","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"integer"}]}},{"description":"email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute","in":"query","name":"identifierType","schema":{"enum":["email_id","contact_id","ext_id","phone_id","whatsapp_id","landline_number_id"],"type":"string"}}],"responses":{"204":{"content":{},"description":"Contact deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"You're not allowed to delete registered email contact with Brevo"}},"summary":"Delete a contact","tags":["Contacts"]},"get":{"description":"<Note>Follow this format when passing a \"SMS\" phone number as an attribute.\nAccepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx</Note>\nThere are 2 ways to get a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL), phone_id (for SMS) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL, SMS and ID of the contact.   <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute <br><br>Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats ``https://developers.brevo.com/reference/contacts-7#getcontactstats`` endpoint with the appropriate date ranges.","operationId":"getContactInfo","parameters":[{"description":"Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)","in":"path","name":"identifier","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"integer"}]}},{"description":"email_id for Email, phone_id for SMS attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute","in":"query","name":"identifierType","schema":{"enum":["email_id","phone_id","contact_id","ext_id","whatsapp_id","landline_number_id"],"type":"string"}},{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date.\n","in":"query","name":"endDate","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"attributes":{"ADDRESS":"987 5th avenue","AREA":"NY","CITY":"New-York","CIV":"1","DOB":"1986-04-13","FIRST_NAME":"Peggy","LAST_NAME":"Rain","SMS":"3087433387669","ZIP_CODE":"87544"},"createdAt":"2017-05-02T16:40:31Z","email":"peggy.rain@example.com","emailBlacklisted":false,"id":42,"listIds":[40],"modifiedAt":"2017-05-02T16:40:31Z","smsBlacklisted":false,"whatsappBlacklisted":false,"statistics":{"clicked":[{"campaignId":21,"links":[{"count":2,"eventTime":"2016-05-03T21:25:01Z","ip":"66.249.93.118","url":"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email"}]}],"delivered":[{"campaignId":21,"count":2,"eventTime":"2016-05-03T21:24:56Z","ip":"66.249.93.118"}],"messagesSent":[{"campaignId":21,"eventTime":"2016-05-03T20:15:13Z"},{"campaignId":42,"eventTime":"2016-10-17T10:30:01Z"}],"opened":[{"campaignId":21,"count":2,"eventTime":"2016-05-03T21:24:56Z","ip":"66.249.93.118"},{"campaignId":68,"count":1,"eventTime":"2017-01-30T13:56:40Z","ip":"66.249.93.217"}]}}}},"schema":{"allOf":[{"$ref":"#/components/schemas/getContactDetails"},{"properties":{"statistics":{"description":"Campaign statistics of the contact","properties":{"clicked":{"description":"Listing of the clicks generated by the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"links":{"description":"Listing of the clicked links for the campaign","items":{"properties":{"count":{"description":"Number of clicks on this link for the campaign","example":1,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has clicked on the link","example":"165.87.3.15","type":"string"},"url":{"description":"URL of the clicked link","example":"www.myshop.com","type":"string"}},"required":["count","eventTime","ip","url"],"type":"object"},"type":"array"}},"required":["campaignId","links"],"type":"object"},"type":"array"},"complaints":{"description":"Listing of the complaints generated by the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"delivered":{"description":"Listing of the delivered campaign for the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"hardBounces":{"description":"Listing of the hard bounces generated by the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"messagesSent":{"description":"Listing of the sent campaign for the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"opened":{"description":"Listing of the openings generated by the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"count":{"description":"Number of openings for the campaign","example":1,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has opened the email","example":"165.87.3.15","type":"string"}},"required":["campaignId","count","eventTime","ip"],"type":"object"},"type":"array"},"softBounces":{"description":"Listing of the soft bounces generated by the contact","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"transacAttributes":{"description":"Listing of the transactional attributes for the contact","items":{"properties":{},"type":"object"},"type":"array"},"unsubscriptions":{"description":"Listing of the unsubscription for the contact","properties":{"adminUnsubscription":{"description":"Contact has been unsubscribed from the administrator","items":{"properties":{"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has been unsubscribed","example":"165.87.3.15","type":"string"}},"required":["eventTime"],"type":"object"},"type":"array"},"userUnsubscription":{"description":"Contact unsubscribe via unsubscription link in a campaign","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has unsubscribed","example":"165.87.3.15","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"}},"required":["adminUnsubscription","userUnsubscription"],"type":"object"}},"type":"object"}},"required":["statistics"],"type":"object"}]}}},"description":"Contact informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact not found"}},"summary":"Get a contact's details","tags":["Contacts"]},"put":{"description":"<Note>Follow this format when passing a \"SMS\" phone number as an attribute.\nAccepted Number Formats 91xxxxxxxxxx +91xxxxxxxxxx 0091xxxxxxxxxx</Note>\nThere are 2 ways to update a contact <br><br> Option 1- https://api.brevo.com/v3/contacts/{identifier} <br><br> Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={} <br> <br> Option 1 only works if identifierType is email_id (for EMAIL) or contact_id (for ID of the contact),where you can directly pass the value of EMAIL and ID of the contact.   <br><br> Option 2 works for all identifierType, use email_id for EMAIL attribute, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute","operationId":"updateContact","parameters":[{"description":"Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) OR its SMS attribute value OR its WHATSAPP attribute value OR its LANDLINE_NUMBER attribute value","in":"path","name":"identifier","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"integer"}]}},{"description":"email_id for Email, contact_id for ID of the contact, ext_id for EXT_ID attribute, phone_id for SMS attribute, whatsapp_id for WHATSAPP attribute, landline_number_id for LANDLINE_NUMBER attribute","in":"query","name":"identifierType","schema":{"enum":["email_id","contact_id","ext_id","phone_id","whatsapp_id","landline_number_id"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"additionalProperties":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"}]},"description":"Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\", \"COUNTRIES\":[\"India\",\"China\"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}**\n","example":{"COUNTRIES":["India","China"],"EMAIL":"newemail@domain.com","FNAME":"Ellie","LNAME":"Roger"},"type":"object"},"emailBlacklisted":{"description":"Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)","example":false,"type":"boolean"},"ext_id":{"description":"Pass your own Id to update ext_id of a contact.","example":"updateExternalId","type":"string"},"listIds":{"description":"Ids of the lists to add the contact to","items":{"description":"Id of the list to add the contact to","example":65,"format":"int64","type":"integer"},"type":"array"},"smsBlacklisted":{"description":"Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true)","example":true,"type":"boolean"},"smtpBlacklistSender":{"description":"transactional email forbidden sender for contact. Use only for email Contact","items":{"format":"email","type":"string"},"type":"array"},"unlinkListIds":{"description":"Ids of the lists to remove the contact from","items":{"description":"Id of the list to remove the contact from","example":36,"format":"int64","type":"integer"},"type":"array"},"forceMerge":{"default":false,"description":"When true, if the contact being updated shares an identifier (email, SMS, ext_id, whatsapp, landline) with an existing contact, the two contacts are force-merged. The contact with the most recent `last_modified` timestamp is retained; the other is deleted. When false (default), a 4xx error is returned on identifier conflict.","example":true,"type":"boolean"}},"type":"object"}}},"description":"Values to update a contact","required":true},"responses":{"204":{"content":{},"description":"Contact updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactErrorModel"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactErrorModel"}}},"description":"Contact not found"},"425":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/contactErrorModel"}}},"description":"Too Early"}},"summary":"Update a contact","tags":["Contacts"],"x-codegen-request-body-name":"updateContact"}},"/contacts/{identifier}/campaignStats":{"get":{"operationId":"getContactStats","parameters":[{"description":"Email (urlencoded) OR ID of the contact","in":"path","name":"identifier","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"integer"}]}},{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate. Must not be greater than the current date.\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Must not be greater than the current date. Maximum difference between startDate and endDate should not be greater than 90 days.\n","in":"query","name":"endDate","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"clicked":[{"campaignId":21,"links":[{"count":2,"eventTime":"2016-05-03T21:25:01Z","ip":"66.249.93.118","url":"https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=brevo&utm_campaign=test_camp&utm_medium=email"}]}],"delivered":[{"campaignId":21,"count":2,"eventTime":"2016-05-03T21:24:56Z","ip":"66.249.93.118"}],"messagesSent":[{"campaignId":21,"eventTime":"2016-05-03T20:15:13Z"},{"campaignId":42,"eventTime":"2016-10-17T10:30:01Z"},{"campaignId":45,"eventTime":"2016-11-09T11:45:02Z"}],"opened":[{"campaignId":21,"count":2,"eventTime":"2016-05-03T21:24:56Z","ip":"66.249.93.118"},{"campaignId":45,"count":1,"eventTime":"2017-01-30T13:56:40Z","ip":"66.249.93.217"}]}}},"schema":{"description":"Campaign Statistics for the contact","properties":{"clicked":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"links":{"items":{"properties":{"count":{"description":"Number of clicks on this link for the campaign","example":1,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has clicked on the link","example":"165.87.3.15","type":"string"},"url":{"description":"URL of the clicked link","example":"www.myshop.com","type":"string"}},"required":["count","eventTime","ip","url"],"type":"object"},"type":"array"}},"required":["campaignId","links"],"type":"object"},"type":"array"},"complaints":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"delivered":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"hardBounces":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"messagesSent":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"opened":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"count":{"description":"Number of openings of the campaign","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has opened the campaign","example":"165.87.3.15","type":"string"}},"required":["campaignId","count","eventTime","ip"],"type":"object"},"type":"array"},"softBounces":{"items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"},"transacAttributes":{"items":{"properties":{"orderDate":{"description":"Date of the order","example":"2017-03-12","format":"date","type":"string"},"orderId":{"description":"ID of the order","example":248,"format":"int64","type":"integer"},"orderPrice":{"description":"Price of the order","example":24.99,"format":"float","type":"number"}},"required":["orderDate","orderId","orderPrice"],"type":"object"},"type":"array"},"unsubscriptions":{"properties":{"adminUnsubscription":{"description":"Contact has been unsubscribed from the administrator","items":{"properties":{"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has been unsubscribed","example":"165.87.3.15","type":"string"}},"required":["eventTime"],"type":"object"},"type":"array"},"userUnsubscription":{"description":"Contact has unsubscribed via the unsubscription link in the email","items":{"properties":{"campaignId":{"description":"ID of the campaign which generated the event","example":3,"format":"int64","type":"integer"},"eventTime":{"description":"UTC date-time of the event","example":"2017-03-12T20:15:13Z","type":"string"},"ip":{"description":"IP from which the user has unsubscribed","example":"165.87.3.15","type":"string"}},"required":["campaignId","eventTime"],"type":"object"},"type":"array"}},"required":["adminUnsubscription","userUnsubscription"],"type":"object"}},"type":"object"}}},"description":"Contact campaign statistics informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact not found"}},"summary":"Get email campaigns' statistics for a contact","description":"Retrieve email campaign statistics for a specific contact identified by email address or numeric ID. Statistics include messages sent, opens, clicks, hard/soft bounces, deliveries, unsubscriptions, complaints, and transactional attributes. By default, data covers the last 90 days; use startDate and endDate parameters (YYYY-MM-DD) to specify a custom range with a maximum span of 90 days.","tags":["Contacts"]}},"/smtp/blockedContacts":{"get":{"operationId":"getTransacBlockedContacts","parameters":[{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of documents returned per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"minimum":0,"type":"integer"}},{"description":"Index of the first document on the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Comma separated list of emails of the senders from which contacts are blocked or unsubscribed","explode":false,"in":"query","name":"senders","schema":{"items":{"type":"string"},"type":"array"},"style":"form"},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"contacts":[{"blockedAt":"2017-05-01T12:30:00Z","email":"abc@xyz.com","reason":{"code":"adminBlocked","message":"Admin blocked"},"senderEmail":"ez312@gmal.com"}],"count":1}}},"schema":{"properties":{"contacts":{"items":{"properties":{"blockedAt":{"description":"Date when the contact was blocked or unsubscribed on","example":"2017-05-01T12:30:00Z","type":"string"},"email":{"description":"Email address of the blocked or unsubscribed contact","example":"john.smith@example.com","format":"email","type":"string"},"reason":{"description":"Reason for blocking / unsubscribing","example":"Admin blocked","properties":{"code":{"description":"Reason code for blocking / unsubscribing (This code is safe for comparison)","enum":["unsubscribedViaMA","unsubscribedViaEmail","adminBlocked","unsubscribedViaApi","hardBounce","contactFlaggedAsSpam"],"example":"AdminBlocked","type":"string"},"message":{"description":"Reason for blocking / unsubscribing (This string is not safe for comparison)","example":"Admin blocked","type":"string"}},"type":"object"},"senderEmail":{"description":"Sender email address of the blocked or unsubscribed contact","example":"john.smith@example.com","format":"email","type":"string"}},"required":["blockedAt","email","reason","senderEmail"],"type":"object"},"type":"array"},"count":{"description":"Count of blocked or unsubscribed contact","example":1,"format":"int64","type":"integer"}},"type":"object"}}},"description":"List of blocked or unsubscribed transactional contacts"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get the list of blocked or unsubscribed transactional contacts","description":"Retrieve a paginated list of transactional contacts that have been blocked or unsubscribed, along with the reason for blocking (e.g. hard bounce, admin blocked, spam complaint, or unsubscription via email/API/Marketing Automation). Both `startDate` and `endDate` must be provided together when filtering by date range, and neither date can be in the future. Results default to 50 per page (max 100) and are sorted in descending order of record creation unless overridden with the `sort` parameter.","tags":["Transactional emails"]}},"/smtp/blockedContacts/{email}":{"delete":{"parameters":[{"description":"contact email (urlencoded) to unblock.","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Contact unblocked"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Unblock or resubscribe a transactional contact","description":"Unblock or resubscribe a transactional contact by removing their email address from the blacklist. The email address must be URL-encoded in the path parameter and must be a valid email format. If the contact is not found in the blocklist, a 404 error is returned.","tags":["Transactional emails"]}},"/smtp/blockedDomains":{"get":{"description":"Get the list of blocked domains","operationId":"getBlockedDomains","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"domains":["example.com","testdomain.com"]}}},"schema":{"properties":{"domains":{"description":"List of all blocked domains","items":{"description":"name of blocked domain","example":"contact.com","type":"string"},"type":"array"}},"required":["domains"],"type":"object"}}},"description":"List of blocked domains"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get the list of blocked domains","tags":["Transactional emails"],"parameters":[]},"post":{"description":"Blocks a new domain in order to avoid messages being sent to the same","operationId":"blockNewDomain","requestBody":{"content":{"application/json":{"schema":{"properties":{"domain":{"description":"name of the domain to be blocked","example":"example.com","type":"string"}},"required":["domain"],"type":"object"}}},"description":"Name of the domain to be blocked","required":true},"responses":{"201":{"content":{},"description":"Domain is successfully blocked"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Add a new domain to the list of blocked domains","tags":["Transactional emails"],"parameters":[]}},"/smtp/blockedDomains/{domain}":{"delete":{"description":"Unblocks an existing domain from the list of blocked domains","operationId":"deleteBlockedDomain","parameters":[{"description":"The name of the domain to be deleted","in":"path","name":"domain","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Domain is successfully deleted from the list of blocked domains"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Domain not found"}},"summary":"Unblock an existing domain from the list of blocked domains","tags":["Transactional emails"]}},"/smtp/deleteHardbounces":{"post":{"description":"Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)","operationId":"deleteHardbounces","requestBody":{"content":{"application/json":{"schema":{"properties":{"contactEmail":{"description":"Target a specific email address","example":"alex76@example.com","format":"email","type":"string"},"endDate":{"description":"Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate","example":"2017-01-31","type":"string"},"startDate":{"description":"Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate","example":"2016-12-31","type":"string"}},"type":"object"}}},"description":"values to delete hardbounces","required":false},"responses":{"200":{"content":{},"description":"No matching hardbounces found for the given filters. The request was processed successfully but no records were deleted."},"204":{"content":{},"description":"Hardbounces deleted successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Delete hardbounces","tags":["Transactional emails"],"parameters":[]}},"/smtp/email":{"post":{"operationId":"sendTransacEmail","requestBody":{"content":{"application/json":{"schema":{"properties":{"attachment":{"description":"Array of attachment objects. Each attachment must include either an absolute URL (no local file paths) or base64-encoded content, along with the attachment filename. The `name` field is required when `content` is provided. Supported file extensions: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass, xlsm. When `templateId` is specified: if the template uses the New Template Language format, both `url` and `content` attachment types are supported; if the template uses the Old Template Language format, the `attachment` parameter is ignored.\n","items":{"properties":{"content":{"description":"Base64-encoded attachment data","example":"b3JkZXIucGRm","format":"byte","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","type":"string"},"name":{"description":"Attachment filename. Required when `content` is provided.\n","example":"myAttachment.png","type":"string"},"url":{"description":"Absolute URL of the attachment. Local file paths are not supported.\n","example":"https://attachment.domain.com/myAttachmentFromUrl.jpg","format":"url","type":"string"}},"type":"object"},"type":"array"},"batchId":{"description":"UUIDv4 identifier for the scheduled batch of transactional emails. If omitted, a valid UUIDv4 batch identifier is automatically generated.","example":"5c6cfa04-eed9-42c2-8b5c-6d470d978e9d","type":"string"},"bcc":{"description":"Array of BCC recipient objects. Each object contains an email address and an optional name.\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient in bcc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"BCC recipient email address","example":"helen9766@example.com","format":"email","type":"string"},"name":{"description":"Display name of the BCC recipient. Maximum length is 70 characters.\n","example":"Helen","type":"string"}},"required":["email"],"type":"object"},"type":"array"},"cc":{"description":"Array of CC recipient objects. Each object contains an email address and an optional name.\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient in cc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"CC recipient email address","example":"ann6533@example.com","format":"email","type":"string"},"name":{"description":"Display name of the CC recipient. Maximum length is 70 characters.\n","example":"Ann","type":"string"}},"required":["email"],"type":"object"},"type":"array"},"headers":{"additionalProperties":{},"description":"Custom email headers (non-standard headers) to include in the email. The `sender.ip` header can be set to specify the IP address used for sending transactional emails (dedicated IP users only). Header names must use Title-Case-Format (words separated by hyphens with the first letter of each word capitalized). Headers not in this format are automatically converted. Standard email headers are not supported. Example: `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_value\", \"Idempotency-Key\":\"abc-123\"}`\n","example":{"X-Mailin-custom":"some_custom_header","idempotencyKey":"abc-123","sender.ip":"1.2.3.4"},"type":"object"},"htmlContent":{"description":"HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided.\n","example":"<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>","type":"string"},"messageVersions":{"description":"Array of message version objects for sending customized email variants. The `templateId` can be customized per version only if a global `templateId` is provided. The `htmlContent` and `textContent` can be customized per version only if at least one of these is present in the global parameters. Global parameters such as `to` (required), `bcc`, `cc`, `replyTo`, and `subject` can be customized per version. Maximum total recipients per API request is 2000. Maximum recipients per message version is 99. Individual `params` objects must not exceed 100 KB. Cumulative `params` across all versions must not exceed 1000 KB. See https://developers.brevo.com/docs/batch-send-transactional-emails for detailed usage instructions.\n","items":{"properties":{"bcc":{"description":"Array of BCC recipient objects. Each object contains an email address and an optional name.\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient in bcc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"BCC recipient email address","example":"helen9766@example.com","format":"email","type":"string"},"name":{"description":"Display name of the BCC recipient. Maximum length is 70 characters.\n","example":"Helen","type":"string"}},"required":["email"],"type":"object"},"type":"array"},"cc":{"description":"Array of CC recipient objects. Each object contains an email address and an optional name.\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient in cc for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"CC recipient email address","example":"ann6533@example.com","format":"email","type":"string"},"name":{"description":"Display name of the CC recipient. Maximum length is 70 characters.\n","example":"Ann","type":"string"}},"required":["email"],"type":"object"},"type":"array"},"htmlContent":{"description":"HTML body content of the email. Required when `templateId` is not provided. Ignored when `templateId` is provided.\n","example":"<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>","type":"string"},"params":{"additionalProperties":{},"description":"Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format.\n","example":{"FNAME":"Joe","LNAME":"Doe"},"type":"object"},"replyTo":{"description":"Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email.\n","properties":{"email":{"description":"Email address in reply to","example":"ann6533@example.com","format":"email","type":"string"},"name":{"description":"Display name for the reply-to address. Maximum length is 70 characters.\n","example":"Ann","type":"string"}},"required":["email"],"type":"object"},"subject":{"description":"Email subject line for this message version\n","example":"Login Email confirmation","type":"string"},"textContent":{"description":"Plain text body content of the email. Ignored when `templateId` is provided.\n","example":"Please confirm your email address by clicking on the link https://text.domain.com","type":"string"},"to":{"description":"Array of recipient objects. Each object contains an email address and an optional display name.\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"Email address of the recipient","example":"jimmy98@example.com","format":"email","type":"string"},"name":{"description":"Display name of the recipient. Maximum length is 70 characters.\n","example":"Jimmy","type":"string"}},"required":["email"],"type":"object"},"type":"array"}},"required":["to"],"type":"object"},"type":"array"},"params":{"additionalProperties":{},"description":"Key-value pairs for template variable substitution. Only applicable when the template uses the New Template Language format.\n","example":{"FNAME":"Joe","LNAME":"Doe"},"type":"object"},"replyTo":{"description":"Reply-to email address (required) and optional display name. Recipients will use this address when replying to the email.\n","properties":{"email":{"description":"Email address in reply to","example":"ann6533@example.com","format":"email","type":"string"},"name":{"description":"Display name for the reply-to address. Maximum length is 70 characters.\n","example":"Ann","type":"string"}},"required":["email"],"type":"object"},"scheduledAt":{"description":"UTC date-time when the email should be sent (format: YYYY-MM-DDTHH:mm:ss.SSSZ). Include timezone information in the date-time value. Scheduled emails may be delayed by up to 5 minutes.","example":"2022-04-05T12:30:00+02:00","format":"date-time","type":"string"},"sender":{"description":"Sender information. Required when `templateId` is not provided. Specify either an email address (with optional name) or a sender ID. The `name` field is ignored when `id` is provided.\n","properties":{"email":{"description":"Sender email address. Required when `id` is not provided.","example":"no-reply@myshop.com","format":"email","type":"string"},"id":{"description":"Sender identifier. Required when `email` is not provided. Use this field to select a sender with a specific IP pool (dedicated IP users only).","example":2,"format":"int64","type":"integer"},"name":{"description":"Display name of the sender. Maximum length is 70 characters. Only applicable when `email` is provided.\n","example":"Mary from MyShop","type":"string"}},"type":"object"},"subject":{"description":"Email subject line. Required when `templateId` is not provided.\n","example":"Login Email confirmation","type":"string"},"tags":{"description":"Array of tags for categorizing and filtering emails","items":{"example":"tag1","type":"string"},"type":"array"},"templateId":{"description":"Template identifier","example":2,"format":"int64","type":"integer"},"textContent":{"description":"Plain text body content of the email. Ignored when `templateId` is provided.\n","example":"Please confirm your email address by clicking on the link https://text.domain.com","type":"string"},"to":{"description":"Array of recipient objects. Each object contains an email address and an optional display name. Required when `messageVersions` is not provided. Ignored when `messageVersions` is provided. Example: `[{\"name\":\"Jimmy\", \"email\":\"jimmy@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]`\n","items":{"properties":{"contactPixelTrackingConsent":{"description":"Consent of the recipient for open (pixel) and click tracking, resolved by the sender at send time. Considered only if the per-contact pixel tracking consent feature is enabled for your account. Pass `true` if this recipient has consented to open and click tracking, in which case the open pixel and tracked links identify the recipient. Pass `false` to anonymise the open and click events (counted in aggregate statistics only). If it is not passed, the recipient is treated as unknown consent status and the email is still sent (the open and click are anonymised unless your account tracks unknown-consent contacts). A value other than `true`/`false` is rejected. Ignored when the feature is not enabled for your account.\n","example":true,"type":"boolean"},"email":{"description":"Email address of the recipient","example":"jimmy98@example.com","format":"email","type":"string"},"name":{"description":"Display name of the recipient. Maximum length is 70 characters.\n","example":"Jimmy","type":"string"}},"required":["email"],"type":"object"},"type":"array"}},"type":"object"},"examples":{"static-content":{"summary":"Static content example","description":"Example request with static HTML content","value":{"sender":{"name":"Alex from Brevo","email":"hello@brevo.com"},"to":[{"email":"johndoe@example.com","name":"John Doe"}],"subject":"Hello from Brevo!","htmlContent":"<html><head></head><body><p>Hello,</p>This is my first transactional email sent from Brevo.</p></body></html>"}},"dynamic-content":{"summary":"Dynamic content example","description":"Example request with dynamic content using template variables","value":{"sender":{"name":"Alex from Brevo","email":"hello@brevo.com"},"to":[{"email":"johndoe@example.com","name":"John Doe"}],"subject":"Hello from Brevo!","params":{"trackingCode":"JD01460000300002350000","estimatedArrival":"Tomorrow"},"htmlContent":"<html><head></head><body>Your delivery is expected {{params.estimatedArrival}}.Your tracking code: {{params.trackingCode}}</p></body></html>"}}}}},"description":"Request body parameters for sending a transactional email","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"messageId":"<201798300811.5787683@relay.domain.com>"}}},"schema":{"properties":{"messageId":{"description":"Message ID of the transactional email sent","example":"<201798300811.5787683@relay.domain.com>","type":"string"},"messageIds":{"items":{"description":"Message ID for each version of the transactional email sent","example":["<201798300811.5787683@relay.domain.com>","<201798300811.5787683@relay.domain.com>"],"type":"string"},"type":"array"}},"type":"object"}}},"description":"Transactional email sent successfully"},"202":{"content":{"application/json":{"examples":{"response":{"value":{"messageId":"<201798300811.5787683@relay.domain.com>"}}},"schema":{"properties":{"batchId":{"description":"Batch identifier for the scheduled transactional email","example":"5c6cfa04-eed9-42c2-8b5c-6d470d978e9d","type":"string"},"messageId":{"description":"Message ID of the transactional email scheduled","example":"<201798300811.5787683@relay.domain.com>","type":"string"},"messageIds":{"items":{"description":"Message ID for each version of the transactional email scheduled","type":"string"},"type":"array"}},"type":"object"}}},"description":"Transactional email scheduled successfully"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Send a transactional email","description":"Send a transactional email to one or more recipients, either using inline HTML content or a pre-built template via `templateId`. You can schedule emails for future delivery using `scheduledAt` (UTC, up to 5-minute delay), send multiple personalized versions with `messageVersions` (max 2000 total recipients, 99 per version), and attach files via URL or base64-encoded content. A `sender` and `subject` are required when no `templateId` is provided; when a `templateId` is used, the template''s sender and subject are applied unless overridden.","tags":["Transactional emails"],"parameters":[]}},"/smtp/email/{identifier}":{"delete":{"description":"Delete scheduled batch of emails by batchId or single scheduled email by messageId","operationId":"deleteScheduledEmailById","parameters":[{"description":"The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`).","examples":{"batchId":{"summary":"batchId of scheduled batch","value":"4320f270-a4e3-4a2e-b591-edfe30a5e627"},"messageId":{"summary":"messageId of scheduled email","value":"<202202231031.53307417725@smtp-relay.mailin.fr>"}},"in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Scheduled email(s) deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Delete scheduled emails by batchId or messageId","tags":["Transactional emails"]}},"/smtp/emailStatus/{identifier}":{"get":{"description":"Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)","operationId":"getScheduledEmailById","parameters":[{"description":"The `batchId` of scheduled emails batch (must be a valid UUIDv4) or the `messageId` of scheduled email (enclosed in angle brackets with @ sign, e.g. `<...@domain>`). When using `messageId`, the `limit`, `offset`, `sort`, and `status` query parameters are ignored.","examples":{"batchId":{"summary":"batchId of scheduled batch","value":"4320f270-a4e3-4a2e-b591-edfe30a5e627"},"messageId":{"summary":"messageId of scheduled email","value":"<202202231031.53307417725@smtp-relay.mailin.fr>"}},"in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Cannot be more than 30 days older than the current date.","example":"2022-02-02","in":"query","name":"startDate","required":false,"schema":{"format":"date","type":"string"}},{"description":"Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.","example":"2022-03-02","in":"query","name":"endDate","required":false,"schema":{"format":"date","type":"string"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`.","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`.","in":"query","name":"status","required":false,"schema":{"enum":["processed","inProgress","queued"],"type":"string"}},{"description":"Number of documents returned per page. Not valid when identifier is `messageId`.","example":100,"in":"query","name":"limit","required":false,"schema":{"default":100,"format":"int64","maximum":500,"minimum":0,"type":"integer"}},{"description":"Index of the first document on the page.  Not valid when identifier is `messageId`.","example":0,"in":"query","name":"offset","required":false,"schema":{"default":0,"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"batchId":{"value":{"batches":[{"createdAt":"2022-02-26T11:36:43.576000000Z","scheduledAt":"2022-02-28T11:36:43.576000000Z","status":"queued"},{"createdAt":"2022-02-24T11:36:43.576000000Z","scheduledAt":"2022-02-25T11:36:43.576000000Z","status":"processed"},{"createdAt":"2022-02-25T11:36:43.576000000Z","scheduledAt":"2022-02-26T11:36:43.576000000Z","status":"inProgress"}],"count":3}},"messageId":{"value":{"createdAt":"2022-02-26T11:36:43.576000000Z","scheduledAt":"2022-02-28T11:36:43.576000000Z","status":"queued"}}},"schema":{"oneOf":[{"properties":{"batches":{"items":{"properties":{"createdAt":{"description":"Datetime on which the batch was scheduled","format":"date-time","type":"string"},"scheduledAt":{"description":"Datetime for which the batch was scheduled","format":"date-time","type":"string"},"status":{"description":"Current status of the scheduled batch","enum":["inProgress","queued","processed","error"],"type":"string"}},"required":["scheduledAt","createdAt","status"],"type":"object"},"type":"array"},"count":{"description":"Total number of batches","type":"integer"}},"type":"object"},{"properties":{"createdAt":{"description":"Datetime on which the email was scheduled","format":"date-time","type":"string"},"scheduledAt":{"description":"Datetime for which the email was scheduled","format":"date-time","type":"string"},"status":{"description":"Current status of the scheduled email","enum":["inProgress","queued","processed","error"],"type":"string"}},"required":["scheduledAt","createdAt","status"],"type":"object"}]}}},"description":"Scheduled email batches"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Fetch scheduled emails by batchId or messageId","tags":["Transactional emails"]}},"/smtp/emails":{"get":{"description":"This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.","operationId":"getTransacEmailsList","parameters":[{"description":"**Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent.\n","in":"query","name":"email","schema":{"type":"string"}},{"description":"**Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email.\n","in":"query","name":"templateId","schema":{"format":"int64","type":"integer"}},{"description":"**Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent.\n","in":"query","name":"messageId","schema":{"type":"string"}},{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the list. **Maximum time period that can be selected is one month**.\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the list. **Maximum time period that can be selected is one month.**\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Number of documents returned per page","in":"query","name":"limit","schema":{"default":500,"format":"int64","maximum":1000,"minimum":0,"type":"integer"}},{"description":"Index of the first document in the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":120,"transactionalEmails":[{"date":"2019-05-25T11:53:26Z","email":"abc@xyz.com","messageId":"<201798300811.5787683@relay.domain.com>","subject":"summer camp","templateId":15,"uuid":"5a78c-209ok98262910-std2341"},{"date":"2019-05-25T07:28:11Z","email":"test@test.com","messageId":"<201798300811.5700093@relay.domain.com>","subject":"details verification","templateId":15,"uuid":"5a78c-209ok98262910-s99a341"}]}}},"schema":{"properties":{"count":{"description":"Total number of transactional emails available on your account according to the passed filter","example":5,"format":"int64","type":"integer"},"transactionalEmails":{"items":{"properties":{"date":{"description":"Date on which transactional email was sent","example":"2017-03-12T12:30:00Z","type":"string"},"email":{"description":"Email address to which transactional email has been sent","example":"john.smith@example.com","format":"email","type":"string"},"from":{"description":"Email address of the sender from which the email was sent","example":"diana.doe@example.com","format":"email","type":"string"},"messageId":{"description":"Message Id of the sent email","example":"<201798300811.5700093@relay.domain.com>","type":"string"},"subject":{"description":"Subject of the sent email","example":"Summer Camp","type":"string"},"tags":{"description":"Tags used for your email","items":{"example":"tag1","type":"string"},"type":"array"},"templateId":{"description":"Id of the template","example":2,"format":"int64","type":"integer"},"uuid":{"description":"Unique id of the email sent to a particular contact","example":"5a78c-209ok98262910-s99a341","type":"string"}},"required":["date","email","messageId","subject","uuid"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"List of transactional emails"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get the list of transactional emails on the basis of allowed filters","tags":["Transactional emails"]}},"/smtp/emails/{uuid}":{"get":{"description":"<Note title=\"How to get uuid\">You can get the uuid using either of the following methods:\nSend a GET request to https://api.brevo.com/v3/smtp/emails and pass the message_id in the url. Use your api-key to authenticate the request and you will get your uuid as a response.\nThe uuid can also be fetched from the transactional logs page in your Brevo account, from the address URL.</Note>","operationId":"getTransacEmailContent","parameters":[{"description":"Unique id of the transactional email that has been sent to a particular contact","in":"path","name":"uuid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"body":"<!DOCTYPE html> <html> <body> <h1>Greetings from the team</h1> <p>This is the actual html content sent</p> </body> </html>","date":"2016-02-25T11:53:26Z","email":"abc@example.com","events":[{"name":"sent","time":"2016-02-25T11:53:26Z"},{"name":"delivered","time":"2016-02-25T11:55:26Z"},{"name":"opened","time":"2016-02-26T09:53:26Z"}],"subject":"Summer Camps","templateId":12}}},"schema":{"properties":{"attachmentCount":{"description":"Count of the attachments that were sent in the email","example":2,"format":"int64","type":"integer"},"body":{"description":"Actual content of the transactional email that has been sent","example":"<!DOCTYPE html> <html> <body> <h1>Greetings from the team</h1> <p>This is the actual html content sent</p> </body> </html>","type":"string"},"date":{"description":"Date on which transactional email was sent","example":"2017-03-12T12:30:00Z","type":"string"},"email":{"description":"Email address to which transactional email has been sent","example":"abc@example.com","format":"email","type":"string"},"events":{"description":"Series of events which occurred on the transactional email","items":{"properties":{"name":{"description":"Name of the event that occurred on the sent email","example":"delivered","type":"string"},"time":{"description":"Time at which the event occurred","example":"2017-03-12T12:30:00Z","type":"string"}},"required":["name","time"],"type":"object"},"type":"array"},"subject":{"description":"Subject of the sent email","example":"Summer Camp","type":"string"},"templateId":{"description":"Id of the template","example":2,"format":"int64","type":"integer"}},"required":["date","email","events","subject"],"type":"object"}}},"description":"Transactional email content"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get the personalized content of a sent transactional email","tags":["Transactional emails"]}},"/smtp/log/{identifier}":{"delete":{"parameters":[{"description":"MessageId or email address of the transactional log(s) to delete. Must be a valid message ID (enclosed in angle brackets with @ sign) or a valid email address.","in":"path","name":"identifier","required":true,"schema":{"type":"string"}},{"description":"Starting date (YYYY-MM-DD) to narrow down logs for deletion","in":"query","name":"from_date","required":false,"schema":{"type":"string"}},{"description":"Ending date (YYYY-MM-DD) to narrow down logs for deletion","in":"query","name":"to_date","required":false,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Transactional Logs deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Message ID not found"}},"summary":"Delete an SMTP transactional log","description":"Delete SMTP transactional log entries identified by a message ID (enclosed in angle brackets with an @ sign) or a valid email address. Optionally narrow the deletion to a specific date range using `from_date` and `to_date` query parameters (YYYY-MM-DD format). The operation also removes any associated stored email preview content.","tags":["Transactional emails"]}},"/smtp/statistics/aggregatedReport":{"get":{"description":"This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days","operationId":"getAggregatedSmtpReport","parameters":[{"description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 90 if neither dates nor days are provided.\n","in":"query","name":"days","schema":{"format":"int64","maximum":90,"type":"integer"}},{"description":"Tag of the emails","in":"query","name":"tag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"blocked":2,"clicks":9987,"delivered":18996,"hardBounces":234,"invalid":0,"opens":17654,"range":"2016-09-08|2017-04-28","requests":19887,"softBounces":1533,"spamReports":1,"uniqueClicks":8766,"uniqueOpens":13688,"unsubscribed":2}}},"schema":{"properties":{"blocked":{"description":"Number of blocked contact emails for the timeframe","example":2,"format":"int64","type":"integer"},"clicks":{"description":"Number of clicks for the timeframe","example":12,"format":"int64","type":"integer"},"delivered":{"description":"Number of delivered emails for the timeframe","example":249,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hardbounces for the timeframe","example":1,"format":"int64","type":"integer"},"invalid":{"description":"Number of invalid emails for the timeframe","example":0,"format":"int64","type":"integer"},"opens":{"description":"Number of openings for the timeframe","example":47,"format":"int64","type":"integer"},"range":{"description":"Time frame of the report","example":"2016-09-08|2017-04-06","type":"string"},"requests":{"description":"Number of requests for the timeframe","example":263,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounces for the timeframe","example":4,"format":"int64","type":"integer"},"spamReports":{"description":"Number of complaint (spam report) for the timeframe","example":0,"format":"int64","type":"integer"},"uniqueClicks":{"description":"Number of unique clicks for the timeframe","example":8,"format":"int64","type":"integer"},"uniqueOpens":{"description":"Number of unique openings for the timeframe","example":37,"format":"int64","type":"integer"},"unsubscribed":{"description":"Number of unsubscribed emails for the timeframe","example":0,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Aggregated report informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get your transactional email activity aggregated over a period of time","tags":["Transactional emails"]}},"/smtp/statistics/events":{"get":{"description":"This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days","operationId":"getEmailEventReport","parameters":[{"description":"Number limitation for the result returned","in":"query","name":"limit","schema":{"default":2500,"format":"int64","maximum":5000,"minimum":0,"type":"integer"}},{"description":"Beginning point in the list to retrieve from.","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of days in the past including today (positive integer, maximum 90). _Not compatible with 'startDate' and 'endDate'_. Defaults to 30 if neither dates nor days are provided.\n","in":"query","name":"days","schema":{"format":"int64","maximum":90,"type":"integer"}},{"description":"Filter the report for a specific email addresses","in":"query","name":"email","schema":{"format":"email","type":"string"}},{"description":"Filter the report for a specific event type","in":"query","name":"event","schema":{"enum":["bounces","hardBounces","softBounces","delivered","spam","requests","opened","clicks","invalid","deferred","blocked","unsubscribed","error","loadedByProxy"],"type":"string"}},{"description":"Filter the report for tags (serialized and urlencoded array)","in":"query","name":"tags","schema":{"type":"string"}},{"description":"Filter on a specific message id","in":"query","name":"messageId","schema":{"type":"string"}},{"description":"Filter on a specific template id","in":"query","name":"templateId","schema":{"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"events":[{"date":"2017-03-12T12:30:00Z","email":"john.smith@example.com","event":"deferred","from":"john@example.com","messageId":"<201798300811.5787683@example.domain.com>","reason":"Error connection timeout","tag":"OrderConfirmation","templateId":4},{"date":"2017-03-13T16:30:00Z","email":"john.smith@example.com","event":"delivered","from":"john@example.com","messageId":"<201798300811.5787683@example.domain.com>","tag":"OrderConfirmation","templateId":5}]}}},"schema":{"properties":{"events":{"items":{"properties":{"date":{"description":"UTC date-time on which the event has been generated","example":"2017-03-12T12:30:00Z","type":"string"},"email":{"description":"Email address which generates the event","example":"john.smith@example.com","format":"email","type":"string"},"event":{"description":"Event which occurred","enum":["bounces","hardBounces","softBounces","delivered","spam","requests","opened","clicks","invalid","deferred","blocked","unsubscribed","error","loadedByProxy"],"example":"delivered","type":"string"},"from":{"description":"Sender email from which the emails are sent","example":"john@example.com","format":"email","type":"string"},"ip":{"description":"IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks)","example":"165.87.3.15","type":"string"},"link":{"description":"The link which is sent to the user (only available if the event is requests or opened or clicks)","example":"https://www.someexamplelink.com","type":"string"},"messageId":{"description":"Message ID which generated the event","example":"<201798300811.5787683@relay.domain.com>","type":"string"},"reason":{"description":"Reason of bounce (only available if the event is hardbounce or softbounce)","example":"Error connection timeout","type":"string"},"subject":{"description":"Subject of the event","example":"Sib client test","type":"string"},"tag":{"description":"Tag of the email which generated the event","example":"OrderConfirmation","type":"string"},"templateId":{"description":"ID of the template (only available if the email is template based)","example":4,"format":"int64","type":"integer"}},"required":["date","email","event","messageId"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Email events report informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get all your transactional email activity (unaggregated events)","tags":["Transactional emails"]}},"/smtp/statistics/reports":{"get":{"description":"This endpoint will show the aggregated stats per day for the past 10 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 30 days.","operationId":"getSmtpReport","parameters":[{"description":"Number of documents returned per page","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":30,"minimum":0,"type":"integer"}},{"description":"Index of the first document on the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"**Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD)\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD)\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of days in the past including today (positive integer, maximum 30). _Not compatible with 'startDate' and 'endDate'_\n","in":"query","name":"days","schema":{"format":"int64","maximum":30,"type":"integer"}},{"description":"Tag of the emails","in":"query","name":"tag","schema":{"type":"string"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"reports":[{"blocked":519,"clicks":1026,"date":"2017-04-30","delivered":10103,"hardBounces":21,"invalid":1,"opens":5091,"requests":10756,"softBounces":137,"spamReports":0,"uniqueClicks":720,"uniqueOpens":2318,"unsubscribed":0},{"blocked":920,"clicks":1514,"date":"2017-05-01","delivered":17499,"hardBounces":34,"invalid":2,"opens":10089,"requests":18812,"softBounces":254,"spamReports":0,"uniqueClicks":1090,"uniqueOpens":4393,"unsubscribed":3}]}}},"schema":{"properties":{"reports":{"items":{"properties":{"blocked":{"description":"Number of blocked emails for the date","example":0,"format":"int64","type":"integer"},"clicks":{"description":"Number of clicks for the date","example":6,"format":"int64","type":"integer"},"date":{"description":"Date of the statistics","example":"2017-04-06","format":"date","type":"string"},"delivered":{"description":"Number of delivered emails for the date","example":63,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hardbounces for the date","example":1,"format":"int64","type":"integer"},"invalid":{"description":"Number of invalid emails for the date","example":0,"format":"int64","type":"integer"},"opens":{"description":"Number of openings for the date","example":58,"format":"int64","type":"integer"},"requests":{"description":"Number of requests for the date","example":65,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounces for the date","example":1,"format":"int64","type":"integer"},"spamReports":{"description":"Number of complaints (spam reports) for the date","example":0,"format":"int64","type":"integer"},"uniqueClicks":{"description":"Number of unique clicks for the date","example":5,"format":"int64","type":"integer"},"uniqueOpens":{"description":"Number of unique openings for the date","example":52,"format":"int64","type":"integer"},"unsubscribed":{"description":"Number of unsubscribed emails for the date","example":0,"format":"int64","type":"integer"}},"required":["blocked","clicks","date","delivered","hardBounces","invalid","opens","requests","softBounces","spamReports","uniqueClicks","uniqueOpens","unsubscribed"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Aggregated report informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get your transactional email activity aggregated per day","tags":["Transactional emails"]}},"/smtp/template/preview":{"post":{"operationId":"postPreviewSmtpEmailTemplates","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"required":["email"]},{"required":["params"]}],"properties":{"email":{"description":"Email of the contact.(Required if params not provided)","example":"john.doe@example.com","type":"string"},"params":{"description":"Key-value pairs of dynamic parameters for template rendering.(Required if email not provided) For example: **{\"Firstname\":\"John\", \"Lastname\":\"Doe\"}**\n","properties":{"Firstname":{"description":"firstname of the contact. **Dynamic parameter**\n","example":"John","type":"string"},"Lastname":{"description":"Lastname of the contact. **Dynamic parameter**","example":"Doe","type":"string"}},"type":"object"},"templateId":{"description":"Id of the template.","example":22,"type":"integer"}},"required":["templateId"],"type":"object"}}},"description":"Values to fetch Template preview","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"fromEmail":"nikon.doe@example.com","fromName":"Nikon Doe","html":"<!DOCTYPE html><html><head><title>Preview html content</title></head><body><p>html content</p></body></html>","previewText":"Preview text","subject":"Template preview subject","usedFeedNames":"[\"feed_1\",\"feed_2\"]"}}},"schema":{"properties":{"fromEmail":{"description":"Sender email address","example":"nikon.doe@example.com","type":"string"},"fromName":{"description":"Sender Name","example":"Nikon doe","type":"string"},"html":{"description":"Html content of the template","example":"<!DOCTYPE html><html><head><title>Preview html content</title></head><body><p>html content,feed_1_value, feed_2_value </p></body></html>","type":"string"},"previewText":{"description":"Preview text of the template","example":"Preview text","type":"string"},"subject":{"description":"subject of the template","example":"Template preview subject","type":"string"},"usedFeedNames":{"example":["feed_1","feed_2"],"items":{"description":"feeds alias used in the template","type":"string"},"type":"array"}},"type":"object"}}},"description":"successfully fetched template's preview fields"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Generate the rendered preview of transactional template","description":"Generate a fully rendered preview of a transactional email template by resolving dynamic variables. Provide either an `email` address (to populate variables from the contact''s attributes) or a `params` object with key-value pairs for manual substitution; at least one of these is required alongside the mandatory `templateId`. The response includes the rendered HTML, subject, sender details, preview text, and any feed names used in the template.","tags":["Transactional emails"],"parameters":[]}},"/smtp/templates":{"get":{"operationId":"getSmtpTemplates","parameters":[{"description":"Filter on the status of the template. Active = true, inactive = false","in":"query","name":"templateStatus","schema":{"type":"boolean"}},{"description":"Number of documents returned per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":1000,"minimum":0,"type":"integer"}},{"description":"Index of the first document in the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Filter on the editor type used to create the template. Currently only `richTextEditor` is supported as a filter value.","in":"query","name":"editorType","required":false,"schema":{"enum":["richTextEditor"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"templates":[{"createdAt":"2016-02-24T14:44:24Z","htmlContent":"HTML CONTENT 1","id":5,"isActive":false,"modifiedAt":"2016-02-24T15:37:11Z","name":"ChristomasTimeTemplate","replyTo":"replyto@domain.com","sender":{"email":"john.smith@example.com","id":23,"name":"John"},"subject":"Merry Christmas","tag":"Festival","testSent":false,"toField":""},{"createdAt":"2016-02-25T11:53:26Z","htmlContent":"HTML CONTENT 2","id":12,"isActive":true,"modifiedAt":"2016-02-25T11:53:26Z","name":"SummerSales2017Template","replyTo":"replyto@domain.com","sender":{"email":"john.smith@example.com","id":23,"name":"John"},"subject":"Enjoy our summer Sales !","tag":"Summer","testSent":false,"toField":""}]}}},"schema":{"properties":{"count":{"description":"Count of transactional email templates","example":1,"format":"int64","type":"integer"},"templates":{"items":{"$ref":"#/components/schemas/getSmtpTemplateOverview"},"type":"array"}},"type":"object"}}},"description":"transactional email templates informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Get the list of email templates","description":"Retrieve a paginated list of all transactional email templates (including automation templates) with their details such as name, subject, sender, status, HTML content, and timestamps. Results default to 50 per page (max 1000) and are sorted in descending creation order unless overridden. You can filter by active/inactive status using `templateStatus` and by editor type using `editorType` (currently only `richTextEditor` is supported).","tags":["Transactional emails"]},"post":{"operationId":"createSmtpTemplate","requestBody":{"content":{"application/json":{"schema":{"properties":{"attachmentUrl":{"description":"Absolute url of the attachment (**no local file**). Extension allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps'\n","example":"https://attachment.domain.com","format":"url","type":"string"},"htmlContent":{"description":"Body of the message (HTML version). The field must have more than 10 characters. **REQUIRED if htmlUrl is empty**\n","example":"The order n°xxxxx has been confirmed. Thanks for your purchase","type":"string"},"htmlUrl":{"description":"Url which contents the body of the email message. REQUIRED if htmlContent is empty","example":"https://html.domain.com","format":"url","type":"string"},"isActive":{"description":"Status of template. isActive = true means template is active and isActive = false means template is inactive","example":true,"type":"boolean"},"replyTo":{"description":"Email on which campaign recipients will be able to reply to","example":"support@myshop.com","format":"email","type":"string"},"sender":{"description":"Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{\"name\":\"xyz\", \"email\":\"example@abc.com\"}** **{\"name\":\"xyz\", \"id\":123}**\n","properties":{"email":{"description":"Email of the sender","example":"contact@myshop.com","format":"email","type":"string"},"id":{"description":"Select the sender for the template on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_.\n","example":3,"format":"int64","type":"integer"},"name":{"description":"Name of the sender. **If not passed, will be set to default**\n","example":"Mary from MyShop","type":"string"}},"type":"object"},"subject":{"description":"Subject of the template","example":"Thanks for your purchase !","type":"string"},"tag":{"description":"Tag of the template","example":"OrderConfirmation","type":"string"},"templateName":{"description":"Name of the template","example":"Order Confirmation - EN","type":"string"},"toField":{"description":"To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization\n","example":"{FNAME} {LNAME}","type":"string"}},"required":["sender","subject","templateName"],"type":"object"}}},"description":"values to update in transactional email template","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"ID of the object created","example":5,"format":"int64","type":"integer"}},"required":["id"],"type":"object"}}},"description":"successfully created"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"}},"summary":"Create an email template","description":"Create a new transactional email template with the specified sender, subject, and content. The `sender`, `subject`, and `templateName` fields are required. Template content can be provided via `htmlContent` (minimum 10 characters) or `htmlUrl`; at least one must be supplied. Templates are created as inactive by default unless `isActive` is explicitly set to `true`.","tags":["Transactional emails"],"parameters":[]}},"/smtp/templates/{templateId}":{"delete":{"operationId":"deleteSmtpTemplate","parameters":[{"description":"id of the template","in":"path","name":"templateId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Inactive transactional email template has been deleted"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Delete an inactive email template","description":"Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets.","tags":["Transactional emails"]},"get":{"operationId":"getSmtpTemplate","parameters":[{"description":"ID of the template. Can be a numeric template ID or a custom template identifier string (alphanumeric, hyphens, and underscores only, max 64 characters, must start with a letter).","in":"path","name":"templateId","required":true,"schema":{"oneOf":[{"format":"int64","type":"integer"},{"type":"string"}]}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"createdAt":"2016-02-25T11:53:26Z","doiTemplate":false,"htmlContent":"HTML CONTENT 4","id":33,"isActive":true,"modifiedAt":"2016-02-25T11:53:26Z","name":"OrderConfirmation","replyTo":"replyto@domain.com","sender":{"email":"john.smith@example.com","id":26,"name":"John"},"subject":"Order Confirmation : Thanks for your Purchase !","tag":"","testSent":false,"toField":""}}},"schema":{"$ref":"#/components/schemas/getSmtpTemplateOverview"}}},"description":"Email template informations"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Returns the template information","description":"Retrieve the full details of a specific transactional email template by its numeric ID or custom template identifier string. The response includes the template name, subject, sender information, HTML content, active status, creation and modification timestamps, reply-to address, tag, and a `doiTemplate` flag indicating whether the template is a double opt-in template (detected by the presence of optin-related tags or variables in the content).","tags":["Transactional emails"]},"put":{"operationId":"updateSmtpTemplate","parameters":[{"description":"ID of the template. Can be a numeric template ID or a custom template identifier string.","in":"path","name":"templateId","required":true,"schema":{"oneOf":[{"format":"int64","type":"integer"},{"type":"string"}]}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attachmentUrl":{"description":"Absolute url of the attachment (**no local file**). Extensions allowed: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps\n","example":"https://attachment.domain.com","format":"url","type":"string"},"htmlContent":{"description":"**Required if htmlUrl is empty**. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)\n","example":"The order n°xxxxx has been confirmed. Thanks for your purchase","type":"string"},"htmlUrl":{"description":"**Required if htmlContent is empty**. URL to the body of the email (HTML)\n","example":"https://html.domain.com","format":"url","type":"string"},"isActive":{"description":"Status of the template. isActive = false means template is inactive, isActive = true means template is active","example":true,"type":"boolean"},"replyTo":{"description":"Email on which campaign recipients will be able to reply to","example":"support@myshop.com","format":"email","type":"string"},"sender":{"description":"Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example: **{\"name\":\"xyz\", \"email\":\"example@abc.com\"}** **{\"name\":\"xyz\", \"id\":123}**\n","properties":{"email":{"description":"Email of the sender","example":"contact@myshop.com","format":"email","type":"string"},"id":{"description":"Select the sender for the template on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_.\n","example":3,"format":"int64","type":"integer"},"name":{"description":"Name of the sender","example":"Mary from MyShop","type":"string"}},"type":"object"},"subject":{"description":"Subject of the email","example":"Thanks for your purchase !","type":"string"},"tag":{"description":"Tag of the template","example":"OrderConfirmation","type":"string"},"templateName":{"description":"Name of the template","example":"Order Confirmation - EN","type":"string"},"toField":{"description":"To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization\n","example":"{FNAME} {LNAME}","type":"string"}},"type":"object"}}},"description":"values to update in transactional email template","required":true},"responses":{"204":{"content":{},"description":"transactional email template updated"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Error code displayed in case of a failure","enum":["invalid_parameter","missing_parameter","out_of_range","campaign_processing","campaign_sent","document_not_found","not_enough_credits","permission_denied","duplicate_parameter","duplicate_request","method_not_allowed","unauthorized","account_under_validation","not_acceptable","bad_request","unprocessable_entity","Domain does not exist","Contact email not found","Attribute not found","Category id not found","Invalid parameters passed","Record(s) for identifier not found","Returned when query params are invalid","Returned when invalid data posted","Feed not found","Campaign ID not found","api-key not found","DMARC policy requires domain authentication","DNS records not properly configured","Invalid OTP code provided","OTP code has expired","Domain already exists in your account","The sum of all IP weights must equal 100","Authentication failed","Insufficient credits","Request already processed"],"example":"method_not_allowed","type":"string"},"message":{"description":"Readable message associated to the failure","example":"POST Method is not allowed on this path","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"bad request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Update an email template","description":"Update an existing transactional email template by its numeric ID or custom template identifier string. All fields in the request body are optional; only the provided fields will be updated. You can update the template name, subject, sender, reply-to address, HTML content (via `htmlContent` or `htmlUrl`), active status, tag, attachment URL, and the personalized `toField`. Only one of sender email or sender ID should be provided per request.","tags":["Transactional emails"]}},"/smtp/templates/{templateId}/sendTest":{"post":{"operationId":"sendTestTemplate","parameters":[{"description":"Id of the template","in":"path","name":"templateId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendTestEmail"}}},"required":true},"responses":{"204":{"content":{},"description":"Test email has been sent successfully to all recipients"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postSendFailed"}}},"description":"Test email could not be sent to the following email addresses"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Send a template to your test list","description":"Send a test email of the specified transactional template to one or more recipients. Provide an array of email addresses in the `emailTo` field; if left empty, the test mail is sent to your entire test list. You can send a maximum of 50 test emails per day, and all provided email addresses must be valid.","tags":["Transactional emails"]}}}}