{"openapi":"3.0.1","info":{"contact":{"email":"contact@brevo.com","name":"Brevo Support","url":"https://account.brevo.com/support"},"description":"Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to :\n  - Manage your campaigns and get the statistics\n  - Manage your contacts\n  - Send transactional Emails and SMS\n  - and much more...\n\nYou can download our wrappers at https://github.com/orgs/brevo\n**Possible responses**\n  | Code | Message |\n  | :-------------: | ------------- |\n  | 200  | OK. Successful Request  |\n  | 201  | OK. Successful Creation |\n  | 202  | OK. Request accepted |\n  | 204  | OK. Successful Update/Deletion  |\n  | 400  | Error. Bad Request  |\n  | 401  | Error. Authentication Needed  |\n  | 402  | Error. Not enough credit, plan upgrade needed  |\n  | 403  | Error. Permission denied  |\n  | 404  | Error. Object does not exist |\n  | 405  | Error. Method not allowed  |\n  | 406  | Error. Not Acceptable  |\n  | 422  | Error. Unprocessable Entity |\n","license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"title":"Brevo API","version":"3.0.0"},"servers":[{"url":"https://api.brevo.com/v3"}],"security":[{"api-key":[]},{"partner-key":[]}],"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","dateTimePreferences":{"timezone":"America/New_York","timeFormat":"12","dateFormat":"mm-dd-yyyy"},"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"},"dateTimePreferences":{"description":"User's date and time preferences","properties":{"timezone":{"description":"User's timezone setting","example":"America/New_York","type":"string"},"timeFormat":{"description":"Preferred time format (12 or 24 hour)","example":"12","type":"string"},"dateFormat":{"description":"Preferred date format","example":"mm-dd-yyyy","type":"string"}},"required":["timezone","timeFormat","dateFormat"],"type":"object"}},"required":["address","dateTimePreferences"],"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","startDate","endDate","users"],"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"}},"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- View date/time preferences and account settings\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\n- SMTP relay configuration for transactional emails\n- Date/time preferences and account settings\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 required for advanced automation features\n- Plan verticals show detailed breakdown across Marketing, Chat, and CRM categories\n- Relay configuration crucial for transactional email setup and deliverability\n- Date/time preferences affect campaign scheduling and reporting displays\n- Enterprise status determines access to advanced features and sub-account management\n","tags":["Account"]}},"/corporate/group":{"post":{"description":"This endpoint allows to create a group of sub-accounts","requestBody":{"content":{"application/json":{"schema":{"properties":{"groupName":{"description":"The name of the group of sub-accounts","example":"My group","type":"string"},"subAccountIds":{"description":"Pass the list of sub-account Ids to be included in the group","example":[234322,325553,893432],"items":{"format":"int64","type":"integer"},"type":"array"}},"required":["groupName"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":"659xxxxxxxxxxxxxxxx6ef9c8"}}},"schema":{"properties":{"id":{"type":"string"}},"type":"object"}}},"description":"Group ID"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad request"}},"summary":"Create a new group of sub-accounts","tags":["Master account"]}},"/corporate/group/unlink/{groupId}/subAccounts":{"put":{"description":"This endpoint allows you to remove a sub-organization from a group.","parameters":[{"description":"Group id","in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"subAccountIds":{"description":"List of sub-account ids","example":[423432,234323,87678],"items":{"format":"int64","type":"integer"},"type":"array"}},"required":["subAccountIds"],"type":"object"}}},"description":"List of sub-account ids","required":true},"responses":{"204":{"content":{},"description":"SubAccounts removed from the group"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"subAccountIds should be array of numeric ids only"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Delete sub-account from group","tags":["Master account"]}},"/corporate/group/{id}":{"delete":{"description":"This endpoint allows you to delete a group of sub-organizations. When a\ngroup is deleted, the sub-organizations are no longer part of this group.\nThe users associated with the group are no longer associated with the group\nonce deleted.","parameters":[{"description":"Id of the group","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Group deleted"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Delete a group","tags":["Master account"]},"get":{"description":"This endpoint allows you to retrieve a specific group’s information such as\nthe list of sub-organizations and the user associated with the group.","parameters":[{"description":"Id of the group of sub-organization","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"group":{"createdAt":"2024-02-09T06:14:40+00:00","groupName":"My group","id":"5f926dba72a405440a4efc97"},"sub-accounts":[{"companyName":"My sub organization","createdAt":"2024-02-09T06:14:40+00:00","id":7866556},{"companyName":"Your sub organization","createdAt":"2024-01-05T03:11:40+00:00","id":6563051}],"users":[{"email":"my-user@my-org.com","firstName":"John","lastName":"Smith"},{"email":"your-user@your-org.com"}]},"schema":{"properties":{"group":{"properties":{"createdAt":{"description":"Group creation date","type":"string"},"groupName":{"description":"Name of the group","type":"string"},"id":{"description":"Group id","type":"string"}},"type":"object"},"sub-accounts":{"items":{"properties":{"companyName":{"description":"Name of the sub-account organzation","type":"string"},"createdAt":{"description":"Creation date of the sub-account organzation","type":"string"},"id":{"description":"Id of the sub-account organzation","format":"int64","type":"integer"}},"type":"object"},"type":"array"},"users":{"items":{"properties":{"email":{"description":"Email address of the user","type":"string"},"firstName":{"description":"First name of the user","type":"string"},"lastName":{"description":"Last name of the user","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Group details"}},"summary":"GET a group details","tags":["Master account"]},"put":{"description":"This endpoint allows to update a group of sub-accounts","parameters":[{"description":"Id of the group","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"groupName":{"description":"The name of the group of sub-accounts","example":"My group","type":"string"},"subAccountIds":{"description":"Pass the list of sub-account Ids to be included in the group","example":[234322,325553,893432],"items":{"format":"int64","type":"integer"},"type":"array"}},"type":"object"}}},"description":"Group details to be updated.","required":true},"responses":{"204":{"content":{},"description":"Group details updated"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Update a group of sub-accounts","tags":["Master account"]}},"/corporate/groups":{"get":{"description":"This endpoint allows you to list all groups created on your Admin account.","operationId":"getSubAccountGroups","responses":{"200":{"content":{"application/json":{"example":[{"groupName":"My group 1","id":"d3b142c709d6ed67ef1cd903"},{"groupName":"My group 2","id":"a5b192a709d6ed67ef8fd922"},{"groupName":"My group 3","id":"bbb142c709d6ed67ef1cd910"}],"schema":{"items":{"properties":{"groupName":{"description":"The name of the group of sub-accounts","type":"string"},"id":{"description":"Unique id of the group","type":"string"}},"type":"object"},"type":"array"}}},"description":"list of all the sub-account groups"}},"summary":"Get the list of groups","tags":["Master account"]}},"/corporate/invited/users":{"get":{"description":"This endpoint allows you to list all Admin users of your Admin account. You\ncan filter users by type (active or pending) and paginate results using\noffset and limit.","operationId":"getCorporateInvitedUsersList","parameters":[{"name":"type","description":"User type (active | pending). This is required if offset is provided for\nlimited result.","in":"query","schema":{"type":"string"}},{"name":"offset","description":"Page number for the result set. This is optional, default value will be\nthe 1st page.","in":"query","schema":{"type":"integer"}},{"name":"limit","description":"Number of users to be displayed on each page. This is optional, the\ndefault limit is 20, but max allowed limit is 100.","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"users":[{"email":"master-user2@company.com","feature_access":{"analytics":["download_data","create_alerts","my_looks","explore_create"],"api_keys":["all"],"apps_management":["none"],"create_sub_organizations":["all"],"manage_sub_organizations":["all"],"my_plan":["all","all"],"sub_organization_groups":["create","edit_delete"],"user_management":["none"]},"groups":[{"id":"65b1f22c09d6ed67ef1cd123,","name":"Test Group1"},{"id":"43b1f16c09db4d67af1cd342,","name":"Test Group2"}],"is_owner":false,"status":"active"},{"email":"master-user3@company.com","feature_access":{"analytics":["create_alerts","my_looks"],"api_keys":["none"],"apps_management":["all"],"create_sub_organizations":["all"],"manage_sub_organizations":["all"],"my_plan":["none","none"],"sub_organization_groups":["edit_delete"],"user_management":["all"]},"groups":[],"is_owner":false,"status":"active"}]}}},"schema":{"properties":{"users":{"description":"Get invited users list","items":{"properties":{"email":{"description":"Email address of the user.","example":"master-user@company.com","type":"string"},"feature_access":{"description":"Feature accessiblity given to the user. (Required only\nif status is active)","properties":{"analytics":{"description":"Analytics dashboard accessibility","items":{"example":["download_data","create_alerts","my_looks","explore_create"],"type":"string"},"type":"array"},"api_keys":{"description":"Api keys accessiblity.","items":{"example":"all / none","type":"string"},"type":"array"},"apps_management":{"description":"Apps management accessiblity | Not available in\nENTv2","items":{"example":"all / none","type":"string"},"type":"array"},"create_sub_organizations":{"description":"Authorization to create sub-organization in the\nadmin account. If the user creating the\nsub-organization, belongs to a group, the user must\nchoose a group at the sub-organization creation.","items":{"example":"all / none","type":"string"},"type":"array"},"manage_sub_organizations":{"description":"Authorization to manage and access sub-organizations\nin the admin account.","items":{"example":"all / none","type":"string"},"type":"array"},"my_plan":{"description":"My plan accessiblity.","items":{"example":"all / none","type":"string"},"type":"array"},"sub_organization_groups":{"description":"Group creation, modification or deletion\naccessibility","items":{"example":["create","edit_delete"],"type":"string"},"type":"array"},"user_management":{"description":"User management accessiblity.","items":{"example":"all / none","type":"string"},"type":"array"}},"type":"object"},"groups":{"description":"Admin user groups list","properties":{"id":{"description":"group id","example":"a5c4f22c08d9ed37ef1ca342","type":"string"},"name":{"description":"group name","example":"My group","type":"string"}},"type":"object"},"is_owner":{"description":"Flag for indicating is user owner of the organization.","example":false,"type":"string"},"status":{"description":"Status of the invited user.","example":"active","type":"string"}},"required":["groups","email","is_owner","status","feature_access"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"list of all admin users"}},"summary":"Get the list of all admin users","tags":["Master account"]}},"/corporate/ip":{"get":{"description":"This endpoint allows you to retrieve the list of active IPs on your Admin\naccount","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":[{"domain":"example.com","ip":"192.168.1.1","transactional":true},{"domain":"example.com","ip":"192.168.1.2","transactional":false}]}},"schema":{"items":{"properties":{"domain":{"type":"string"},"ip":{"type":"string"},"transactional":{"type":"boolean"}},"type":"object"},"type":"array"}}},"description":"List of all IPs"}},"summary":"List of all IPs","tags":["Master account"]}},"/corporate/masterAccount":{"get":{"description":"This endpoint will provide the details of the master account.","responses":{"200":{"content":{"application/json":{"example":{"billingInfo":{"address":{"countryCode":"IN","locality":"Pandav Nagar, New Delhi","postalCode":"560048","stateCode":"UP","streetAddress":"C-92"},"companyName":"Corp Sample 1-1","email":"sample@example.com","name":{"familyName":"Pandit","givenName":"Uday"}},"companyName":"Corp Sample 1-1","currencyCode":"INR","email":"sample@example.com","id":1003286,"planInfo":{"currencyCode":"INR","features":[{"name":"MULTI_USER","quantity":10,"remaining":0,"unitValue":1,"used":15},{"name":"ADVANCED_REPORTING","quantity":12,"remaining":11,"unitValue":1,"used":1},{"name":"INBOX","quantity":10,"remaining":0,"unitValue":1,"used":10},{"name":"LANDING_PAGE","quantity":10,"remaining":0,"unitValue":5,"used":11},{"name":"RECURRING_CREDITS","quantity":500,"remaining":499,"unitValue":1,"used":1}],"nextBillingAt":1637739295,"planPeriod":"month","price":2100,"subAccounts":15},"timezone":"Europe/Paris"},"schema":{"properties":{"billingInfo":{"description":"Billing details of the master account organization","properties":{"address":{"description":"Billing address of master account","properties":{"countryCode":{"description":"Country code","type":"string"},"locality":{"description":"Locality","type":"string"},"postalCode":{"description":"Postal code","type":"string"},"stateCode":{"description":"State code","type":"string"},"streetAddress":{"description":"Street address","type":"string"}},"type":"object"},"companyName":{"description":"Company name of master account","type":"string"},"email":{"description":"Billing email id of master account","type":"string"},"name":{"description":"Billing name of master account holder","properties":{"familyName":{"description":"Last name for billing","type":"string"},"givenName":{"description":"First name for billing","type":"string"}},"type":"object"}},"type":"object"},"companyName":{"description":"Company name of master account organization","type":"string"},"currencyCode":{"description":"Currency code of the master account organization","type":"string"},"email":{"description":"Email id of master account","type":"string"},"id":{"description":"Unique identifier of the master account organization","format":"int64","type":"integer"},"planInfo":{"description":"Plan details","properties":{"currencyCode":{"description":"Plan currency","type":"string"},"features":{"description":"List of provided features in the plan","items":{"properties":{"name":{"description":"Name of the feature","type":"string"},"quantity":{"description":"Quantity provided in the plan","format":"int64","type":"integer"},"quantityWithOverages":{"description":"Quantity with overages provided in the plan (only\napplicable on ENTv2)","format":"int64","type":"integer"},"remaining":{"description":"Quantity remaining in the plan","format":"int64","type":"integer"},"unitValue":{"description":"Unit value of the feature","type":"string"},"used":{"description":"Quantity consumed by master","format":"int64","type":"integer"},"usedOverages":{"description":"Quantity consumed by sub-organizations over the\nadmin plan limit (only applicable on ENTv2)","format":"int64","type":"integer"}},"type":"object"},"type":"array"},"nextBillingAt":{"description":"Timestamp of next billing date","format":"int64","type":"integer"},"planPeriod":{"description":"Plan period type","enum":["month","year"],"type":"string"},"price":{"description":"Plan amount","type":"number"},"subAccounts":{"description":"Number of sub-accounts","type":"integer"}},"type":"object"},"timezone":{"description":"Timezone of the master account organization","type":"string"}},"type":"object"}}},"description":"Master account details"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the details of requested master account","tags":["Master account"]}},"/corporate/ssoToken":{"post":{"description":"This endpoint generates an SSO token to authenticate and access the admin\naccount using the endpoint\nhttps://account-app.brevo.com/account/login/corporate/sso/[token], where\n[token] will be replaced by the actual token.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"description":"User email of admin account","example":"vipin+ent-user@brevo.com","type":"string"}},"required":["email"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"token":"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0"}}},"schema":{"$ref":"#/components/schemas/getSsoToken"}}},"description":"Session token"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid email address"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"},"403":{"content":{"application/json":{"examples":{"response":{"value":{"code":"permission_denied","message":"Access forbidden."}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Current account is not an admin account"}},"summary":"Generate SSO token to access admin account","tags":["Master account"]}},"/corporate/subAccount":{"get":{"description":"This endpoint will provide the list all the sub-accounts of the master\naccount.","parameters":[{"description":"Index of the first sub-account in the page","in":"query","name":"offset","required":true,"schema":{"type":"integer"}},{"description":"Number of sub-accounts to be displayed on each page","in":"query","name":"limit","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":3,"subAccounts":[{"active":"true,","companyName":"Company1","createdAt":1631523176,"groups":[{"id":"5f8f8c3b5f56a02d4433b3a8","name":"Group 1"},{"id":"4fbf3c3b1f56a02ac465b1a0","name":"Group 2"}],"id":4043629},{"active":true,"companyName":"Company2","createdAt":1629439311,"groups":[],"id":3984002},{"active":true,"companyName":"Company3","createdAt":1614713641,"groups":[],"id":3524191}]}}},"schema":{"properties":{"count":{"description":"Total number of subaccounts","type":"integer"},"subAccounts":{"items":{"properties":{"active":{"description":"Whether the sub-account is active or not","type":"boolean"},"companyName":{"description":"Name of the sub-account company","type":"string"},"createdAt":{"description":"Timestamp when the sub-account was created","format":"int64","type":"integer"},"groups":{"description":"Group details","items":{"properties":{"id":{"description":"Group identifier","type":"string"},"name":{"description":"Name of the group","type":"string"}},"type":"object"},"type":"array"},"id":{"description":"id of the sub-account","format":"int64","type":"integer"}},"required":["id","companyName","active","createdAt","groups"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"Sub-accounts list"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of all the sub-accounts of the master account.","tags":["Master account"]},"post":{"description":"This endpoint will create a new sub-account under a master account","requestBody":{"content":{"application/json":{"schema":{"example":{"companyName":"Test Sub-account","email":"test-sub@example.com","groupIds":["5f8f8c3b5f56a02d4433b3a7","5f8f8c3b5f56a02d4433b3a8"],"language":"fr","timezone":"Europe/Paris"},"properties":{"companyName":{"description":"Set the name of the sub-account company","type":"string"},"email":{"description":"Email address for the organization","type":"string"},"groupIds":{"description":"Set the group(s) for the sub-account","items":{"type":"string"},"type":"array"},"language":{"description":"Set the language of the sub-account","enum":["en","fr","it","es","pt","de"],"type":"string"},"timezone":{"description":"Set the timezone of the sub-account","type":"string"}},"required":["companyName","email"],"type":"object"}}},"description":"Request body with sub-account organization name","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":4109344}}},"schema":{"properties":{"id":{"description":"ID of the sub-account created","example":5,"format":"int64","type":"integer"}},"required":["id"],"type":"object"}}},"description":"Created sub-account ID"},"400":{"content":{"application/json":{"example":{"code":"missing_parameter","message":"Missing companyName attribute in the request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad request"}},"summary":"Create a new sub-account under a master account.","tags":["Master account"]}},"/corporate/subAccount/ip/associate":{"post":{"description":"This endpoint allows to associate an IP to sub-accounts","requestBody":{"content":{"application/json":{"schema":{"properties":{"ids":{"description":"Pass the list of sub-account Ids to be associated with the IP\naddress","example":[234322,325553,893432],"items":{"format":"int64","type":"integer"},"type":"array"},"ip":{"description":"IP address","example":"103.11.32.88","type":"string"}},"required":["ip","ids"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":[]}},"schema":{"type":"object"}}},"description":"IP has been associated with sub-accounts successfully"},"400":{"content":{"application/json":{"example":{"code":"invalid id","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad request"}},"summary":"Associate an IP to sub-accounts","tags":["Master account"]}},"/corporate/subAccount/ip/dissociate":{"put":{"description":"This endpoint allows to dissociate an IP from sub-accounts","requestBody":{"content":{"application/json":{"schema":{"properties":{"ids":{"description":"Pass the list of sub-account Ids to be dissociated from the IP\naddress","example":[234322,325553,893432],"items":{"format":"int64","type":"integer"},"type":"array"},"ip":{"description":"IP address","example":"103.11.32.88","type":"string"}},"required":["ip","ids"],"type":"object"}}}},"responses":{"204":{"content":{},"description":"IP has been dissociated from sub-accounts successfully"},"400":{"content":{"application/json":{"example":{"code":"invalid id","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad request"}},"summary":"Dissociate an IP to sub-accounts","tags":["Master account"]}},"/corporate/subAccount/key":{"post":{"description":"This endpoint will generate an API v3 key for a sub-account","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"Id of the sub-account organization","example":3232323,"format":"int64","type":"integer"},"name":{"description":"Name of the API key","example":"My Api Key","type":"string"}},"required":["id","name"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"key":"xkeysib-21881axxxxxcc92e04-mIrexxxx7z","status":"success"}}},"schema":{"properties":{"key":{"description":"API key","example":"xkeysib-21881axxxxxcc92e04-mIrexxxx7z","type":"string"},"status":{"description":"Status of the API operation.","example":"success","type":"string"}},"required":["status","key"],"type":"object"}}},"description":"API key"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"id should be a positive number"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Create an API key for a sub-account","tags":["Master account"]}},"/corporate/subAccount/ssoToken":{"post":{"description":"This endpoint generates an sso token to authenticate and access a\nsub-account of the master using the account endpoint\nhttps://account-app.brevo.com/account/login/sub-account/sso/[token], where\n[token] will be replaced by the actual token.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"description":"User email of sub-account organization","example":"vipin+subaccount@brevo.com","type":"string"},"id":{"description":"Id of the sub-account organization","example":3232323,"format":"int64","type":"integer"},"target":{"description":"**Set target after login success** * **automation** - Redirect\nto Automation after login * **email_campaign** - Redirect to\nEmail Campaign after login * **contacts** - Redirect to Contacts\nafter login * **landing_pages** - Redirect to Landing Pages\nafter login * **email_transactional** - Redirect to Email\nTransactional after login * **senders** - Redirect to Senders\nafter login * **sms_campaign** - Redirect to Sms Campaign after\nlogin * **sms_transactional** - Redirect to Sms Transactional\nafter login","enum":["automation","email_campaign","contacts","landing_pages","email_transactional","senders","sms_campaign","sms_transactional"],"example":"contacts","type":"string"},"url":{"description":"Set the full target URL after login success. The user will land\ndirectly on this target URL after login","example":"https://app.brevo.com/senders/domain/list","type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"token":"5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0"}}},"schema":{"$ref":"#/components/schemas/getSsoToken"}}},"description":"Session token"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid sub-account id."},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"},"403":{"content":{"application/json":{"examples":{"response":{"value":{"code":"permission_denied","message":"Access forbidden."}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Current account is not a master account"}},"summary":"Generate SSO token to access sub-account","tags":["Master account"]}},"/corporate/subAccount/{id}":{"delete":{"parameters":[{"description":"Id of the sub-account organization to be deleted","in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"description":"Returned when sub-account is deleted succesfully"},"400":{"content":{"application/json":{"example":{"code":"missing_parameter","message":"Sub-account 2039dfsddf885 is not valid"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"},"404":{"content":{"application/json":{"example":{"code":"document_not_found","message":"Sub-account 2039885 was not found"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"sub-account not found"}},"summary":"Delete a sub-account","tags":["Master account"]},"get":{"description":"This endpoint will provide the details for the specified sub-account company","parameters":[{"description":"Id of the sub-account organization","in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"companyName":"API-Sub-26thOct21-4","email":"uday+1@brevo.com","groups":[{"id":"5f8f8c3b5f56a02d4433b3a7","name":"Group 1"},{"id":"5f8f8c3b5f56a02d4433b3a8","name":"Group 2"}],"name":"Uday Pandit","planInfo":{"credits":{"emails":{"quantity":2000,"remaining":1955},"externalFeeds":{"quantity":1,"remaining":1},"sms":{"quantity":2000,"remaining":1955},"whatsapp":{"quantity":100,"remaining":50},"wpSubscribers":{"quantity":2000,"remaining":1955}},"features":{"inbox":{"quantity":20,"remaining":12},"landingPage":{"quantity":25,"remaining":14},"salesUsers":{"quantity":30,"remaining":14},"users":{"quantity":30,"remaining":14}},"planType":"paid"}},"schema":{"properties":{"companyName":{"description":"Sub-account company name","type":"string"},"email":{"description":"Email id of the sub-account organization","type":"string"},"groups":{"description":"List of groups associated with the sub-account","items":{"properties":{"id":{"description":"Group id","type":"string"},"name":{"description":"Name of the group","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"Name of the sub-account user","type":"string"},"planInfo":{"description":"Sub-account plan details","properties":{"credits":{"description":"Credits quota and remaining credits on the sub-account","properties":{"emails":{"description":"Email credits remaining on the sub-account","properties":{"quantity":{"description":"Quantity of email messaging limits provided","format":"int64","type":"integer"},"remaining":{"description":"Available email messaging limits for use","format":"int64","type":"integer"}},"type":"object"},"externalFeeds":{"description":"externalFeeds credits remaining on the sub-account","properties":{"quantity":{"description":"Quantity of externalFeeds messaging limits\nprovided","format":"int64","type":"integer"},"remaining":{"description":"Available externalFeeds messaging limits for use","format":"int64","type":"integer"}},"type":"object"},"sms":{"description":"SMS credits remaining on the sub-account","properties":{"quantity":{"description":"Quantity of SMS messaging limits provided","format":"int64","type":"integer"},"remaining":{"description":"Available SMS messaging limits for use","format":"int64","type":"integer"}},"type":"object"},"whatsapp":{"description":"Whatsapp credits remaining on the sub-account","properties":{"quantity":{"description":"Quantity of whatsapp messaging limits provided","format":"int64","type":"integer"},"remaining":{"description":"Available whatsapp messaging limits for use","format":"int64","type":"integer"}},"type":"object"},"wpSubscribers":{"description":"Push credits remaining on the sub-account","properties":{"quantity":{"description":"Quantity of Push sending limits provided","format":"int64","type":"integer"},"remaining":{"description":"Available Push sending limits for use","format":"int64","type":"integer"}},"type":"object"}},"type":"object"},"features":{"description":"Features available on the sub-account","properties":{"inbox":{"description":"Inbox details / Not applicable on ENTv2","properties":{"quantity":{"description":"Quantity of inbox provided","format":"int64","type":"integer"},"remaining":{"description":"Available inboxes for use","format":"int64","type":"integer"}},"type":"object"},"landingPage":{"description":"Landing page details / Not applicable on ENTv2","properties":{"quantity":{"description":"Quantity of landing pages provided","format":"int64","type":"integer"},"remaining":{"description":"Available landing pages for use","format":"int64","type":"integer"}},"type":"object"},"salesUsers":{"description":"Sales and service users to use phone, sales and\nconversations","properties":{"quantity":{"description":"Quantity of sales users provided","format":"int64","type":"integer"},"remaining":{"description":"Available sales users for use","format":"int64","type":"integer"}},"type":"object"},"users":{"description":"Marketing users to manage the marketing channels","properties":{"quantity":{"description":"Quantity of marketing users provided","format":"int64","type":"integer"},"remaining":{"description":"Available marketing users for use","format":"int64","type":"integer"}},"type":"object"}},"type":"object"},"planType":{"description":"type of the plan","type":"string"}},"type":"object"}},"type":"object"}}},"description":"Sub-account organization details"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get sub-account details","tags":["Master account"]}},"/corporate/subAccount/{id}/applications/toggle":{"put":{"description":"API endpoint for the Corporate owner to enable/disable applications on the\nsub-account","parameters":[{"description":"Id of the sub-account organization (mandatory)","in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"List of enable/disable applications on the sub-account","example":{"landing-pages":true,"meetings":true,"sms-campaigns":false,"web-push":false,"whatsapp":true},"properties":{"automation":{"description":"Set this field to enable or disable Automation on the\nsub-account","type":"boolean"},"conversations":{"description":"Set this field to enable or disable Conversations on the\nsub-account","type":"boolean"},"crm":{"description":"Set this field to enable or disable Sales CRM on the sub-account","type":"boolean"},"email-campaigns":{"description":"Set this field to enable or disable Email Campaigns on the\nsub-account","type":"boolean"},"facebook-ads":{"description":"Set this field to enable or disable Facebook ads on the\nsub-account","type":"boolean"},"inbox":{"description":"Set this field to enable or disable Inbox on the sub-account /\nNot applicable on ENTv2","type":"boolean"},"landing-pages":{"description":"Set this field to enable or disable Landing pages on the\nsub-account","type":"boolean"},"meetings":{"description":"Set this field to enable or disable Meetings on the sub-account","type":"boolean"},"sms-campaigns":{"description":"Set this field to enable or disable SMS Marketing on the\nsub-account","type":"boolean"},"transactional-emails":{"description":"Set this field to enable or disable Transactional Email on the\nsub-account","type":"boolean"},"transactional-sms":{"description":"Set this field to enable or disable Transactional SMS on the\nsub-account","type":"boolean"},"web-push":{"description":"Set this field to enable or disable Web Push on the sub-account","type":"boolean"},"whatsapp":{"description":"Set this field to enable or disable Whatsapp campaigns on the\nsub-account","type":"boolean"}},"type":"object"}}},"description":"List of applications to activate or deactivate on a sub-account","required":true},"responses":{"204":{"content":{},"description":"Sub-account application(s) enabled/disabled"},"400":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"examples":{"response":{"value":{"code":"permission_denied","message":"Access forbidden."}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Current account is not a master account"}},"summary":"Enable/disable sub-account application(s)","tags":["Master account"]}},"/corporate/subAccount/{id}/plan":{"put":{"description":"This endpoint will update the sub-account plan. On the Corporate solution\nnew version v2, you can set an unlimited number of credits in your\nsub-organization. Please pass the value “-1\" to set the consumable in\nunlimited mode.","parameters":[{"description":"Id of the sub-account organization","in":"path","name":"id","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Details of the plan to be changed","example":{"credits":{"email":5000,"externalFeeds":1,"sms":2000,"whatsapp":100,"wpSubscribers":-1},"features":{"inbox":10,"landingPage":20,"salesUsers":6,"users":15}},"properties":{"credits":{"description":"Credit details to update","properties":{"email":{"description":"Number of email credits | Pass the value -1 for unlimited\nemails in ENTv2 only","format":"int64","type":"integer"},"externalFeeds":{"description":"Number of externalFeeds credits, possible values are 0 or 1\n|available in ENTv2 only","format":"int64","type":"number"},"sms":{"description":"Number of SMS credits | Pass the value -1 for unlimited SMS\nin ENTv2 only","format":"float","type":"number"},"whatsapp":{"description":"Number of whatsapp credits | Pass the value -1 for unlimited\nwhatsapp in ENTv2 only","format":"float","type":"number"},"wpSubscribers":{"description":"Number of Push credits, possible value is 0 and -1 |\navailable in ENT-v2 only","format":"int64","type":"integer"}},"type":"object"},"features":{"description":"Features details to update","properties":{"inbox":{"description":"Number of inboxes / Not required on ENTv2","format":"int64","type":"integer"},"landingPage":{"description":"Number of landing pages","format":"int64","type":"integer"},"salesUsers":{"description":"Number of sales and service users | only available in ENT-V2","format":"int64","type":"integer"},"users":{"description":"Number of multi-users","format":"int64","type":"integer"}},"type":"object"}},"type":"object"}}},"description":"Values to update a sub-account plan","required":true},"responses":{"204":{"content":{},"description":"Sub account plan updated"},"400":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"examples":{"response":{"value":{"code":"permission_denied","message":"Access forbidden."}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Current account is not a master account"}},"summary":"Update sub-account plan","tags":["Master account"]}},"/corporate/subAccounts/plan":{"put":{"description":"This endpoint will update multiple sub-accounts plan. On the Corporate\nsolution new version v2, you can set an unlimited number of credits in your\nsub-organization. Please pass the value “-1\" to set the consumable in\nunlimited mode.","requestBody":{"content":{"application/json":{"schema":{"description":"Details of the plan to be changed","example":{"credits":{"email":5000,"externalFeeds":1,"sms":2000,"whatsapp":100,"wpSubscribers":-1},"features":{"landingPage":20,"salesUsers":6,"users":15},"subAccountIds":[4534345,987893,876785]},"properties":{"credits":{"description":"Credit details to update","properties":{"email":{"description":"Number of email credits | Pass the value -1 for unlimited\nemails in ENTv2 only","format":"int64","type":"integer"},"externalFeeds":{"description":"Number of externalFeeds credits, possible values are 0 or 1\n|available in ENTv2 only","format":"int64","type":"number"},"sms":{"description":"Number of SMS credits | Pass the value -1 for unlimited SMS\nin ENTv2 only","format":"float","type":"number"},"whatsapp":{"description":"Number of whatsapp credits | Pass the value -1 for unlimited\nwhatsapp in ENTv2 only","format":"float","type":"number"},"wpSubscribers":{"description":"Number of Push credits, possible value is 0 and -1 |\navailable in ENT-v2 only","format":"int64","type":"integer"}},"type":"object"},"features":{"description":"Features details to update","properties":{"landingPage":{"description":"Number of landing pages","format":"int64","type":"integer"},"salesUsers":{"description":"Number of sales and service users | only available in ENT-V2","format":"int64","type":"integer"},"users":{"description":"Number of multi-users","format":"int64","type":"integer"}},"type":"object"},"subAccountIds":{"description":"List of sub-account ids","items":{"format":"int64","type":"integer"},"type":"array"}},"type":"object"}}},"description":"Values to update sub-accounts plan","required":true},"responses":{"202":{"content":{},"description":"Request accepted"},"400":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"examples":{"response":{"value":{"code":"permission_denied","message":"Access forbidden."}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Current account is not a master account"}},"summary":"Update sub-accounts plan","tags":["Master account"]}},"/corporate/user/invitation/send":{"post":{"description":"`This endpoint allows you to invite a member to manage the Admin account\nFeatures and their respective permissions are as below: - `my_plan`:\n  - \"all\"\n- `api`:\n  - \"none\"\n- `user_management`:\n  - \"all\"\n- `app_management` | Not available in ENTv2:\n  - \"all\"\n- `sub_organization_groups`\n  - \"create\"\n  - \"edit_delete\"\n- `create_sub_organizations`\n  - \"all\"\n- `manage_sub_organizations`\n  - \"all\"\n- `analytics`\n  - \"download_data\"\n  - \"create_alerts\"\n  - \"my_looks\"\n  - \"explore_create\"\n- `security`\n  - \"all\"\n**Note**: - If `all_features_access: false` then only privileges are\nrequired otherwise if `true` then it's assumed that all permissions will be\nthere for the invited admin user.","operationId":"inviteAdminUser","requestBody":{"content":{"application/json":{"schema":{"properties":{"all_features_access":{"description":"All access to the features","enum":[true,false],"example":true,"type":"boolean"},"email":{"description":"Email address for the organization","example":"inviteuser@example.com","format":"email","type":"string"},"groupIds":{"description":"Ids of Group","example":["2baxxxxxxxxxxxxxxxxxxxxxcaa","65axxxxxxxxxxxxxxxxxxxxxc5a"],"items":{"description":"Group Id","type":"string"},"type":"array"},"privileges":{"items":{"description":"Privileges given to the user","example":[{"feature":"my_plan","permissions":["all"]},{"feature":"api","permissions":["none"]},{"feature":"user_management","permissions":["all"]},{"feature":"app_management","permissions":["all"]},{"feature":"sub_organization_groups","permissions":["create","edit_delete"]},{"feature":"create_sub_organizations","permissions":["all"]},{"feature":"manage_sub_organizations","permissions":["all"]},{"feature":"analytics","permissions":["download_data","create_alerts","my_looks","explore_create"]},{"feature":"security","permissions":["all"]}],"properties":{"feature":{"description":"Feature name","enum":["my_plan","api","user_management","app_management","sub_organization_groups","create_sub_organizations","manage_sub_organizations","analytics","security"],"example":"user_management","type":"string"},"permissions":{"description":"Permissions for a given feature","items":{"enum":["all","none","create","edit_delete","download_data","create_alerts"],"example":"'all', 'none', 'create', 'edit_delete', 'download_data', 'create_alerts'","type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"required":["email","all_features_access","privileges"],"type":"object"}}},"description":"Payload to send an invitation","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":"659xxxxxxxxxxxxxxxx6ef9c8"}}},"schema":{"properties":{"id":{"type":"string"}},"type":"object"}}},"description":"Invitation ID"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send invitation to an admin user","tags":["Master account"]}},"/corporate/user/invitation/{action}/{email}":{"put":{"description":"This endpoint will allow the user to:\n- Resend an admin user invitation\n- Cancel an admin user invitation\n","parameters":[{"description":"Action to be performed (cancel / resend)","in":"path","name":"action","required":true,"schema":{"enum":["resend","cancel"],"type":"string"}},{"description":"Email address of the recipient","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"message":"Invitation resent successfully"},"schema":{"properties":{"message":{"description":"Action success message","type":"string"}},"type":"object"}}},"description":"Response of the action performed"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invitation not found"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Resend / cancel admin user invitation","tags":["Master account"]}},"/corporate/user/revoke/{email}":{"delete":{"description":"This endpoint allows to revoke/remove an invited member of your Admin\naccount","parameters":[{"description":"Email of the invited user","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"User revoked"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid request"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Revoke an admin user","tags":["Master account"]}},"/corporate/user/{email}/permissions":{"get":{"description":"This endpoint will provide the list of admin user permissions","operationId":"getCorporateUserPermission","parameters":[{"description":"Email of the invited user.","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"email":"invitedUser@company.com","feature_access":{"analytics":["download_data","create_alerts","my_looks","explore_create"],"api_keys":["all"],"apps_management":["all"],"create_sub_organizations":["all"],"manage_sub_organizations":["all"],"my_plan":["all","all"],"sub_organization_groups":["create","edit_delete"],"user_management":["none"]},"groups":[{"id":"6543ab3667ffbb00142e4486","name":"Support"},{"id":"174bab366732bbce142e4412","name":"Technical"}],"status":"active"}}},"schema":{"description":"Check admin user permissions","properties":{"email":{"description":"Email address of the user.","example":"invitedUser@company.com","type":"string"},"feature_access":{"description":"Granular feature permissions given to the user.","properties":{"analytics":{"description":"Permission on analytics","items":{"description":"Permission details","example":["create_alerts","download_data","my_looks","explore_create"],"type":"string"},"type":"array"},"api_keys":{"description":"Permission on api keys","items":{"description":"Permission details","example":"all","type":"string"},"type":"array"},"apps_management":{"description":"Permission on apps management","items":{"description":"Permission details","example":"all","type":"string"},"type":"array"},"create_sub_organizations":{"description":"Permission on create sub-accounts","items":{"description":"Permission details","example":"all","type":"string"},"type":"array"},"manage_sub_organizations":{"description":"Permission on manage sub-accounts","items":{"description":"Permission details","example":"all","type":"string"},"type":"array"},"my_plan":{"description":"Permission on my plan","items":{"description":"Permission details","example":"all","type":"string"},"type":"array"},"sub_organization_groups":{"description":"Permission on groups","items":{"description":"Permission details","example":["create","edit_delete"],"type":"string"},"type":"array"},"user_management":{"description":"Permission on user management","items":{"description":"Permission details","example":"none","type":"string"},"type":"array"}},"type":"object"},"groups":{"items":{"description":"Groups details","properties":{"id":{"description":"group identifier","example":"6cbcxxxxxxxxxxxxxxxx457a","type":"string"},"name":{"description":"Group name","example":"Staff","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status of the invited user.","example":"active / pending","type":"string"}},"required":["email","status","groups","feature_access"],"type":"object"}}},"description":"List of user's permissions"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Check admin user permissions","tags":["Master account"]},"put":{"description":"This endpoint will allow you to change the permissions of Admin users of\nyour Admin account","parameters":[{"description":"Email address of Admin user","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"all_features_access":false,"privileges":[{"feature":"user_management","permissions":["all"]},{"feature":"api","permissions":["all"]},{"feature":"my_plan","permissions":["none"]},{"feature":"apps_management","permissions":["all"]},{"feature":"create_sub_organizations","permissions":["all"]},{"feature":"sub_organization_groups","permissions":["create","edit_delete"]},{"feature":"manage_sub_organizations","permissions":["all"]},{"feature":"security","permissions":["none"]},{"feature":"analytics","permissions":["create_alerts","download_data","my_looks","explore_create"]}]},"schema":{"properties":{"all_features_access":{"description":"All access to the features","enum":[true,false],"example":true,"type":"boolean"},"privileges":{"items":{"description":"Permission on features","properties":{"feature":{"description":"feature name","enum":["user_management","api","my_plan","apps_management","analytics","sub_organization_groups","create_sub_organizations","manage_sub_organizations","security"],"example":"user_management","type":"string"},"permissions":{"description":"Permission for the feature","example":["all"],"items":{"enum":["all","none","create","edit_delete","create_alerts","download_data","my_looks","explore_create"],"type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"required":["all_features_access","privileges"],"type":"object"}}},"description":"Values to update an admin user permissions","required":true},"responses":{"204":{"content":{},"description":"User permissions has been modified"},"400":{"content":{"application/json":{"example":{"code":"invalid_parameter","message":"Invalid email"},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"bad request"}},"summary":"Change admin user permissions","tags":["Master account"]}},"/organization/activities":{"get":{"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":{"$ref":"#/components/responses/errorModel"}},"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"]}},"/organization/invited/users":{"get":{"operationId":"getInvitedUsersList","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"users":[{"email":"owner@company.com","feature_access":{"conversations":"owner","crm":"owner","marketing":"owner"},"is_owner":true,"status":"active"},{"email":"pendingInvitedUser@company.com","feature_access":{"conversations":"none","crm":"full","marketing":"custom"},"is_owner":false,"status":"pending"},{"email":"connectedInvitedUser@company.com","feature_access":{"conversations":"full","crm":"none","marketing":"none"},"is_owner":false,"status":"active"}]}}},"schema":{"properties":{"users":{"description":"Get invited users list","items":{"properties":{"email":{"description":"Email address of the user.","example":"pendingInvitedUser@company.com","type":"string"},"feature_access":{"description":"Feature accessiblity given to the user.","properties":{"conversations":{"description":"Conversations features accessiblity.","example":"none","type":"string"},"crm":{"description":"CRM features accessiblity.","example":"full","type":"string"},"marketing":{"description":"Marketing features accessiblity.","example":"custom","type":"string"}},"type":"object"},"is_owner":{"description":"Flag for indicating is user owner of the organization.","example":true,"type":"string"},"status":{"description":"Status of the invited user.","example":"active","type":"string"}},"required":["email","is_owner","status","feature_access"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"list of all your users"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of all your users","tags":["User"]}},"/organization/user/invitation/revoke/{email}":{"put":{"operationId":"putRevokeUserPermission","parameters":[{"description":"Email of the invited user.","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"credit_notes":{"description":"Credit note","items":{"example":"TEST-123","type":"string"},"type":"array"},"status":{"description":"Status of the API operation.","example":"OK","type":"string"}},"required":["status"],"type":"object"}}},"description":"Credit note exists"},"403":{"$ref":"#/components/responses/errorModel"}},"summary":"Revoke user permission","tags":["User"]}},"/organization/user/invitation/send":{"post":{"description":"`Feature` - A Feature represents a specific functionality like Email\ncampaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user,\ndetermine which feature you want to manage access to. You must specify the\nfeature accurately to avoid errors. `Permission` - A Permission defines the\nlevel of access or control a user has over a specific feature. While\ninviting user, decide on the permission level required for the selected\nfeature. Make sure the chosen permission is related to the selected feature.\nFeatures and their respective permissions are as below: - `email_campaigns`:\n  - \"create_edit_delete\"\n  - \"send_schedule_suspend\"\n- `sms_campaigns`:\n  - \"create_edit_delete\"\n  - \"send_schedule_suspend\"\n- `contacts`:\n  - \"view\"\n  - \"create_edit_delete\"\n  - \"import\"\n  - \"export\"\n  - \"list_and_attributes\"\n  - \"forms\"\n- `templates`:\n  - \"create_edit_delete\"\n  - \"activate_deactivate\"\n- `workflows`:\n  - \"create_edit_delete\"\n  - \"activate_deactivate_pause\"\n  - \"settings\"\n- `landing_pages`:\n  - \"all\"\n- `transactional_emails`:\n  - \"settings\"\n  - \"logs\"\n- `smtp_api`:\n  - \"smtp\"\n  - \"api_keys\"\n  - \"authorized_ips\"\n- `user_management`:\n  - \"all\"\n- `sales_platform`:\n  - \"create_edit_deals\"\n  - \"delete_deals\"\n  - \"manage_others_deals_tasks\"\n  - \"reports\"\n  - \"settings\"\n- `phone`:\n  - \"all\"\n- `conversations`:\n  - \"access\"\n  - \"assign\"\n  - \"configure\"\n- `senders_domains_dedicated_ips`:\n  - \"senders_management\"\n  - \"domains_management\"\n  - \"dedicated_ips_management\"\n- `push_notifications`:\n  - \"view\"\n  - \"create_edit_delete\"\n  - \"send\"\n  - \"settings\"\n- `companies`:\n  - \"manage_owned_companies\"\n  - \"manage_other_companies\"\n  - \"settings\"\n**Note**: - If `all_features_access: false` then only privileges are\nrequired otherwise if `true` then it's assumed that all permissions will be\nthere for the invited user. - The availability of feature and its permission\ndepends on your current plan. Please select the features and permissions\naccordingly.","operationId":"inviteuser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inviteuser"}}},"description":"Values to create an invitation","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"invoice_id":{"description":"Invoice id","items":{"example":"TEST-ID","type":"string"},"type":"string"},"status":{"description":"Status of the API operation.","example":"OK","type":"string"}},"required":["status"],"type":"object"}}},"description":"Success"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send invitation to user","tags":["User"]}},"/organization/user/invitation/{action}/{email}":{"put":{"operationId":"putresendcancelinvitation","parameters":[{"description":"action","in":"path","name":"action","required":true,"schema":{"enum":["resend","cancel"],"type":"string"}},{"description":"Email of the invited user.","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"credit_notes":{"description":"Credit note","items":{"example":"TEST-123","type":"string"},"type":"array"},"status":{"description":"Status of the API operation.","example":"OK","type":"string"}},"required":["status"],"type":"object"}}},"description":"Success"},"403":{"$ref":"#/components/responses/errorModel"}},"summary":"Resend / Cancel invitation","tags":["User"]}},"/organization/user/update/permissions":{"post":{"description":"`Feature` - A Feature represents a specific functionality like Email\ncampaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user,\ndetermine which feature you want to manage access to. You must specify the\nfeature accurately to avoid errors. `Permission` - A Permission defines the\nlevel of access or control a user has over a specific feature. While\ninviting user, decide on the permission level required for the selected\nfeature. Make sure the chosen permission is related to the selected feature.\nFeatures and their respective permissions are as below: - `email_campaigns`:\n  - \"create_edit_delete\"\n  - \"send_schedule_suspend\"\n- `sms_campaigns`:\n  - \"create_edit_delete\"\n  - \"send_schedule_suspend\"\n- `contacts`:\n  - \"view\"\n  - \"create_edit_delete\"\n  - \"import\"\n  - \"export\"\n  - \"list_and_attributes\"\n  - \"forms\"\n- `templates`:\n  - \"create_edit_delete\"\n  - \"activate_deactivate\"\n- `workflows`:\n  - \"create_edit_delete\"\n  - \"activate_deactivate_pause\"\n  - \"settings\"\n- `landing_pages`:\n  - \"all\"\n- `transactional_emails`:\n  - \"settings\"\n  - \"logs\"\n- `smtp_api`:\n  - \"smtp\"\n  - \"api_keys\"\n  - \"authorized_ips\"\n- `user_management`:\n  - \"all\"\n- `sales_platform`:\n  - \"create_edit_deals\"\n  - \"delete_deals\"\n  - \"manage_others_deals_tasks\"\n  - \"reports\"\n  - \"settings\"\n- `phone`:\n  - \"all\"\n- `conversations`:\n  - \"access\"\n  - \"assign\"\n  - \"configure\"\n- `senders_domains_dedicated_ips`:\n  - \"senders_management\"\n  - \"domains_management\"\n  - \"dedicated_ips_management\"\n- `push_notifications`:\n  - \"view\"\n  - \"create_edit_delete\"\n  - \"send\"\n  - \"settings\"\n- `companies`:\n  - \"manage_owned_companies\"\n  - \"manage_other_companies\"\n  - \"settings\"\n**Note**: - The privileges array remains the same as in the send invitation;\nthe user simply needs to provide the permissions that need to be updated. -\nThe availability of feature and its permission depends on your current plan.\nPlease select the features and permissions accordingly.","operationId":"EditUserPermission","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inviteuser"}}},"description":"Values to create an invitation","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"credit_notes":{"description":"Credit note","items":{"example":"TEST-123","type":"string"},"type":"array"},"invoice_id":{"description":"Invoice id","items":{"example":"TEST-ID","type":"string"},"type":"string"},"status":{"description":"Status of the API operation.","example":"OK","type":"string"}},"required":["status"],"type":"object"}}},"description":"Success"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Update permission for a user","tags":["User"]}},"/organization/user/{email}/permissions":{"get":{"operationId":"getUserPermission","parameters":[{"description":"Email of the invited user.","in":"path","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"email":"invitedUser@company.com","privileges":[{"feature":"Email campaign","permissions":["Create / edit / delete","Send / schedule / suspend"]},{"feature":"Templates","permissions":["Create / edit / delete","Activate / deactivate"]},{"feature":"SMS campaign","permissions":["Create / edit / delete","Send / schedule / suspend"]},{"feature":"Facebook Ads","permissions":["Schedule / pause"]},{"feature":"Landing pages","permissions":["All"]},{"feature":"Workflows","permissions":["Create / edit / delete","Activate / deactivate / Pause"]},{"feature":"Contacts","permissions":["View","Contact forms"]},{"feature":"SMTP & API","permissions":["SMTP","API Keys","Authorized IPs"]},{"feature":"User management","permissions":["None"]},{"feature":"Sales Platform","permissions":["Create / edit / delete owned deals and tasks","Manage deals and tasks from other users","Reports","Settings"]},{"feature":"Conversations","permissions":["None"]},{"feature":"Senders, Domains & Dedicated IPs","permissions":["Senders management","Domains management","Dedicated IPs management"]},{"feature":"Push","permissions":["View","Create / edit / delete","Send","Settings"]},{"feature":"Companies","permissions":["Create / edit / delete owned companies","Manage companies from other users","Settings"]}],"status":"active"}}},"schema":{"description":"Check user permission","properties":{"email":{"description":"Email address of the user.","example":"invitedUser@company.com","type":"string"},"privileges":{"description":"Granular feature permissions given to the user.","items":{"properties":{"feature":{"example":"Email campaign","type":"string"},"permissions":{"items":{"example":"Create / edit / delete","type":"string"},"type":"array"}},"required":["feature","permissions"],"type":"object"},"type":"array"},"status":{"description":"Status of the invited user.","example":"active","type":"string"}},"required":["email","status","privileges"],"type":"object"}}},"description":"list of all the user's permissions"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Check user permission","tags":["User"]}},"/processes":{"get":{"operationId":"getProcesses","parameters":[{"description":"Number limitation for the result returned","in":"query","name":"limit","schema":{"default":10,"format":"int64","maximum":50,"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":"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 (for completed processes)","properties":{"import":{"description":"Import process details","properties":{"invalid_emails":{"description":"Number of invalid email addresses","type":"integer","nullable":true},"duplicate_contact_id":{"description":"Number of duplicate contact IDs","type":"integer","nullable":true},"duplicate_ext_id":{"description":"Number of duplicate external IDs","type":"integer","nullable":true},"duplicate_email_id":{"description":"Number of duplicate email IDs","type":"integer","nullable":true},"duplicate_phone_id":{"description":"Number of duplicate phone numbers","type":"integer","nullable":true},"duplicate_whatsapp_id":{"description":"Number of duplicate WhatsApp numbers","type":"integer","nullable":true},"duplicate_landline_number_id":{"description":"Number of duplicate landline numbers","type":"integer","nullable":true}},"type":"object"},"export":{"description":"Export process details","properties":{"total_records":{"description":"Total number of exported records","type":"integer"},"file_size":{"description":"Size of exported file in bytes","type":"integer"}},"type":"object"}},"type":"object","nullable":true},"export_url":{"description":"Download URL for completed export processes","example":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv","format":"url","type":"string","nullable":true},"error":{"description":"Error message for failed processes","example":"Processing timeout exceeded","type":"string","nullable":true},"created_at":{"description":"Process creation timestamp","example":"2024-01-15T10:30:00.000Z","format":"date-time","type":"string","nullable":true},"completed_at":{"description":"Process completion timestamp","example":"2024-01-15T10:35:00.000Z","format":"date-time","type":"string","nullable":true}},"required":["id","name","status"],"type":"object"},"type":"array"}},"required":["count","processes"],"type":"object"}}},"description":"Background processes retrieved successfully"},"400":{"$ref":"#/components/responses/errorModel"}},"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, type, status)\n- Process creation and completion timestamps\n- Process progress and completion status\n- Error information for failed processes\n- Process result data and download links\n\n**Important considerations:**\n- Background processes handle long-running operations like imports and exports\n- Process status indicates current state (queued, processing, completed, failed, cancelled)\n- Export processes provide download URLs when completed\n- Failed processes include error messages for troubleshooting\n- Use pagination for accounts with many historical processes\n- Sort options available for creation order (ascending or descending)\n- Different process types handle specific operations (imports, exports, calculations)\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","info":{"export":{"total_records":1250,"file_size":102400}}}},"failed_process":{"summary":"Failed process with error message","value":{"id":189,"name":"TRANS-GLOBAL-CALC","status":"failed","error":"Processing timeout exceeded after 30 minutes"}}},"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 (for completed processes)","properties":{"import":{"description":"Import process details","properties":{"invalid_emails":{"description":"Number of invalid email addresses","example":2,"type":"integer","nullable":true},"duplicate_contact_id":{"description":"Number of duplicate contact IDs","example":0,"type":"integer","nullable":true},"duplicate_ext_id":{"description":"Number of duplicate external IDs","example":1,"type":"integer","nullable":true},"duplicate_email_id":{"description":"Number of duplicate email IDs","example":5,"type":"integer","nullable":true},"duplicate_phone_id":{"description":"Number of duplicate phone numbers","type":"integer","nullable":true},"duplicate_whatsapp_id":{"description":"Number of duplicate WhatsApp numbers","type":"integer","nullable":true},"duplicate_landline_number_id":{"description":"Number of duplicate landline numbers","type":"integer","nullable":true}},"type":"object"},"export":{"description":"Export process details","properties":{"total_records":{"description":"Total number of exported records","example":1250,"type":"integer"},"file_size":{"description":"Size of exported file in bytes","example":102400,"type":"integer"}},"type":"object"}},"type":"object","nullable":true},"export_url":{"description":"Download URL for completed export processes","example":"https://s3.eu-west-1.amazonaws.com/api-export.example.com/upload/contacts_export.csv","format":"url","type":"string","nullable":true},"error":{"description":"Error message for failed processes","example":"Processing timeout exceeded after 30 minutes","type":"string","nullable":true},"created_at":{"description":"Process creation timestamp","example":"2024-01-15T10:30:00.000Z","format":"date-time","type":"string","nullable":true},"completed_at":{"description":"Process completion timestamp","example":"2024-01-15T10:32:15.000Z","format":"date-time","type":"string","nullable":true}},"required":["id","name","status"],"type":"object"}}},"description":"Process information retrieved successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"examples":{"process_not_found":{"summary":"Process ID not found","value":{"code":"invalid_parameter","message":"processId is invalid"}}},"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 and status\n- Import/export statistics and results\n- Error information for troubleshooting\n- Download URLs for export processes\n- Process timing and performance data\n\n**Important considerations:**\n- Process ID must exist in your account\n- Completed processes provide detailed statistics and results\n- Export processes include download URLs when successful\n- Failed processes contain error messages for debugging\n- Timing information helps with performance analysis\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":{"$ref":"#/components/responses/errorModel"}},"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":{"$ref":"#/components/responses/errorModel"}},"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"}},"/senders/domains":{"get":{"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":{"$ref":"#/components/responses/errorModel"}},"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"]},"post":{"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","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.[a-zA-Z]{2,}$"}},"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":{"$ref":"#/components/responses/errorModel"}},"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"}},"/senders/domains/{domainName}":{"delete":{"operationId":"deleteDomain","parameters":[{"description":"Domain name","in":"path","name":"domainName","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{},"description":"Domain deleted successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"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","id":3,"ip":"192.168.1.100"},{"active":true,"domain":"newsletter.enterprise.com","id":5,"ip":"192.168.1.101"},{"active":false,"domain":"notifications.enterprise.com","id":6,"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":{"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"},"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"}},"required":["active","domain","id","ip"],"type":"object"},"type":"array"}},"required":["ips"],"type":"object"}}},"description":"List of dedicated IPs retrieved successfully"},"400":{"$ref":"#/components/responses/errorModel"}},"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"]}},"/senders/{senderId}":{"delete":{"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":{"$ref":"#/components/responses/errorModel"},"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":{"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":{"$ref":"#/components/responses/errorModel"},"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":{"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":{"$ref":"#/components/responses/errorModel"},"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":{"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":{"$ref":"#/components/responses/errorModel"},"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":{"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,"channel":"email","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"},{"channel":"sms","createdAt":"2017-02-20T14:30:00Z","description":"Webhook triggered on campaign hard bounces","events":["hardBounces"],"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":{"$ref":"#/components/responses/errorModel"}},"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":{"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 webhook","enum":["sms","email"],"example":"sms","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. 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` -\nPossible values for type **Transactional** and channel **SMS**\n####\n`accepted`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`,\n`subscribe`,`sent`,`blacklisted`,`skip` - Possible values for\ntype **Marketing**  channel **SMS** ####\n`sent`,`delivered`,`softBounce`,`hardBounce`,`unsubscribe`,`reply`,\n`subscribe`,`skip`","items":{"enum":["sent","hardBounce","softBounce","blocked","spam","delivered","request","click","invalid","deferred","opened","uniqueOpened","unsubscribed","listAddition","contactUpdated","contactDeleted","inboundEmailProcessed"],"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":["events","url"],"type":"object"}}},"description":"Values to create a webhook","required":true},"responses":{"201":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"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"]}},"/webhooks/export":{"post":{"summary":"This endpoint will submit a request to get the history of webhooks in the\nCSV file. The link to download the CSV file will be sent to the webhook that\nwas provided in the notifyURL.","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":"integer"},"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":{"$ref":"#/components/responses/createdProcessId"},"400":{"$ref":"#/components/responses/errorModel"}},"description":"Exports 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","tags":["Webhooks"]}},"/webhooks/{webhookId}":{"delete":{"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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"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,"channel":"sms","createdAt":"2016-06-07T09:10:10Z","description":"Webhook triggered on campaign openings and addition of lists","events":["listAdditions","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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"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`","items":{"enum":["sent","hardBounce","softBounce","blocked","spam","delivered","request","click","invalid","deferred","opened","uniqueOpened","unsubscribed","listAddition","contactUpdated","contactDeleted","inboundEmailProcessed"],"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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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"}},"/feeds":{"get":{"operationId":"getAllExternalFeeds","parameters":[{"description":"Can be used to filter records by search keyword on feed name","example":"product","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which\nyou want to fetch the list. Can be maximum 30 days older than current\ndate.","example":"2024-01-01","in":"query","name":"startDate","required":false,"schema":{"format":"date","type":"string"}},{"description":"Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which\nyou want to fetch the list. Maximum time period that can be selected is\none month.","example":"2024-01-31","in":"query","name":"endDate","required":false,"schema":{"format":"date","type":"string"}},{"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"}},{"description":"Filter the records by `authType` of the feed.","in":"query","name":"authType","required":false,"schema":{"enum":["basic","token","noAuth"],"type":"string"}},{"description":"Number of documents returned per page.","example":50,"in":"query","name":"limit","required":false,"schema":{"default":50,"format":"int64","maximum":500,"minimum":0,"type":"integer"}},{"description":"Index of the first document on the page.","example":0,"in":"query","name":"offset","required":false,"schema":{"default":0,"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"feeds_response":{"summary":"List of external feeds with various configurations","value":{"count":18,"feeds":[{"id":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","name":"Product Catalog Feed","alias":"product_catalog_feed","url":"https://api.example.com/products","authType":"noAuth","maxRetries":3,"cache":true,"isInternal":false,"createdAt":"2025-09-18T13:29:27.208Z","modifiedAt":"2025-09-18T13:29:27.208Z"},{"id":"c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7","name":"Blog News Feed","alias":"blog_news_feed","url":"https://blog.example.com/api/posts","authType":"noAuth","maxRetries":3,"cache":true,"isInternal":true,"createdAt":"2025-09-17T16:03:25.826Z","modifiedAt":"2025-09-17T16:03:25.826Z"},{"id":"d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8","name":"Public Data Feed","alias":"public_data_feed","url":"https://jsonplaceholder.typicode.com/posts","authType":"noAuth","maxRetries":3,"cache":true,"isInternal":true,"createdAt":"2025-09-05T09:06:42.848Z","modifiedAt":"2025-09-05T09:06:42.848Z"}]}}},"schema":{"properties":{"count":{"description":"Total number of feeds","example":18,"type":"integer"},"feeds":{"description":"List of external feeds","items":{"properties":{"id":{"description":"Unique identifier of the feed","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","format":"uuidv4","type":"string"},"name":{"description":"Name of the feed","example":"Product Catalog Feed","type":"string"},"alias":{"description":"URL-friendly alias for the feed","example":"product_catalog_feed","type":"string"},"url":{"description":"URL of the external data source","example":"https://api.example.com/products","format":"url","type":"string"},"authType":{"description":"Authentication type for accessing the feed","enum":["basic","token","noAuth"],"example":"token","type":"string"},"username":{"description":"Username for basic authentication","example":"apiuser","type":"string"},"password":{"description":"Password for basic authentication","example":"apipass","type":"string"},"token":{"description":"Token for token-based authentication","example":"abc123token456","type":"string"},"maxRetries":{"description":"Maximum number of retry attempts for failed requests","example":3,"maximum":5,"minimum":0,"type":"integer"},"cache":{"description":"Whether to cache the feed response","example":true,"type":"boolean"},"isInternal":{"description":"Whether this is an internal Brevo system feed","example":false,"type":"boolean"},"headers":{"description":"Custom HTTP headers for the feed request","items":{"properties":{"name":{"description":"Header name","example":"Authorization","type":"string"},"value":{"description":"Header value","example":"Bearer xyz789","type":"string"}},"required":["name","value"],"type":"object"},"type":"array","nullable":true},"createdAt":{"description":"Feed creation timestamp","example":"2025-09-18T13:29:27.208Z","format":"date-time","type":"string"},"modifiedAt":{"description":"Feed last modification timestamp","example":"2025-09-18T13:29:27.208Z","format":"date-time","type":"string"}},"required":["id","name","alias","url","authType","maxRetries","cache","isInternal","createdAt","modifiedAt"],"type":"object"},"type":"array"}},"required":["count","feeds"],"type":"object"}}},"description":"External feeds retrieved successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Record not found"}},"summary":"Get all external feeds","description":"Retrieves all external feeds from your Brevo account with filtering and pagination.\n\n**Use this to:**\n- Get an overview of all external data feeds\n- Find feeds by name using search functionality\n- Filter feeds by creation date range\n- Browse feeds by authentication type\n- Monitor feed library organization and usage\n\n**Key information returned:**\n- Feed details (UUID, name, URL, authentication type)\n- Feed configuration and settings\n- Creation and modification timestamps\n- Feed status and error information\n- Authentication and header configurations\n\n**Important considerations:**\n- External feeds enable dynamic content in email campaigns\n- Feeds must be accessible from Brevo servers\n- Authentication credentials are securely stored\n- Feed performance affects campaign delivery\n- Use pagination for accounts with many feeds\n- Date range filtering limited to 30 days maximum\n- Search functionality works on feed name matching\n- Internal feeds are system-managed and cannot be modified\n","tags":["External Feeds"]},"post":{"operationId":"createExternalFeed","requestBody":{"content":{"application/json":{"examples":{"basic_feed":{"summary":"Basic external feed with no authentication","value":{"name":"Public API Feed","url":"https://jsonplaceholder.typicode.com/posts","authType":"noAuth","cache":true,"maxRetries":3}},"token_authenticated_feed":{"summary":"Feed with token authentication","value":{"name":"Product Catalog","url":"https://api.example.com/products","authType":"noAuth","cache":true,"maxRetries":3}},"basic_authenticated_feed":{"summary":"Feed with basic authentication","value":{"name":"Internal Blog Feed","url":"https://blog.example.com/api/posts","authType":"noAuth","cache":true,"maxRetries":3}}},"schema":{"properties":{"name":{"description":"Name of the feed","example":"Product Catalog Feed","type":"string"},"url":{"description":"URL of the external data source","example":"https://api.example.com/products","format":"url","type":"string"},"authType":{"description":"Authentication type for accessing the feed","default":"noAuth","enum":["basic","token","noAuth"],"example":"token","type":"string"},"username":{"description":"Username for basic authentication (required if authType is 'basic')","example":"api_user","type":"string"},"password":{"description":"Password for basic authentication (required if authType is 'basic')","example":"secure_pass123","type":"string"},"token":{"description":"Token for token-based authentication (required if authType is 'token')","example":"token_abc123","type":"string"},"maxRetries":{"description":"Maximum number of retry attempts for failed requests","default":5,"example":3,"maximum":5,"minimum":0,"type":"integer"},"cache":{"description":"Whether to cache the feed response","default":false,"example":true,"type":"boolean"},"headers":{"description":"Custom HTTP headers for the feed request","items":{"properties":{"name":{"description":"Header name","example":"Authorization","type":"string"},"value":{"description":"Header value","example":"Bearer xyz789","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"}},"required":["name","url"],"type":"object"}}},"description":"External feed configuration","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"successful_creation":{"summary":"Successfully created external feed","value":{"id":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6"}}},"schema":{"properties":{"id":{"description":"UUID of the created feed","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","format":"uuidv4","type":"string"}},"required":["id"],"type":"object"}}},"description":"External feed created successfully"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create external feed","description":"Creates a new external feed for dynamic content in email campaigns.\n\n**Use this to:**\n- Set up external data sources for dynamic content\n- Configure authentication for protected feeds\n- Enable real-time content updates in campaigns\n- Establish connections to product catalogs, blogs, or APIs\n\n**Key information returned:**\n- Created feed UUID for reference in campaigns\n- Success confirmation\n\n**Important considerations:**\n- Feed URL must be accessible from Brevo infrastructure\n- Authentication credentials are securely encrypted\n- Test feed accessibility before campaign use\n- Consider feed response time for campaign performance\n- Monitor feed reliability and uptime\n- Use caching for frequently accessed feeds\n- Maximum 5 retry attempts allowed for failed requests\n- Custom headers support for API integration requirements\n","tags":["External Feeds"]}},"/feeds/{uuid}":{"delete":{"operationId":"deleteExternalFeed","parameters":[{"description":"UUID of the feed to delete","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","in":"path","name":"uuid","required":true,"schema":{"format":"uuidv4","type":"string"}}],"responses":{"204":{"content":{},"description":"External feed deleted successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete external feed","description":"Deletes an external feed from your Brevo account.\n\n**Use this to:**\n- Remove external feeds that are no longer needed\n- Clean up unused data sources\n- Remove test or outdated feeds\n- Maintain organized feed library\n\n**Key information returned:**\n- Success confirmation message\n\n**Important considerations:**\n- This action is PERMANENT and cannot be undone\n- Feed configuration and history will be lost\n- Check if feed is used in active campaigns before deletion\n- Remove feed references from email templates\n- Consider deactivating instead of deleting if unsure\n","tags":["External Feeds"]},"get":{"operationId":"getExternalFeedByUUID","parameters":[{"description":"UUID of the feed to fetch","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","in":"path","name":"uuid","required":true,"schema":{"format":"uuidv4","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"token_authenticated_feed":{"summary":"Feed with token authentication","value":{"id":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","name":"Product Catalog Feed","url":"https://api.example.com/products","authType":"noAuth","username":null,"password":null,"token":null,"personalization":false,"defaultAttr":"","defaultContact":"","headers":null,"maxRetries":0,"cache":false,"createdAt":"2025-09-18T13:29:27.208Z","modifiedAt":"2025-09-18T13:29:27.208Z"}},"basic_authenticated_feed":{"summary":"Feed with basic authentication","value":{"id":"c2d3e4f5-a6b7-48c9-90d1-e2f3a4b5c6d7","name":"Internal Blog Feed","url":"https://blog.example.com/api/posts","authType":"noAuth","username":null,"password":null,"token":null,"personalization":false,"defaultAttr":"","defaultContact":"","headers":null,"maxRetries":0,"cache":false,"createdAt":"2025-09-17T16:03:25.826Z","modifiedAt":"2025-09-17T16:03:25.826Z"}},"no_auth_feed":{"summary":"Public feed with no authentication","value":{"id":"d3e4f5a6-b7c8-49d0-91e2-f3a4b5c6d7e8","name":"Public Data Feed","url":"https://jsonplaceholder.typicode.com/posts","authType":"noAuth","username":null,"password":null,"token":null,"personalization":false,"defaultAttr":"","defaultContact":"","headers":null,"maxRetries":0,"cache":false,"createdAt":"2025-09-05T09:06:42.848Z","modifiedAt":"2025-09-05T09:06:42.848Z"}}},"schema":{"properties":{"id":{"description":"Unique identifier of the feed","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","format":"uuidv4","type":"string"},"name":{"description":"Name of the feed","example":"Product Catalog Feed","type":"string"},"url":{"description":"URL of the external data source","example":"https://api.example.com/products","format":"url","type":"string"},"authType":{"description":"Authentication type for accessing the feed","enum":["basic","token","noAuth"],"example":"token","type":"string"},"username":{"description":"Username for basic authentication (null if not using basic auth)","example":"api_user","type":"string","nullable":true},"password":{"description":"Password for basic authentication (null if not using basic auth)","example":"secure_pass123","type":"string","nullable":true},"token":{"description":"Token for token-based authentication (null if not using token auth)","example":"token_abc123","type":"string","nullable":true},"personalization":{"description":"Whether personalization is enabled for this feed","example":true,"type":"boolean"},"defaultAttr":{"description":"Default attribute name for personalization fallback (empty string if not set)","example":"","type":"string"},"defaultContact":{"description":"Default contact email for personalization fallback (empty string if not set)","example":"","type":"string"},"headers":{"description":"Custom HTTP headers for the feed request","items":{"properties":{"name":{"description":"Header name","example":"Authorization","type":"string"},"value":{"description":"Header value","example":"Bearer xyz789","type":"string"}},"required":["name","value"],"type":"object"},"type":"array","nullable":true},"maxRetries":{"description":"Maximum number of retry attempts for failed requests","example":3,"maximum":5,"minimum":0,"type":"integer"},"cache":{"description":"Whether to cache the feed response","example":true,"type":"boolean"},"createdAt":{"description":"Feed creation timestamp","example":"2025-09-18T13:29:27.208Z","format":"date-time","type":"string"},"modifiedAt":{"description":"Feed last modification timestamp","example":"2025-09-18T13:29:27.208Z","format":"date-time","type":"string"}},"required":["id","name","url","authType","personalization","defaultAttr","defaultContact","maxRetries","cache","createdAt","modifiedAt"],"type":"object"}}},"description":"External feed details retrieved successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Get external feed details","description":"Retrieves details of a specific external feed by its UUID.\n\n**Use this to:**\n- Get complete configuration of an external feed\n- Check feed authentication settings\n- Review feed personalization options\n- Verify feed URL and parameters\n- Monitor feed modification history\n\n**Key information returned:**\n- Complete feed configuration and settings\n- Authentication credentials and headers\n- Personalization and fallback settings\n- Creation and modification timestamps\n- Cache and retry configurations\n\n**Important considerations:**\n- UUID must exist in your account\n- Provides complete feed information for troubleshooting\n- Essential before making modifications\n- Shows current feed health status\n- Useful for debugging feed issues\n","tags":["External Feeds"]},"put":{"operationId":"updateExternalFeed","parameters":[{"description":"UUID of the feed to update","example":"b1c2d3e4-f5a6-47b8-89c0-d1e2f3a4b5c6","in":"path","name":"uuid","required":true,"schema":{"format":"uuidv4","type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"update_name_and_url":{"summary":"Update feed name and URL","value":{"name":"Updated Product Catalog","url":"https://api.newstore.com/products/v2"}},"update_authentication":{"summary":"Change authentication from basic to token","value":{"authType":"token","token":"newabc123token789","username":null,"password":null}},"update_cache_and_retries":{"summary":"Update cache and retry settings","value":{"cache":true,"maxRetries":5}},"update_headers":{"summary":"Add custom headers","value":{"headers":[{"name":"X-API-Version","value":"v2"},{"name":"User-Agent","value":"Brevo-Feed-Client/1.0"}]}},"complete_update":{"summary":"Complete feed configuration update","value":{"name":"Enterprise Product Feed","url":"https://enterprise-api.company.com/catalog","authType":"token","token":"enterprise789token123","cache":true,"maxRetries":3,"headers":[{"name":"Authorization","value":"Bearer enterprise789token123"},{"name":"Accept","value":"application/json"}]}}},"schema":{"properties":{"name":{"description":"Name of the feed","example":"Updated Product Catalog","type":"string"},"url":{"description":"URL of the external data source","example":"https://api.newstore.com/products/v2","format":"url","type":"string"},"authType":{"description":"Authentication type for accessing the feed","enum":["basic","token","noAuth"],"example":"token","type":"string"},"username":{"description":"Username for basic authentication","example":"apiuser","type":"string"},"password":{"description":"Password for basic authentication","example":"newsecurepass456","type":"string"},"token":{"description":"Token for token-based authentication","example":"newabc123token789","type":"string"},"headers":{"description":"Custom HTTP headers for the feed request","items":{"properties":{"name":{"description":"Header name","example":"X-API-Version","type":"string"},"value":{"description":"Header value","example":"v2","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"maxRetries":{"description":"Maximum number of retry attempts for failed requests","example":3,"maximum":5,"minimum":0,"type":"integer"},"cache":{"description":"Whether to cache the feed response","example":true,"type":"boolean"}},"type":"object"}}},"description":"Feed configuration updates","required":true},"responses":{"204":{"content":{},"description":"External feed updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update external feed","description":"Updates configuration of an existing external feed.\n\n**Use this to:**\n- Update feed URLs when data sources change\n- Modify authentication credentials\n- Change cache and retry settings\n- Update custom headers\n- Rename feeds for better organization\n\n**Key information returned:**\n- Success confirmation message\n\n**Important considerations:**\n- Only provided fields will be updated\n- Feed UUID must exist in your account\n- Authentication changes require verification\n- URL changes should be tested before campaign use\n- Monitor campaigns using this feed after updates\n","tags":["External Feeds"]}},"/objects/{object_type}/batch/upsert":{"post":{"description":"This API allows bulk upsert of object records in a single request. Each object record may include\n  - Attributes\n  - Identifiers\n  - Associations\n**Response:**\n  The API processes the request asynchronously and returns a processId that you can use to track the background process status.\n**API and Schema Limitation:**\n  - Size:\n      - Max 1000 objects records per request\n      - Max request body size: 1 MB\n  - Max 500 attributes defined per object record upsert request\n    - This is coherent with schema limitation: an object cannot have more than 500 attributes.\n    - Worth noting: Nothing happens If an attribute is mentioned in the request, but was not previously defined for the object schema (no error, no attribute creation)\n  - Max 10 associations defined per object record upsert request\n    - This is coherent with schema limitation: an object cannot have more than 10 associations with other objects. and each object record can be linked to max 10 other records.\n**Errors:**\n    - Make sure both object records exist before associating them, else the API will return an error.\n    - This route does not create objects. The object where the object records are upserted by this API must be created already else the API will return an error \"invalid object type\".\n","operationId":"upsertrecords","parameters":[{"description":"object type for the attribute","in":"path","name":"object_type","required":true,"schema":{"example":"vehicle","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"records":{"description":"List of object records to be upsert. Each record can have attributes, identifiers, and associations.","items":{"oneOf":[{"properties":{"associations":{"items":{"oneOf":[{"properties":{"object_type":{"description":"Type of the associated object","example":"garage","type":"string"},"records":{"items":{"properties":{"identifiers":{"example":{"id":435435},"properties":{"ext_id":{"description":"ext_id is ID of record in the external system that client_dev want to store in the object system.","example":"9ab4c8d2ef","type":"string"},"id":{"description":"Internal ID of the object record generated by Brevo","type":"integer"}},"type":"object"}},"type":"object"},"maxItems":100,"minItems":1,"type":"array"}},"type":"object"},{"properties":{"object_type":{"description":"Type of the associated object","example":"insurance","type":"string"},"records":{"items":{"oneOf":[{"properties":{"identifiers":{"description":"Identifiers attached with the associated object record. It can be ext_id or id. NOTE: - Either ext_id or id is required, if both are not provided, then error will be returned. - Both ext_id and id cannot be provided in the same request.\n","example":{"id":1236},"properties":{"ext_id":{"description":"ext_id is ID of record in the external system that client_dev want to store in the object system.","example":"9ab4c8d2ef","type":"string"},"id":{"description":"Internal ID of the object record generated by Brevo","type":"integer"}},"type":"object"}},"type":"object"},{"properties":{"identifiers":{"example":{"ext_id":"f7e8d9c0ba"},"type":"object"}},"type":"object"}]},"maxItems":100,"minItems":1,"type":"array"}},"type":"object"}]},"maxItems":10,"minItems":0,"type":"array"},"attributes":{"description":"Attributes attached with the object record. Only the already created attributes will be used with records. Minimum 1 attribute is required.\n","example":{"color":"Gray","engine_type":"Diesel","make":"Honda","model":"Civic","year":2021},"type":"object"},"identifiers":{"description":"Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system. NOTE: - Its an optional field, if identifier is not provided, then id of object records will be generated by Brevo. This id can be used for further operation with the object record. - Both ext_id and id cannot be provided in the same request.\n","example":{"id":400},"properties":{"ext_id":{"description":"ext_id is ID of record in the external system that client_dev want to store in the object system.","type":"string"},"id":{"description":"Internal ID of the object record generated by Brevo","example":16789,"type":"integer"}},"type":"object"}},"type":"object"}]},"maxItems":1000,"minItems":1,"type":"array"}},"required":["records"],"type":"object"}}},"description":"Payload for batch upsert object records with associations","required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"message":{"example":"Batch object records are being processed","type":"string"},"processId":{"description":"Unique Id for the batch process used to track the status of the batch.","example":21,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Batch request accepted for processing of upsert object records."},"400":{"description":"Bad request (e.g., invalid organization ID, invalid object_type, records cannot be empty or more than 1000)"},"403":{"description":"Custom objects are not available on this account."},"404":{"description":"Object not found for the provided organization or object type"},"500":{"description":"Internal server error"}},"summary":"Create/Update object records in bulk","tags":["Custom Objects"]}},"/objects/{object_type}/records":{"get":{"description":"This API retrieves a list of object records along with their associated records and provides the total count of records for the specified object. **Note**: Contact as object type is not supported in this endpoint.\n","operationId":"getrecords","parameters":[{"description":"object type for the attribute","in":"path","name":"object_type","required":true,"schema":{"example":"vehicle","type":"string"}},{"description":"Number of records returned per page","in":"query","name":"limit","required":true,"schema":{"format":"int64","maximum":1000,"minimum":0,"type":"integer"}},{"description":"Page number for pagination. It's used to fetch the object records on a provided page number. Must be a valid positive integer.","in":"query","name":"page_num","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}},{"description":"Sort order, must be 'asc' or 'desc'. Default to 'desc' if not provided.","in":"query","name":"sort","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Whether to include associations, must be 'true' or 'false'. Default to 'false' if not provided.","in":"query","name":"association","schema":{"enum":["true","false"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"description":"Total number of object records for an object type.","example":350,"format":"int64","type":"integer"},"records":{"items":{"properties":{"associations":{"description":"List of associations for the object record. If association query param is true it will return 5 associated records per association.","items":{"oneOf":[{"properties":{"object_type":{"description":"Type of the associated object","example":"garage","type":"string"},"records":{"items":{"oneOf":[{"properties":{"identifiers":{"description":"Identifiers attached with the associated object record.","properties":{"id":{"description":"Internal ID of the object record generated by Brevo","example":12345,"type":"integer"}},"type":"object"}},"type":"object"},{"properties":{"identifiers":{"description":"Identifiers attached with the associated object record.","properties":{"id":{"description":"Internal ID of the object record generated by Brevo","example":45678,"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"}},"type":"object"},{"properties":{"object_type":{"description":"Type of the associated object","example":"insurance","type":"string"},"records":{"items":{"oneOf":[{"properties":{"identifiers":{"description":"Identifiers attached with the associated object record. Only includes the internal ID.","properties":{"id":{"description":"Internal ID of the insurance object record generated by Brevo","example":98765,"type":"integer"}},"type":"object"}},"type":"object"},{"properties":{"identifiers":{"description":"Identifiers attached with the associated object record. Only includes the internal ID.","properties":{"id":{"description":"Internal ID of the insurance object record generated by Brevo","example":87654,"type":"integer"}},"type":"object"}},"type":"object"}]},"type":"array"}},"type":"object"}]},"type":"array"},"attributes":{"description":"Attributes attached with the object record. Only the already created attributes will be used with records. Minimum 1 attribute is required.\n","example":{"color":"Black","engine_type":"Hybrid","make":"Toyoto","model":"Corolla","year":2020},"type":"object"},"createdAt":{"description":"Timestamp when the object record was created","example":"2025-07-22T10:20:30Z","format":"date-time","type":"string"},"identifiers":{"description":"Identifiers attached with the object record. It can have id or ext_id. ext_id is ID of record in the external system that client want to store in the object system, id is an internal ID of object record generated by Brevo system.\n","properties":{"ext_id":{"description":"ext_id is ID of record in the external system that client_dev want to store in the object system.","example":"507f1f77bc","type":"string"},"id":{"description":"Internal ID of the object record generated by Brevo","example":16789,"type":"integer"}},"type":"object"},"updatedAt":{"description":"Timestamp when the object record was last updated","example":"2025-07-22T10:20:30Z","format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"A list of object records for an object type. If association param is set true it will return 5 associated records per association for an object type."},"400":{"description":"Bad request (e.g., invalid object_type, invalid page number provided)"},"403":{"description":"Custom objects are not available on this account."},"424":{"description":"primary attribute not found"},"500":{"description":"Internal server error"}},"summary":"Get the list of object records and total records count for an object.","tags":["Custom Objects"]}},"/objects/{object_type}/batch/delete":{"post":{"operationId":"batchDeleteObjectRecords","summary":"Delete multiple object records (up to 1000) asynchronously","description":"Use this endpoint to delete multiple object records of the same object-type in one request.\nThe request is accepted and processed asynchronously.   You can track the status of the deletion process using the returned **processId**.\n**API and Schema Limitations:** - Each request can contain up to **1000** object record identifiers   - If more records must be deleted → send multiple batch requests\n","parameters":[{"description":"Object type for the records to delete","in":"path","name":"object_type","required":true,"schema":{"example":"vehicle","type":"string"}}],"requestBody":{"required":true,"description":"List of object record identifiers to delete","content":{"application/json":{"schema":{"type":"object","properties":{"identifiers":{"description":"One of the below must be provided","oneOf":[{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","maxItems":1000,"description":"List of object record IDs","items":{"type":"integer"},"example":[101,102,103]}}},{"type":"object","required":["ext_ids"],"properties":{"ext_ids":{"type":"array","maxItems":1000,"description":"List of external record identifiers","items":{"type":"string"},"example":["ext-001","ext-002"]}}}]}}},"examples":{"deleteByExtIds":{"summary":"Delete using external identifiers","value":{"identifiers":{"ext_ids":["ext-001","ext-002"]}}}}}}},"responses":{"202":{"description":"Batch request accepted for deletion - process started","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"integer","format":"int64","description":"Identifier for batch process tracking","example":21},"message":{"type":"string","example":"Batch object records are being processed for deletion."}}}}}},"400":{"description":"Invalid request (object_type, payload format etc.)"},"403":{"description":"Custom objects are not available on this account"},"404":{"description":"Object type not found or invalid identifier references"},"500":{"description":"Internal server error"}},"tags":["Custom Objects"]}},"/contacts":{"get":{"operationId":"getContacts","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":1000,"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":"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":"Id of the segment. **Either listIds or segmentId can be passed.**","in":"query","name":"segmentId","schema":{"format":"int64","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},{"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,"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":{"$ref":"#/components/responses/errorModel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Too Many Requests"}},"summary":"Get all the contacts","tags":["Contacts"]},"post":{"description":"Creates 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"}},"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"]}},"/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},{"label":"Women","value":2},{"label":"Kid","value":3}],"name":"GENDER","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":"ID of Value of the \"category\" type attribute","example":1,"format":"int64","type":"integer"}},"required":["label","value"],"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"}},"summary":"List all attributes","tags":["Contacts"]}},"/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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete an attribute","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":{"$ref":"#/components/responses/errorModel"}},"summary":"Create contact attribute","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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update contact attribute","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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete a multiple-choice attribute option","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":{"$ref":"#/components/responses/errorModel"}},"summary":"Update multiple contacts","tags":["Contacts"]}},"/contacts/doubleOptinConfirmation":{"post":{"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"},"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Create Contact via DOI (Double-Opt-In) Flow","tags":["Contacts"],"x-codegen-request-body-name":"createDoiContact"}},"/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":{"$ref":"#/components/responses/createdProcessId"},"400":{"$ref":"#/components/responses/errorModel"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Too Many Requests"}},"summary":"Export contacts","tags":["Contacts"]}},"/contacts/folders":{"get":{"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":{"$ref":"#/components/responses/errorModel"}},"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":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create a folder","tags":["Contacts"],"x-codegen-request-body-name":"createFolder"}},"/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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Delete a folder (and all its lists)","tags":["Contacts"]},"get":{"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":{"$ref":"#/components/responses/errorModel"},"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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Folder ID not found"}},"summary":"Update a folder","tags":["Contacts"],"x-codegen-request-body-name":"updateFolder"}},"/contacts/folders/{folderId}/lists":{"get":{"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":{"$ref":"#/components/responses/errorModel"},"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"},"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":{"$ref":"#/components/responses/createdProcessId"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Import contacts","tags":["Contacts"]}},"/contacts/lists":{"get":{"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":{"$ref":"#/components/responses/errorModel"}},"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":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create a list","tags":["Contacts"]}},"/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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Delete a list","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**. 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":"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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Get a list's details","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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Update a list","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":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":{"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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"List ID not found"}},"summary":"Get contacts in a list","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","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":{"$ref":"#/components/responses/errorModel"},"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","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 add to 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":{"$ref":"#/components/responses/errorModel"},"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","format":"string","type":"string"},"id":{"description":"ID of the list","example":23,"format":"int64","type":"integer"},"segmentName":{"description":"Name of the Segment","example":"My Segment","type":"string"},"updatedAt":{"description":"Updation 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":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all the segments","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":{"$ref":"#/components/responses/errorModel"},"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":"There 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\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.\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,"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 hardbounes 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 softbounes 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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact's email not found"}},"summary":"Get a contact's details","tags":["Contacts"]},"put":{"description":"There 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 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 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 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"}},"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's email 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\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. 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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact's email not found"}},"summary":"Get email campaigns' statistics for a contact","tags":["Contacts"]}},"/conversations/agentOnlinePing":{"post":{"description":"We recommend pinging this endpoint every minute for as long as the agent has to be considered online.","requestBody":{"content":{"application/json":{"examples":{"Basic use":{"value":{"agentId":"d9nKoegKSjmCtyK78"}},"agentEmail + agentName + receivedFrom":{"value":{"agentEmail":"liz@getwear.com","agentName":"Liz","receivedFrom":"SuperAwesomeHelpdesk"}}},"schema":{"properties":{"agentEmail":{"description":"agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically."},"agentId":{"description":"agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required)."},"agentName":{"description":"agent name"},"receivedFrom":{"description":"mark your messages to distinguish messages created by you from the others."}},"type":"object"}}},"required":true},"responses":{"201":{"description":"Status of the agent was set successfully. Response body will be empty."},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Sets agent’s status to online for 2-3 minutes","tags":["Conversations"]}},"/conversations/messages":{"post":{"requestBody":{"content":{"application/json":{"examples":{"Basic use":{"value":{"agentId":"d9nKoegKSjmCtyK78","text":"Hello! How can I help you?","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}},"agentEmail + agentName + receivedFrom":{"description":"When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically.","value":{"agentEmail":"liz@getwear.com","agentName":"Liz","receivedFrom":"SuperAwesomeHelpdesk","text":"Hello! How can I help you?","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}},"receivedFrom":{"description":"When you receive a webhook, you might want to distinguish messages created by you from the others. Use receivedFrom property to mark your messages.","value":{"agentId":"d9nKoegKSjmCtyK78","receivedFrom":"SuperAwesomeHelpdesk","text":"Hello! How can I help you?","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"properties":{"agentEmail":{"description":"agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address."},"agentId":{"description":"agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required)."},"agentName":{"description":"agent name"},"receivedFrom":{"description":"mark your messages to distinguish messages created by you from the others."},"text":{"description":"message text"},"visitorId":{"description":"visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>"}},"required":["visitorId","text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1482512803740,"html":"Hello! How can I help you?","id":"eYBEm3gq3zc5ayE2g","isMissed":false,"isMissedByVisitor":false,"isPushed":false,"isTrigger":false,"receivedFrom":"SuperAwesomeHelpdesk","text":"Hello! How can I help you?","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Newly created message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send a message as an agent","tags":["Conversations"]}},"/conversations/messages/{id}":{"delete":{"description":"Only agents’ messages can be deleted.","parameters":[{"description":"ID of the message","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The message was deleted from the conversation"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Delete a message sent by an agent","tags":["Conversations"]},"get":{"parameters":[{"description":"ID of the message","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"requested message":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1482512803740,"html":"Hello! How can I help you?","id":"eYBEm3gq3zc5ayE2g","isMissed":false,"isMissedByVisitor":false,"isPushed":false,"isTrigger":false,"receivedFrom":"SuperAwesomeHelpdesk","text":"Hello! How can I help you?","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Requested message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get a message","tags":["Conversations"]},"put":{"description":"Only agents’ messages can be edited.","parameters":[{"description":"ID of the message","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"edition":{"value":{"text":"Good morning! How can I help you?"}}},"schema":{"properties":{"text":{"description":"edited message text","type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"edited message":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1482512803740,"html":"Hello! How can I help you?","id":"eYBEm3gq3zc5ayE2g","isMissed":false,"isMissedByVisitor":false,"isPushed":false,"isTrigger":false,"receivedFrom":"SuperAwesomeHelpdesk","text":"Hello! How can I help you?","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Updated message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Update a message sent by an agent","tags":["Conversations"]}},"/conversations/pushedMessages":{"post":{"description":"Example of automated messages: order status, announce new features in your web app, etc.","requestBody":{"content":{"application/json":{"examples":{"Agent group":{"description":"Send a message on behalf of a random agent from one of your agent groups","value":{"groupId":"PjRBMhWGen6aRHjif","text":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}},"Random agent":{"value":{"text":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}},"Specific agent":{"description":"Send a message on behalf of a specific agent","value":{"agentId":"d9nKoegKSjmCtyK78","text":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"properties":{"agentId":{"description":"agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>."},"groupId":{"description":"group ID. It can be found on group’s page."},"text":{"description":"message text"},"visitorId":{"description":"visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\"><a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a></a>"}},"required":["visitorId","text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1470222622433,"html":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","id":"AXCR3k9bpSY7bpuh7","isMissed":false,"isMissedByVisitor":false,"isPushed":true,"isTrigger":false,"text":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Newly created message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send an automated message to a visitor","tags":["Conversations"]}},"/conversations/pushedMessages/{id}":{"delete":{"parameters":[{"description":"ID of the message","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The message was deleted from the conversation"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Delete an automated message","tags":["Conversations"]},"get":{"parameters":[{"description":"ID of the message sent previously","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"requested message":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1470222622433,"html":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","id":"AXCR3k9bpSY7bpuh7","isMissed":false,"isMissedByVisitor":false,"isPushed":true,"isTrigger":false,"text":"Your order has shipped! Here’s your tracking number: 9114 5847 3325 9667 4328 88","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Requested message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get an automated message","tags":["Conversations"]},"put":{"parameters":[{"description":"ID of the message","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"edition":{"value":{"text":"Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54"}}},"schema":{"properties":{"text":{"description":"edited message text","type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"updated message":{"value":{"agentId":"d9nKoegKSjmCtyK78","createdAt":1470222622433,"html":"Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54","id":"AXCR3k9bpSY7bpuh7","isMissed":false,"isMissedByVisitor":false,"isPushed":true,"isTrigger":false,"text":"Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54","type":"agent","visitorId":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg"}}},"schema":{"$ref":"#/components/schemas/ConversationsMessage"}}},"description":"Updated message is returned as a response"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Update an automated message","tags":["Conversations"]}},"/conversations/visitorGroup":{"put":{"description":"Assigns a visitor to a specific agent group or removes them from their current group.","requestBody":{"content":{"application/json":{"examples":{"Assign to group":{"description":"Assign visitor to a group","value":{"groupId":"PjRBMhWGen6aRHjif"}},"Remove from group":{"description":"Remove visitor from group","value":{"groupId":null}}},"schema":{"properties":{"groupId":{"description":"Group ID. It can be found on group’s page."}},"required":["groupId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"groupId":"PjRBMhWGen6aRHjif","visitorId":"AXCR3k9bpSY7bpuh7"}}},"schema":{"properties":{"groupId":{"description":"group ID the visitor was assigned to"},"visitorId":{"description":"visitor ID"}},"type":"object"}}},"description":"Visitor assigned to group"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when the visitor is not found"}},"summary":"Set visitor group assignment","tags":["Conversations"]}},"/categories":{"get":{"operationId":"getCategories","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"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 by category ids","in":"query","name":"ids","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Filter by category name","in":"query","name":"name","schema":{"type":"string"}},{"description":"Filter (urlencoded) the categories modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"modifiedSince","schema":{"type":"string"}},{"description":"Filter (urlencoded) the categories created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"createdSince","schema":{"type":"string"}},{"description":"Filter categories by their deletion status. If `false` is passed, only categories that are not deleted will be returned.\n","in":"query","name":"isDeleted","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"categories":[{"createdAt":"2021-12-31T11:42:35.638Z","id":"C19","isDeleted":true,"modifiedAt":"2022-03-03T14:48:31.867Z","name":"Food","url":"http://mydomain.com/category/food"},{"createdAt":"2021-12-31T11:42:35.638Z","id":"C20","isDeleted":true,"modifiedAt":"2022-03-03T14:48:31.867Z","name":"clothing","url":"http://mydomain.com/category/clothing"}],"count":2}}},"schema":{"properties":{"categories":{"items":{"allOf":[{"$ref":"#/components/schemas/getCategoryDetails"}],"type":"object"},"type":"array"},"count":{"description":"Number of categories","example":17655,"format":"int64","type":"integer"}},"required":["categories","count"],"type":"object"}}},"description":"All categories listed"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your categories","tags":["Ecommerce"]},"post":{"operationId":"createUpdateCategory","requestBody":{"content":{"application/json":{"schema":{"properties":{"deletedAt":{"description":"UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Unique Category ID as saved in the shop\n","example":"CAT123","format":"email","type":"string"},"isDeleted":{"description":"category deleted from the shop's database","example":true,"type":"boolean"},"name":{"description":"**Mandatory in case of creation**. Name of the Category, as displayed in the shop\n","example":"Electronics","type":"string"},"updateEnabled":{"default":false,"description":"Facilitate to update the existing category in the same request (updateEnabled = true)","example":false,"type":"boolean"},"url":{"description":"URL to the category","example":"http://mydomain.com/category/electronics","type":"string"}},"required":["id"],"type":"object"}}},"description":"Values to create/update a category","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":21}}},"schema":{"properties":{"id":{"description":"ID of the category when a new category is created","example":122,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Category created"},"204":{"content":{},"description":"Category updated"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create/Update a category","tags":["Ecommerce"]}},"/categories/batch":{"post":{"operationId":"createUpdateBatchCategory","requestBody":{"content":{"application/json":{"schema":{"properties":{"categories":{"description":"array of categories objects","items":{"properties":{"deletedAt":{"description":"UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the category deleted from the shop's database","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Unique Category ID as saved in the shop\n","example":"CAT123","format":"email","type":"string"},"isDeleted":{"description":"category deleted from the shop's database","example":true,"type":"boolean"},"name":{"description":"**Mandatory in case of creation**. Name of the Category, as displayed in the shop\n","example":"Electronics","type":"string"},"url":{"description":"URL to the category","example":"http://mydomain.com/category/electronics","type":"string"}},"required":["id"],"type":"object"},"type":"array"},"updateEnabled":{"description":"Facilitate to update the existing categories in the same request (updateEnabled = true)","type":"boolean"}},"required":["categories"],"type":"object"}}},"description":"Values to create a batch of categories","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"createdCount":2,"updatedCount":7}}},"schema":{"properties":{"createdCount":{"description":"Number of the new created categories","example":7,"format":"int64","type":"integer"},"updatedCount":{"description":"Number of the existing categories updated","example":5,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Category created and updated"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create categories in batch","tags":["Ecommerce"]}},"/categories/{id}":{"get":{"operationId":"getCategoryInfo","parameters":[{"description":"Category ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getCategoryDetails"}}},"description":"Category informations"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Get a category details","tags":["Ecommerce"]}},"/couponCollections":{"get":{"operationId":"getCouponCollections","parameters":[{"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","minimum":0,"type":"integer"}},{"description":"Sort the results by creation time in ascending/descending order","in":"query","name":"sort","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"The field used to sort coupon collections","in":"query","name":"sortBy","required":false,"schema":{"default":"createdAt","enum":["createdAt","remainingCoupons","expirationDate"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"collections":[{"createdAt":"2017-03-12T12:30:00Z","defaultCoupon":"10 OFF","id":"23befbae-1505-47a8-bd27-e30ef739f32c","name":"Summer","remainingCoupons":5000,"totalCoupons":10000}]}}},"schema":{"$ref":"#/components/schemas/getCouponCollection"}}},"description":"Coupon collections"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all your coupon collections","tags":["Coupons"]},"post":{"operationId":"createCouponCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"defaultCoupon":{"description":"Default coupons collection name","example":"Winter","type":"string"},"expirationDate":{"description":"Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date.","example":"2022-01-02T00:00:00Z","format":"date-time","type":"string"},"name":{"description":"Name of the coupons collection","example":"10%OFF","type":"string"},"remainingCouponsAlert":{"description":"Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts.","example":5,"type":"integer"},"remainingDaysAlert":{"description":"Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts.","example":5,"type":"integer"}},"required":["name","defaultCoupon"],"type":"object"}}},"description":"Values to create a coupon collection","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"The id of the created collection","example":"23befbae-1505-47a8-bd27-e30ef739f32c","format":"uuidv4","type":"string"}},"required":["id"],"type":"object"}}},"description":"Coupon collection created"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"}},"summary":"Create а coupon collection","tags":["Coupons"]}},"/couponCollections/{id}":{"get":{"operationId":"getCouponCollection","parameters":[{"description":"Id of the collection to return","in":"path","name":"id","required":true,"schema":{"format":"uuidv4","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":[{"createdAt":"2017-03-12T12:30:00Z","defaultCoupon":"10 OFF","id":"23befbae-1505-47a8-bd27-e30ef739f32c","name":"Summer","remainingCoupons":5000,"totalCoupons":10000}]}},"schema":{"$ref":"#/components/schemas/getCouponCollection"}}},"description":"Coupon collection"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Coupon collection not found"}},"summary":"Get a coupon collection by id","tags":["Coupons"]},"patch":{"operationId":"updateCouponCollection","parameters":[{"description":"Id of the collection to update","in":"path","name":"id","required":true,"schema":{"format":"uuidv4","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"defaultCoupon":{"description":"A default coupon to be used in case there are no coupons left","example":"10 OFF","type":"string"},"expirationDate":{"description":"Specify an expiration date for the coupon collection in RFC3339 format. Use null to remove the expiration date.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"remainingCouponsAlert":{"description":"Send a notification alert (email) when the remaining coupons count is equal or fall bellow this number. Use null to disable alerts.","example":5,"type":"integer"},"remainingDaysAlert":{"description":"Send a notification alert (email) when the remaining days until the expiration date are equal or fall bellow this number. Use null to disable alerts.","example":5,"type":"integer"}},"type":"object"}}},"description":"Values to update the coupon collection"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"defaultCoupon":{"description":"The default coupon of the collection","example":"10 OFF","type":"string"},"id":{"description":"The id of the collection","example":"23befbae-1505-47a8-bd27-e30ef739f32c","format":"uuidv4","type":"string"},"name":{"description":"The name of the collection","example":"SummerPromotions","format":"uuidv4","type":"string"}},"required":["id","name","defaultCoupon"],"type":"object"}}},"description":"Coupon collection updated"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"}},"summary":"Update a coupon collection by id","tags":["Coupons"]}},"/coupons":{"post":{"operationId":"createCoupons","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"description":"The id of the coupon collection for which the coupons will be created","example":"23befbae-1505-47a8-bd27-e30ef739f32c","format":"uuidv4","type":"string"},"coupons":{"items":{"description":"Name of the coupon","example":"Uf12AF","type":"string"},"maxItems":10000,"minItems":1,"type":"array","uniqueItems":true}},"required":["collectionId","coupons"],"type":"object"}}},"description":"Values to create coupons","required":true},"responses":{"204":{"content":{},"description":"Coupons creation in progress"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Coupon collection not found"}},"summary":"Create coupons for a coupon collection","tags":["Coupons"]}},"/ecommerce/activate":{"post":{"description":"Getting access to Brevo eCommerce.","responses":{"200":{"description":"eCommerce activation is in process, please wait for 5 minutes."},"401":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Activate the eCommerce app","tags":["Ecommerce"]}},"/ecommerce/attribution/metrics":{"get":{"parameters":[{"description":"When getting metrics for a specific period, define the starting datetime in RFC3339 format","in":"query","name":"periodFrom","schema":{"example":"2022-01-02T00:00:00Z","format":"date-time","type":"string"}},{"description":"When getting metrics for a specific period, define the end datetime in RFC3339 format","in":"query","name":"periodTo","schema":{"example":"2022-01-03T00:00:00Z","format":"date-time","type":"string"}},{"description":"The email campaign ID(s) to get metrics for","in":"query","name":"emailCampaignId[]","schema":{"items":{"example":"sale","type":"string"},"type":"array"}},{"description":"The SMS campaign ID(s) to get metrics for","in":"query","name":"smsCampaignId[]","schema":{"items":{"type":"string"},"type":"array"}},{"description":"The automation workflow ID(s) to get email attribution metrics for","in":"query","name":"automationWorkflowEmailId[]","schema":{"items":{"type":"string"},"type":"array"}},{"description":"The automation workflow ID(s) to get SMS attribution metrics for","in":"query","name":"automationWorkflowSmsId[]","schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"results":{"description":"List of conversion attribution metrics","example":[{"averageBasket":3,"conversionSource":"email_campaign","id":"sale01","ordersCount":300,"revenue":900},{"averageBasket":4,"conversionSource":"email_campaign","id":"sale02","ordersCount":200,"revenue":800}],"items":{"$ref":"#/components/schemas/ConversionSourceMetrics"},"type":"array"},"totals":{"description":"Attribution list aggregated totals","example":{"averageBasket":3.4,"ordersCount":500,"revenue":1700},"properties":{"averageBasket":{"format":"float","type":"number"},"ordersCount":{"format":"integer","type":"number"},"revenue":{"format":"float","type":"number"}},"required":["ordersCount","revenue","averageBasket"],"type":"object"}},"required":["results","totals"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get attribution metrics for one or more Brevo campaigns or workflows","tags":["Ecommerce"]}},"/ecommerce/attribution/metrics/{conversionSource}/{conversionSourceId}":{"get":{"parameters":[{"description":"The Brevo campaign type or workflow type for which data will be retrieved","in":"path","name":"conversionSource","required":true,"schema":{"enum":["email_campaign","sms_campaign","automation_workflow_email","automation_workflow_sms"],"type":"string"}},{"description":"The Brevo campaign or automation workflow id for which data will be retrieved","in":"path","name":"conversionSourceId","required":true,"schema":{"example":"sale","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ConversionSourceMetrics"},{"properties":{"newCustomersCount":{"format":"integer","type":"number"}},"required":["newCustomersCount"],"type":"object"}]}}},"description":"OK"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get detailed attribution metrics for a single Brevo campaign or workflow","tags":["Ecommerce"]}},"/ecommerce/attribution/products/{conversionSource}/{conversionSourceId}":{"get":{"parameters":[{"description":"The Brevo campaign or automation workflow type for which data will be retrieved","in":"path","name":"conversionSource","required":true,"schema":{"enum":["email_campaign","sms_campaign","automation_workflow_email","automation_workflow_sms"],"type":"string"}},{"description":"The Brevo campaign or automation workflow id for which data will be retrieved","in":"path","name":"conversionSourceId","required":true,"schema":{"example":"sale","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"products":{"description":"List of attributed products","items":{"properties":{"id":{"example":"1","type":"string"},"imageUrl":{"example":"http://mydomain.com/product-absoulte-url/img.jpeg","type":"string"},"name":{"example":"Milky Way Galaxy","type":"string"},"ordersCount":{"example":200,"type":"integer"},"price":{"example":1000,"format":"float","type":"number"},"revenue":{"example":999.99,"format":"float","type":"number"},"sku":{"example":"sku-1","type":"string"},"url":{"example":"https://mydomain.com/products/alpina-panoma-classic","type":"string"}},"required":["id"],"type":"object"},"type":"array"}},"required":["products"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get attributed product sales for a single Brevo campaign or workflow","tags":["Ecommerce"]}},"/ecommerce/config/displayCurrency":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"ISO 4217 compliant display currency code","example":"EUR","type":"string"}},"required":["code"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Permission denied. eCommerce is not activated."}},"summary":"Get the ISO 4217 compliant display currency code for your Brevo account","tags":["Ecommerce"]},"post":{"operationId":"setConfigDisplayCurrency","requestBody":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"ISO 4217 compliant display currency code","example":"EUR","type":"string"}},"required":["code"],"type":"object"}}},"description":"set ISO 4217 compliant display currency code payload"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"ISO 4217 compliant display currency code","example":"EUR","type":"string"}},"required":["code"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Permission denied. eCommerce is not activated."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Invalid ISO 4217 currency code."}},"summary":"Set the ISO 4217 compliant display currency code for your Brevo account","tags":["Ecommerce"]}},"/orders":{"get":{"description":"Get all the orders","operationId":"getOrders","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"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 (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"modifiedSince","schema":{"type":"string"}},{"description":"Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"createdSince","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":1,"orders":[{"amount":2000,"billing":{"address":"Sec 62, Noida","city":"Noida","country":"India","countryCode":"IN","paymentMethod":"Net banking","phone":9238283982,"postCode":110001,"region":"North India"},"contact_id":2,"coupons":["flat50","flat40"],"createdAt":"2021-12-31T11:42:35.638Z","email":"testvisitor@sendinblue.com","id":"order1803","identifiers":{"ext_id":"ab12","loyalty_subscription_id":"1234"},"products":[{"price":100,"productId":21,"quantity":2,"variantId":"P100"},{"price":100,"productId":21,"quantity":2,"variantId":"P15756"}],"status":"complete","storeId":"123","updatedAt":"2022-03-03T14:48:31.867Z"}]}}}}},"description":"orders fetched successfully"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get order details","tags":["Ecommerce"]}},"/orders/status":{"post":{"description":"Manages the transactional status of the order","operationId":"createOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/order"}}},"required":true},"responses":{"204":{"content":{},"description":"Order Event posted"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Managing the status of the order","tags":["Ecommerce"]}},"/orders/status/batch":{"post":{"description":"Create multiple orders at one time instead of one order at a time","operationId":"createBatchOrder","requestBody":{"content":{"application/json":{"schema":{"properties":{"historical":{"default":true,"description":"Defines wether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual.","example":true,"type":"boolean"},"notifyUrl":{"description":"Notify Url provided by client_dev to get the status of batch request","example":"https://en.wikipedia.org/wiki/Webhook","type":"string"},"orders":{"description":"array of order objects","items":{"$ref":"#/components/schemas/order"},"type":"array"}},"required":["orders"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"batchId":{"description":"Batch ID of the request","example":"1","type":"number"},"count":{"description":"Number of orders","example":17655,"format":"int64","type":"integer"}},"required":["batchId"],"type":"object"}}},"description":"batch id created"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create orders in batch","tags":["Ecommerce"]}},"/payments/requests":{"post":{"operationId":"createPaymentRequest","requestBody":{"content":{"application/json":{"schema":{"properties":{"cart":{"$ref":"#/components/schemas/cart"},"configuration":{"$ref":"#/components/schemas/configuration"},"contactId":{"description":"Brevo ID of the contact requested to pay.\n","example":43,"format":"int64","type":"integer"},"description":{"description":"Description of payment request.\n","example":"Shipping Cost for sending bottles to NYC","type":"string"},"notification":{"$ref":"#/components/schemas/notification"},"reference":{"description":"Reference of the payment request, it will appear on the payment page.\n","example":"Invoice #INV0001","type":"string"}},"required":["reference","contactId","cart"],"type":"object"}}},"description":"Create a payment request\n","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":"6d4ec0b2b48ef803df4103ve","url":"https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve"}}},"schema":{"properties":{"id":{"description":"ID of the object created","example":122,"format":"int64","type":"integer"},"url":{"description":"URL of the payment request created","example":"https://pay.brevo.com/payment/6d4ec0b2b48ef803df4103ve","type":"string"}},"required":["id"],"type":"object"}}},"description":"Payment request created."},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Permission denied. Either you don't have access to Brevo Payments or your Brevo Payments account is not validated."}},"summary":"Create a payment request","tags":["Payments"]}},"/payments/requests/{id}":{"delete":{"operationId":"deletePaymentRequest","parameters":[{"description":"ID of the payment request.","example":"9ae7d68a-565c-4695-9381-d8fb3e3a14cc","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Payment request deleted successfully."},"401":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Permission denied. Either you don't have access to Brevo Payments or your Brevo Payments account is not validated."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Payment request not found."}},"summary":"Delete a payment request.","tags":["Payments"]},"get":{"operationId":"getPaymentRequest","parameters":[{"description":"Id of the payment Request","example":"050db7b0-9bb7-4c1e-9c68-5a8dace8c1dc","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"cart":{"currency":"EUR","specificAmount":1200},"configuration":{"customSuccessUrl":"https://my-company.com/payment-success"},"contactId":43,"notification":{"channel":"email","text":"Please pay for your yoga class."},"numberOfRemindersSent":5,"reference":"Invoice #INV0001\n","status":"paid"},"schema":{"properties":{"cart":{"$ref":"#/components/schemas/cart"},"configuration":{"$ref":"#/components/schemas/configuration"},"contactId":{"description":"Brevo ID of the contact requested to pay.\n","example":43,"format":"int64","type":"integer"},"notification":{"$ref":"#/components/schemas/notification"},"numberOfRemindersSent":{"description":"number of reminders sent.\n","example":5,"format":"int64","type":"integer"},"reference":{"description":"Reference of the payment request, it will appear on the payment page.\n","example":"Invoice #INV0001\n","type":"string"},"status":{"description":"Status of the payment request.","enum":["created","sent","reminderSent","paid"],"example":"paid","type":"string"}},"required":["reference","status","cart","notification"],"type":"object"}}},"description":"Payment request details"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Permission denied. Either you don't have access to Brevo Payments or your Brevo Payments account is not validated."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Payment request not found."}},"summary":"Get payment request details","tags":["Payments"]}},"/products":{"get":{"operationId":"getProducts","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":1000,"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 by product ids","in":"query","name":"ids","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Filter by product name, minimum 3 characters should be present for search.","in":"query","name":"name","schema":{"type":"string"}},{"description":"Price filter for products less than and equals to particular amount","in":"query","name":"price[lte]","schema":{"type":"number"}},{"description":"Price filter for products greater than and equals to particular amount","in":"query","name":"price[gte]","schema":{"type":"number"}},{"description":"Price filter for products less than particular amount","in":"query","name":"price[lt]","schema":{"type":"number"}},{"description":"Price filter for products greater than particular amount","in":"query","name":"price[gt]","schema":{"type":"number"}},{"description":"Price filter for products equals to particular amount","in":"query","name":"price[eq]","schema":{"type":"number"}},{"description":"Price filter for products not equals to particular amount","in":"query","name":"price[ne]","schema":{"type":"number"}},{"description":"Filter by categories ids","in":"query","name":"categories","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Filter (urlencoded) the orders modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"modifiedSince","schema":{"type":"string"}},{"description":"Filter (urlencoded) the orders created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","in":"query","name":"createdSince","schema":{"type":"string"}},{"description":"Filter products by their deletion status. If `false` is passed, only products that are not deleted will be returned.\n","in":"query","name":"isDeleted","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"products":[{"categories":["279638835374","279502848174"],"createdAt":"2022-06-30T10:29:16.078Z","id":7498033266862,"imageUrl":"http://mydomain.com/product-absoulte-url/img.jpeg","isDeleted":true,"modifiedAt":"2022-06-30T10:29:16.078Z","name":"Alpina Panoma Classic","price":49.95,"s3Original":"https://img-ecom.mailinblue.com/path-to-original/img.jpg","s3ThumbAnalytics":"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg","s3ThumbEditor":"https://img-ecom.mailinblue.com/path-to-editor/img.jpg","sku":"186622-9","stock":100,"url":"https://mydomain.com/products/alpina-panoma-classic"},{"categories":["2d79638835374","27d9502848174"],"createdAt":"2022-06-30T10:29:16.078Z","id":7498033266862,"imageUrl":"http://mydomain.com/product-absoulte-url/img.jpeg","isDeleted":true,"metaInfo":{"brand":"addidas","description":"Shoes for sports"},"modifiedAt":"2022-06-30T10:29:16.078Z","name":"Alpina Panoma Classic2","price":49.95,"s3Original":"https://img-ecom.mailinblue.com/path-to-original/img.jpg","s3ThumbAnalytics":"https://img-ecom.mailinblue.com/path-to-analytics/img.jpg","s3ThumbEditor":"https://img-ecom.mailinblue.com/path-to-editor/img.jpg","sku":"186622-9","stock":350,"url":"https://mydomain.com/products/alpina-panoma-classic2"}]}}},"schema":{"properties":{"count":{"description":"Number of products","example":17655,"format":"int64","type":"integer"},"products":{"items":{"allOf":[{"$ref":"#/components/schemas/getProductDetails"}],"type":"object"},"type":"array"}},"required":["products","count"],"type":"object"}}},"description":"All products listed"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your products","tags":["Ecommerce"]},"post":{"operationId":"createUpdateProduct","requestBody":{"content":{"application/json":{"schema":{"properties":{"categories":{"description":"Category ID-s of the product","items":{"type":"string"},"type":"array"},"deletedAt":{"description":"UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Product ID for which you requested the details","example":"P11","format":"string","type":"string"},"imageUrl":{"description":"Absolute URL to the cover image of the product","example":"http://mydomain.com/product-absoulte-url/img.jpeg","format":"string","type":"string"},"isDeleted":{"description":"product deleted from the shop's database","example":true,"type":"boolean"},"metaInfo":{"additionalProperties":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":"Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 20.","example":{"brand":"addidas","description":"Shoes for sports"},"type":"object"},"name":{"description":"Mandatory in case of creation**. Name of the product for which you requested the details","example":"Iphone 11","format":"string","type":"string"},"parentId":{"description":"Parent product id of the product","format":"string","type":"string"},"price":{"description":"Price of the product","format":"float","type":"number"},"sku":{"description":"Product identifier from the shop","format":"string","type":"string"},"stock":{"description":"Current stock value of the product from the shop's database","example":100,"type":"number"},"updateEnabled":{"default":false,"description":"Facilitate to update the existing category in the same request (updateEnabled = true)","example":false,"type":"boolean"},"url":{"description":"URL to the product","example":"http://mydomain.com/product/electronics/product1","format":"string","type":"string"}},"required":["id","name"],"type":"object"}}},"description":"Values to create/update a product","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"id":21}}},"schema":{"properties":{"id":{"description":"ID of the Product when a new product is created","example":122,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Product created"},"204":{"description":"Product updated"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create/Update a product","tags":["Ecommerce"]}},"/products/batch":{"post":{"operationId":"createUpdateBatchProducts","requestBody":{"content":{"application/json":{"schema":{"properties":{"products":{"description":"array of products objects","items":{"properties":{"categories":{"description":"Category ID-s of the product","items":{"type":"string"},"type":"array"},"deletedAt":{"description":"UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop's database","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Product ID for which you requested the details","example":"P11","format":"string","type":"string"},"imageUrl":{"description":"Absolute URL to the cover image of the product","example":"http://mydomain.com/product-absoulte-url/img.jpeg","format":"string","type":"string"},"isDeleted":{"description":"product deleted from the shop's database","example":true,"type":"boolean"},"metaInfo":{"additionalProperties":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":"Meta data of product such as description, vendor, producer, stock level. The size of cumulative metaInfo shall not exceed **1000 KB**. Maximum length of metaInfo object can be 20.","example":{"brand":"addidas","description":"Shoes for sports"},"type":"object"},"name":{"description":"Mandatory in case of creation**. Name of the product for which you requested the details","example":"Iphone 11","format":"string","type":"string"},"parentId":{"description":"Parent product id of the product","format":"string","type":"string"},"price":{"description":"Price of the product","format":"float","type":"number"},"sku":{"description":"Product identifier from the shop","format":"string","type":"string"},"stock":{"description":"Current stock value of the product from the shop's database","example":100,"type":"number"},"url":{"description":"URL to the product","example":"http://mydomain.com/product/electronics/product1","format":"string","type":"string"}},"required":["id","name"],"type":"object"},"type":"array"},"updateEnabled":{"description":"Facilitate to update the existing categories in the same request (updateEnabled = true)","type":"boolean"}},"required":["products"],"type":"object"}}},"description":"Values to create a batch of products","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"createdCount":2,"updatedCount":7}}},"schema":{"properties":{"createdCount":{"description":"Number of the new created products","example":7,"format":"int64","type":"integer"},"updatedCount":{"description":"Number of the existing products updated","example":5,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Products created and updated"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create products in batch","tags":["Ecommerce"]}},"/products/{id}":{"get":{"operationId":"getProductInfo","parameters":[{"description":"Product ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getProductDetails"}}},"description":"Product informations"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Product's id not found"}},"summary":"Get a product's details","tags":["Ecommerce"]}},"/products/{id}/alerts/{type}":{"post":{"operationId":"createProductAlert","parameters":[{"description":"Product ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Alert type","in":"path","name":"type","required":true,"schema":{"enum":["back_in_stock"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contactIdentifiers":{"properties":{"email":{"description":"Email address of the contact","example":"elly@example.com","format":"email","type":"string"},"ext_id":{"description":"Contact ID in your system","example":"ExternalId","type":"string"},"sms":{"description":"Sms of the contact","example":"+91xxxxxxxxxx","type":"string"}},"type":"object"}},"type":"object"}}},"description":"Contact identifier to associate the alert with (at least one is required). Priority is given to `ext_id` > `email` > `sms`","required":true},"responses":{"204":{"description":"Product alert was created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Product alert could not be created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Product alerts is not allowed for this account"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Product ID not found"}},"summary":"Create a product alert for a contact","tags":["Ecommerce"]}},"/events":{"post":{"description":"Create an event to track a contact's interaction.","operationId":"createEvent","requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_properties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"}]},"description":"Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **\"FIRSTNAME\": \"Jane\" , \"AGE\": 37**","example":{"AGE":32,"GENDER":"FEMALE"},"type":"object"},"event_date":{"description":"Timestamp of when the event occurred (e.g. \"2024-01-24T17:39:57+01:00\"). If no value is passed, the timestamp of the event creation is used.","example":"2024-02-06T20:59:23.383Z","type":"string"},"event_name":{"description":"The name of the event that occurred. This is how you will find your event in Brevo. Limited to 255 characters, alphanumerical characters and - _ only.","example":"video_played","type":"string"},"event_properties":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"object"},{"items":{},"type":"array"}]},"description":"Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. \"2024-01-24T17:39:57+01:00\"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb.","example":{"autoplayed":false,"duration":142,"upload_date":"2023-11-24T12:09:10+01:00","video_description":"Create your free account today!","video_title":"Brevo — The most approachable CRM suite"},"type":"object"},"identifiers":{"description":"Identifies the contact associated with the event. At least one identifier is required.","minProperties":1,"properties":{"contact_id":{"description":"Internal unique contact ID. When present, this takes priority over all other identifiers for event attribution and contact resolution.","example":211,"format":"int64","type":"integer"},"email_id":{"description":"Email Id associated with the event","example":"jane.doe@example.com","type":"string"},"ext_id":{"description":"ext_id associated with the event","example":"abc123","type":"string"},"landline_number_id":{"description":"landline_number associated with the event","example":"+91xxxxxxxxxx","type":"string"},"phone_id":{"description":"SMS associated with the event","example":"+91xxxxxxxxxx","type":"string"},"whatsapp_id":{"description":"whatsapp associated with the event","example":"+91xxxxxxxxxx","type":"string"}},"type":"object"},"object":{"description":"Identifiers of the object record associated with this event. Ignored if the object type or identifier for this record does not exist on the account.","properties":{"identifiers":{"description":"Identifiers for the object.","properties":{"ext_id":{"description":"External object ID","example":"sub-59374-linwn","type":"string"},"id":{"description":"Internal object ID","example":"178140","type":"string"}},"type":"object"},"type":{"description":"Type of object (e.g., subscription, vehicle, etc.)","example":"subscription","type":"string"}},"type":"object"}},"required":["event_name","identifiers"],"type":"object"}}},"required":true},"responses":{"204":{"content":{},"description":"Event posted"},"400":{"$ref":"#/components/responses/errorModel"},"401":{"$ref":"#/components/responses/errorModel"}},"summary":"Create an event","tags":["Event"]}},"/inbound/events":{"get":{"description":"This endpoint will show the list of all the events for the received emails.","operationId":"getInboundEmailEvents","parameters":[{"description":"Email address of the sender.","in":"query","name":"sender","required":false,"schema":{"type":"string"}},{"description":"Mandatory if endDate is used. Starting date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) from which you want to fetch the list. Maximum time period that can be selected is one month.","in":"query","name":"startDate","required":false,"schema":{"format":"datetime","type":"string"}},{"description":"Mandatory if startDate is used. Ending date (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ) till which you want to fetch the list. Maximum time period that can be selected is one month.","in":"query","name":"endDate","required":false,"schema":{"format":"datetime","type":"string"}},{"description":"Number of documents returned per page","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","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","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-11T12:30:00.000Z","recipient":"alexa@example.com","sender":"john@example.com","uuid":"1a825d56-029b-4a41-b8e4-1a825d56"},{"date":"2017-03-12T12:30:00.000Z","recipient":"bob@example.com","sender":"alice@example.com","uuid":"1a825d56-029b-4a41-b8e4-61670463431b"}]}}},"schema":{"properties":{"events":{"items":{"properties":{"date":{"description":"Date when email was received on SMTP relay","format":"date-time","type":"string"},"recipient":{"description":"Recipient’s email address","format":"email","type":"string"},"sender":{"description":"Sender’s email address","format":"email","type":"string"},"uuid":{"description":"UUID that can be used to fetch additional data","format":"uuid","type":"string"}},"required":["uuid","sender","date","recipient"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"List of events for received emails."},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of all the events for the received emails.","tags":["Inbound Parsing"]}},"/inbound/events/{uuid}":{"get":{"description":"This endpoint will show the list of all events history for one particular received email.","operationId":"getInboundEmailEventsByUuid","parameters":[{"description":"UUID to fetch events specific to received email","in":"path","name":"uuid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"attachments":[{"contentId":null,"contentLength":12345,"contentType":"application/pdf","name":"invoice.pdf"}],"deliveredAt":"2017-03-12T12:31:00.000Z","logs":[{"date":"2017-03-12T12:30:00.000Z","type":"received"},{"date":"2017-03-12T12:30:04.000Z","type":"webhookFailed"},{"date":"2017-03-12T12:31:04.000Z","type":"webhookDelivered"}],"messageId":"<a_nice@message.id>","receivedAt":"2017-03-12T12:30:00.000Z","recipient":"bob@example.com","sender":"alice@example.com","subject":"Re: Question about your API"}}},"schema":{"properties":{"attachments":{"description":"List of attachments of the email. This will be present only after the processing is done.","items":{"properties":{"contentId":{"description":"value of the Content-ID header of the attachment.","type":"string"},"contentLength":{"description":"size of the attachment in bytes","type":"integer"},"contentType":{"description":"value of the Content-Type header of the attachment","type":"string"},"name":{"description":"filename specified in the Content-Disposition header of the attachment","type":"string"}},"type":"object"},"type":"array"},"deliveredAt":{"description":"Date when email was delivered successfully to client_dev’s webhook","format":"date-time","nullable":true,"type":"string"},"logs":{"description":"List of events/logs that describe the lifecycle of the email on SIB platform","items":{"properties":{"date":{"description":"Date of the event","format":"date-time","type":"string"},"type":{"description":"Type of the event","enum":["received","processed","webhookFailed","webhookDelivered"],"type":"string"}},"type":"object"},"type":"array"},"messageId":{"description":"Value of the Message-ID header. This will be present only after the processing is done.","type":"string"},"receivedAt":{"description":"Date when email was received on SMTP relay","example":"2019-05-25T11:53:26Z","format":"date-time","type":"string"},"recipient":{"description":"Recipient’s email address","format":"email","type":"string"},"sender":{"description":"Sender’s email address","format":"email","type":"string"},"subject":{"description":"Value of the Subject header. This will be present only after the processing is done.","type":"string"}},"type":"object"}}},"description":"Email campaign informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Fetch all events history for one particular received email.","tags":["Inbound Parsing"]}},"/inbound/attachments/{downloadToken}":{"get":{"description":"This endpoint will retrieve inbound attachment with download token.","operationId":"getInboundEmailAttachment","parameters":[{"description":"Token to fetch a particular attachment","in":"path","name":"downloadToken","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"Attachment information","headers":{"Content-Disposition":{"schema":{"example":"attachment; filename=\"download.png\"","type":"string"}},"Content-Length":{"schema":{"example":4032,"type":"integer"}},"Content-Type":{"schema":{"example":"image/png","type":"string"}}}},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"attachment not found"}},"summary":"Retrieve inbound attachment with download token.","tags":["Inbound Parsing"]}},"/loyalty/balance/programs/{pid}/active-balance":{"get":{"description":"Returns Active Balances","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Limit","in":"query","name":"limit","schema":{"maximum":500,"minimum":1,"type":"integer"}},{"description":"Offset","in":"query","name":"offset","schema":{"minimum":0,"type":"integer"}},{"description":"Sort Field","in":"query","name":"sort_field","schema":{"type":"string"}},{"description":"Sort Order","in":"query","name":"sort","schema":{"type":"string"}},{"description":"Contact ID","in":"query","name":"contact_id","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Balance Definition ID","in":"query","name":"balance_definition_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceLimit"}}},"description":"Successful retrieval of active balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"subscription not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get Active Balances API","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/balance-definitions":{"get":{"description":"Returns balance definition page","operationId":"getBalanceDefinitionList","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Limit the number of records returned","in":"query","name":"limit","schema":{"default":200,"maximum":500,"minimum":1,"type":"integer"}},{"description":"Offset to paginate records","in":"query","name":"offset","schema":{"default":0,"minimum":0,"type":"integer"}},{"description":"Field to sort by","in":"query","name":"sortField","schema":{"default":"updated_at","enum":["name","created_at","updated_at"],"type":"string"}},{"description":"Sort direction","in":"query","name":"sort","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Version","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"list of balance definitions","items":{"$ref":"#/components/schemas/balanceDefinition"},"type":"array"}},"type":"object"}}},"description":"Successful retrieval of balance definition page"},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"No content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get balance definition list","tags":["Balance"]},"post":{"description":"Creates balance definition and returns information","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for creating a new balance definition, specifying expiration rules, rounding strategies, and constraints.","properties":{"balanceAvailabilityDurationModifier":{"description":"Defines when the balance expires within the selected duration.","enum":["noModification","startOfPeriod","endOfPeriod"],"type":"string"},"balanceAvailabilityDurationUnit":{"description":"Unit of time for balance validity.","enum":["day","week","month","year"],"type":"string"},"balanceAvailabilityDurationValue":{"description":"Number of time units before the balance expires.","type":"integer"},"balanceExpirationDate":{"description":"Fixed expiration date (`dd/mm` format) as an alternative to duration-based expiry.","format":"date","type":"string"},"balanceOptionAmountOvertakingStrategy":{"description":"Defines whether partial credit is allowed when reaching max balance.","enum":["strict","partial"],"type":"string"},"balanceOptionCreditRounding":{"description":"Defines rounding strategy for credit transactions.","enum":["lower","upper","natural"],"type":"string"},"balanceOptionDebitRounding":{"description":"Defines rounding strategy for debit transactions.","enum":["lower","upper","natural"],"type":"string"},"description":{"description":"Short description of the balance definition.","maxLength":256,"type":"string"},"imageRef":{"description":"URL of an optional image reference.","type":"string"},"maxAmount":{"description":"Maximum allowable balance amount.","type":"number"},"maxCreditAmountLimit":{"description":"Maximum credit allowed per operation.","type":"number"},"maxDebitAmountLimit":{"description":"Maximum debit allowed per operation.","type":"number"},"meta":{"description":"Additional metadata for the balance definition.","type":"object"},"minAmount":{"description":"Minimum allowable balance amount.","type":"number"},"name":{"description":"Name of the balance definition.","maxLength":128,"type":"string"},"unit":{"description":"Unit of balance measurement.","enum":["POINTS","EUR","USD","MXN","GBP","INR","CAD","SGD","RON","JPY","MYR","CLP","PEN","MAD","AUD","CHF","BRL"],"type":"string"}},"required":["name","unit"],"type":"object"}}},"description":"Create Balance Definition Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceDefinition"}}},"description":"Successful creation of balance definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"No content"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create balance definition","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}":{"delete":{"description":"Delete Balance definition","operationId":"deleteBalanceDefinition","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Successful deletion of balance definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Delete balance definition","tags":["Balance"]},"get":{"description":"Returns balance definition","operationId":"getBalanceDefinition","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceDefinition"}}},"description":"Successful retrieval of balance definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get balance definition","tags":["Balance"]},"put":{"description":"Updates Balance definition","operationId":"updateBalanceDefinition","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for updating an existing balance definition, including expiry rules, rounding strategies, and constraints.","properties":{"balanceAvailabilityDurationModifier":{"description":"Defines when the balance expires within the selected duration.","enum":["noModification","startOfPeriod","endOfPeriod"],"type":"string"},"balanceAvailabilityDurationUnit":{"description":"Unit of time for balance validity.","enum":["day","week","month","year"],"type":"string"},"balanceAvailabilityDurationValue":{"description":"Number of time units before the balance expires.","type":"integer"},"balanceExpirationDate":{"description":"Expiration date (`dd/mm` format) or empty if not applicable.","type":"string"},"balanceOptionAmountOvertakingStrategy":{"description":"Defines whether partial credit is allowed when reaching max balance.","enum":["strict","partial"],"type":"string"},"balanceOptionCreditRounding":{"description":"Rounding strategy for credit transactions.","enum":["lower","upper","natural"],"type":"string"},"balanceOptionDebitRounding":{"description":"Rounding strategy for debit transactions.","enum":["lower","upper","natural"],"type":"string"},"description":{"description":"Short description of the balance definition.","maxLength":256,"type":"string"},"imageRef":{"description":"URL of an optional image reference.","type":"string"},"maxAmount":{"description":"Maximum allowable balance amount.","type":"number"},"maxCreditAmountLimit":{"description":"Maximum credit allowed per operation.","type":"number"},"maxDebitAmountLimit":{"description":"Maximum debit allowed per operation.","type":"number"},"meta":{"additionalProperties":true,"description":"Optional metadata for the balance definition.","type":"object"},"minAmount":{"description":"Minimum allowable balance amount.","type":"number"},"name":{"description":"Name of the balance definition.","maxLength":128,"type":"string"},"unit":{"description":"Unit of balance measurement.","enum":["POINTS","EUR","USD","MXN","GBP","INR","CAD","SGD","RON","JPY","MYR","CLP","PEN","MAD","AUD","CHF","BRL"],"type":"string"}},"required":["name","unit"],"type":"object"}}},"description":"Create Balance Definition Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceDefinition"}}},"description":"Successful update of balance definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"balance definition doesn't exist"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Update balance definition","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits":{"post":{"description":"Creates balance limit and sends the created UUID along with the data","operationId":"createBalanceLimit","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for setting transaction or amount-based limits on a balance.","properties":{"constraintType":{"description":"Defines whether the limit applies to transaction count or amount.","enum":["transaction","amount"],"type":"string"},"durationUnit":{"description":"Unit of time for which the limit is applicable.","enum":["day","week","month","year"],"type":"string"},"durationValue":{"description":"Number of time units for the balance limit.","type":"integer"},"slidingSchedule":{"description":"Determines if the limit resets on a rolling schedule.","type":"boolean"},"transactionType":{"description":"Specifies whether the limit applies to credit or debit transactions.","enum":["credit","debit"],"type":"string"},"value":{"description":"Maximum allowed value for the specified constraint type.","type":"integer"}},"required":["constraintType","durationUnit","durationValue","transactionType","value"],"type":"object"}}},"description":"Balance Definition Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceLimit"}}},"description":"Successful creation of balance limit"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create balance limits","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/balance-definitions/{bdid}/limits/{blid}":{"delete":{"description":"Delete balance limit","operationId":"deleteBalanceLimit","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Limit Id","in":"path","name":"blid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Successful deletion of balance definition"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Delete balance limit","tags":["Balance"]},"get":{"description":"Fetches balance limits and send the created UUID along with the data","operationId":"getBalanceLimit","parameters":[{"description":"Version","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}},{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Limit Id","in":"path","name":"blid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceLimit"}}},"description":"Successful retrieval of balance limit"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"balance limit not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get balance limits","tags":["Balance"]},"put":{"description":"Updates balance limit","operationId":"updateBalanceLimit","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Definition Id","in":"path","name":"bdid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Balance Limit Id","in":"path","name":"blid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for updating an existing balance limit, specifying constraints on transactions or amounts.","properties":{"constraintType":{"description":"Defines whether the limit applies to transaction count or amount.","enum":["transaction","amount"],"type":"string"},"durationUnit":{"description":"Unit of time for which the limit is applicable.","enum":["day","week","month","year"],"type":"string"},"durationValue":{"description":"Number of time units for the balance limit.","type":"integer"},"slidingSchedule":{"description":"Determines if the limit resets on a rolling schedule.","type":"boolean"},"transactionType":{"description":"Specifies whether the limit applies to credit or debit transactions.","enum":["credit","debit"],"type":"string"},"value":{"description":"Maximum allowed value for the specified constraint type.","type":"integer"}},"required":["constraintType","durationUnit","durationValue","transactionType","value"],"type":"object"}}},"description":"Balance Limits Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/balanceLimit"}}},"description":"Successful update of balance limit"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Updates balance limit","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/contact-balances":{"get":{"description":"Returns balance list","operationId":"getContactBalances","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balanceDefinitionId":{"type":"string"},"balances":{"items":{"properties":{"contactId":{"type":"integer"},"loyaltySubscriptionId":{"type":"string"},"updatedAt":{"type":"string"},"value":{"type":"number"}},"type":"object"},"type":"array"},"count":{"type":"integer"},"loyaltyProgramId":{"type":"string"}},"type":"object"}}},"description":"Successful retrieval of contact balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"subscription data not found for some contacts"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get balance list","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/create-order":{"post":{"description":"Returns created order","operationId":"createBalanceOrder","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for creating an order linked to a balance definition.","properties":{"amount":{"description":"Order amount (must be non-zero).","type":"number"},"balanceDefinitionId":{"description":"Unique identifier (UUID) of the associated balance definition.","type":"string"},"contactId":{"description":"Unique identifier of the contact placing the order (must be ≥ 1).","minimum":1,"type":"integer"},"dueAt":{"description":"RFC3339 timestamp specifying when the order is due.","type":"string"},"expiresAt":{"description":"Optional RFC3339 timestamp defining order expiration.","type":"string"},"meta":{"additionalProperties":true,"description":"Optional metadata associated with the order.","type":"object"},"source":{"description":"Specifies the origin of the order (`engine` or `user`).","type":"string"}},"required":["amount","balanceDefinitionId","contactId","dueAt","source"],"type":"object"}}},"description":"Order Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Represents an order linked to a balance definition, including amount, due date, and transaction details.","properties":{"amount":{"description":"Order amount (must not be zero).","type":"number"},"balanceDefinitionId":{"description":"Optional unique identifier (UUID) of the associated balance definition.","type":"string"},"contactId":{"description":"Unique identifier of the contact placing the order (must be ≥ 1).","minimum":1,"type":"integer"},"createdAt":{"description":"RFC3339 timestamp indicating when the order was created.","type":"string"},"dueAt":{"description":"RFC3339 timestamp specifying when the order is due in the future.","type":"string"},"expiresAt":{"description":"Optional RFC3339 timestamp defining order expiration in the future.","type":"string"},"id":{"description":"Unique identifier for the balance order.","type":"string"},"loyaltyProgramId":{"description":"Unique identifier of the loyalty program associated with the order.","type":"string"},"meta":{"additionalProperties":true,"description":"Optional metadata associated with the order.","type":"object"},"processedAt":{"description":"Optional RFC3339 timestamp indicating when the order was processed.","type":"string"},"transactionid":{"description":"Optional reference to the associated transaction ID.","type":"string"},"updatedAt":{"description":"RFC3339 timestamp indicating the last update to the order.","type":"string"}},"required":["amount","contactId","createdAt","dueAt","loyaltyProgramId","updatedAt"],"type":"object"}}},"description":"Successful creation of order"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create balance order","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/subscriptions/{cid}/balances":{"get":{"description":"Returns subscription balances","operationId":"getSubscriptionBalances","parameters":[{"description":"Contact Id","in":"path","name":"cid","required":true,"schema":{"format":"int","type":"string"}},{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance":{"items":{"properties":{"balanceDefinitionId":{"description":"balance definition ID","type":"string"},"value":{"description":"Unique identifier for the balance definition associated with this aggregate balance","type":"number"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Successful retrieval of contact balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get subscription balances","tags":["Balance"]},"post":{"description":"Creates a balance for a contact","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Contact Id","in":"path","name":"cid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for creating a new balance linked to a specific balance definition.","properties":{"balanceDefinitionId":{"description":"Unique identifier (UUID) of the balance definition associated with the new balance.","type":"string"}},"required":["balanceDefinitionId"],"type":"object"}}},"description":"Create Balance Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"amount":{"description":"The current amount available in the balance","type":"number"},"balanceDefinitionId":{"description":"balance definition ID","type":"string"},"consumedAt":{"description":"Timestamp of when the balance was last consumed","type":"string"},"contactId":{"description":"contact ID","type":"integer"},"createdAt":{"description":"Timestamp of when the balance was created","type":"string"},"expiresAt":{"description":"Expiration timestamp of the balance","type":"string"},"id":{"description":"Unique identifier for the balance","type":"string"},"loyaltyProgramId":{"description":"loyalty program ID","type":"string"},"organizationId":{"description":"organization ID","type":"integer"}},"type":"object"}}},"description":"Successful creation of balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"No content"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create subscription balances","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/transaction-history":{"get":{"description":"Returns transaction history","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Limit the number of records returned","in":"query","name":"limit","schema":{"default":20,"type":"integer"}},{"description":"Skip a number of records","in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"description":"Field to sort by","in":"query","name":"sort_field","schema":{"default":"created_at","enum":["name","created_at","updated_at"],"type":"string"}},{"description":"Sort order, either asc or desc","in":"query","name":"sort","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Contact ID","in":"query","name":"contact_id","required":true,"schema":{"default":0,"type":"integer"}},{"description":"Balance Definition ID","in":"query","name":"balance_definition_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Filters to apply","in":"query","name":"filters","schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Response containing transaction history details for a specific balance and contact.","properties":{"balanceDefinitionId":{"description":"Unique identifier of the associated balance definition.","type":"string"},"contactId":{"description":"Unique identifier of the contact related to the transactions.","type":"integer"},"count":{"description":"Total number of transactions in the history.","type":"integer"},"loyaltyProgramId":{"description":"Unique identifier of the associated loyalty program.","type":"string"},"transactionHistory":{"description":"List of past transactions associated with the balance.","items":{"description":"Represents a record of a past transaction, including status and key timestamps.","properties":{"amount":{"description":"The transaction amount.","type":"number"},"balanceExpirationDate":{"description":"Expiration date of the balance associated with this transaction.","type":"string"},"cancelledAt":{"description":"Timestamp when the transaction was canceled, if applicable.","type":"string"},"completedAt":{"description":"Timestamp when the transaction was successfully completed.","type":"string"},"createdAt":{"description":"Timestamp when the transaction was initiated.","type":"string"},"id":{"description":"Unique identifier of the transaction.","type":"string"},"meta":{"additionalProperties":true,"description":"Optional metadata associated with the transaction.","type":"object"},"rejectReason":{"description":"Reason for rejection, if the transaction was declined.","type":"string"},"rejectedAt":{"description":"Timestamp when the transaction was rejected.","type":"string"},"status":{"description":"Current status of the transaction (e.g., pending, completed, rejected).","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Successful retrieval of transaction history"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"subscription not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get Transaction History API","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/transactions":{"post":{"description":"Creates new transaction and returns information","operationId":"beginTransaction","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Payload for creating a transaction, specifying balance details and optional expiration.","properties":{"LoyaltySubscriptionId":{"description":"Unique identifier for the loyalty subscription (required unless `contactId` is provided).","type":"string"},"amount":{"description":"Transaction amount (must be provided).","type":"number"},"autoComplete":{"description":"Whether the transaction should be automatically completed.","type":"boolean"},"balanceDefinitionId":{"description":"Unique identifier (UUID) of the associated balance definition.","type":"string"},"balanceExpiryInMinutes":{"description":"Optional expiry time for the balance in minutes (must be greater than 0 if provided).","type":"integer"},"contactId":{"description":"Unique identifier of the contact involved in the transaction (required unless `LoyaltySubscriptionId` is provided).","minimum":1,"type":"integer"},"eventTime":{"description":"Optional timestamp specifying when the transaction occurred.","type":"string"},"meta":{"additionalProperties":true,"description":"Optional metadata associated with the transaction.","type":"object"},"ttl":{"description":"Optional time-to-live for the transaction (must be greater than 0 if provided).","type":"integer"}},"required":["amount","balanceDefinitionId"],"type":"object"}}},"description":"Transaction Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transaction"}}},"description":"Transaction information"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Transaction not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create new transaction","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/transactions/{tid}/cancel":{"post":{"description":"Cancels transaction","operationId":"cancelTransaction","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transaction Id","in":"path","name":"tid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transaction"}}},"description":"Transaction information"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"transaction not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Cancel transaction","tags":["Balance"]}},"/loyalty/balance/programs/{pid}/transactions/{tid}/complete":{"post":{"description":"Completes transaction","operationId":"completeTransaction","parameters":[{"description":"Loyalty Program Id","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Transaction Id","in":"path","name":"tid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/transaction"}}},"description":"Transaction information"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"transaction not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Complete transaction","tags":["Balance"]}},"/loyalty/config/programs":{"get":{"description":"Returns list of loyalty programs","operationId":"getLPList","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Index of the first document in the page","in":"query","name":"offset","required":false,"schema":{"type":"integer"}},{"description":"Sort documents by field","in":"query","name":"sort_field","required":false,"schema":{"enum":["name","created_at","updated_at"],"type":"string"}},{"description":"Sort documents by field","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"Loyalty Program list","items":{"$ref":"#/components/schemas/loyaltyProgram"},"type":"array"}},"type":"object"}}},"description":"Loyalty Program page"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Invalid `sort_field` parameter value."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Get loyalty program list","tags":["Program"]},"post":{"description":"Creates loyalty program","operationId":"createNewLP","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"Optional description of the loyalty program (max 256 chars).","maxLength":256,"type":"string"},"documentId":{"description":"Optional unique document ID.","type":"string"},"meta":{"additionalProperties":{},"description":"Optional metadata related to the loyalty program.","type":"object"},"name":{"description":"Required name of the loyalty program (max 128 chars).","maxLength":128,"type":"string"}},"required":["name"],"type":"object"}}},"description":"Payload for creating a new loyalty program.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/loyaltyProgram"}}},"description":"Successfully created loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program name already exists."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Create loyalty program","tags":["Program"]}},"/loyalty/config/programs/{pid}":{"delete":{"description":"Deletes Loyalty Program","operationId":"deleteLoyaltyProgram","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Successfully deleted loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Delete Loyalty Program","tags":["Program"]},"get":{"description":"Returns loyalty program","operationId":"getLoyaltyProgramInfo","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/loyaltyProgram"}}},"description":"Successfully retrieved loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Get loyalty program Info","tags":["Program"]},"patch":{"description":"Partially updates loyalty program","operationId":"partiallyUpdateLoyaltyProgram","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"Loyalty Program description","type":"string"},"meta":{"description":"Loyalty Program meta data","type":"object"},"name":{"description":"Loyalty Program name","type":"string"}},"type":"object"}}},"description":"Loyalty Program Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/loyaltyProgram"}}},"description":"Successfully updated loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program name already exists."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Partially update loyalty program","tags":["Program"]},"put":{"description":"Updates loyalty program","operationId":"updateLoyaltyProgram","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"Loyalty Program description","type":"string"},"meta":{"description":"Loyalty Program meta data","type":"object"},"name":{"description":"Loyalty Program name","type":"string"}},"required":["name"],"type":"object"}}},"description":"Update Loyalty Program Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/loyaltyProgram"}}},"description":"Successfully updated loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program name already exists."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Update loyalty program","tags":["Program"]}},"/loyalty/config/programs/{pid}/account-info":{"get":{"description":"Get Information of balances, tiers, rewards and subscription members for a subscription","operationId":"getParameterSubscriptionInfo","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The contact ID to filter by.","in":"query","name":"contactId","required":false,"schema":{"type":"string"}},{"description":"A list of filter parameters for querying the subscription info.","in":"query","name":"params","required":false,"schema":{"type":"string"}},{"description":"The loyalty subscription ID to filter by.","in":"query","name":"loyaltySubscriptionId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance":{"allOf":[{"properties":{"balances":{"description":"List of balance details associated with the contact.","items":{"properties":{"balanceDefinitionId":{"description":"Unique identifier for the balance definition).","type":"string"},"value":{"description":"The amount of the balance.","type":"number"}},"type":"object"},"type":"array"},"contactId":{"description":"Unique identifier of the contact.","type":"integer"},"loyaltyProgramId":{"description":"Unique identifier of the loyalty program.","type":"string"}},"type":"object"}],"description":"Balance details for the subscription."},"members":{"description":"List of members associated with the subscription.","items":{"properties":{"createdAt":{"description":"Timestamp when the member was created.","type":"string"},"memberContactId":{"description":"Unique identifier of the member.","type":"integer"},"updatedAt":{"description":"Timestamp when the member was last updated.","type":"string"}},"type":"object"},"type":"array"},"reward":{"description":"List of rewards associated with the subscription.","items":{"properties":{"code":{"description":"Reward code assigned to the contact.","type":"string"},"contactId":{"description":"Unique identifier of the contact.","type":"integer"},"createdAt":{"description":"Timestamp when the reward was created.","type":"string"},"expirationDate":{"description":"Expiration date of the reward.","type":"string"},"id":{"description":"Unique identifier of the reward.","type":"string"},"loyaltyProgramId":{"description":"Unique identifier of the loyalty program.","type":"string"},"meta":{"additionalProperties":{},"description":"Additional metadata related to the reward.","type":"object"},"rewardId":{"description":"Unique identifier of the reward definition.","type":"string"},"updatedAt":{"description":"Timestamp when the reward was last updated.","type":"string"}},"type":"object"},"type":"array"},"tier":{"description":"List of tier assignments for the subscription.","items":{"properties":{"contactId":{"description":"Unique identifier of the contact.","type":"integer"},"createdAt":{"description":"Timestamp when the tier was assigned.","type":"string"},"groupId":{"description":"Unique identifier of the group associated with the tier.","type":"string"},"loyaltyProgramId":{"description":"Unique identifier of the loyalty program.","type":"string"},"meta":{"additionalProperties":{},"description":"Additional metadata related to the tier.","type":"object"},"tierId":{"description":"Unique identifier of the tier.","type":"string"},"updatedAt":{"description":"Timestamp when the tier was last updated","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Successfully retrieved subscription info."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Either `contactId` or `loyaltySubscriptionId` is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Get Subscription Data","tags":["Program"]}},"/loyalty/config/programs/{pid}/publish":{"post":{"description":"Publishes loyalty program","operationId":"publishLoyaltyProgram","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Successfully published loyalty program."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty program not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Publish loyalty program","tags":["Program"]}},"/loyalty/config/programs/{pid}/subscription-members":{"delete":{"description":"Deletes member from a subscription","operationId":"deleteContactMembers","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Comma-separated list of member contact IDs to delete from the subscription.","in":"query","name":"memberContactIds","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted subscription member."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Missing `memberContactIds` parameter."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Contact subscription not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Delete subscription member","tags":["Program"]},"post":{"description":"Add member to a subscription","operationId":"subscribeMemberToASubscription","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contactId":{"description":"Required if LoyaltySubscriptionId is not provided, must be greater than 0","type":"integer"},"loyaltySubscriptionId":{"description":"Required if ContactId is not provided, max length 64","maxLength":64,"type":"string"},"memberContactIds":{"description":"Required, each item must be greater than or equal to 1","items":{"type":"integer"},"minItems":1,"type":"array"}},"required":["memberContactIds"],"type":"object"}}},"description":"Payload for adding a subscription member.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"createdAt":{"description":"Timestamp when the subscription member was created.","type":"string"},"memberContactIds":{"description":"List of unique member contact IDs.","items":{"type":"integer"},"type":"array"},"organizationId":{"description":"Unique identifier of the organization.","type":"integer"},"ownerContactId":{"description":"Unique identifier of the subscription owner.","type":"integer"},"updatedAt":{"description":"Timestamp when the subscription member was last updated.","type":"string"}},"type":"object"}}},"description":"Successfully added subscription member."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot validate loyalty program and organization ID."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Owner contact cannot be added as a member."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Create subscription member","tags":["Program"]}},"/loyalty/config/programs/{pid}/subscriptions":{"post":{"description":"Subscribes to a loyalty program","operationId":"subscribeToLoyaltyProgram","parameters":[{"description":"Loyalty Program ID. A unique identifier for the loyalty program.","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contactId":{"description":"Required contact ID; must be greater than 0.","type":"integer"},"creationDate":{"description":"Optional custom date-time format.","type":"string"},"loyaltySubscriptionId":{"description":"Optional subscription ID (max length 64).","maxLength":64,"type":"string"}},"required":["contactId"],"type":"object"}}},"description":"Create Subscription Payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contactId":{"description":"Unique identifier of the contact.","type":"integer"},"createdAt":{"description":"Timestamp when the subscription was created.","type":"string"},"loyaltyProgramId":{"description":"Unique identifier of the loyalty program.","type":"string"},"loyaltySubscriptionId":{"description":"Unique identifier of the subscription.","type":"string"},"organizationId":{"description":"Unique identifier of the organization.","type":"integer"},"updatedAt":{"description":"Timestamp when the subscription was last updated.","type":"string"},"versionId":{"description":"Version number of the subscription.","type":"integer"}},"type":"object"}}},"description":"Successfully created subscription."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Loyalty subscription ID is already assigned to a contact."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Invalid contact ID."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred."}},"summary":"Create subscription","tags":["Program"]}},"/loyalty/offer/programs/{pid}/code-pools/{cpid}/codes-count":{"get":{"description":"Get code count","operationId":"getCodeCount","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Code Pool ID","in":"path","name":"cpid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"description":"Number of codes","format":"int64","type":"integer"}},"type":"object"}}},"description":"Code count successfully fetched"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get code count","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/offers":{"get":{"description":"Returns a reward page","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size","in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"description":"State of the reward","in":"query","name":"state","schema":{"default":"all","type":"string"}},{"description":"Version","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"Items for the current reward","items":{"properties":{"createdAt":{"description":"Timestamp for when this reward was created","format":"date-time","type":"string"},"endDate":{"description":"Timestamp for when this reward attribution ended","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the reward","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Loyalty Program to which current reward is associated","format":"uuid","type":"string"},"name":{"description":"Name of the reward","type":"string"},"publicImage":{"description":"Public image of the reward","type":"string"},"startDate":{"description":"Timestamp for when this reward attribution started","format":"date-time","type":"string"},"state":{"description":"State of the reward","type":"string"},"updatedAt":{"description":"Timestamp for when this reward attribution was updated","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"totalCount":{"description":"Count of the associated parameter in current reward","type":"integer"}},"type":"object"}}},"description":"Reward list successfully retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get Reward Page API","tags":["Reward"]},"post":{"description":"Creates a new reward in the loyalty program.","operationId":"createReward","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Internal name of the reward","maxLength":128,"type":"string"},"publicDescription":{"description":"Public facing description of the reward","maxLength":128,"type":"string"},"publicImage":{"description":"URL of the public image for the reward","format":"uri","type":"string"},"publicName":{"description":"Public facing name of the reward","maxLength":128,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"createdAt":{"description":"Timestamp when the reward was created","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the reward","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Id of the loyalty program to which the current reward belongs to","format":"uuid","type":"string"},"name":{"description":"Name of the reward","type":"string"},"publicDescription":{"description":"Public description for the reward","type":"string"},"publicImage":{"description":"Public Image for the reward","type":"string"},"publicName":{"description":"Public name for the reward","type":"string"},"updatedAt":{"description":"Timestamp for when this reward was last updated.","type":"string"}},"type":"object"}}},"description":"Reward successfully created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create a reward","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/attribute":{"post":{"description":"Create a voucher and attribute it to a specific membership.","operationId":"createVoucher","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Code generated to attribute reward to a contact","maxLength":128,"type":"string"},"contactId":{"description":"Contact to attribute the reward","format":"int64","minimum":1,"type":"integer"},"expirationDate":{"description":"Reward expiration date","type":"string"},"loyaltySubscriptionId":{"description":"One of contactId or loyaltySubscriptionId is required","type":"string"},"meta":{"additionalProperties":{},"description":"Offer meta information (key/value object)","type":"object"},"rewardId":{"description":"Reward id","format":"uuid","type":"string"},"value":{"description":"Value of the selected reward config","format":"float64","type":"number"}},"required":["rewardId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Generated code","type":"string"},"consumedAt":{"description":"Timestamp for when this reward was consumed","type":"string"},"contactId":{"description":"Id of the contact that attributed the reward","format":"int64","type":"integer"},"createdAt":{"description":"Timestamp for when this reward was created","format":"date-time","type":"string"},"expirationDate":{"description":"Expiration date of the reward","format":"date-time","type":"string"},"id":{"description":"Unique identifier","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Loyalty Program Id to which attributed reward belongs","type":"string"},"meta":{"additionalProperties":{},"description":"Additional data to define the reward","type":"object"},"rewardId":{"description":"Unique identifier for the reward","type":"string"},"updatedAt":{"description":"Timestamp for when this reward was updated","format":"date-time","type":"string"},"value":{"description":"Value of the selected reward config","format":"float64","type":"number"}},"type":"object"}}},"description":"Voucher successfully created"},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create a voucher","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/redeem":{"post":{"description":"Creates a request to redeem a voucher.","operationId":"redeemVoucher","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributedRewardId":{"description":"Unique identifier for the attributed reward","format":"uuid","type":"string"},"code":{"description":"Redemption code for the reward","type":"string"},"contactId":{"description":"Unique identifier for the contact","format":"int64","minimum":1,"type":"integer"},"loyaltySubscriptionId":{"description":"Identifier for the loyalty subscription","type":"string"},"meta":{"additionalProperties":{},"description":"Additional metadata associated with the redeem request","type":"object"},"order":{"allOf":[{"properties":{"amount":{"description":"Total amount of the order","format":"float64","type":"number"},"billing":{"allOf":[{"properties":{"address":{"description":"Address of the user","type":"string"},"city":{"description":"City of the user","type":"string"},"countryCode":{"description":"Country code of the user","type":"string"},"paymentMethod":{"description":"Payment method opted by the user","type":"string"},"phone":{"description":"Phone number of the user","format":"int64","type":"integer"},"postCode":{"description":"Postal Code of user's location","format":"int64","type":"integer"},"region":{"description":"Region where user resides","type":"string"}},"type":"object"}],"description":"Billing information for the order"},"contact_id":{"description":"Unique identifier for the contact","format":"int64","type":"integer"},"coupons":{"description":"List of coupon codes applied to the order","items":{"type":"string"},"type":"array"},"createdAt":{"description":"Timestamp when the order was created","format":"date-time","type":"string"},"email":{"description":"Email address associated with the order","format":"email","type":"string"},"id":{"description":"Unique identifier for the order","type":"string"},"identifiers":{"allOf":[{"properties":{"ext_id":{"description":"External identifier for the order","type":"string"},"loyalty_subscription_id":{"description":"Identifier for the loyalty subscription","type":"string"}},"type":"object"}],"description":"Additional identifiers for the order"},"products":{"description":"List of products in the order","items":{"properties":{"category":{"description":"List of categories the product belongs to","items":{"type":"string"},"type":"array"},"price":{"description":"Price of the product","format":"float64","type":"number"},"productId":{"description":"Unique identifier for the product","type":"string"},"quantity":{"description":"Quantity of the product","format":"float64","type":"number"},"variantId":{"description":"Identifier for the product variant","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Current status of the order","type":"string"},"storeId":{"description":"Identifier for the store where the order was placed","type":"string"},"updatedAt":{"description":"Timestamp when the order was last updated","format":"date-time","type":"string"}},"type":"object"}],"description":"Order details for the redemption"},"rewardId":{"description":"Unique identifier for the reward","format":"uuid","type":"string"},"ttl":{"description":"Time to live in seconds for the redemption request","minimum":0,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/redeem"}}},"description":"Redeem request successfully created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Precondition Failed"},"417":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Expectation Failed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create redeem voucher request","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/redeem/{tid}/complete":{"post":{"description":"Completes voucher redeem request.","operationId":"completeRedeemTransaction","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Redeem transaction ID","in":"path","name":"tid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/redeem"}}},"description":"Voucher Redeem completed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Precondition Failed"},"417":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Expectation Failed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Complete redeem voucher request","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/revoke":{"delete":{"description":"Revoke attributed vouchers.","operationId":"revokeVouchers","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Reward Attribution IDs (comma seperated)","in":"query","name":"attributedRewardIds","schema":{"type":"string"}}],"responses":{"204":{"description":"Successful revocation of voucher"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Revoke vouchers","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/validate":{"post":{"description":"Validates a reward.","operationId":"validateReward","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributedRewardId":{"description":"Unique identifier for the attributed reward","format":"uuid","type":"string"},"code":{"description":"Validation code for the reward","type":"string"},"contactId":{"description":"Unique identifier for the contact","format":"int64","minimum":1,"type":"integer"},"loyaltySubscriptionId":{"description":"Identifier for the loyalty subscription","type":"string"},"pointOfSellId":{"description":"Identifier for the point of sale","type":"string"},"rewardId":{"description":"Unique identifier for the reward","format":"uuid","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"authorize":{"description":"Boolean value to authorize a reward or not","type":"boolean"}},"type":"object"}}},"description":"Reward successfully validated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Validate a reward","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/rewards/{rid}":{"get":{"description":"Returns reward information.","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Reward ID","in":"path","name":"rid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Version","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"attributionPerConsumer":{"description":"Maximum number of times a consumer can be attributed this reward","type":"integer"},"balanceDefinitionId":{"description":"Unique identifier for the balance definition","format":"uuid","type":"string"},"code":{"description":"Unique code for the reward","type":"string"},"codeCount":{"description":"Total number of codes generated","format":"int64","type":"integer"},"codeGeneratorId":{"description":"Unique identifier for the code generator","format":"uuid","type":"string"},"codePoolId":{"description":"Unique identifier for the code pool","format":"uuid","type":"string"},"config":{"description":"Configuration settings for the reward","type":"string"},"createdAt":{"description":"Timestamp when the reward was created","format":"date-time","type":"string"},"disabledAt":{"description":"Disabled date of the reward","format":"date-time","type":"string"},"endDate":{"description":"End date of the reward validity","format":"date-time","type":"string"},"expirationDate":{"description":"Expiration date of the reward","format":"date-time","type":"string"},"expirationModifier":{"default":"noModification","description":"Select startOfPeriod to configure rewards expiry on start of day/week/month/year. Select endOfPeriod to configure reward expiry on end of day/week/month/year, else select noModification","enum":["startOfPeriod","endOfPeriod","noModification"],"type":"string"},"expirationUnit":{"description":"Unit of time for the rewards's availability (e.g., day/week/month/year).","type":"string"},"expirationValue":{"description":"Number of days/weeks/month/year for reward expiry","type":"integer"},"generator":{"allOf":[{"properties":{"createdAt":{"description":"Timestamp when the reward was created","type":"string"},"description":{"description":"Public facing description of the reward","type":"string"},"id":{"description":"Unique identifier for the reward","format":"uuid","type":"string"},"name":{"description":"Name of the reward","type":"string"},"pattern":{"description":"Generated pattern","type":"string"},"updatedAt":{"description":"Timestamp when the reward was created","format":"date-time","type":"string"}},"type":"object"}],"description":"object"},"id":{"description":"Unique identifier for the reward","format":"uuid","type":"string"},"limits":{"description":"Attribution / Redeem Limits for the reward","items":{"properties":{"createdAt":{"description":"Timestamp when the reward limit was created","format":"date-time","type":"string"},"durationUnit":{"description":"Unit of time for the reward limit's availability (e.g., day/week/month/year).","type":"string"},"durationValue":{"description":"Number of days/weeks/month/year for reward limit","type":"integer"},"limitValue":{"description":"Value of the limit","type":"integer"},"rewardLimitId":{"description":"Unique identifier for the reward limit","type":"string"},"slidingSchedule":{"description":"Select true to calculate all redeems/attributions from the previous value of selected durationUnit to the current time","type":"boolean"},"type":{"description":"Type of reward","type":"string"},"updatedAt":{"description":"Timestamp when the reward limit was created","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"loyaltyProgramId":{"description":"Id of the loyalty program to which the current reward belongs to","format":"uuid","type":"string"},"meta":{"additionalProperties":{},"description":"Additional data for reward definition","type":"object"},"name":{"description":"Name of the reward","type":"string"},"products":{"description":"Selected products for reward definition","items":{"properties":{"createdAt":{"description":"Timestamp when the product was created","type":"string"},"imageRef":{"description":"URL of the product image","type":"string"},"productId":{"description":"Unique identifier for the product","type":"string"},"value":{"description":"string","type":"string"}},"type":"object"},"type":"array"},"publicDescription":{"description":"Public description for the reward","type":"string"},"publicImage":{"description":"Public Image for the reward","type":"string"},"publicName":{"description":"Public name for the reward","type":"string"},"redeemPerConsumer":{"description":"Defines the redeem limit for the consumer","type":"integer"},"redeemRules":{"description":"Rules defined to redeem a reward","items":{"type":"string"},"type":"array"},"rewardConfigs":{"allOf":[{"properties":{"attribution":{"description":"Attribution config of the reward","type":"string"},"code":{"description":"Code config of the reward","type":"string"},"value":{"description":"Value config of the reward","type":"string"}},"type":"object"}],"description":"object"},"rule":{"allOf":[{"properties":{"condition":{"allOf":[{"$ref":"#/components/schemas/ruleConditionResponse"}],"description":"Selected rule condition"},"createdAt":{"description":"Timestamp when the rule was created","type":"string"},"description":{"description":"Description of the rule","type":"string"},"event":{"allOf":[{"properties":{"name":{"description":"Name of the event","type":"string"},"source":{"description":"Source of the event","type":"string"}},"type":"object"}],"description":"Selected event in the rule"},"isInternal":{"description":"Metric to identify if it's an internal rule or not","type":"boolean"},"loyaltyProgramId":{"description":"Loyalty Program id to which current rule is associated","type":"string"},"loyaltyVersionId":{"description":"Loyalty Version id to which current rule is associated","format":"int16","type":"integer"},"meta":{"additionalProperties":true,"description":"Additional data to define the rule","type":"object"},"name":{"description":"Rule name","type":"string"},"results":{"description":"Results of the rule definition","items":{"properties":{"action":{"description":"Action for the defined rule","type":"string"},"parameters":{"description":"Parameters to define the reward","items":{"properties":{"name":{"description":"Name of the rule","type":"string"},"value":{"allOf":[{"$ref":"#/components/schemas/valueResponse"}],"description":"Selected value of the parameter to define the rule"}},"type":"object"},"type":"array"},"service":{"description":"Selected service to define the reward","type":"string"}},"type":"object"},"type":"array"},"ruleId":{"description":"Unique identifier for the rule","type":"string"},"ruleType":{"description":"Type of the rule","type":"string"},"updatedAt":{"description":"Timestamp when the rule was updated","type":"string"}},"type":"object"}],"description":"Rule to define the reward"},"startDate":{"description":"Start date of attribution of the reward","format":"date-time","type":"string"},"subtractBalanceDefinitionId":{"description":"Id of the selected balance while redeeming / attributing a reward","type":"string"},"subtractBalanceStrategy":{"description":"Strategy of the Balance while redeeming / attributing a reward","type":"string"},"subtractBalanceValue":{"description":"Amount of balance to be selected while redeeming / attributing a reward","type":"integer"},"subtractTotalBalance":{"description":"Value to indicate to subtract full balance or not","type":"boolean"},"totalAttribution":{"description":"Defines the limit to which a consumer can attribute a reward","type":"integer"},"totalRedeem":{"description":"Defines the limit to which a consumer can redeem a reward","type":"integer"},"triggerId":{"description":"Id of the Rule to be updated for that reward","type":"string"},"unit":{"description":"Selected unit of the balance","type":"string"},"updatedAt":{"description":"Timestamp for when this reward was last updated.","type":"string"},"value":{"description":"Value of metric in selected config for reward definition","format":"float64","type":"number"},"valueType":{"description":"Type of config selected for reward definition","type":"string"}},"type":"object"}}},"description":"Successful retrieval of reward data"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get reward information","tags":["Reward"]}},"/loyalty/offer/programs/{pid}/vouchers":{"get":{"description":"Get voucher for a contact","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Page size","in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Pagination offset","in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"description":"Sort order","in":"query","name":"sort","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Sort field","in":"query","name":"sortField","schema":{"default":"updatedAt","enum":["updatedAt","createdAt"],"type":"string"}},{"description":"Contact ID","in":"query","name":"contactId","required":true,"schema":{"minimum":1,"type":"integer"}},{"description":"Metadata value for a Key filter","in":"query","name":"metadata_key_value","required":false,"schema":{"type":"string"}},{"description":"Reward ID","in":"query","name":"rewardId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contactId":{"description":"Contact id associated with the current reward","format":"int64","type":"integer"},"contactRewards":{"description":"List of all the rewards for current contact","items":{"properties":{"code":{"description":"Generated code","type":"string"},"consumedAt":{"description":"Timestamp when the reward limit was consumed","type":"string"},"createdAt":{"description":"Timestamp when the reward limit was created","type":"string"},"expirationDate":{"description":"Reward expiration date","type":"string"},"id":{"description":"Unique identifier for the contact","type":"string"},"meta":{"additionalProperties":{},"description":"Additional data for the reward","type":"object"},"rewardId":{"description":"Unique identifier for the reward","type":"string"},"unit":{"description":"Unit of the balance selected in the reward definition","type":"string"},"updatedAt":{"description":"Timestamp when the reward limit was updated","type":"string"},"value":{"description":"Value of the selected reward config","format":"float64","type":"number"}},"type":"object"},"type":"array"},"count":{"description":"Count of the rewards associated with the current contact","type":"integer"},"loyaltyProgramId":{"description":"Loyalty Program Id for the contact","type":"string"},"loyaltySubscriptionId":{"description":"Loyalty Subscription Id for the contact","type":"string"}},"type":"object"}}},"description":"Voucher list successfully retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get voucher for a contact","tags":["Reward"]}},"/loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid}":{"post":{"description":"Manually assigns a tier to a specific membership.","operationId":"addSubscriptionToTier","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Contact ID","in":"path","name":"cid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier ID","in":"path","name":"tid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"contactId":{"description":"Contact to which the tier is assigned","type":"integer"},"createdAt":{"format":"date-time","type":"string"},"groupId":{"description":"Group Id to which the tier is associated","format":"uuid","type":"string"},"id":{"description":"Unique identifier for the assigned tier","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Associated loyalty program Id","format":"uuid","type":"string"},"meta":{"additionalProperties":{},"description":"object","type":"object"},"updatedAt":{"format":"date-time","type":"string"}},"type":"object"}}},"description":"Tier successfully assigned to membership"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"424":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Failed Dependency"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Assign a tier","tags":["Tier"]}},"/loyalty/tier/programs/{pid}/tier-groups":{"get":{"description":"Returns the list of tier groups defined within the loyalty program.","operationId":"getListOfTierGroups","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Select 'active' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups.","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/tierGroup"},"type":"array"}},"type":"object"}}},"description":"Tier group list successfully retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request authentication failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"List tier groups","tags":["Tier"]},"post":{"description":"Creates a new tier group in a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*","operationId":"createTierGroup","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"downgradeStrategy":{"default":"real_time","description":"Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"},"name":{"description":"Name of the tier group","type":"string"},"tierOrder":{"description":"Order of the tiers in the group in ascending order","items":{"type":"string"},"type":"array"},"upgradeStrategy":{"default":"real_time","description":"Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"}},"required":["name"],"type":"object"}}},"description":"Tier group creation payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tierGroup"}}},"description":"Tier group Successfully created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request is malformed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"}},"summary":"Create a tier group","tags":["Tier"]}},"/loyalty/tier/programs/{pid}/tier-groups/{gid}":{"delete":{"description":"Deletes a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*","operationId":"deleteTierGroup","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier group ID","in":"path","name":"gid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Tier group successfully deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Delete tier group","tags":["Tier"]},"get":{"description":"Returns tier group information.","operationId":"getTierGroup","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier group ID","in":"path","name":"gid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group.","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tierGroup"}}},"description":"Tier group information successfully retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Get tier group","tags":["Tier"]},"put":{"description":"Updates a tier group from a loyalty program. *(The changes will take effect with the next publication of the loyalty program)*","operationId":"updateTierGroup","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier group ID","in":"path","name":"gid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"downgradeStrategy":{"default":"real_time","description":"Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"},"name":{"description":"Name of the tier group","type":"string"},"tierOrder":{"description":"Order of the tiers in the group in ascending order","example":[],"items":{"format":"uuid","type":"string"},"type":"array"},"upgradeStrategy":{"default":"real_time","description":"Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"}},"required":["downgradeStrategy","name","tierOrder","upgradeStrategy"],"type":"object"}}},"description":"Tier group update payload","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tierGroup"}}},"description":"Tier group successfully updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request authentication failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Update tier group","tags":["Tier"]}},"/loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers":{"post":{"description":"Creates a new tier in a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*","operationId":"createTierForTierGroup","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier group ID","in":"path","name":"gid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"accessConditions":{"items":{"properties":{"balanceDefinitionId":{"description":"Balance definition identifier for accessing the tier","format":"uuid","type":"string"},"minimumValue":{"description":"Minimum value required to access the tier","type":"integer"}},"type":"object"},"type":"array"},"imageRef":{"description":"Image of the tier","type":"string"},"name":{"description":"Name of the tier to be created","type":"string"},"tierRewards":{"items":{"properties":{"rewardId":{"description":"Reward unique identifier","format":"uuid","type":"string"}},"type":"object"},"type":"array"}},"required":["name","accessConditions"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier"}}},"description":"Tier successfully created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Create a tier","tags":["Tier"]}},"/loyalty/tier/programs/{pid}/tiers":{"get":{"description":"Returns the list of tiers defined within the loyalty program.","operationId":"getLoyaltyProgramTier","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Select 'active' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers.","in":"query","name":"version","schema":{"default":"draft","enum":["active","draft"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/tier"},"type":"array"}},"type":"object"}}},"description":"Tier list successfully retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"List tiers","tags":["Tier"]}},"/loyalty/tier/programs/{pid}/tiers/{tid}":{"delete":{"description":"Deletes a tier from a loyalty program tier group. *(The changes will take effect with the next publication of the loyalty program)*","operationId":"deleteTier","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier ID","in":"path","name":"tid","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Tier successfully deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Delete tier","tags":["Tier"]},"put":{"description":"Modifies an existing tier for the specified tier group *(The changes will take effect with the next publication of the loyalty program)*","operationId":"updateTier","parameters":[{"description":"Loyalty Program ID","in":"path","name":"pid","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Tier ID","in":"path","name":"tid","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"accessConditions":{"items":{"properties":{"balanceDefinitionId":{"description":"Balance definition identifier for accessing the tier","format":"uuid","type":"string"},"minimumValue":{"description":"Minimum value required to access the tier","type":"integer"}},"type":"object"},"type":"array"},"imageRef":{"description":"Image of the tier","type":"string"},"name":{"description":"Name of the tier to be created","type":"string"},"tierRewards":{"items":{"properties":{"rewardId":{"description":"Reward unique identifier","format":"uuid","type":"string"}},"type":"object"},"type":"array"}},"required":["name","accessConditions","tierRewards"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tier"}}},"description":"Tier successfully updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Request Authentication Failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Cannot Authenticate Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Validation errors"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Internal error occurred"}},"summary":"Update tier","tags":["Tier"]}},"/emailCampaigns":{"get":{"operationId":"getEmailCampaigns","parameters":[{"description":"Filter on the type of the campaigns","in":"query","name":"type","schema":{"enum":["classic","trigger"],"type":"string"}},{"description":"Filter on the status of the campaign","in":"query","name":"status","schema":{"enum":["suspended","archive","sent","queued","draft","inProcess","inReview"],"type":"string"}},{"description":"Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.This option only returns data for events occurred in the last 6 months.For older campaigns, it’s advisable to use the **Get Campaign Report** endpoint.","in":"query","name":"statistics","schema":{"enum":["globalStats","linksStats","statsByDomain"],"type":"string"}},{"description":"**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\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 filter the sent email campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"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":"Use this flag to exclude htmlContent from the response body. If set to **true**, htmlContent field will be returned as empty string in the response body","in":"query","name":"excludeHtmlContent","schema":{"enum":[true,false],"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"campaigns":[{"createdAt":"2017-05-01T12:30:00Z","footer":"[DEFAULT_FOOTER]","header":"[DEFAULT_HEADER]","htmlContent":"This is my HTML Content","id":12,"inlineImageActivation":true,"mirrorActive":true,"modifiedAt":"2017-05-01T12:30:00Z","name":"EN - Sales Summer 2017","previewText":"Don't miss the sale!","recipients":{"exclusionLists":[13],"lists":[5]},"recurring":false,"replyTo":"replyto@domain.com","scheduledAt":"2017-06-01T12:30:00Z","sender":{"email":"marketing@mycompany.com","id":26,"name":"Marketing"},"shareLink":"http://example.com/fhsgccc.html?t=9865448900","statistics":{"campaignStats":[{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"listId":5,"sent":19887,"softBounces":100,"trackableViews":5661,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999}],"globalStats":{"appleMppOpens":10,"clickers":2665,"complaints":1,"delivered":19765,"estimatedViews":560,"hardBounces":87,"opensRate":29.54,"sent":19887,"softBounces":100,"trackableViews":5661,"trackableViewsRate":23.45,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999},"linksStats":{"http://myUrl1.domain.com":80},"mirrorClick":120,"remaining":1000,"statsByDomain":{"hotmail.co.uk":{"clickers":2720,"complaints":5,"delivered":117056,"hardBounces":0,"sent":117055,"softBounces":111,"uniqueClicks":1970,"uniqueViews":21111,"unsubscriptions":105,"viewed":35251},"yahoo.com":{"clickers":533,"complaints":0,"delivered":25596,"hardBounces":0,"sent":25601,"softBounces":5,"uniqueClicks":298,"uniqueViews":3527,"unsubscriptions":17,"viewed":5255}}},"status":"sent","subject":"20% OFF for 2017 Summer Sales","tag":"Newsletter","testSent":true,"toField":"{FNAME} {LNAME}","type":"classic"},{"createdAt":"2017-05-01T12:30:00Z","footer":"[DEFAULT_FOOTER]","header":"[DEFAULT_HEADER]","htmlContent":"This is my HTML Content","id":22,"inlineImageActivation":true,"mirrorActive":true,"modifiedAt":"2017-05-01T12:30:00Z","name":"Weekly - 1","previewText":"your weekly newsletter!","recipients":{"exclusionLists":[45],"lists":[10]},"recurring":false,"replyTo":"replyto@domain.com","scheduledAt":"","sender":{"email":"newsletter@mycompany.com","id":26,"name":"Newsletter"},"shareLink":"http://example.com/fhsgccc.html?t=9865448900","statistics":{"campaignStats":[{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"listId":10,"sent":19887,"softBounces":100,"trackableViews":5661,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999}],"globalStats":{"appleMppOpens":10,"clickers":2665,"complaints":1,"delivered":19765,"estimatedViews":560,"hardBounces":87,"opensRate":29.42,"sent":19887,"softBounces":100,"trackableViews":5661,"trackableViewsRate":23.45,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999},"linksStats":{"http://myUrl1.domain.com":{"nbClick":80},"http://myUrl2.domain.com":{"nbClick":80},"http://myUrl3.domain.com":{"nbClick":80}},"mirrorClick":120,"remaining":1000,"statsByDomain":{"aol":{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"sent":19887,"softBounces":100,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999},"gmail":{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"sent":19887,"softBounces":100,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999}}},"status":"draft","subject":"Week 1 - Newsletter","tag":"Newsletter","testSent":false,"toField":"{FNAME} {LNAME}","type":"Classic"}],"count":2}}},"schema":{"properties":{"campaigns":{"items":{"allOf":[{"$ref":"#/components/schemas/getExtendedCampaignOverview"},{"properties":{"recipients":{"allOf":[{"$ref":"#/components/schemas/getCampaignRecipients"}],"type":"object"},"shareLink":{"description":"Link to share the campaign on social medias","example":"http://dhh.brevo.com/fhsgccc.html?t=9865448900","format":"url","type":"string"},"statistics":{"allOf":[{"$ref":"#/components/schemas/getExtendedCampaignStats"}],"type":"object"}},"required":["recipients","statistics"],"type":"object"}],"type":"object"},"type":"array"},"count":{"description":"Number of Email campaigns retrieved","example":24,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Email campaigns informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your created email campaigns","tags":["Email Campaigns"]},"post":{"operationId":"createEmailCampaign","requestBody":{"content":{"application/json":{"schema":{"properties":{"abTesting":{"default":false,"description":"Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B\n","example":true,"type":"boolean"},"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"},"emailExpirationDate":{"description":"To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy. Learn more about setting an email expiration date. For reference , ``https://help.brevo.com/hc/en-us/articles/4413566705298-Create-an-email-campaign``","properties":{"duration":{"description":"Duration of the email expiry. maximum duration can be 3600 days or 480 weeks or 120 months.","example":30,"format":"int64","maximum":3600,"minimum":1,"type":"integer"},"unit":{"description":"unit of the duration","enum":["days","weeks","months"],"example":"weeks","type":"string"}},"type":"object"},"footer":{"description":"Footer of the email campaign","example":"[DEFAULT_FOOTER]","type":"string"},"header":{"description":"Header of the email campaign","example":"[DEFAULT_HEADER]","type":"string"},"htmlContent":{"description":"Mandatory if htmlUrl and templateId are empty. Body of the message (HTML).\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"},"htmlUrl":{"description":"**Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example: **https://html.domain.com**\n","example":"https://html.domain.com","format":"url","type":"string"},"increaseRate":{"description":"**Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.\n","example":70,"format":"int64","maximum":100,"minimum":0,"type":"integer"},"initialQuota":{"description":"**Mandatory if ipWarmupEnable is set to true**. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.\n","example":3000,"format":"int64","type":"integer"},"inlineImageActivation":{"default":false,"description":"Use true to embedded the images in your email. Final size of the email should be less than **4MB**. Campaigns with embedded images can _not be sent to more than 5000 contacts_\n","example":true,"type":"boolean"},"ipWarmupEnable":{"default":false,"description":"**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.\n","example":true,"type":"boolean"},"mirrorActive":{"description":"Use true to enable the mirror link","example":true,"type":"boolean"},"name":{"description":"Name of the campaign","example":"Newsletter - May 2017","type":"string"},"params":{"additionalProperties":{},"description":"Pass the set of attributes to customize the type classic campaign. For example: **{\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**\n","example":{"FNAME":"Joe","LNAME":"Doe"},"type":"object"},"previewText":{"description":"Preview text or preheader of the email campaign","example":"Thanks for your order!","type":"string"},"recipients":{"description":"Segment ids and List ids to include/exclude from campaign","properties":{"exclusionListIds":{"description":"List ids to exclude from the campaign","items":{"example":8,"format":"int64","type":"integer"},"type":"array"},"exclusionSegmentIds":{"description":"Segment ids which have to be excluded from a campaign.\n","items":{"example":13,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"**Mandatory if scheduledAt is not empty**. List Ids to send the campaign to\n","items":{"example":32,"format":"int64","type":"integer"},"type":"array"},"segmentIds":{"description":"**Mandatory if listIds are not used**. Segment ids to send the campaign to.\n","items":{"example":23,"format":"int64","type":"integer"},"type":"array"}},"type":"object"},"replyTo":{"description":"Email on which the campaign recipients will be able to reply to","example":"support@myshop.com","format":"email","type":"string"},"scheduledAt":{"description":"Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result**. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example: **2017-06-01T12:30:00+02:00**\n","example":"2017-06-01T12:30:00+02:00","type":"string"},"sendAtBestTime":{"default":false,"description":"Set this to true if you want to send your campaign at best time.","example":true,"type":"boolean"},"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":"Sender email","example":"newsletter@myshop.com","format":"email","type":"string"},"id":{"description":"Select the sender for the campaign on the basis of sender id. _In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_.\n","example":3,"format":"int64","type":"integer"},"name":{"description":"Sender Name","example":"Mary from MyShop","type":"string"}},"type":"object"},"splitRule":{"description":"Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else\n","example":50,"format":"int64","maximum":50,"minimum":1,"type":"integer"},"subject":{"description":"Subject of the campaign. **Mandatory if abTesting is false**. Ignored if abTesting is true.\n","example":"Discover the New Collection !","type":"string"},"subjectA":{"description":"Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value\n","example":"Discover the New Collection!","type":"string"},"subjectB":{"description":"Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value\n","example":"Want to discover the New Collection?","type":"string"},"tag":{"description":"Tag of the campaign","example":"Newsletter","type":"string"},"templateId":{"description":"**Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional email template with status _active_. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.\n","format":"int64","type":"integer"},"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"},"unsubscriptionPageId":{"description":"Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.\n","example":"62cbb7fabbe85021021aac52","type":"string"},"updateFormId":{"description":"**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.\n","example":"6313436b9ad40e23b371d095","type":"string"},"utmCampaign":{"description":"Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed","example":"NL_05_2017","type":"string"},"winnerCriteria":{"description":"Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed\n","enum":["open","click"],"example":"open","type":"string"},"winnerDelay":{"description":"Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed\n","example":50,"format":"int64","maximum":168,"minimum":1,"type":"integer"}},"required":["name","sender"],"type":"object"}}},"description":"Values to create a campaign","required":true},"responses":{"201":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create an email campaign","tags":["Email Campaigns"]}},"/emailCampaigns/images":{"post":{"operationId":"uploadImageToGallery","requestBody":{"content":{"application/json":{"schema":{"properties":{"imageUrl":{"description":"The absolute url of the image (**no local file**). Maximum allowed size for image is **2MB**. Allowed extensions for images are: #### jpeg, jpg, png, bmp, gif.\n","example":"https://somedomain.com/image1.jpg","type":"string"},"name":{"description":"Name of the image.","example":"nature.jpg","type":"string"}},"required":["imageUrl"],"type":"object"}}},"description":"Parameters to upload an image","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"url":"https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg"}}},"schema":{"properties":{"url":{"description":"URL of the image uploaded","example":"https://img.mailinblue.com/100000/images/rnb/original/62casdase8wewq9df1c2f27c.jpeg","type":"string"}},"type":"object"}}},"description":"Image has been successfully uploaded"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Upload an image to your account's image gallery","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}":{"delete":{"operationId":"deleteEmailCampaign","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Email campaign has been deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete an email campaign","tags":["Email Campaigns"]},"get":{"operationId":"getEmailCampaign","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}},{"description":"Filter on type of the statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response.","in":"query","name":"statistics","required":false,"schema":{"enum":["globalStats","linksStats","statsByDomain","statsByDevice","statsByBrowser"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"createdAt":"2017-05-01T12:30:00Z","footer":"[DEFAULT_FOOTER]","header":"[DEFAULT_HEADER]","htmlContent":"This is my HTML Content","id":22,"inlineImageActivation":true,"mirrorActive":true,"modifiedAt":"2017-05-01T12:30:00Z","name":"Weekly - 1","previewText":"your weekly newsletter","recipients":{"exclusionLists":[45],"lists":[22]},"recurring":false,"replyTo":"replyto@domain.com","scheduledAt":"2017-09-22T12:30:00Z","sender":{"email":"newsletter@mycompany.com","id":26,"name":"Newsletter"},"shareLink":"http://dhh.brevo.com/fhsgccc.html?t=9865448900","statistics":{"campaignStats":[{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"listId":22,"sent":19887,"softBounces":100,"trackableViews":5661,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999}],"globalStats":{"appleMppOpens":10,"clickers":2665,"complaints":1,"delivered":19765,"estimatedViews":560,"hardBounces":87,"opensRate":24.59,"sent":19887,"softBounces":100,"trackableViews":5661,"trackableViewsRate":23.45,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999},"linksStats":{"http://myUrl1.domain.com":{"nbClick":80},"http://myUrl2.domain.com":{"nbClick":80},"http://myUrl3.domain.com":{"nbClick":80}},"mirrorClick":120,"remaining":1000,"statsByBrowser":{"internetExplorer":{"clickers":0,"uniqueClicks":0,"uniqueViews":0,"viewed":1},"safari":{"clickers":1,"uniqueClicks":0,"uniqueViews":0,"viewed":1},"thunderbird":{"clickers":1,"uniqueClicks":0,"uniqueViews":0,"viewed":1}},"statsByDevice":{"desktop":{"mac":{"clickers":1,"uniqueClicks":0,"uniqueViews":1,"viewed":2}},"mobile":{"androidMobile":{"clickers":1,"uniqueClicks":0,"uniqueViews":0,"viewed":1},"iPhone":{"clickers":1,"uniqueClicks":0,"uniqueViews":0,"viewed":2}}},"statsByDomain":{"gmail":{"clickers":2665,"complaints":1,"deferred":30,"delivered":19765,"hardBounces":87,"sent":19887,"softBounces":100,"uniqueClicks":2300,"uniqueViews":7779,"unsubscriptions":2,"viewed":8999}}},"status":"draft","subject":"Week 1 - Newsletter","tag":"Newsletter","testSent":false,"toField":"{FNAME} {LNAME}","type":"classic"}}},"schema":{"allOf":[{"$ref":"#/components/schemas/getExtendedCampaignOverview"},{"properties":{"recipients":{"allOf":[{"$ref":"#/components/schemas/getCampaignRecipients"}],"type":"object"},"statistics":{"allOf":[{"$ref":"#/components/schemas/getExtendedCampaignStats"}],"type":"object"}},"required":["recipients","statistics"],"type":"object"}]}}},"description":"Email campaign informations"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Get an email campaign report","tags":["Email Campaigns"]},"put":{"operationId":"updateEmailCampaign","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"abTesting":{"default":false,"description":"Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true. subjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B\n","example":true,"type":"boolean"},"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"},"emailExpirationDate":{"description":"To reduce your carbon footprint, set an expiration date for your email. If supported, it will be automatically deleted from the recipient’s inbox, saving storage space and energy.","properties":{"duration":{"description":"Duration of the email expiry. maximum duration can be 3600 days or 480 weeks or 120 months.","example":30,"format":"int64","maximum":3600,"minimum":1,"type":"integer"},"unit":{"description":"unit of the duration","enum":["days","weeks","months"],"example":"weeks","type":"string"}},"type":"object"},"footer":{"description":"Footer of the email campaign","example":"[DEFAULT_FOOTER]","type":"string"},"header":{"description":"Header of the email campaign","example":"[DEFAULT_HEADER]","type":"string"},"htmlContent":{"description":"Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. **REQUIRED if htmlUrl is empty**\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"},"htmlUrl":{"description":"Url which contents the body of the email message. **REQUIRED if htmlContent is empty**\n","example":"https://html.domain.com","format":"url","type":"string"},"increaseRate":{"description":"Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.\n","example":70,"format":"int64","maximum":100,"minimum":0,"type":"integer"},"initialQuota":{"description":"Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.\n","example":3000,"format":"int64","type":"integer"},"inlineImageActivation":{"default":false,"description":"Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than **4MB** with images embedded in the email. Campaigns with the images embedded in the email _must be sent to less than 5000 contacts_.\n","example":true,"type":"boolean"},"ipWarmupEnable":{"default":false,"description":"**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.\n","example":true,"type":"boolean"},"mirrorActive":{"description":"Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign","example":true,"type":"boolean"},"name":{"description":"Name of the campaign","example":"Newsletter - May 2017","type":"string"},"params":{"additionalProperties":{},"description":"Pass the set of attributes to customize the type classic campaign. For example: **{\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**\n","example":{"FNAME":"Joe","LNAME":"Doe"},"type":"object"},"previewText":{"description":"Preview text or preheader of the email campaign","example":"Thanks for your order!","type":"string"},"recipients":{"description":"Segment ids and List ids to include/exclude from campaign","properties":{"exclusionListIds":{"description":"List ids which have to be excluded from a campaign","items":{"example":8,"format":"int64","type":"integer"},"type":"array"},"exclusionSegmentIds":{"description":"Segment ids which have to be excluded from a campaign.\n","items":{"example":13,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"Lists Ids to send the campaign to. **Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty**\n","items":{"example":32,"format":"int64","type":"integer"},"type":"array"},"segmentIds":{"description":"**Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it.** Segment ids to send the campaign to.\n","items":{"example":23,"format":"int64","type":"integer"},"type":"array"}},"type":"object"},"recurring":{"default":false,"description":"**FOR TRIGGER ONLY !** Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times\n","example":false,"type":"boolean"},"replyTo":{"description":"Email on which campaign recipients will be able to reply to","example":"support@myshop.com","format":"email","type":"string"},"scheduledAt":{"description":"UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.** If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).\n","example":"2017-06-01T12:30:00+02:00","type":"string"},"sendAtBestTime":{"description":"Set this to true if you want to send your campaign at best time. Note:- **if true, warmup ip will be disabled.**\n","example":true,"type":"boolean"},"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":"Sender email from which the campaign emails are sent","example":"newsletter@myshop.com","format":"email","type":"string"},"id":{"description":"Select the sender for the campaign on the basis of sender id. **In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)**.\n","example":3,"format":"int64","type":"integer"},"name":{"description":"Sender Name from which the campaign emails are sent","example":"Mary from MyShop","type":"string"}},"type":"object"},"splitRule":{"description":"Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else\n","example":50,"format":"int64","maximum":50,"minimum":1,"type":"integer"},"subject":{"description":"Subject of the campaign","example":"Discover the New Collection !","type":"string"},"subjectA":{"description":"Subject A of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value\n","example":"Discover the New Collection!","type":"string"},"subjectB":{"description":"Subject B of the campaign. **Mandatory if abTesting = true**. subjectA & subjectB should have unique value\n","example":"Want to discover the New Collection?","type":"string"},"tag":{"description":"Tag of the campaign","example":"Newsletter","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"},"unsubscriptionPageId":{"description":"Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.\n","example":"62cbb7fabbe85021021aac52","type":"string"},"updateFormId":{"description":"**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.\n","example":"6313436b9ad40e23b371d095","type":"string"},"utmCampaign":{"description":"Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed","example":"NL_05_2017","type":"string"},"winnerCriteria":{"description":"Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed\n","enum":["open","click"],"example":"open","type":"string"},"winnerDelay":{"description":"Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed\n","example":50,"format":"int64","maximum":168,"minimum":1,"type":"integer"}},"type":"object"}}},"description":"Values to update a campaign","required":true},"responses":{"204":{"content":{},"description":"Email campaign updated"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update an email campaign","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/abTestCampaignResult":{"get":{"description":"Obtain winning version of an A/B test email campaign","operationId":"getAbTestCampaignResult","parameters":[{"description":"Id of the A/B test campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"clickRate":"50%","clickedLinks":{"Version A":[{"clickRate":"0%","clicksCount":0,"link":"https://google.com"},{"clickRate":"0%","clicksCount":0,"link":"https://youtube.com"}],"Version B":[{"clickRate":"40%","clicksCount":2,"link":"http://www.github.com"},{"clickRate":"60%","clicksCount":3,"link":"http://www.stackoverflow.com"}]},"openRate":"100%","statistics":{"clicks":{"Version A":"0%","Version B":"50%"},"complaints":{"Version A":"0%","Version B":"0%"},"hardBounces":{"Version A":"0%","Version B":"0%"},"openers":{"Version A":"20%","Version B":"100%"},"softBounces":{"Version A":"0%","Version B":"0%"},"unsubscribed":{"Version A":"20%","Version B":"0%"}},"winningCriteria":"Click","winningVersion":"B","winningVersionRate":"0%"}}},"schema":{"properties":{"clickRate":{"description":"Click rate for current winning version","example":"70%","type":"string"},"clickedLinks":{"properties":{"Version A":{"$ref":"#/components/schemas/abTestVersionClicks"},"Version B":{"$ref":"#/components/schemas/abTestVersionClicks"}},"required":["Version A","Version B"],"type":"object"},"openRate":{"description":"Open rate for current winning version","example":"70%","type":"string"},"statistics":{"properties":{"clicks":{"$ref":"#/components/schemas/abTestVersionStats"},"complaints":{"$ref":"#/components/schemas/abTestVersionStats"},"hardBounces":{"$ref":"#/components/schemas/abTestVersionStats"},"openers":{"$ref":"#/components/schemas/abTestVersionStats"},"softBounces":{"$ref":"#/components/schemas/abTestVersionStats"},"unsubscribed":{"$ref":"#/components/schemas/abTestVersionStats"}},"required":["clicks","complaints","hardBounces","openers","softBounces","unsubscribed"],"type":"object"},"winningCriteria":{"description":"Criteria chosen for winning version (Open/Click)","enum":["Open","Click"],"example":"Open","type":"string"},"winningSubjectLine":{"description":"Subject Line of current winning version","example":"Subject Line A","type":"string"},"winningVersion":{"description":"Winning Campaign Info. pending = Campaign has been picked for sending and winning version is yet to be decided, tie = A tie happened between both the versions, notAvailable = Campaign has not yet been picked for sending.","enum":["notAvailable","pending","tie","A","B"],"example":"A","type":"string"},"winningVersionRate":{"description":"Open/Click rate for the winner version","example":"70%","type":"string"}},"type":"object"}}},"description":"A/B test email campaign Result"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"A/B test Email Campaign not found"}},"summary":"Get an A/B test email campaign results","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/exportRecipients":{"post":{"operationId":"emailExportRecipients","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"notifyURL":{"description":"Webhook 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"},"recipientsType":{"description":"Type of recipients to export for a campaign","enum":["all","nonClickers","nonOpeners","clickers","openers","softBounces","hardBounces","unsubscribed"],"example":"openers","type":"string"}},"required":["recipientsType"],"type":"object"}}},"description":"Values to send for a recipient export request","required":false},"responses":{"202":{"$ref":"#/components/responses/createdProcessId"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Export the recipients of an email campaign","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/sendNow":{"post":{"operationId":"sendEmailCampaignNow","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"Email campaign has been scheduled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Campaign could not be sent"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"You don't have enough credit to send your campaign. Please update your plan"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Send an email campaign immediately, based on campaignId","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/sendReport":{"post":{"description":"A PDF will be sent to the specified email addresses","operationId":"sendReport","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendReport"}}},"description":"Values for send a report","required":true},"responses":{"204":{"content":{},"description":"Report has been successfully sent to the defined recipients"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Send the report of a campaign","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/sendTest":{"post":{"operationId":"sendTestEmail","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","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/postSendFailed"}}},"description":"Campaign ID not found"}},"summary":"Send an email campaign to your test list","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/sharedUrl":{"get":{"description":"Get a unique URL to share & import an email template from one Brevo account to another.","operationId":"getSharedTemplateUrl","parameters":[{"description":"Id of the campaign or template","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"sharedUrl":"https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-"}}},"schema":{"properties":{"sharedUrl":{"description":"A unique URL for the email campaign or transactional template. This URL can be shared with other Brevo users.","example":"https://my.brevo.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-","format":"url","type":"string"}},"required":["sharedUrl"],"type":"object"}}},"description":"Shared template URL information"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Campaign/Template ID not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Only email campaigns or templates are allowed"}},"summary":"Get a shared template url","tags":["Email Campaigns"]}},"/emailCampaigns/{campaignId}/status":{"put":{"operationId":"updateCampaignStatus","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCampaignStatus"}}},"description":"Status of the campaign","required":true},"responses":{"204":{"content":{},"description":"The campaign status has been updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update an email campaign status","tags":["Email Campaigns"]}},"/smsCampaigns":{"get":{"operationId":"getSmsCampaigns","parameters":[{"description":"Status of campaign.","in":"query","name":"status","schema":{"enum":["suspended","archive","sent","queued","draft","inProcess"],"type":"string"}},{"description":"**Mandatory if endDate is used.** Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\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 filter the sent sms campaigns. **Prefer to pass your timezone in date-time format for accurate result** ( only available if either 'status' not passed and if passed is set to 'sent' )\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number limitation for the result returned","in":"query","name":"limit","schema":{"default":500,"format":"int64","maximum":1000,"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":"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":{"campaigns":[{"content":"Visit our Store and get some discount !","createdAt":"2017-06-01T12:30:00Z","id":2,"modifiedAt":"2017-05-01T12:30:00Z","name":"PROMO CODE","recipients":{"exclusionLists":[13],"lists":[21]},"scheduledAt":"2017-06-01T12:30:00Z","sender":"MyCompany","sentDate":"2017-06-01T12:30:00Z","statistics":{"answered":2,"delivered":2987,"hardBounces":1,"processing":0,"sent":3000,"softBounces":3,"unsubscriptions":3},"status":"sent","testSent":true},{"content":"Summer Sale is starting tomorrow. Get extra 10% with this code:SUM17","createdAt":"2017-06-01T12:30:00Z","id":10,"modifiedAt":"2017-05-01T12:30:00Z","name":"SUMMER SALE","recipients":{"exclusionLists":[13],"lists":[21]},"scheduledAt":"2017-08-04T12:30:00Z","sender":"MyCompany","sentDate":"2017-06-01T12:30:00Z","statistics":{"answered":2,"delivered":2987,"hardBounces":1,"processing":0,"sent":3000,"softBounces":3,"unsubscriptions":3},"status":"draft","testSent":false}],"count":12}}},"schema":{"properties":{"campaigns":{"items":{"allOf":[{"$ref":"#/components/schemas/getSmsCampaignOverview"},{"properties":{"recipients":{"allOf":[{"$ref":"#/components/schemas/getCampaignRecipients"}],"type":"object"},"statistics":{"allOf":[{"$ref":"#/components/schemas/getSmsCampaignStats"}],"type":"object"}},"required":["recipients","statistics"],"type":"object"}],"type":"object"},"type":"array"},"count":{"description":"Number of SMS campaigns retrieved","example":12,"format":"int64","type":"integer"}},"type":"object"}}},"description":"SMS campaigns informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Returns the information for all your created SMS campaigns","tags":["SMS Campaigns"]},"post":{"operationId":"createSmsCampaign","requestBody":{"content":{"application/json":{"schema":{"properties":{"content":{"description":"Content of the message. The **maximum characters used per SMS is 160**, if used more than that, it will be counted as more than one SMS.\n","example":"Get a discount by visiting our NY store and saying : Happy Spring!","type":"string"},"name":{"description":"Name of the campaign","example":"Spring Promo Code","type":"string"},"organisationPrefix":{"description":"A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**","example":"MyCompany","type":"string"},"recipients":{"properties":{"exclusionListIds":{"description":"List ids which have to be excluded from a campaign","items":{"description":"List Id to exclude from the campaign","example":15,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"Lists Ids to send the campaign to. **REQUIRED if scheduledAt is not empty**\n","items":{"description":"List Id to send the campaign to","example":54,"format":"int64","type":"integer"},"type":"array"}},"required":["listIds"],"type":"object"},"scheduledAt":{"description":"UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","example":"2017-05-05T12:30:00+02:00","type":"string"},"sender":{"description":"Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**\n","example":"MyShop","maxLength":15,"type":"string"},"unicodeEnabled":{"default":false,"description":"Format of the message. It indicates whether the content should be treated as unicode or not.\n","example":true,"type":"boolean"},"unsubscribeInstruction":{"description":"Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**","example":"send Stop if you want to unsubscribe.","type":"string"}},"required":["content","name","sender"],"type":"object"}}},"description":"Values to create an SMS Campaign","required":true},"responses":{"201":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Creates an SMS campaign","tags":["SMS Campaigns"]}},"/smsCampaigns/{campaignId}":{"delete":{"operationId":"deleteSmsCampaign","parameters":[{"description":"id of the SMS campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"SMS campaign has been deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete an SMS campaign","tags":["SMS Campaigns"]},"get":{"operationId":"getSmsCampaign","parameters":[{"description":"id of the SMS campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"content":"Visit our Store and get some discount !","createdAt":"2017-06-01T12:30:00Z","id":2,"modifiedAt":"2017-05-01T12:30:00Z","name":"PROMO CODE","recipients":{"exclusionLists":[13],"lists":[21]},"scheduledAt":"2017-06-01T12:30:00Z","sender":"MyCompany","statistics":{"answered":2,"delivered":2987,"hardBounces":1,"processing":0,"sent":3000,"softBounces":3,"unsubscriptions":3},"status":"sent","testSent":true}}},"schema":{"allOf":[{"$ref":"#/components/schemas/getSmsCampaignOverview"},{"properties":{"recipients":{"allOf":[{"$ref":"#/components/schemas/getCampaignRecipients"}],"type":"object"},"statistics":{"allOf":[{"$ref":"#/components/schemas/getSmsCampaignStats"}],"type":"object"}},"required":["recipients","statistics"],"type":"object"}]}}},"description":"SMS campaign informations"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Get an SMS campaign","tags":["SMS Campaigns"]},"put":{"operationId":"updateSmsCampaign","parameters":[{"description":"id of the SMS campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"content":{"description":"Content of the message. The **maximum characters used per SMS is 160**, if used more than that, it will be counted as more than one SMS\n","example":"Get a discount by visiting our NY store and saying : Happy Spring!","type":"string"},"name":{"description":"Name of the campaign","example":"Spring Promo Code","type":"string"},"organisationPrefix":{"description":"A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**","example":"MyCompany","type":"string"},"recipients":{"properties":{"exclusionListIds":{"description":"List ids which have to be excluded from a campaign","items":{"description":"List Id to exclude from the campaign","example":15,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"Lists Ids to send the campaign to. **REQUIRED if scheduledAt is not empty**\n","items":{"description":"List Id to send the campaign to","example":54,"format":"int64","type":"integer"},"type":"array"}},"required":["listIds"],"type":"object"},"scheduledAt":{"description":"UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.**\n","example":"2017-05-05T12:30:00+02:00","type":"string"},"sender":{"description":"Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**\n","example":"MyShop","maxLength":15,"type":"string"},"unicodeEnabled":{"default":false,"description":"Format of the message. It indicates whether the content should be treated as unicode or not.\n","example":true,"type":"boolean"},"unsubscribeInstruction":{"description":"Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**","example":"send Stop if you want to unsubscribe.","type":"string"}},"type":"object"}}},"description":"Values to update an SMS Campaign","required":true},"responses":{"204":{"content":{},"description":"SMS campaign updated"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update an SMS campaign","tags":["SMS Campaigns"]}},"/smsCampaigns/{campaignId}/exportRecipients":{"post":{"description":"It returns the background process ID which on completion calls the notify URL that you have set in the input.","operationId":"requestSmsRecipientExport","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"notifyURL":{"description":"URL that will be called once the export process is finished. For reference, https://help.brevo.com/hc/en-us/articles/360007666479","example":"http://requestb.in/173lyyx1","format":"url","type":"string"},"recipientsType":{"description":"Filter the recipients based on how they interacted with the campaign","enum":["all","delivered","answered","softBounces","hardBounces","unsubscribed"],"example":"answered","type":"string"}},"required":["recipientsType"],"type":"object"}}},"description":"Values to send for a recipient export request","required":false},"responses":{"202":{"$ref":"#/components/responses/createdProcessId"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Export an SMS campaign's recipients","tags":["SMS Campaigns"],"x-codegen-request-body-name":"recipientExport"}},"/smsCampaigns/{campaignId}/sendNow":{"post":{"operationId":"sendSmsCampaignNow","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"SMS campaign has been scheduled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"SMS Campaign could not be sent"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"You don't have enough credit to send your campaign. Please update your plan"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Send your SMS campaign immediately","tags":["SMS Campaigns"]}},"/smsCampaigns/{campaignId}/sendReport":{"post":{"description":"Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.","operationId":"sendSmsReport","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendReport"}}},"description":"Values for send a report","required":true},"responses":{"204":{"content":{},"description":"Report has been successfully sent to the defined recipients"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Send an SMS campaign's report","tags":["SMS Campaigns"]}},"/smsCampaigns/{campaignId}/sendTest":{"post":{"operationId":"sendTestSms","parameters":[{"description":"Id of the SMS campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"phoneNumber":{"description":"Mobile number of the recipient with the country code. This number **must belong to one of your contacts in Brevo account and must not be blacklisted**\n","example":"33689965433","type":"string"}},"type":"object"}}},"description":"Mobile number of the recipient with the country code. This number **must belong to one of your contacts in Brevo account and must not be blacklisted**\n","required":true},"responses":{"204":{"content":{},"description":"Test SMS has been sent successfully to the recipient"},"400":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"Response code","example":"invalid_parameter","type":"string"},"message":{"description":"Response message","example":"The SMS could not be sent to all recipients","type":"string"},"unexistingSms":{"items":{"description":"Email addresses you tried to sent a SMS to, but not existing in your contacts","example":"337699086644@mailin.com, 41778899954@mailin.com","format":"email","type":"string"},"type":"array"},"withoutListSms":{"items":{"description":"Email addresses you sent a SMS to, without a contact list","example":"3542388988@mailin.com, 10976444477@mailin.com","format":"email","type":"string"},"type":"array"}},"required":["code","message"],"type":"object"}}},"description":"Test SMS could not be sent to the following email addresses"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Send a test SMS campaign","tags":["SMS Campaigns"]}},"/smsCampaigns/{campaignId}/status":{"put":{"operationId":"updateSmsCampaignStatus","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCampaignStatus"}}},"description":"Status of the campaign.","required":true},"responses":{"204":{"content":{},"description":"The campaign status has been updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Update a campaign's status","tags":["SMS Campaigns"],"x-codegen-request-body-name":"status"}},"/whatsappCampaigns":{"get":{"operationId":"getWhatsAppCampaigns","parameters":[{"description":"**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**\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 filter the WhatsApp campaigns created. **Prefer to pass your timezone in date-time format for accurate result**\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"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 modification. 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":{"campaigns":[{"campaignName":"campaign_22","campaignStatus":"sent","createdAt":"2017-05-01T12:30:00Z","errorReason":"NONE","id":1672035851100690,"invalidatedContacts":0,"modifiedAt":"2017-05-01T12:30:00Z","readPercentage":28.57,"scheduledAt":"2022-12-27T09:50:00Z","stats":{"delivered":3,"notSent":4,"read":2,"sent":3,"unsubscribe":0},"templateId":637660278078655}],"count":23}}},"schema":{"properties":{"campaigns":{"items":{"properties":{"campaignName":{"description":"Name of the WhatsApp Campaign","example":"Test Campaign","type":"string"},"campaignStatus":{"description":"Status of the Whatsapp Campaign","enum":["draft","scheduled","pending","approved","running","suspended","rejected","sent"],"example":"draft","type":"string"},"createdAt":{"description":"Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-06-01T12:30:00Z","type":"string"},"errorReason":{"description":"Error Reason associated with the WhatsApp campaign sending","type":"string"},"id":{"description":"ID of the WhatsApp Campaign","example":1672035851100690,"format":"int64","type":"integer"},"invalidatedContacts":{"description":"Count of invalidated contacts","example":0,"format":"int64","type":"integer"},"modifiedAt":{"description":"UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"readPercentage":{"description":"Read percentage of the the whatsapp campaign created","example":28.57,"format":"float","type":"number"},"scheduledAt":{"description":"UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format","example":"2017-06-01T12:30:00Z","type":"string"},"stats":{"$ref":"#/components/schemas/WhatsappCampStats"},"templateId":{"description":"Id of the WhatsApp template","example":637660278078655,"type":"string"}},"required":["id","campaignName","campaignStatus","templateId","scheduledAt","createdAt","modifiedAt"],"type":"object"},"type":"array"},"count":{"description":"Number of WhatsApp campaigns retrieved","example":40,"format":"int64","type":"integer"}},"type":"object"}}},"description":"WhatsApp campaigns information"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your created WhatsApp campaigns","tags":["WhatsApp Campaigns"]},"post":{"operationId":"createWhatsAppCampaign","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name of the WhatsApp campaign creation","example":"Test Campaign","type":"string"},"recipients":{"description":"Segment ids and List ids to include/exclude from campaign","properties":{"excludedListIds":{"description":"List ids to exclude from the campaign","items":{"example":8,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"**Mandatory if scheduledAt is not empty**. List Ids to send the campaign to\n","items":{"example":32,"format":"int64","type":"integer"},"type":"array"},"segments":{"description":"**Mandatory if listIds are not used**. Segment ids to send the campaign to.\n","items":{"example":23,"format":"int64","type":"integer"},"type":"array"}},"type":"object"},"scheduledAt":{"description":"Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00**\n","example":"2017-06-01T12:30:00+02:00","type":"string"},"templateId":{"description":"Id of the WhatsApp template in **approved** state","example":19,"type":"integer"}},"required":["name","templateId","scheduledAt","recipients"],"type":"object"}}},"description":"Values to create a WhatsApp Campaign","required":true},"responses":{"201":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create and Send a WhatsApp campaign","tags":["WhatsApp Campaigns"]}},"/whatsappCampaigns/config":{"get":{"operationId":"getWhatsAppConfig","responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"businessStatus":"verified","phoneNumberNameStatus":"APPROVED","phoneNumberQuality":"GREEN","sendingLimit":"TIER_1K","whatsappBusinessAccountID":105569359072383,"whatsappBusinessAccountStatus":"APPROVED"}}},"schema":{"properties":{"businessStatus":{"description":"Verification status information of the Business account","example":"verified","type":"string"},"phoneNumberNameStatus":{"description":"Status of the name associated with WhatsApp Phone number","enum":["APPROVED","PENDING","REJECTED"],"example":"APPROVED","type":"string"},"phoneNumberQuality":{"description":"Quality status of phone number associated with WhatsApp account. There are three quality ratings. example - **High (GREEN) , Medium (YELLOW) and Low(RED)**","enum":["GREEN","YELLOW","RED"],"example":"GREEN","type":"string"},"sendingLimit":{"description":"Sending limit of the WhatsApp account","example":"TIER_1K","type":"string"},"whatsappBusinessAccountId":{"description":"Id of the WhatsApp business account","example":105569359072383,"type":"string"},"whatsappBusinessAccountStatus":{"description":"Status information related to WhatsApp Api account","enum":["APPROVED","PENDING","REJECTED"],"example":"APPROVED","type":"string"}},"type":"object"}}},"description":"Get all the information of your WhatsApp API account"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get your WhatsApp API account information","tags":["WhatsApp Campaigns"]}},"/whatsappCampaigns/template":{"post":{"operationId":"createWhatsAppTemplate","requestBody":{"content":{"application/json":{"schema":{"properties":{"bodyText":{"description":"Body of the template. **Maximum allowed characters are 1024**","example":"making it look like readable English","type":"string"},"category":{"description":"Category of the template","enum":["MARKETING","UTILITY"],"example":"MARKETING","type":"string"},"headerText":{"description":"Text content of the header in the template.  **Maximum allowed characters are 45** **Use this field to add text content in template header and if mediaUrl is empty**\n","example":"Test WhatsApp campaign","type":"string"},"language":{"description":"Language of the template. For Example :\n**en** for English\n","example":"en","type":"string"},"mediaUrl":{"description":"Absolute url of the media file **(no local file)** for the header. **Use this field in you want to add media in Template header and headerText is empty** Allowed extensions for media files are: #### jpeg | png | mp4 | pdf\n","example":"https://attachment.domain.com","type":"string"},"name":{"description":"Name of the template","example":"Test template","type":"string"},"source":{"description":"source of the template","enum":["Automation","Conversations"],"type":"string"}},"required":["name","language","category","bodyText"],"type":"object"}}},"description":"Values to create a WhatsApp Template","required":true},"responses":{"201":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create a WhatsApp template","tags":["WhatsApp Campaigns"]}},"/whatsappCampaigns/template-list":{"get":{"operationId":"getWhatsAppTemplates","parameters":[{"description":"**Mandatory if endDate is used**. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**\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 filter the templates created. **Prefer to pass your timezone in date-time format for accurate result**\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"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 modification. Default order is **descending** if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"source of the template","in":"query","name":"source","required":false,"schema":{"enum":["Automation","Conversations"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"count":2,"templates":[{"category":"MARKETING","createdAt":"2017-05-01T12:30:00Z","errorReason":"NONE","id":235,"language":"en","modifiedAt":"2017-05-01T12:30:00Z","name":"campaign_22","status":"approved","type":"whatsapp"},{"category":"MARKETING","createdAt":"2017-0","errorReason":"NONE","id":124,"language":"","modifiedAt":"2017-05-01T12:30:00Z","name":"test-template","status":"draft","type":"whatsapp"}]}}},"schema":{"properties":{"count":{"description":"Number of whatsApp templates retrieved","example":24,"format":"int64","type":"integer"},"templates":{"items":{"properties":{"category":{"description":"category of the template","example":"MARKETING","type":"string"},"createdAt":{"description":"Creation UTC date-time of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-06-01T12:30:00Z","type":"string"},"errorReason":{"description":"Error reason in the template creation","example":"NONE","type":"string"},"id":{"description":"ID of the whatsApp template","example":235,"format":"int64","type":"integer"},"language":{"description":"Language in which template exists","example":"en","type":"string"},"modifiedAt":{"description":"UTC date-time of last modification of the whatsApp template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"name":{"description":"Name of the whatsApp template","example":"Test template","type":"string"},"status":{"description":"Status of the whatsApp template","example":"approved","type":"string"}},"required":["id","name","status","type","language","category","createdAt","modifiedAt"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"WhatsApp templates informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your created WhatsApp templates","tags":["WhatsApp Campaigns"]}},"/whatsappCampaigns/template/approval/{templateId}":{"post":{"operationId":"sendWhatsAppTemplateApproval","parameters":[{"description":"id of the template","in":"path","name":"templateId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{},"description":"WhatsApp template sent for approval"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send your WhatsApp template for approval","tags":["WhatsApp Campaigns"]}},"/whatsappCampaigns/{campaignId}":{"delete":{"operationId":"deleteWhatsAppCampaign","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"204":{"content":{},"description":"WhatsApp campaign has been deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete a WhatsApp campaign","tags":["WhatsApp Campaigns"]},"get":{"operationId":"getWhatsAppCampaign","parameters":[{"description":"Id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"campaignName":"Test WhatsApp Campaign","campaignStatus":"sent","createdAt":"2022-12-26T06:50:00Z","id":1672035851100690,"modifiedAt":"2022-12-26T08:50:00Z","recipients":{"excludedLists":[45],"includedLists":[22],"type":"list"},"scheduledAt":"2022-12-27T09:50:00Z","senderNumber":9368207029,"stats":{"delivered":"3,","notSent":4,"read":"2,","sent":"3,","unsubscribe":"0,"},"template":{"body_variable":[],"button_type":"CALL_TO_ACTION","category":"MARKETING","components":[{"text":"making it look like readable English.","type":"BODY"},{"buttons":[{"text":"vLorem Ipsum is simply du","type":"URL","url":"app.brevo"},{"phone_number":"+918800613137","text":"Lorem Ipsum is simply dum","type":"PHONE_NUMBER"}],"type":"BUTTONS"}],"contains_button":true,"display_header":false,"header_footer":true,"header_type":"text","header_variables":[{"datatype":"text","default":"INVALID HEADER","index":1,"name":"FIRSTNAME"}],"language":"en","name":"official_campaign8"}}}},"schema":{"properties":{"campaignName":{"description":"Name of the WhatsApp Campaign","example":"Test Campaign","type":"string"},"campaignStatus":{"description":"Status of the WhatsApp Campaign","enum":["draft","scheduled","pending","approved","running","suspended","rejected","sent"],"example":"draft","type":"string"},"createdAt":{"description":"Creation UTC date-time of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-06-01T12:30:00Z","type":"string"},"id":{"description":"ID of the WhatsApp Campaign","example":1672035851100690,"format":"int64","type":"integer"},"modifiedAt":{"description":"UTC date-time of last modification of the WhatsApp campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"scheduledAt":{"description":"UTC date-time on which WhatsApp campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format","example":"2017-06-01T12:30:00Z","type":"string"},"senderNumber":{"description":"Sender of the WhatsApp Campaign","example":9368207029,"type":"string"},"stats":{"$ref":"#/components/schemas/WhatsappCampStats"},"template":{"properties":{"body_variables":{"description":"array of variables item variables","items":{"$ref":"#/components/schemas/variablesItems"},"type":"array"},"button_type":{"example":"QUICK_REPLIES","type":"string"},"category":{"description":"description of the template","example":"Marketing","type":"string"},"components":{"description":"array of component item objects","items":{"properties":{"text":{"example":"Life is a long lesson in humility","type":"string"},"type":{"example":"BODY","type":"string"}},"type":"object"},"type":"array"},"contains_button":{"example":false,"type":"boolean"},"display_header":{"example":true,"type":"boolean"},"header_type":{"description":"type of header","example":"text","type":"string"},"header_variables":{"description":"array of variables item object","items":{"$ref":"#/components/schemas/variablesItems"},"type":"array"},"hide_footer":{"example":true,"type":"boolean"},"language":{"description":"language of the template","example":"en_GB","type":"string"},"name":{"description":"name of the template","example":"wta107","type":"string"}},"type":"object"}},"required":["id","campaignName","campaignStatus","senderNumber","recipients","createdAt","template","modifiedAt"],"type":"object"}}},"description":"Get whatsApp campaign information on the basis of campaignId"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Get a WhatsApp campaign","tags":["WhatsApp Campaigns"]},"put":{"operationId":"updateWhatsAppCampaign","parameters":[{"description":"id of the campaign","in":"path","name":"campaignId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"campaignName":{"description":"Name of the campaign","example":"Test WhatsApp","type":"string"},"campaignStatus":{"default":"scheduled","description":"Status of the campaign","enum":["scheduled","suspended"],"example":"scheduled","type":"string"},"recipients":{"description":"Segment ids and List ids to include/exclude from campaign","properties":{"excludedListIds":{"description":"List ids to exclude from the campaign","items":{"example":8,"format":"int64","type":"integer"},"type":"array"},"listIds":{"description":"**Mandatory if scheduledAt is not empty**. List Ids to send the campaign to\n","items":{"example":32,"format":"int64","type":"integer"},"type":"array"},"segments":{"description":"**Mandatory if listIds are not used**. Segment ids to send the campaign to.\n","items":{"example":23,"format":"int64","type":"integer"},"type":"array"}},"type":"object"},"rescheduleFor":{"description":"Reschedule the sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of campaign. **Prefer to pass your timezone in date-time format for accurate result.For example: **2017-06-01T12:30:00+02:00** Use this field to update the scheduledAt of any existing draft or scheduled WhatsApp campaign.\n","example":"2017-06-01T12:30:00+02:00","type":"string"}},"type":"object"}}},"description":"Values to update a WhatsApp Campaign","required":true},"responses":{"204":{"content":{},"description":"WhatsApp campaign has been deleted"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Update a WhatsApp campaign","tags":["WhatsApp Campaigns"]}},"/companies":{"get":{"parameters":[{"description":"Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"}","in":"query","name":"filters","schema":{"type":"string"}},{"description":"Filter by linked contacts ids","in":"query","name":"linkedContactsIds","schema":{"format":"int64","type":"integer"}},{"description":"Filter by linked Deals ids","in":"query","name":"linkedDealsIds","schema":{"format":"objectID","type":"string"}},{"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.","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.","in":"query","name":"createdSince","schema":{"type":"string"}},{"description":"Index of the first document of the page","in":"query","name":"page","schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed","in":"query","name":"sort","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The field used to sort field names.","in":"query","name":"sortBy","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of companies","properties":{"items":{"description":"List of companies","items":{"$ref":"#/components/schemas/Company"},"type":"array"}},"type":"object"}}},"description":"Returns companies list with filters"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all Companies","tags":["Companies"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"description":"Attributes for company creation","example":{"domain":"https://example.com","industry":"Fabric","owner":"60e68d60582a3b006f524197"},"type":"object"},"countryCode":{"description":"Country code if phone_number is passed in attributes.","example":91,"format":"int64","type":"integer"},"linkedContactsIds":{"description":"Contact ids to be linked with company","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"linkedDealsIds":{"description":"Deal ids to be linked with company","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"format":"objectID","type":"string"},"type":"array"},"name":{"description":"Name of company","example":"company","type":"string"}},"required":["name"],"type":"object"}}},"description":"Company create data.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Created company id","properties":{"id":{"description":"Unique company id","example":"61a5cd07ca1347c82306ad06","type":"string"}},"required":["id"],"type":"object"}}},"description":"Created new Company"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create a company","tags":["Companies"]}},"/companies/import":{"post":{"description":"Import companies from a CSV file with mapping options.","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) company_id [brevo mongoID to update deals] (b) associated_contact (c) associated_deal (f) any other attribute with internal name\n","example":false,"format":"binary","type":"string"},"mapping":{"description":"The mapping options in JSON format. Here is an example of the JSON structure: ```json {\n  \"link_entities\": true, // Determines whether to link related entities during the import process\n  \"unlink_entities\": false, // Determines whether to unlink related entities during the import process\n  \"update_existing_records\": true, // Determines whether to update based on company ID or treat every row as create\n  \"unset_empty_attributes\": false // Determines whether to unset a specific attribute during update if the values input is blank\n} ```\n","type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"processId":{"description":"The ID of the import process","example":50,"type":"integer"}},"type":"object"}}},"description":"Successfully imported companies"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"example":"Bad request : With reason","type":"string"}},"type":"object"}}},"description":"Bad request"}},"summary":"Import companies(creation and updation)","tags":["Companies"]}},"/companies/link-unlink/{id}":{"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"linkContactIds":{"description":"Contact ids for contacts to be linked with company","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"linkDealsIds":{"description":"Deal ids for deals to be linked with company","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"unlinkContactIds":{"description":"Contact ids for contacts to be unlinked from company","example":[4,5,6],"items":{"format":"int64","type":"integer"},"type":"array"},"unlinkDealsIds":{"description":"Deal ids for deals to be unlinked from company","example":["61a5ce58c5d4795761045994","61a5ce58c5d479576104595","61a5ce58c5d4795761045996"],"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Linked / Unlinked contacts and deals ids.","required":true},"responses":{"204":{"description":"Returns list of company attributes"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Link and Unlink company with contact and deal","tags":["Companies"]}},"/companies/{id}":{"delete":{"parameters":[{"description":"Company ID to delete","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"When company deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Delete a company","tags":["Companies"]},"get":{"parameters":[{"description":"Get Company Details","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"Returns the Company"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get a company","tags":["Companies"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"description":"Attributes for company update","example":{"category":"label_2","date":"2022-05-04T00:00:00+05:30","domain":"xyz","industry":"flipkart","number_of_contacts":1,"number_of_employees":100,"owner":"5b1a17d914b73d35a76ca0c7","phone_number":"81718441912","revenue":10000.34222},"type":"object"},"countryCode":{"description":"Country code if phone_number is passed in attributes.","example":91,"format":"int64","type":"integer"},"linkedContactsIds":{"description":"Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed.","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"linkedDealsIds":{"description":"Warning - Using PATCH on linkedDealsIds replaces the list of linked contacts. Omitted IDs will be removed.","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"format":"objectID","type":"string"},"type":"array"},"name":{"description":"Name of company","example":"company","type":"string"}},"type":"object"}}},"description":"Updated company details.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"Company updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when company id is not found"}},"summary":"Update a company","tags":["Companies"]}},"/crm/attributes":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributeType":{"description":"The type of attribute (must be one of the defined enums)","enum":["text","user","number","single-select","date","boolean","multi-choice"],"example":"single-select","type":"string"},"description":{"description":"A description of the attribute","example":"This is a sample attribute description.","type":"string"},"label":{"description":"The label for the attribute (max 50 characters, cannot be empty)","example":"Attribute Label","type":"string"},"objectType":{"description":"The type of object the attribute belongs to (prefilled with `companies`, mandatory)","enum":["companies","deals"],"example":"companies,deal","type":"string"},"optionsLabels":{"description":"Options for multi-choice or single-select attributes","example":["Option 1","Option 2","Option 3"],"items":{"type":"string"},"type":"array"}},"required":["label","attributeType","objectType"],"type":"object"}}},"description":"Attribute creation data for a company/deal.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"Unique ID of the created attribute","example":"61a5cd07ca1347c82306ad07","type":"string"}},"required":["id"],"type":"object"}}},"description":"Created new attribute"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when invalid data is posted"}},"summary":"Create a company/deal attribute","tags":["Companies","Deals"]}},"/crm/attributes/{id}":{"delete":{"summary":"Delete an attribute","tags":["companies","deals"],"parameters":[{"in":"path","name":"id","required":true,"description":"Attribute ID","schema":{"type":"string"}}],"responses":{"204":{"description":"Attribute deleted successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}}},"patch":{"summary":"Update an attribute","tags":["companies","deals"],"parameters":[{"in":"path","name":"id","required":true,"description":"Attribute ID","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Update an attribute details","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","description":"Attribute display label","example":"New label"},"optionsLabels":{"type":"array","description":"Updated labels for selectable options","items":{"type":"object","additionalProperties":false,"required":["key","value"],"properties":{"key":{"type":"string","description":"Internal option identifier","example":"value_1"},"value":{"type":"string","description":"Display label for the option","example":"Updated value"}}}},"objectType":{"type":"string","description":"The type of object the attribute belongs to, it cannot be updated after creation","enum":["companies","deals"],"example":"companies"}}}}}},"responses":{"204":{"description":"Attribute updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}}}},"/crm/attributes/companies":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of company attributes","items":{"description":"List of attributes","properties":{"attributeOptions":{"items":{"example":{"key":"custom key","value":"custom label"},"type":"object"},"type":"array"},"attributeTypeName":{"example":"text","type":"string"},"internalName":{"example":"name","type":"string"},"isRequired":{"example":true,"type":"boolean"},"label":{"example":"Company Name","type":"string"}},"type":"object"},"type":"array"}}},"description":"Returns list of company attributes"}},"summary":"Get company attributes","tags":["Companies"]}},"/crm/attributes/deals":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of deal attributes","items":{"description":"List of attributes","properties":{"attributeOptions":{"items":{"example":{"key":"custom key","value":"custom label"},"type":"object"},"type":"array"},"attributeTypeName":{"example":"text","type":"string"},"internalName":{"example":"deal_name","type":"string"},"isRequired":{"example":true,"type":"boolean"},"label":{"example":"Deal Name","type":"string"}},"type":"object"},"type":"array"}}},"description":"Returns list of deal attributes"}},"summary":"Get deal attributes","tags":["Deals"]}},"/crm/deals":{"get":{"parameters":[{"description":"Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering.","in":"query","name":"filters[attributes.deal_name]","schema":{"type":"string"}},{"description":"Filter by linked companies ids","in":"query","name":"filters[linkedCompaniesIds]","schema":{"type":"string"}},{"description":"Filter by linked companies ids","in":"query","name":"filters[linkedContactsIds]","schema":{"type":"string"}},{"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.","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.","in":"query","name":"createdSince","schema":{"type":"string"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed","in":"query","name":"sort","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of Deals","properties":{"items":{"description":"List of deals","items":{"$ref":"#/components/schemas/Deal"},"type":"array"}},"type":"object"}}},"description":"Returns deals list with filters"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all deals","tags":["Deals"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"description":"Attributes for deal creation To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you want to create a deal on a specific pipeline and stage you can use the following attributes `pipeline` and `deal_stage`. Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}`\n","example":{"amount":12,"deal_owner":"6093d2425a9b436e9519d034"},"type":"object"},"linkedCompaniesIds":{"description":"Company ids to be linked with deal","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"format":"objectID","type":"string"},"type":"array"},"linkedContactsIds":{"description":"Contact ids to be linked with deal","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"name":{"description":"Name of deal","example":"Deal: Connect with company","type":"string"}},"required":["name"],"type":"object"}}},"description":"Deal create data.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"description":"Created deal id","properties":{"id":{"description":"Unique deal id","example":"61a5cd07ca1347c82306ad06","type":"string"}},"required":["id"],"type":"object"}}},"description":"Created new Deal"},"400":{"description":"Returned when invalid data posted"}},"summary":"Create a deal","tags":["Deals"]}},"/crm/deals/import":{"post":{"description":"Import deals from a CSV file with mapping options.","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name\n","example":false,"format":"binary","type":"string"},"mapping":{"description":"The mapping options in JSON format. Here is an example of the JSON structure: ```json {\n  \"link_entities\": true, // Determines whether to link related entities during the import process\n  \"unlink_entities\": false, // Determines whether to unlink related entities during the import process\n  \"update_existing_records\": true, // Determines whether to update based on company ID or treat every row as create\n  \"unset_empty_attributes\": false // Determines whether to unset a specific attribute during update if the values input is blank\n} ```\n","type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"processId":{"description":"The ID of the import process","example":50,"type":"integer"}},"type":"object"}}},"description":"Successfully imported deals"},"400":{"content":{"application/json":{"schema":{"properties":{"message":{"example":"Bad request : With reason","type":"string"}},"type":"object"}}},"description":"Bad request"}},"summary":"Import deals(creation and updation)","tags":["Deals"]}},"/crm/deals/link-unlink/{id}":{"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"linkCompanyIds":{"description":"Company ids to be linked with deal","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"linkContactIds":{"description":"Contact ids for contacts to be linked with deal","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"unlinkCompanyIds":{"description":"Company ids to be unlinked from deal","example":["61a5ce58c5d4795761045994","61a5ce58c5d479576104595","61a5ce58c5d4795761045996"],"items":{"type":"string"},"type":"array"},"unlinkContactIds":{"description":"Contact ids for contacts to be unlinked from deal","example":[4,5,6],"items":{"format":"int64","type":"integer"},"type":"array"}},"type":"object"}}},"description":"Linked / Unlinked contacts and companies ids.","required":true},"responses":{"204":{"description":"Successfully linked/unlinked contacts/companies with the deal."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when query params are invalid or invalid data provided in request."}},"summary":"Link and Unlink a deal with contacts and companies","tags":["Deals"]}},"/crm/deals/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned when item deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when deal id is not found"}},"summary":"Delete a deal","tags":["Deals"]},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deal"}}},"description":"Returns the deal by id"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when task id is invalid"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get a deal","tags":["Deals"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"attributes":{"description":"Attributes for deal update To assign owner of a Deal you can send attributes.deal_owner and utilize the account email or ID. If you wish to update the pipeline of a deal you need to provide the `pipeline` and the `deal_stage` Pipeline and deal_stage are ids you can fetch using this endpoint `/crm/pipeline/details/{pipelineID}`\n","example":{"amount":12,"deal_owner":"6093d2425a9b436e9519d034"},"type":"object"},"linkedCompaniesIds":{"description":"Warning - Using PATCH on linkedCompaniesIds replaces the list of linked contacts. Omitted IDs will be removed.","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"format":"objectID","type":"string"},"type":"array"},"linkedContactsIds":{"description":"Warning - Using PATCH on linkedContactIds replaces the list of linked contacts. Omitted IDs will be removed.","example":[1,2,3],"items":{"format":"int64","type":"integer"},"type":"array"},"name":{"description":"Name of deal","example":"Deal: Connect with client_dev","type":"string"}},"type":"object"}}},"description":"Updated deal details.","required":true},"responses":{"204":{"description":"Deal updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when deal id is not found"}},"summary":"Update a deal","tags":["Deals"]}},"/crm/files":{"get":{"parameters":[{"description":"Filter by file entity type","in":"query","name":"entity","required":false,"schema":{"enum":["companies","deals","contacts"],"type":"string"}},{"description":"Filter by file entity IDs","in":"query","name":"entityIds","required":false,"schema":{"type":"string"}},{"description":"dateFrom to date range filter type (timestamp in milliseconds)","in":"query","name":"dateFrom","required":false,"schema":{"type":"integer"}},{"description":"dateTo to date range filter type (timestamp in milliseconds)","in":"query","name":"dateTo","required":false,"schema":{"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","required":false,"schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","required":false,"schema":{"default":50,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed","in":"query","name":"sort","required":false,"schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of files","items":{"$ref":"#/components/schemas/FileData"},"type":"array"}}},"description":"Returns files list with filters"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all files","tags":["Files"]},"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"companyId":{"type":"string"},"contactId":{"format":"int64","type":"integer"},"dealId":{"type":"string"},"file":{"description":"File data to create a file.","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileData"}}},"description":"Returns the created File with additional details"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Upload a file","tags":["Files"]}},"/crm/files/{id}":{"delete":{"parameters":[{"description":"File id to delete.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned when file is deleted."},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Delete a file","tags":["Files"]},"get":{"parameters":[{"description":"File id to download.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Downloadable file link","properties":{"fileUrl":{"description":"A unique link to download the requested file.","example":"https://storage.googleapis.com/brevo-app-crm.......-sample.pdf","type":"string"}},"type":"object"}}},"description":"Returns downloadable file link. Valid for next 5 minutes only."},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Download a file","tags":["Files"]}},"/crm/files/{id}/data":{"get":{"parameters":[{"description":"File id to get file data.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileData"}}},"description":"Returned when file is found."},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get file details","tags":["Files"]}},"/crm/notes":{"get":{"parameters":[{"description":"Filter by note entity type","in":"query","name":"entity","schema":{"enum":["companies","deals","contacts"],"type":"string"}},{"description":"Filter by note entity IDs","in":"query","name":"entityIds","schema":{"type":"string"}},{"description":"dateFrom to date range filter type (timestamp in milliseconds)","in":"query","name":"dateFrom","schema":{"type":"integer"}},{"description":"dateTo to date range filter type (timestamp in milliseconds)","in":"query","name":"dateTo","schema":{"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed","in":"query","name":"sort","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of notes","items":{"$ref":"#/components/schemas/Note"},"type":"array"}}},"description":"Returns notes list with filters"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all notes","tags":["Notes"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteData"}}},"description":"Note data to create a note.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Updated Note ID","properties":{"id":{"description":"Unique note Id","example":"61a5cd07ca1347c82306ad09","type":"string"}},"type":"object"}}},"description":"Created new note"},"400":{"$ref":"#/components/responses/errorModel"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Format is not supported"}},"summary":"Create a note","tags":["Notes"]}},"/crm/notes/{id}":{"delete":{"parameters":[{"description":"Note ID to delete","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned when item deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Delete a note","tags":["Notes"]},"get":{"parameters":[{"description":"Note ID to get","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"Returns the Note by id"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get a note","tags":["Notes"]},"patch":{"parameters":[{"description":"Note ID to update","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteData"}}},"description":"Note data to update a note.","required":true},"responses":{"204":{"description":"Note updated successfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Format is not supported"}},"summary":"Update a note","tags":["Notes"]}},"/crm/pipeline/details":{"get":{"deprecated":true,"description":"This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipeline"}}},"description":"Returns list of pipeline stages"}},"summary":"Get pipeline stages","tags":["Deals"]}},"/crm/pipeline/details/all":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipelines"}}},"description":"Returns list of pipelines and and there details"},"400":{"content":{"application/json":{"examples":{"Pipeline Not Exist":{"value":{"message":"Pipeline not found"}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when pipeline id is invalid or does not exist"}},"summary":"Get all pipelines","tags":["Deals"]}},"/crm/pipeline/details/{pipelineID}":{"get":{"parameters":[{"in":"path","name":"pipelineID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pipelines"}}},"description":"Returns pipeline and its details"},"400":{"content":{"application/json":{"examples":{"Pipeline Not Exist":{"value":{"message":"Pipeline not found"}}},"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when pipeline id is invalid or does not exist"}},"summary":"Get a pipeline","tags":["Deals"]}},"/crm/tasks":{"get":{"parameters":[{"description":"Filter by task type (ID)","in":"query","name":"filter[type]","schema":{"type":"string"}},{"description":"Filter by task status","in":"query","name":"filter[status]","schema":{"enum":["done","undone"],"type":"string"}},{"description":"Filter by date","in":"query","name":"filter[date]","schema":{"enum":["overdue","today","tomorrow","week","range"],"type":"string"}},{"description":"Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute.","in":"query","name":"filter[assignTo]","schema":{"type":"string"}},{"description":"Filter by contact ids","in":"query","name":"filter[contacts]","schema":{"type":"string"}},{"description":"Filter by deals ids","in":"query","name":"filter[deals]","schema":{"type":"string"}},{"description":"Filter by companies ids","in":"query","name":"filter[companies]","schema":{"type":"string"}},{"description":"dateFrom to date range filter type (timestamp in milliseconds)","in":"query","name":"dateFrom","schema":{"type":"integer"}},{"description":"dateTo to date range filter type (timestamp in milliseconds)","in":"query","name":"dateTo","schema":{"type":"integer"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"format":"int64","type":"integer"}},{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","type":"integer"}},{"description":"Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed","in":"query","name":"sort","schema":{"enum":["asc","desc"],"type":"string"}},{"description":"The field used to sort field names.","example":"name","in":"query","name":"sortBy","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"List of tasks","properties":{"items":{"description":"List of tasks","items":{"$ref":"#/components/schemas/Task"},"type":"array"}},"type":"object"}}},"description":"Returns task list with filters"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all tasks","tags":["Tasks"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignToId":{"description":"To assign a task to a user you can use either the account email or ID.","example":"5faab4b7f195bb3c4c31e62a","type":"string"},"companiesIds":{"description":"Companies ids for companies a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"contactsIds":{"description":"Contact ids for contacts linked to this task","example":[1,2,3],"items":{"type":"integer"},"type":"array"},"date":{"description":"Task due date and time","example":"2021-11-01T17:44:54.668Z","format":"date-time","type":"string"},"dealsIds":{"description":"Deal ids for deals a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"done":{"description":"Task marked as done","example":false,"type":"boolean"},"duration":{"description":"Duration of task in milliseconds [1 minute = 60000 ms]","example":600000,"format":"int64","minimum":0,"type":"integer"},"name":{"description":"Name of task","example":"Task: Connect with client_dev","type":"string"},"notes":{"description":"Notes added to a task","example":"In communication with client_dev for resolution of queries.","type":"string"},"reminder":{"$ref":"#/components/schemas/TaskReminder"},"taskTypeId":{"description":"Id for type of task e.g Call / Email / Meeting etc.","example":"61a5cd07ca1347c82306ad09","type":"string"}},"required":["name","taskTypeId","date"],"type":"object"}}},"description":"Task name.","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"description":"Task Details","properties":{"id":{"description":"Unique task id","example":"61a5cd07ca1347c82306ad06","type":"string"}},"required":["id"],"type":"object"}}},"description":"Created new task"},"400":{"description":"Returned when invalid data posted"}},"summary":"Create a task","tags":["Tasks"]}},"/crm/tasks/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned when item deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when task id is not found"}},"summary":"Delete a task","tags":["Tasks"]},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Returns the Task by id"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when task id is invalid"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when item not found"}},"summary":"Get a task","tags":["Tasks"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assignToId":{"description":"To assign a task to a user you can use either the account email or ID.","example":"5faab4b7f195bb3c4c31e62a","type":"string"},"companiesIds":{"description":"Companies ids for companies a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"contactsIds":{"description":"Contact ids for contacts linked to this task","example":[1,2,3],"items":{"type":"integer"},"type":"array"},"date":{"description":"Task date/time","example":"2021-11-01T17:44:54.668Z","format":"date-time","type":"string"},"dealsIds":{"description":"Deal ids for deals a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"done":{"description":"Task marked as done","example":false,"type":"boolean"},"duration":{"description":"Duration of task in milliseconds [1 minute = 60000 ms]","example":600000,"format":"int64","type":"integer"},"name":{"description":"Name of task","example":"Task: Connect with client_dev","type":"string"},"notes":{"description":"Notes added to a task","example":"In communication with client_dev for resolution of queries.","type":"string"},"reminder":{"$ref":"#/components/schemas/TaskReminder"},"taskTypeId":{"description":"Id for type of task e.g Call / Email / Meeting etc.","example":"61a5cd07ca1347c82306ad09","type":"string"}},"type":"object"}}},"description":"Updated task details.","required":true},"responses":{"204":{"description":"Task updated succussfully"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Returned when task id is not found"}},"summary":"Update a task","tags":["Tasks"]}},"/crm/tasktypes":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"description":"Task types details","properties":{"id":{"description":"Id of task type","example":"61a88a2eb7a574180261234","type":"string"},"title":{"description":"Title of task type","example":"Email","type":"string"}},"type":"object"}}},"description":"Returns all the Task types"}},"summary":"Get all task types","tags":["Tasks"]}},"/whatsapp/sendMessage":{"post":{"description":"This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)","operationId":"sendWhatsappMessage","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"contactNumbers":{"description":"List of phone numbers of the contacts","items":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"},"type":"array"},"params":{"description":"Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}.","example":{"FNAME":"Joe","LNAME":"Doe"},"type":"object"},"senderNumber":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"},"templateId":{"description":"ID of the template to send","example":123,"type":"integer"}},"required":["senderNumber","templateId","contactNumbers"],"type":"object"},{"properties":{"contactNumbers":{"description":"List of phone numbers of the contacts","items":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"},"type":"array"},"senderNumber":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"},"text":{"description":"Text to be sent as message body (will be overridden if templateId is passed in the same request)","example":"Hi! There i am a message","type":"string"}},"required":["senderNumber","contactNumbers","authType","text"],"type":"object"}]}}},"description":"Values to send WhatsApp message","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"messageId":{"description":"messageId of sent message","example":"23befbae-1505-47a8-bd27-e30ef739f32c","format":"uuidv4","type":"string"}},"required":["messageId"],"type":"object"}}},"description":"successfully created"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send a WhatsApp message","tags":["Transactional WhatsApp"]}},"/whatsapp/statistics/events":{"get":{"description":"This endpoint will show the unaggregated statistics for WhatsApp activity (30 days by default if `startDate` and `endDate` or `days` is not passed. The date range can not exceed 90 days)","operationId":"getWhatsappEventReport","parameters":[{"description":"Number limitation for the result returned","in":"query","name":"limit","schema":{"default":2500,"format":"int64","maximum":10000,"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). _Not compatible with 'startDate' and 'endDate'_\n","in":"query","name":"days","schema":{"format":"int64","type":"integer"}},{"description":"Filter results for specific contact (WhatsApp Number with country code. Example, 85264318721)","in":"query","name":"contactNumber","schema":{"format":"mobile","type":"string"}},{"description":"Filter the report for a specific event type","in":"query","name":"event","schema":{"enum":["sent","delivered","read","error","unsubscribe","reply","soft-bounce"],"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":{"events":[{"contactNumber":919876543211,"date":"2017-03-12T12:30:00Z","event":"sent","messageId":"23befbae-1505-47a8-bd27-e30ef739f32c","senderNumber":919876543210},{"contactNumber":919876543211,"date":"2017-03-12T12:30:00Z","event":"error","messageId":"23befbae-1505-47a8-bd27-e30ef739f32c","reason":"error reason","senderNumber":919876543210},{"contactNumber":919876543211,"date":"2017-03-12T12:30:00Z","event":"soft-bounce","messageId":"23befbae-1505-47a8-bd27-e30ef739f32c","reason":"invalid whatsapp contact","senderNumber":919876543210},{"body":"body only in case of text reply & url will be empty","contactNumber":919876543211,"date":"2017-03-12T12:30:00Z","event":"reply","mediaUrl":"media url only in case media reply & body will be empty","messageId":"23befbae-1505-47a8-bd27-e30ef739f32c","senderNumber":919876543210}]}}},"schema":{"properties":{"events":{"items":{"properties":{"body":{"description":"Text of the reply (will be there only in case of `reply` event with text)","example":"Hi! I am a reply","type":"string"},"contactNumber":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"},"date":{"description":"UTC date-time on which the event has been generated","example":"2017-03-12T12:30:00Z","type":"string"},"event":{"description":"Event which occurred","enum":["sent","delivered","read","error","unsubscribe","reply","soft-bounce"],"example":"delivered","type":"string"},"mediaUrl":{"description":"Url of the media reply (will be there only in case of `reply` event with media)","example":"https://example.com/media.png","format":"url","type":"string"},"messageId":{"description":"Message ID which generated the event","example":"23befbae-1505-47a8-bd27-e30ef739f32c","type":"string"},"reason":{"description":"Reason for the event (will be there in case of `error` and `soft-bounce` events)","example":"23befbae-1505-47a8-bd27-e30ef739f32c","type":"string"},"senderNumber":{"description":"WhatsApp Number with country code. Example, 85264318721","example":919876543210,"format":"mobile","type":"string"}},"required":["contactNumber","date","messageId","event","senderNumber"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"WhatsApp events report"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all your WhatsApp activity (unaggregated events)","tags":["Transactional WhatsApp"]}},"/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":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of blocked or unsubscribed transactional contacts","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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"summary":"Unblock or resubscribe a transactional contact","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"}},"summary":"Get the list of blocked domains","tags":["Transactional emails"]},"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Add a new domain to the list of blocked domains","tags":["Transactional emails"]}},"/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":{"$ref":"#/components/responses/errorModel"},"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":{"204":{"content":{},"description":"Hardbounces deleted"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Delete hardbounces","tags":["Transactional emails"]}},"/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":{"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":{"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":{"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":{"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":{"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":{"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Send a transactional email","tags":["Transactional emails"]}},"/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 (Should be a valid UUIDv4) or the `messageId` of scheduled email.","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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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 (Should be a valid UUIDv4) or the `messageId` of scheduled email.","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. Can be maximum 30 days older tha 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":{"$ref":"#/components/responses/errorModel"},"404":{"$ref":"#/components/responses/errorModel"}},"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of transactional emails on the basis of allowed filters","tags":["Transactional emails"]}},"/smtp/emails/{uuid}":{"get":{"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":["attachmentCount","body","date","email","events","subject"],"type":"object"}}},"description":"Transactional email content"}},"summary":"Get the personalized content of a sent transactional email","tags":["Transactional emails"]}},"/smtp/log/{identifier}":{"delete":{"parameters":[{"description":"MessageId of the transactional log(s) to delete","in":"path","name":"identifier","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{},"description":"Transactional Logs deleted"},"400":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Message ID not found"}},"summary":"Delete an SMTP transactional log","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). _Not compatible with 'startDate' and 'endDate'_\n","in":"query","name":"days","schema":{"format":"int64","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":{"$ref":"#/components/responses/errorModel"}},"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). _Not compatible with 'startDate' and 'endDate'_\n","in":"query","name":"days","schema":{"format":"int64","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_dev 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":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all your transactional email activity (unaggregated events)","tags":["Transactional emails"]}},"/smtp/statistics/reports":{"get":{"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). _Not compatible with 'startDate' and 'endDate'_\n","in":"query","name":"days","schema":{"format":"int64","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":{"$ref":"#/components/responses/errorModel"}},"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Generate the rendered preview of transactional template","tags":["Transactional emails"]}},"/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"}}],"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":{"$ref":"#/components/responses/errorModel"}},"summary":"Get the list of email templates","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":{"$ref":"#/components/responses/createModel"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Create an email template","tags":["Transactional emails"]}},"/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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Delete an inactive email template","tags":["Transactional emails"]},"get":{"operationId":"getSmtpTemplate","parameters":[{"description":"id of the template","in":"path","name":"templateId","required":true,"schema":{"format":"int64","type":"integer"}}],"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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Returns the template information","tags":["Transactional emails"]},"put":{"operationId":"updateSmtpTemplate","parameters":[{"description":"id of the template","in":"path","name":"templateId","required":true,"schema":{"format":"int64","type":"integer"}}],"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":{"$ref":"#/components/responses/errorModel"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"Template ID not found"}},"summary":"Update an email template","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","tags":["Transactional emails"]}},"/transactionalSMS/send":{"post":{"operationId":"sendAsyncTransactionalSms","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendTransacSms"}}},"description":"Values to send a transactional SMS","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"messageId":{"example":1511882900176220,"format":"int64","type":"integer"}},"required":["messageId"],"type":"object"}}},"description":"SMS has been sent successfully to the recipient"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Send SMS message asynchronously to a mobile number","tags":["Transactional SMS"]}},"/transactionalSMS/sms":{"post":{"operationId":"sendTransacSms","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendTransacSms"}}},"description":"Values to send a transactional SMS","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"messageId":{"example":1511882900176220,"format":"int64","type":"integer"},"reference":{"example":"ab1cde2fgh3i4jklmno","type":"string"},"remainingCredits":{"description":"Remaining SMS credits of the user","example":82.85,"format":"float","type":"number"},"smsCount":{"description":"Count of SMS's to send multiple text messages","example":2,"format":"int64","type":"integer"},"usedCredits":{"description":"SMS credits used per text message","example":0.7,"format":"float","type":"number"}},"required":["messageId","reference"],"type":"object"}}},"description":"SMS has been sent successfully to the recipient"},"400":{"$ref":"#/components/responses/errorModel"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorModel"}}},"description":"You don't have enough credit to send your SMS. Please update your plan"}},"summary":"Send SMS message to a mobile number","tags":["Transactional SMS"],"x-codegen-request-body-name":"sendTransacSms"}},"/transactionalSMS/statistics/aggregatedReport":{"get":{"operationId":"getTransacAggregatedSmsReport","parameters":[{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of days in the past including today (positive integer). **Not compatible with startDate and endDate**\n","in":"query","name":"days","schema":{"format":"int64","type":"integer"}},{"description":"Filter on a tag","in":"query","name":"tag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"accepted":6,"blocked":4,"delivered":16,"hardBounces":5,"range":"2015-05-22|2017-11-29","rejected":14,"replied":8,"requests":54,"skipped":1,"softBounces":26,"unsubscribed":10}}},"schema":{"properties":{"accepted":{"description":"Number of accepted SMS for the timeframe","example":252,"format":"int64","type":"integer"},"blocked":{"description":"Number of blocked contact for the timeframe","example":2,"format":"int64","type":"integer"},"delivered":{"description":"Number of delivered SMS for the timeframe","example":249,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hardbounces for the timeframe","example":1,"format":"int64","type":"integer"},"range":{"description":"Time frame of the report","example":"2016-09-08|2017-04-06","type":"string"},"rejected":{"description":"Number of rejected SMS for the timeframe","example":8,"format":"int64","type":"integer"},"replied":{"description":"Number of answered SMS for the timeframe","example":12,"format":"int64","type":"integer"},"requests":{"description":"Number of requests for the timeframe","example":263,"format":"int64","type":"integer"},"skipped":{"description":"Number of skipped SMS for the timeframe","example":1,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounces for the timeframe","example":4,"format":"int64","type":"integer"},"unsubscribed":{"description":"Number of unsubscription for the timeframe","example":6,"format":"int64","type":"integer"}},"type":"object"}}},"description":"Aggregated SMS report informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get your SMS activity aggregated over a period of time","tags":["Transactional SMS"]}},"/transactionalSMS/statistics/events":{"get":{"operationId":"getSmsEvents","parameters":[{"description":"Number of documents per page","in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"minimum":0,"type":"integer"}},{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Index of the first document of the page","in":"query","name":"offset","schema":{"default":0,"format":"int64","type":"integer"}},{"description":"Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'**\n","in":"query","name":"days","schema":{"format":"int64","type":"integer"}},{"description":"Filter the report for a specific phone number","in":"query","name":"phoneNumber","schema":{"type":"string"}},{"description":"Filter the report for specific events","in":"query","name":"event","schema":{"enum":["bounces","hardBounces","softBounces","delivered","sent","accepted","unsubscription","replies","blocked","rejected","skipped"],"type":"string"}},{"description":"Filter the report for specific tags passed as a serialized urlencoded array","in":"query","name":"tags","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":{"events":[{"date":"2015-05-20T12:30:00Z","event":"sent","messageId":"1473139351170140","phoneNumber":911059469013,"reason":"Recipient is currently unreachable","tag":"cabWaiting"},{"date":"2015-05-20T16:30:00Z","event":"delivered","messageId":"1473139351170140","phoneNumber":911059469013,"reason":"Recipient is currently unreachable","tag":"cabRequest"}]}}},"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"},"event":{"description":"Event which occurred","enum":["bounces","hardBounces","softBounces","delivered","sent","accepted","unsubscription","replies","blocked","rejected","skipped"],"example":"accepted","type":"string"},"messageId":{"description":"Message ID which generated the event","example":"1472640582425378","type":"string"},"phoneNumber":{"description":"Phone number which has generated the event","example":189001094,"type":"string"},"reason":{"description":"Reason of bounce (only available if the event is hardbounce or softbounce)","example":"Message is undeliverable due to an incorrect / invalid / blacklisted / permanently barred MSISDN for this operator","type":"string"},"reply":{"type":"string"},"tag":{"description":"Tag of the SMS which generated the event","example":"CabWaiting","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Sms events report informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get all your SMS activity (unaggregated events)","tags":["Transactional SMS"]}},"/transactionalSMS/statistics/reports":{"get":{"operationId":"getTransacSmsReport","parameters":[{"description":"**Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the report\n","in":"query","name":"startDate","schema":{"type":"string"}},{"description":"**Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the report\n","in":"query","name":"endDate","schema":{"type":"string"}},{"description":"Number of days in the past including today (positive integer). **Not compatible with 'startDate' and 'endDate'**\n","in":"query","name":"days","schema":{"format":"int64","type":"integer"}},{"description":"Filter on a tag","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":[{"accepted":2318,"blocked":1026,"date":"2017-04-30","delivered":10103,"hardBounces":21,"rejected":0,"replied":5091,"requests":10756,"skipped":1,"softBounces":137,"unsubscribed":720},{"accepted":4393,"blocked":1514,"date":"2017-05-01","delivered":17499,"hardBounces":34,"rejected":0,"replied":10089,"requests":18812,"skipped":0,"softBounces":254,"unsubscribed":1090},{"accepted":4689,"blocked":1646,"date":"2017-05-02","delivered":13427,"hardBounces":16,"rejected":0,"replied":11563,"requests":14321,"skipped":1,"softBounces":176,"unsubscribed":1170}]}}},"schema":{"properties":{"reports":{"items":{"properties":{"accepted":{"description":"Number of accepted SMS for the date","example":85,"format":"int64","type":"integer"},"blocked":{"description":"Number of blocked contact for the date","example":0,"format":"int64","type":"integer"},"date":{"description":"Date for which statistics are retrieved","example":"2017-03-17","format":"date","type":"string"},"delivered":{"description":"Number of delivered SMS for the date","example":85,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hardbounces for the date","example":1,"format":"int64","type":"integer"},"rejected":{"description":"Number of rejected SMS for the date","example":1,"format":"int64","type":"integer"},"replied":{"description":"Number of answered SMS for the date","example":2,"format":"int64","type":"integer"},"requests":{"description":"Number of requests for the date","example":87,"format":"int64","type":"integer"},"skipped":{"description":"Number of skipped SMS for the date","example":1,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounces for the date","example":1,"format":"int64","type":"integer"},"unsubscribed":{"description":"Number of unsubscription for the date","example":1,"format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Aggregated SMS report informations"},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Get your SMS activity aggregated per day","tags":["Transactional SMS"]}},"/transactionalSMS/templates":{"get":{"operationId":"getSMSTemplates","parameters":[{"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 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"}}],"responses":{"200":{"description":"transactional sms templates informations","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"description":"Count of transactional sms templates","example":1,"format":"int64","type":"integer"},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"description":"ID of the template","example":4,"format":"int64","type":"integer"},"name":{"description":"Name of the template","example":"Order Confirmation - EN","type":"string"},"short_url_enabled":{"description":"URL shortening is enabled","type":"boolean","example":false},"message":{"description":"message content for the sms","example":"Thanks for your order !","type":"string"},"compliance":{"type":"object","description":"Manage US compliance","properties":{"compliance_toggle":{"type":"boolean","description":"US compliance is enabled.","example":true},"organisation_prefix":{"type":"string","description":"A recognizable prefix will ensure your audience knows who you are. Recommended by the U.S. carriers.","example":"BREVO"},"stop_keyword":{"type":"string","description":"Instructions to unsubscribe from future communications. Must include STOP keyword.","example":"STOP"}}},"encryption":{"type":"boolean","description":"Enable Unicode encryption."},"unicode_sms":{"type":"boolean","description":"Support unicode characters in the sms.","example":true},"media_file":{"type":"string","example":"brv-logo.png","description":"file name of the media."},"media_file_size":{"type":"string","example":39752,"description":"file size in bytes."},"media_url":{"type":"string","example":"https://img-st2.mailinblue.com/1232/images/content_library/original/69282fe28f55fd22de6e0cf9.png","description":"URL of the image."},"createdAt":{"description":"Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2025-05-01T12:30:00Z","type":"string"},"updatedAt":{"description":"Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2025-05-01T12:30:00Z","type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/errorModel"}},"summary":"Return all your created SMS templates","tags":["SMS Templates"]}}},"components":{"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"},"partner-key":{"description":"The partner key should be passed in the request headers as `partner-key` along with `api-key` pair for successful authentication of partner (Optional).","in":"header","name":"partner-key","type":"apiKey"}},"schemas":{"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"},"getSsoToken":{"properties":{"token":{"description":"Session token, it will remain valid for 15 days.","example":"ede520dxxxxxxxxxxxx76d631fba2","type":"string"}},"required":["token"],"type":"object"},"inviteuser":{"properties":{"all_features_access":{"description":"All access to the features","enum":[true,false],"example":true,"type":"boolean"},"email":{"description":"Email address for the organization","example":"inviteuser@example.com","format":"email","type":"string"},"privileges":{"items":{"description":"Privileges given to the user","example":[{"feature":"email_campaigns","permissions":["create_edit_delete","send_schedule_suspend"]},{"feature":"sms_campaigns","permissions":["create_edit_delete","send_schedule_suspend"]}],"properties":{"feature":{"description":"Feature name","enum":["email_campaigns","sms_campaigns","contacts","templates","workflows","landing_pages","transactional_emails","smtp_api","user_management","sales_platform","phone","conversations","senders_domains_dedicated_ips","push_notifications","companies"],"example":"email_campaigns","type":"string"},"permissions":{"description":"Permissions for a given feature","items":{"enum":["create_edit_delete","send_schedule_suspend","view","import","export","list_and_attributes","forms","activate_deactivate","activate_deactivate_pause","settings","schedule_pause","all","logs","access","assign","configure","create_edit_deals","delete_deals","manage_others_deals_tasks","manage_owned_companies","manage_others_companies","reports","senders_management","domains_management","dedicated_ips_management","send","smtp","api_keys","authorized_ips","none"],"example":"'create_edit_delete', 'send_schedule_suspend'","type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"required":["email","all_features_access","privileges"],"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"},"channel":{"default":"email","description":"channel of webhook","enum":["sms","email"],"example":"email","type":"string"},"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 or transactional)","enum":["marketing","transactional"],"example":"marketing","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"},"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"}},"required":["attributes","createdAt","emailBlacklisted","id","listIds","modifiedAt","smsBlacklisted"],"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"},"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"},"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"},"createUpdateFolder":{"properties":{"name":{"description":"Name of the folder","example":"Wordpress Contacts","type":"string"}},"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"},"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_dev, applied to all delivered emails","example":560,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of harbounce 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 client_dev","example":5661,"format":"int64","type":"integer"},"trackableViewsRate":{"description":"Rate of recipients without any privacy protection option enabled in their email client_dev","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"},"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"},"ConversationsMessage":{"description":"a Conversations message","properties":{"agentId":{"description":"ID of the agent on whose behalf the message was sent (only in messages sent by an agent).","example":"d9nKoegKSjmCtyK78","type":"string"},"agentName":{"description":"Agent’s name as displayed to the visitor. Only in the messages sent by an agent.","example":"Liz","type":"string"},"agentUserpic":{"description":"Only set if the agent has uploaded a profile picture.","example":"https://www.brevo.com/","type":"string"},"attachments":{"description":"An array of file attachments.","items":{"properties":{"fileName":{"description":"The name of the file.","type":"string"},"inlineId":{"description":"The ID of the inline file.","type":"string"},"isImage":{"description":"`true` for images.","type":"boolean"},"isInline":{"description":"`true` for inline files.","type":"string"},"size":{"description":"The size of the file in bytes.","format":"int64","type":"integer"},"url":{"description":"The URL of the file.","type":"string"}},"type":"object"},"type":"array"},"bcc":{"description":"An array containing details of the blind carbon copy (BCC) recipients (applicable only to messages in email threads).","items":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"cc":{"description":"An array containing details of the carbon copy (CC) recipients (applicable only to messages in email threads).","items":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"createdAt":{"description":"Timestamp in milliseconds.","example":1470222622433,"format":"int64","minimum":0,"type":"integer"},"file":{"properties":{"filename":{"description":"Name of the file","example":"conversations.png","type":"string"},"imageInfo":{"description":"image info is passed in case the file is an image","properties":{"height":{"description":"height of the image","example":525,"format":"int64","minimum":0,"type":"integer"},"previewUrl":{"description":"URL of the preview","example":"https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/","format":"url","type":"string"},"width":{"description":"Width of the image","example":1129,"format":"int64","minimum":0,"type":"integer"}},"type":"object"},"isImage":{"description":"Whether the file is an image","example":true,"type":"boolean"},"size":{"description":"Size in bytes","example":15538,"format":"int64","minimum":0,"type":"integer"},"url":{"description":"URL of the file","example":"https://ucarecdn.com/cee5c10c-8302-45c1-b1fb-43860ca941a9/","format":"url","type":"string"}},"type":"object"},"forwardedToSourceStatus":{"description":"Status of the message forwarding to the source.","properties":{"error":{"type":"string"},"isSuccess":{"type":"boolean"}},"type":"object"},"from":{"description":"An object containing details about the email sender (applicable only to messages in email threads).","properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"html":{"description":"The HTML content of the message.","example":"Good morning!<br>How can I help you?","type":"string"},"id":{"description":"Message ID. It can be used for further manipulations with the message.","example":"eYBEm3gq3zc5ayE2g","type":"string"},"integrations":{"description":"Integration details.","type":"object"},"isBot":{"description":"`true` for automated messages generated by an AI bot.","type":"boolean"},"isMissed":{"description":"`true` for missed and offline messages.","example":false,"type":"boolean"},"isMissedByVisitor":{"description":"`true` for unread agent’s messages in finished chats.","example":false,"type":"boolean"},"isPushed":{"description":"`true` for pushed messages","example":true,"type":"boolean"},"isTrigger":{"description":"`true` for automatic messages from “Targeted chats & triggers” and API (https://developers.brevo.com/docs/javascript-api-reference#sendautomessage)","example":false,"type":"boolean"},"rawUnsafeHtml":{"description":"Unescaped HTML content of the message (may include unsafe HTML).","example":"Good morning!<br>How can I help you?","type":"string"},"receivedFrom":{"description":"In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop.","example":"SuperAwesomeHelpdesk","type":"string"},"replyTo":{"description":"An object containing details of the reply-to email address (applicable only to messages in email threads).","properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"sourceMessageId":{"description":"The ID of the message assigned by the integration source.","type":"string"},"subject":{"description":"The subject line of the email message (only for messages sent to email threads).","example":"Invitation to a meeting","type":"string"},"text":{"description":"Message text or name of the attached file","example":"Good morning! How can I help you?","type":"string"},"to":{"description":"An array containing details of the recipients (applicable only to messages in email threads).","items":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"type":{"description":"`\"agent\"` for agents’ messages, `\"visitor\"` for visitors’ messages.","enum":["agent","visitor"],"example":"agent","type":"string"},"visitorId":{"description":"visitor’s ID","example":"kZMvWhf8npAu3H6qd57w2Hv6nh6rnxvg","type":"string"}},"type":"object"},"getCategoryDetails":{"properties":{"createdAt":{"description":"Creation UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Category ID for which you requested the details","example":"C11","format":"string","type":"string"},"isDeleted":{"description":"category deleted from the shop's database","example":true,"format":"string","type":"boolean"},"modifiedAt":{"description":"Last modification UTC date-time of the category (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"name":{"description":"Name of the category for which you requested the details","example":"Electronics","format":"string","type":"string"},"url":{"description":"URL to the category","example":"http://mydomain.com/category/clothing","format":"string","type":"string"}},"required":["id","name","createdAt","modifiedAt","isDeleted"],"type":"object"},"getCouponCollection":{"properties":{"createdAt":{"description":"Datetime on which the collection was created.","example":"2023-01-06T05:03:47.053000000Z","format":"date-time","type":"string"},"defaultCoupon":{"description":"The default coupon of the collection.","example":"10 OFF","type":"string"},"expirationDate":{"description":"Expiration date for the coupon collection in RFC3339 format.","example":"2024-01-01T00:00:00Z","format":"date-time","type":"string"},"id":{"description":"The id of the collection.","example":"23befbae-1505-47a8-bd27-e30ef739f32c","format":"uuidv4","type":"string"},"name":{"description":"The name of the collection.","example":"SummerPromotions","format":"uuidv4","type":"string"},"remainingCoupons":{"description":"Number of coupons that have not been sent yet.","example":5000,"format":"int64","type":"integer"},"remainingCouponsAlert":{"description":"If present, an email notification is going to be sent when the total number of available coupons falls below the defined threshold.","example":5,"type":"integer"},"remainingDaysAlert":{"description":"If present, an email notification is going to be sent the defined amount of days before to the expiration date.","example":5,"type":"integer"},"totalCoupons":{"description":"Total number of coupons in the collection.","example":10000,"format":"int64","type":"integer"}},"required":["id","name","defaultCoupon","createdAt","totalCoupons","remainingCoupons"],"type":"object"},"ConversionSourceMetrics":{"properties":{"averageBasket":{"format":"float","type":"number"},"conversionSource":{"enum":["email_campaign","sms_campaign","automation_workflow_email","automation_workflow_sms"],"type":"string"},"id":{"format":"integer","type":"number"},"ordersCount":{"format":"integer","type":"number"},"revenue":{"format":"float","type":"number"}},"required":["id","conversionSource","ordersCount","revenue","averageBasket"],"type":"object"},"order":{"properties":{"amount":{"description":"Total amount of the order, including all shipping expenses, tax and the price of items.","example":308.42,"type":"number"},"billing":{"description":"Billing details of an order.","properties":{"address":{"description":"Full billing address.","example":"15 Somewhere Road, Brynmenyn","type":"string"},"city":{"description":"Exact city of the address.","example":"Basel","type":"string"},"country":{"description":"Billing country name.","example":"Canada","type":"string"},"countryCode":{"description":"Billing country 2-letter ISO code.","example":"CA","type":"string"},"paymentMethod":{"description":"How the visitor will pay for the item(s), e.g. paypal, check, etc.","example":"PayPal","type":"string"},"phone":{"description":"Billing phone number.","example":"01559 032133","type":"string"},"postCode":{"description":"Postcode for delivery and billing.","example":"4052","type":"string"},"region":{"description":"Exact region (state/province) for delivery and billing.","example":"Northwestern Switzerland","type":"string"}},"type":"object"},"coupons":{"description":"Coupons applied to the order. Stored case insensitive.","example":["EASTER15OFF"],"items":{"type":"string"},"type":"array"},"createdAt":{"description":"Event occurrence UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when order is actually created.","example":"2021-07-29T20:59:23.383Z","type":"string"},"id":{"description":"Unique ID of the order.","example":"14","type":"string"},"identifiers":{"description":"Identifies the contact associated with the order.","properties":{"email_id":{"description":"Email of the contact associated with the order","example":"example@brevo.com","type":"string"},"ext_id":{"description":"ext_id associated with the order","example":"ext_id_1","type":"string"},"loyalty_subscription_id":{"description":"loyalty_subscription_id associated with the order","example":"loyalty_id_1","type":"string"},"phone_id":{"description":"Phone number of the contact associated with the order","example":"01559 032133","type":"string"}},"type":"object"},"metaInfo":{"additionalProperties":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}]},"description":"Meta data of order to store additional detal such as custom message, customer type, source.","example":{"customer_loyalty_tier":"Gold","gift_message":"Happy Birthday!","order_source":"Website"},"type":"object"},"products":{"items":{"description":"Details for the Products in an order.","properties":{"price":{"description":"The price of a unit of product","example":99.99,"type":"number"},"productId":{"description":"ID of the product.","example":"P1","type":"string"},"quantity":{"description":"How many pieces of the product the visitor has added to the cart.","example":10,"type":"number"},"variantId":{"description":"Product ID of the red color shirts.","example":"P100","type":"string"}},"required":["productId","quantity","price"],"type":"object"},"type":"array"},"status":{"description":"State of the order.","example":"completed","type":"string"},"storeId":{"description":"ID of store where the order is placed","example":"ST-21","type":"string"},"updatedAt":{"description":"Event updated UTC date-time (YYYY-MM-DDTHH:mm:ssZ), when the status of the order is actually changed/updated.","example":"2021-07-30T10:59:23.383Z","type":"string"}},"required":["id","createdAt","updatedAt","status","amount","products"],"type":"object"},"cart":{"description":"Specify the payment currency and amount.\n","properties":{"currency":{"description":"Currency code for the payment amount.\n","enum":["EUR"],"example":"EUR","type":"string"},"specificAmount":{"description":"Payment amount, in cents. e.g. if you want to request €12.00, then the amount in cents is 1200.\n","example":1200,"format":"int64","type":"integer"}},"required":["currency","specificAmount"],"type":"object"},"configuration":{"description":"Optional. Redirect contact to a custom success page once payment is successful. If empty the default Brevo page will be displayed once a payment is validated\n","properties":{"customSuccessUrl":{"description":"Absolute URL of the custom success page.\n","example":"https://my-company.com/payment-success","format":"url","type":"string"}},"required":["customSuccessUrl"]},"notification":{"description":"Optional. Use this object if you want to let Brevo send an email to the contact, with the payment request URL. If empty, no notifications (message and reminders) will be sent.\n","properties":{"channel":{"description":"Channel used to send the notifications.\n","enum":["email"],"example":"email","type":"string"},"text":{"description":"Use this field if you want to give more context to your contact about the payment request.\n","example":"Please pay for your yoga class.","type":"string"}},"required":["channel","text"],"type":"object"},"getProductDetails":{"properties":{"categories":{"description":"Category ID-s of the product","items":{"type":"string"},"type":"array"},"createdAt":{"description":"Creation UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"id":{"description":"Product ID for which you requested the details","example":"P11","format":"string","type":"string"},"imageUrl":{"description":"Absolute URL to the cover image of the product","example":"http://mydomain.com/product-absoulte-url/img.jpeg","format":"string","type":"string"},"isDeleted":{"description":"Product get deleted from the shop's database but not from Brevo","example":true,"type":"boolean"},"metaInfo":{"description":"Meta data of product such as description, vendor, producer, stock level, etc.","example":{"brand":"addidas","description":"Shoes for sports"},"type":"object"},"modifiedAt":{"description":"Last modification UTC date-time of the product (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-12T12:30:00Z","type":"string"},"name":{"description":"Name of the product for which you requested the details","example":"Iphone 11","format":"string","type":"string"},"parentId":{"description":"Parent product id of the product","format":"string","type":"string"},"price":{"description":"Price of the product","format":"float","type":"number"},"s3Original":{"description":"S3 url of original image","format":"string","type":"string"},"s3ThumbAnalytics":{"description":"S3 thumbnail url of original image in 120x120 dimension for analytics section","format":"string","type":"string"},"s3ThumbEditor":{"description":"S3 thumbnail url of original image in 600x400 dimension for editor section","format":"string","type":"string"},"sku":{"description":"Product identifier from the shop","format":"string","type":"string"},"stock":{"description":"Current stock value of the product from the shop's database","example":100,"type":"number"},"url":{"description":"URL to the product","example":"http://mydomain.com/product/electronics/product1","format":"string","type":"string"}},"required":["id","name","createdAt","modifiedAt","s3ThumbAnalytics","s3ThumbEditor"],"type":"object"},"balanceLimit":{"properties":{"balanceDefinitionId":{"description":"balance definition ID","type":"string"},"constraintType":{"description":"Defines the type of constraint (e.g., transaction-based or amount-based).","type":"string"},"createdAt":{"description":"Timestamp of when the balance limit was created.","type":"string"},"durationUnit":{"description":"Time unit for the balance limit (day, week, month, year).","type":"string"},"durationValue":{"description":"Number of time units the balance limit applies to.","type":"integer"},"id":{"description":"Unique identifier for the balance limit.","type":"string"},"slidingSchedule":{"description":"Indicates if the limit resets periodically based on a sliding schedule.","type":"boolean"},"transactionType":{"description":"Specifies whether the limit applies to credit or debit transactions.","type":"string"},"updatedAt":{"description":"Timestamp of the last update to the balance limit.","type":"string"},"value":{"description":"The maximum allowed value for the defined constraint.","type":"integer"}},"required":["createdAt","updatedAt"],"type":"object"},"balanceDefinition":{"properties":{"balanceAvailabilityDurationModifier":{"description":"startOfPeriod depicts the balancy expiry on start of day/week/month/year. endOfPeriod depicts the balancy expiry on end of day/week/month/year","enum":["startOfPeriod","endOfPeriod","noModification"],"type":"string"},"balanceAvailabilityDurationUnit":{"description":"Unit of time for the balance's availability (e.g., day/week/month/year).","type":"string"},"balanceAvailabilityDurationValue":{"description":"Number of days/weeks/month/year for balance expiry","type":"integer"},"balanceExpirationDate":{"description":"Date when the balance expires and can no longer be used, in dd/mm format. The balance will be expired when this date appears next in the calendar and only one of balanceExpirationDate or balance availability fields can be used.","format":"date-time","type":"string"},"balanceOptionAmountOvertakingStrategy":{"description":"Partial enables partial credit of balance if maximum balance limit is reaching. Strict enables rejection of transaction if it will breach the max credit amount limit.","type":"string"},"balanceOptionCreditRounding":{"description":"Rounding strategy for credit transactions.","type":"string"},"balanceOptionDebitRounding":{"description":"Rounding strategy for debit transactions.","type":"string"},"createdAt":{"description":"Timestamp of balance definition creation.","format":"date-time","type":"string"},"deletedAt":{"description":"Timestamp of balance definition deletion (nullable).","type":"string"},"description":{"description":"Short description of the balance definition.","type":"string"},"id":{"description":"Unique identifier for the balance definition.","type":"string"},"imageRef":{"description":"Optional image reference URL.","type":"string"},"maxAmount":{"description":"Maximum allowable balance.","type":"number"},"maxCreditAmountLimit":{"description":"Max credit allowed per operation.","type":"number"},"maxDebitAmountLimit":{"description":"Max debit allowed per operation.","type":"number"},"meta":{"additionalProperties":{},"description":"Additional metadata for the balance definition.","type":"object"},"minAmount":{"description":"Minimum allowable balance.","type":"number"},"name":{"description":"Name of the balance definition.","type":"string"},"unit":{"description":"Unit of balance (e.g., points, currency).","type":"string"},"updatedAt":{"description":"Timestamp of the last update.","type":"string"}},"type":"object"},"transaction":{"description":"Represents a transaction involving a balance, including status and timestamps.","properties":{"amount":{"description":"The transaction amount.","type":"number"},"balanceDefinitionId":{"description":"Unique identifier (UUID) of the associated balance definition.","type":"string"},"cancelledAt":{"description":"Timestamp when the transaction was canceled (nullable).","type":"string"},"completedAt":{"description":"Timestamp when the transaction was completed (nullable).","type":"string"},"contactId":{"description":"Unique identifier of the contact associated with the transaction.","type":"integer"},"createdAt":{"description":"Timestamp when the transaction was created.","type":"string"},"eventTime":{"description":"Optional timestamp indicating when the transaction event occurred.","type":"string"},"expirationDate":{"description":"Expiry date of the transaction (nullable).","type":"string"},"id":{"description":"Unique identifier (UUID) of the transaction.","type":"string"},"loyaltyProgramId":{"description":"Unique identifier (UUID) of the associated loyalty program.","type":"string"},"meta":{"additionalProperties":true,"description":"Optional metadata associated with the transaction.","type":"object"},"rejectReason":{"description":"Reason for rejection if the transaction was declined (nullable).","type":"string"},"rejectedAt":{"description":"Timestamp when the transaction was rejected (nullable).","type":"string"},"status":{"description":"The current status of the transaction (e.g., pending, completed, rejected).","type":"string"},"updatedAt":{"description":"Timestamp when the transaction was last updated.","type":"string"}},"type":"object"},"loyaltyProgram":{"properties":{"codeCount":{"description":"Loyalty Program code count","type":"integer"},"createdAt":{"description":"Loyalty Program creation date","type":"string"},"description":{"description":"Loyalty Program description","type":"string"},"documentId":{"description":"string","type":"string"},"id":{"description":"Loyalty Program ID","type":"string"},"meta":{"additionalProperties":{},"description":"Loyalty Program meta data","type":"object"},"name":{"description":"Loyalty Program name","type":"string"},"pattern":{"description":"string","type":"string"},"state":{"description":"Loyalty Program state","enum":["inactive","active"],"type":"string"},"subscriptionGeneratorId":{"description":"Loyalty Program subscription generator ID","type":"string"},"subscriptionPoolId":{"description":"Loyalty Program subscription pool ID","type":"string"},"updatedAt":{"description":"Loyalty Program last modification date","type":"string"}},"type":"object"},"redeem":{"properties":{"cancelledAt":{"description":"Timestamp when the redemption was cancelled","format":"date-time","type":"string"},"completedAt":{"description":"Timestamp when the redemption was completed","format":"date-time","type":"string"},"contactId":{"description":"Unique identifier for the contact","format":"int64","type":"integer"},"createdAt":{"description":"Timestamp when the redemption was created","format":"date-time","type":"string"},"debitTransactionId":{"description":"Unique identifier for the debit transaction","format":"uuid","type":"string"},"expiresAt":{"description":"Timestamp when the redemption expires","format":"date-time","type":"string"},"id":{"description":"Unique identifier for the redemption","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Unique identifier for the loyalty program","format":"uuid","type":"string"},"meta":{"additionalProperties":{},"description":"Additional metadata associated with the redemption","type":"object"},"rejectReason":{"description":"Reason for rejection if the redemption was rejected","type":"string"},"rejectedAt":{"description":"Timestamp when the redemption was rejected","format":"date-time","type":"string"},"rewardAttributionId":{"description":"Unique identifier for the reward attribution","format":"uuid","type":"string"},"status":{"description":"Current status of the redemption","type":"string"},"updatedAt":{"description":"Timestamp when the redemption was last updated","format":"date-time","type":"string"}},"type":"object"},"ruleConditionResponse":{"properties":{"and":{"description":"Metric to indicate AND between rules","items":{"$ref":"#/components/schemas/ruleConditionResponse"},"type":"array"},"lhs":{"allOf":[{"$ref":"#/components/schemas/valueResponse"}],"description":"Condition of the rule"},"op":{"description":"Selected operator for the rule","type":"string"},"or":{"description":"Metric to indicate OR between rules","items":{"$ref":"#/components/schemas/ruleConditionResponse"},"type":"array"},"rhs":{"allOf":[{"$ref":"#/components/schemas/valueResponse"}],"description":"Action of the rule"}},"type":"object"},"valueResponse":{"properties":{"array":{"description":"Array values to define the rule","items":{"$ref":"#/components/schemas/valueResponse"},"type":"array"},"boolean":{"description":"Boolean values for rule definition","type":"boolean"},"contactProperty":{"description":"string","type":"string"},"date":{"description":"Selected date for rule definition","type":"string"},"eventProperty":{"description":"Selected event property for rule definition","type":"string"},"expression":{"allOf":[{"$ref":"#/components/schemas/nodeResponse"}],"description":"Created expression for rule definition"},"number":{"description":"Boolean values for rule definition","format":"float64","type":"number"},"string":{"description":"String values for rule definition","type":"string"}},"type":"object"},"nodeResponse":{"properties":{"args":{"description":"array[object]","items":{"$ref":"#/components/schemas/nodeResponse"},"type":"array"},"array":{"description":"Array values for rule definition","items":{"$ref":"#/components/schemas/nodeResponse"},"type":"array"},"boolean":{"description":"Boolean values for rule definition","type":"boolean"},"description":{"description":"Description for rule definition","type":"string"},"float":{"description":"Float values for rule definition","format":"float64","type":"number"},"int":{"description":"int64","format":"int64","type":"integer"},"op":{"description":"Operator selected for rule definition","type":"string"},"string":{"description":"Boolean values for rule definition","type":"string"}},"type":"object"},"tierGroup":{"properties":{"createdAt":{"description":"Timestamp when the tier group was created","format":"date-time","type":"string"},"downgradeStrategy":{"default":"real_time","description":"Select real_time to downgrade tier on real time balance updates. Select membership_anniversary to downgrade tier on subscription anniversary. Select tier_anniversary to downgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"},"id":{"description":"Tier group unique identifier","format":"uuid","type":"string"},"loyaltyProgramId":{"description":"Associated loyalty program Id","format":"uuid","type":"string"},"name":{"description":"Tier group name","type":"string"},"tierOrder":{"description":"Order of the tiers in the group in ascending order","example":[],"items":{"format":"uuid","type":"string"},"type":"array"},"updatedAt":{"description":"Timestamp when the tier group was last updated","format":"date-time","type":"string"},"upgradeStrategy":{"default":"real_time","description":"Select real_time to upgrade tier on real time balance updates. Select membership_anniversary to upgrade tier on subscription anniversary. Select tier_anniversary to upgrade tier on tier anniversary.","enum":["real_time","membership_anniversary","tier_anniversary"],"type":"string"}},"type":"object"},"tier":{"properties":{"accessConditions":{"description":"Conditions required to access this tier","items":{"properties":{"balanceDefinitionId":{"description":"Balance definition identifier","format":"uuid","type":"string"},"createdAt":{"format":"date-time","type":"string"},"minimumValue":{"description":"Minimum value required to access this tier","type":"integer"},"updatedAt":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"groupId":{"description":"Associated group Id","format":"uuid","type":"string"},"imageRef":{"description":"Tier image reference","type":"string"},"loyaltyProgramId":{"description":"Associated loyalty program Id","format":"uuid","type":"string"},"name":{"description":"Tier name","type":"string"},"tierId":{"description":"Tier id","format":"uuid","type":"string"},"tierRewards":{"description":"Rewards associated with this tier","items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"rewardId":{"description":"Reward to be attributed on tier assignment","format":"uuid","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"},"updatedAt":{"format":"date-time","type":"string"}},"type":"object"},"getExtendedCampaignOverview":{"allOf":[{"properties":{"abTesting":{"description":"Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.","example":true,"type":"boolean"},"id":{"description":"ID of the campaign","example":12,"format":"int64","type":"integer"},"name":{"description":"Name of the campaign","example":"EN - Sales Summer 2017","type":"string"},"previewText":{"description":"Preview text or preheader of the email campaign","example":"Thanks for your order!","type":"string"},"scheduledAt":{"description":"UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-06-01T12:30:00Z","type":"string"},"sendAtBestTime":{"description":"It is true if you have chosen to send your campaign at best time, otherwise it is false","example":true,"type":"boolean"},"splitRule":{"description":"The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`","example":25,"type":"integer"},"status":{"description":"Status of the campaign","enum":["draft","sent","archive","queued","suspended","in_process"],"example":"sent","type":"string"},"subject":{"description":"Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`","example":"20% OFF for 2017 Summer Sales","type":"string"},"subjectA":{"description":"Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`","example":"Discover the New Collection!","type":"string"},"subjectB":{"description":"Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`","example":"Want to discover the New Collection?","type":"string"},"type":{"description":"Type of campaign","enum":["classic","trigger"],"example":"classic","type":"string"},"winnerCriteria":{"description":"Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`","example":"open","type":"string"},"winnerDelay":{"description":"The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`","example":50,"type":"integer"}},"required":["id","name","status","type"],"type":"object"},{"properties":{"createdAt":{"description":"Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"footer":{"description":"Footer of the campaign","example":"[DEFAULT_FOOTER]","type":"string"},"header":{"description":"Header of the campaign","example":"[DEFAULT_HEADER]","type":"string"},"htmlContent":{"description":"HTML content of the campaign","example":"This is my HTML Content","type":"string"},"inlineImageActivation":{"description":"Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.","example":true,"type":"boolean"},"mirrorActive":{"description":"Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign","example":true,"type":"boolean"},"modifiedAt":{"description":"UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"recurring":{"description":"FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times","example":true,"type":"boolean"},"replyTo":{"description":"Email defined as the \"Reply to\" of the campaign","example":"replyto@domain.com","format":"email","type":"string"},"returnBounce":{"description":"Total number of non-delivered campaigns for a particular campaign id.","example":5,"format":"int64","type":"integer"},"sender":{"properties":{"email":{"description":"Sender email of the campaign","example":"marketing@mycompany.com","format":"email","type":"string"},"id":{"description":"Sender id of the campaign","example":43,"format":"int64","type":"integer"},"name":{"description":"Sender name of the campaign","example":"Marketing","type":"string"}},"type":"object"},"sentDate":{"description":"Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'","example":"2018-12-01T16:30:00Z","type":"string"},"shareLink":{"description":"Link to share the campaign on social medias","example":"http://dhh.brevo.com/fhsgccc.html?t=9865448900","format":"url","type":"string"},"tag":{"description":"Tag of the campaign","example":"Newsletter","type":"string"},"testSent":{"description":"Retrieved the status of test email sending. (true=Test email has been sent  false=Test email has not been sent)","example":true,"type":"boolean"},"toField":{"description":"Customisation of the \"to\" field of the campaign","example":"{FNAME} {LNAME}","type":"string"},"utmCampaignValue":{"description":"utm parameter associated with campaign","example":"myutm","type":"string"},"utmIDActive":{"description":"utm id active","example":true,"type":"boolean"},"utmMedium":{"example":"EMAIL","type":"string"},"utmSource":{"description":"source of utm","example":"Brevo","type":"string"}},"required":["createdAt","footer","header","htmlContent","modifiedAt","replyTo","sender","testSent"],"type":"object"}]},"getCampaignRecipients":{"properties":{"exclusionLists":{"items":{"description":"List IDs excluded of the campaign","example":13,"format":"int64","type":"integer"},"type":"array"},"lists":{"items":{"description":"List IDs included in the campaign","example":21,"format":"int64","type":"integer"},"type":"array"}},"required":["exclusionLists","lists"],"type":"object"},"getDeviceBrowserStats":{"properties":{"clickers":{"description":"Number of total clicks for the campaign using the particular browser","example":2665,"format":"int64","type":"integer"},"uniqueClicks":{"description":"Number of unique clicks for the campaign using the particular browser","example":2300,"format":"int64","type":"integer"},"uniqueViews":{"description":"Number of unique openings for the campaign using the particular browser","example":7779,"format":"int64","type":"integer"},"viewed":{"description":"Number of openings for the campaign using the particular browser","example":8999,"format":"int64","type":"integer"}},"required":["clickers","uniqueClicks","uniqueViews","viewed"],"type":"object"},"getExtendedCampaignStats":{"properties":{"campaignStats":{"description":"List-wise statistics of the campaign.","items":{"allOf":[{"$ref":"#/components/schemas/getCampaignStats"}],"type":"object"},"type":"array"},"globalStats":{"allOf":[{"$ref":"#/components/schemas/getCampaignStats"}],"description":"Overall statistics of the campaign","type":"object"},"linksStats":{"description":"Statistics about the number of clicks for the links","example":{"example.abc.com":7,"example.domain.com":10},"properties":{},"type":"object"},"mirrorClick":{"description":"Number of clicks on mirror link","example":120,"format":"int64","type":"integer"},"remaining":{"description":"Number of remaning emails to send","example":1000,"format":"int64","type":"integer"},"statsByBrowser":{"additionalProperties":{"$ref":"#/components/schemas/getDeviceBrowserStats"},"type":"object"},"statsByDevice":{"properties":{"desktop":{"additionalProperties":{"$ref":"#/components/schemas/getDeviceBrowserStats"},"description":"Statistics of the campaign on the basis of desktop devices","type":"object"},"mobile":{"additionalProperties":{"$ref":"#/components/schemas/getDeviceBrowserStats"},"description":"Statistics of the campaign on the basis of mobile devices","type":"object"},"tablet":{"additionalProperties":{"$ref":"#/components/schemas/getDeviceBrowserStats"},"description":"Statistics of the campaign on the basis of tablet devices","type":"object"},"unknown":{"additionalProperties":{"$ref":"#/components/schemas/getDeviceBrowserStats"},"description":"Statistics of the campaign on the basis of unknown devices","type":"object"}},"type":"object"},"statsByDomain":{"additionalProperties":{"$ref":"#/components/schemas/getCampaignStats"},"type":"object"}},"required":["campaignStats","globalStats","linksStats","mirrorClick","remaining","statsByBrowser","statsByDevice","statsByDomain"],"type":"object"},"abTestVersionClicks":{"description":"Information on clicked links for a particular version","items":{"properties":{"clickRate":{"description":"Percentage of clicks of link with respect to total clicks","example":"40%","type":"string"},"clicksCount":{"description":"Number of times a link is clicked","example":3,"format":"int64","type":"integer"},"link":{"description":"URL of the link","example":"https://facbook.com/versionA","type":"string"}},"required":["clickRate","clicksCount","link"],"type":"object"},"type":"array"},"abTestVersionStats":{"description":"Percentage of a particular event for both versions","properties":{"Version A":{"description":"percentage of an event for version A","example":"50%","type":"string"},"Version B":{"description":"percentage of an event for version B","example":"50%","type":"string"}},"required":["Version A","Version B"],"type":"object"},"sendReport":{"properties":{"email":{"description":"Custom attributes for the report email.","properties":{"body":{"description":"Custom text message to be presented in the report email.","example":"Please find attached the report of our last email campaign.","type":"string"},"to":{"description":"Email addresses of the recipients","items":{"description":"Email address of the recipient","example":"jim.suehan@example.com","format":"email","type":"string"},"type":"array"}},"required":["body","to"],"type":"object"},"language":{"default":"fr","description":"Language of email content for campaign report sending.","enum":["fr","es","pt","it","de","en"],"example":"en","type":"string"}},"required":["email"],"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"},"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"},"updateCampaignStatus":{"description":"Status of the campaign","example":"draft","properties":{"status":{"description":"Note:- **replicateTemplate** status will be available **only for template type campaigns.**\n","enum":["suspended","archive","darchive","sent","queued","replicate","replicateTemplate","draft"],"type":"string"}},"type":"object"},"getSmsCampaignOverview":{"properties":{"content":{"description":"Content of the SMS Campaign","example":"Visit our Store and get some discount !","type":"string"},"createdAt":{"description":"Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-06-01T12:30:00Z","type":"string"},"id":{"description":"ID of the SMS Campaign","example":2,"format":"int64","type":"integer"},"modifiedAt":{"description":"UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)","example":"2017-05-01T12:30:00Z","type":"string"},"name":{"description":"Name of the SMS Campaign","example":"PROMO CODE","type":"string"},"scheduledAt":{"description":"UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format","example":"2017-06-01T12:30:00Z","type":"string"},"sender":{"description":"Sender of the SMS Campaign","example":"MyCompany","type":"string"},"status":{"description":"Status of the SMS Campaign","enum":["draft","sent","archive","queued","suspended","inProcess"],"example":"draft","type":"string"}},"required":["content","createdAt","id","modifiedAt","name","sender","status"],"type":"object"},"getSmsCampaignStats":{"properties":{"answered":{"description":"Number of replies to the SMS","example":2,"format":"int64","type":"integer"},"delivered":{"description":"Number of delivered SMS","example":2987,"format":"int64","type":"integer"},"hardBounces":{"description":"Number of hardbounced SMS","example":1,"format":"int64","type":"integer"},"processing":{"description":"Number of processing SMS","example":0,"format":"int64","type":"integer"},"sent":{"description":"Number of sent SMS","example":3000,"format":"int64","type":"integer"},"softBounces":{"description":"Number of softbounced SMS","example":3,"format":"int64","type":"integer"},"unsubscriptions":{"description":"Number of unsubscription SMS","example":3,"format":"int64","type":"integer"}},"required":["answered","delivered","hardBounces","processing","sent","softBounces","unsubscriptions"],"type":"object"},"WhatsappCampStats":{"properties":{"delivered":{"example":3,"type":"integer"},"notSent":{"example":4,"type":"integer"},"read":{"example":2,"type":"integer"},"sent":{"example":3,"type":"integer"},"unsubscribe":{"example":0,"type":"integer"}},"required":["sent","delivered","read","unsubscribe","notSent"],"type":"object"},"variablesItems":{"properties":{"datatype":{"example":"text","type":"string"},"default":{"example":"INVALID_HEADER","type":"string"},"name":{"example":"FIRSTNAME","type":"string"}},"type":"object"},"Company":{"description":"Company Details","properties":{"attributes":{"description":"Company attributes with values","example":{"created_at":"2022-01-13T19:04:24.376+05:30","domain":"xyz","last_updated_at":"2022-04-01T18:47:48.283+05:30","name":"text","number_of_contacts":0,"owner":"62260474111b1101704a9d85","owner_assign_date":"2022-04-01T18:21:13.379+05:30","phone_number":8171844192,"revenue":10},"type":"object"},"id":{"description":"Unique company id","example":"629475917295261d9b1f4403","type":"string"},"linkedContactsIds":{"description":"Contact ids for contacts linked to this company","example":[1,2,3],"format":"int64","items":{"type":"integer"},"type":"array"},"linkedDealsIds":{"description":"Deals ids for companies linked to this company","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"format":"objectID","items":{"type":"string"},"type":"array"}},"type":"object"},"Deal":{"description":"Deal Details","properties":{"attributes":{"description":"Deal attributes with values","example":{"amount":12,"created_at":"2022-05-30T07:42:05.671Z","deal_name":"testname","deal_owner":"6093d2425a9b436e9519d034","deal_stage":"9e577ff7-8e42-4ab3-be26-2b5e01b42518","last_activity_date":"2022-06-06T08:38:36.000Z","last_updated_date":"2022-06-06T08:38:36.761Z","next_activity_date":null,"number_of_activities":0,"number_of_contacts":1,"pipeline":"6093d296ad1e9c5cf2140a58","stage_updated_at":"2022-05-30T07:42:05.671Z"},"type":"object"},"id":{"description":"Unique deal id","example":"629475917295261d9b1f4403","type":"string"},"linkedCompaniesIds":{"description":"Companies ids for companies linked to this deal","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"linkedContactsIds":{"description":"Contact ids for contacts linked to this deal","example":[1,2,3],"items":{"type":"integer"},"type":"array"}},"type":"object"},"FileData":{"description":"File data that is uploaded","properties":{"authorId":{"description":"Account id of user which created the file","example":"61a5ce58y5d4795761045991","type":"string"},"companyId":{"description":"Company id linked to a file","example":"61a5ce58c5d4795761045991","type":"string"},"contactId":{"description":"Contact id of contact on which file is uploaded","example":1,"format":"int64","type":"integer"},"createdAt":{"description":"File created date/time","example":"2017-05-01T17:05:03.000Z","format":"date-time","type":"string"},"dealId":{"description":"Deal id linked to a file","example":"61a5ce58c5d4795761045991","type":"string"},"name":{"description":"Name of uploaded file","example":"example.png","type":"string"},"size":{"description":"Size of file in bytes","example":10,"format":"int64","type":"integer"}},"type":"object"},"Note":{"description":"Note Details","properties":{"authorId":{"description":"Account details of user which created the note","example":{"email":"johndoe@example.com","id":"61a5ce58y5d4795761045991","locale":"en_GB","name":{"fullName":"John Doe"},"timezone":"Asia/Kolkata"},"type":"object"},"contactIds":{"description":"Contact ids linked to a note","example":[247,1,2],"items":{"type":"integer"},"type":"array"},"createdAt":{"description":"Note created date/time","example":"2017-05-01T17:05:03.000Z","format":"date-time","type":"string"},"dealIds":{"description":"Deal ids linked to a note","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"],"items":{"type":"string"},"type":"array"},"id":{"description":"Unique note Id","example":"61a5cd07ca1347c82306ad09","type":"string"},"text":{"description":"Text content of a note","example":"In communication with client_dev for resolution of queries.","maxLength":3000,"minLength":1,"type":"string"},"updatedAt":{"description":"Note updated date/time","example":"2017-05-01T17:05:03.000Z","format":"date-time","type":"string"}},"required":["text"],"type":"object"},"NoteData":{"description":"Note data to be saved","properties":{"companyIds":{"description":"Company Ids linked to a note","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"],"items":{"type":"string"},"type":"array"},"contactIds":{"description":"Contact Ids linked to a note","example":[247,1,2],"items":{"type":"integer"},"type":"array"},"dealIds":{"description":"Deal Ids linked to a note","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991"],"items":{"type":"string"},"type":"array"},"text":{"description":"Text content of a note","example":"In communication with client_dev for resolution of queries.","maxLength":3000,"minLength":1,"type":"string"}},"required":["text"],"type":"object"},"Pipeline":{"description":"List of stages","properties":{"pipeline":{"description":"Pipeline id","example":"5ea675e3da0dd085acaea610","type":"string"},"pipeline_name":{"description":"Pipeline Name","example":"Sales Pipeline","type":"string"},"stages":{"description":"List of stages","items":{"description":"List of stages","properties":{"id":{"description":"Stage id","example":"9e577ff7-8e42-4ab3-be26-2b5e01b42518","type":"string"},"name":{"description":"Stage name","example":"New","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"Pipelines":{"description":"List of pipeline","items":{"$ref":"#/components/schemas/Pipeline"},"type":"array"},"Task":{"description":"Task Details","properties":{"companiesIds":{"description":"Companies ids for companies a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"contactsIds":{"description":"Contact ids for contacts linked to this task","example":[1,2,3],"items":{"type":"integer"},"type":"array"},"dealsIds":{"description":"Deal ids for deals a task is linked to","example":["61a5ce58c5d4795761045990","61a5ce58c5d4795761045991","61a5ce58c5d4795761045992"],"items":{"type":"string"},"type":"array"},"id":{"description":"Unique task id","example":"61a5cd07ca1347c82306ad06","type":"string"},"name":{"description":"Name of task","example":"Task: Connect with client_dev","type":"string"},"taskTypeId":{"description":"Id for type of task e.g Call / Email / Meeting etc.","example":"61a5cd07ca1347c82306ad09","type":"string"}},"required":["taskTypeId","name","date"],"type":"object"},"TaskReminder":{"description":"Task reminder date/time for a task","properties":{"types":{"description":"Type of task reminder e.g email, push","type":"array","items":{"type":"string","enum":["email","push"]},"example":["email"]},"unit":{"description":"Unit of time before reminder is to be sent","enum":["minutes","hours","weeks","days"],"type":"string"},"value":{"description":"Value of time unit before reminder is to be sent","example":10,"type":"integer"}},"required":["value","unit","types"],"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":"From email for the template","example":"Mary form 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"}},"required":["createdAt","htmlContent","id","isActive","modifiedAt","name","replyTo","sender","subject","tag","testSent","toField"],"type":"object"},"sendTransacSms":{"allOf":[{"type":"object","properties":{"organisationPrefix":{"description":"A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. **Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.**","example":"MyCompany","type":"string"},"recipient":{"description":"Mobile number to send SMS with the country code","example":"33689965433","type":"string"},"sender":{"description":"Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters**\n","example":"MyShop","maxLength":15,"type":"string"},"tag":{"description":"Tag of the message","example":"accountValidation | [\"tag1\", \"tag2\"]","properties":{"field":{"description":"A tag can be a string or an array of strings.","oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}},"type":"object"},"type":{"default":"transactional","description":"Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc.","enum":["transactional","marketing"],"example":"marketing","type":"string"},"unicodeEnabled":{"default":false,"description":"Format of the message. It indicates whether the content should be treated as unicode or not.\n","example":true,"type":"boolean"},"webUrl":{"description":"Webhook to call for each event triggered by the message (delivered etc.)","example":"http://requestb.in/173lyyx1","format":"url","type":"string"}},"required":["recipient","sender"]},{"oneOf":[{"description":"Send SMS using a template ID.","type":"object","required":["templateId"],"properties":{"templateId":{"description":"Template ID to send SMS with the template. When provided, overrides the content parameter. Mandatory if 'content' is not passed.","example":123,"type":"integer"},"content":{"not":{}}}},{"description":"Send SMS using direct content.","type":"object","required":["content"],"properties":{"content":{"description":"Content of the message. If more than **160 characters** long, will be sent as multiple text messages. Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed.\n","example":"Enter this code:CCJJG8 to validate your account","type":"string"},"templateId":{"not":{}}}}]}]}},"responses":{"errorModel":{"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"},"createModel":{"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"},"createdProcessId":{"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"}}},"x-samples-languages":["curl"]}
