All URIs are relative to https://api.brevo.com/v3
| Method | HTTP request | Description |
|---|---|---|
| AddContactToList | POST /contacts/lists/{listId}/contacts/add | Add existing contacts to a list |
| CreateAttribute | POST /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute |
| CreateContact | POST /contacts | Create a contact |
| CreateDoiContact | POST /contacts/doubleOptinConfirmation | Create Contact via DOI (Double-Opt-In) Flow |
| CreateFolder | POST /contacts/folders | Create a folder |
| CreateList | POST /contacts/lists | Create a list |
| DeleteAttribute | DELETE /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute |
| DeleteContact | DELETE /contacts/{identifier} | Delete a contact |
| DeleteFolder | DELETE /contacts/folders/{folderId} | Delete a folder (and all its lists) |
| DeleteList | DELETE /contacts/lists/{listId} | Delete a list |
| DeleteMultiAttributeOptions | DELETE /contacts/attributes/{attributeType}/{multipleChoiceAttribute}/{multipleChoiceAttributeOption} | Delete a multiple-choice attribute option |
| GetAttributes | GET /contacts/attributes | List all attributes |
| GetContactInfo | GET /contacts/{identifier} | Get a contact's details |
| GetContactStats | GET /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact |
| GetContacts | GET /contacts | Get all the contacts |
| GetContactsFromList | GET /contacts/lists/{listId}/contacts | Get contacts in a list |
| GetFolder | GET /contacts/folders/{folderId} | Returns a folder's details |
| GetFolderLists | GET /contacts/folders/{folderId}/lists | Get lists in a folder |
| GetFolders | GET /contacts/folders | Get all folders |
| GetList | GET /contacts/lists/{listId} | Get a list's details |
| GetLists | GET /contacts/lists | Get all the lists |
| GetSegments | GET /contacts/segments | Get all the Segments |
| ImportContacts | POST /contacts/import | Import contacts |
| RemoveContactFromList | POST /contacts/lists/{listId}/contacts/remove | Delete a contact from a list |
| RequestContactExport | POST /contacts/export | Export contacts |
| UpdateAttribute | PUT /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute |
| UpdateBatchContacts | POST /contacts/batch | Update multiple contacts |
| UpdateContact | PUT /contacts/{identifier} | Update a contact |
| UpdateFolder | PUT /contacts/folders/{folderId} | Update a folder |
| UpdateList | PUT /contacts/lists/{listId} | Update a list |
PostContactInfo AddContactToList (long? listId, AddContactToList contactEmails)
Add existing contacts to a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class AddContactToListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
var contactEmails = new AddContactToList(); // AddContactToList | Emails addresses OR IDs OR EXT_ID attributes of the contacts
try
{
// Add existing contacts to a list
PostContactInfo result = apiInstance.AddContactToList(listId, contactEmails);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.AddContactToList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list | |
| contactEmails | AddContactToList | Emails addresses OR IDs OR EXT_ID attributes of the contacts |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute)
Create contact attribute
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class CreateAttributeExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var attributeCategory = attributeCategory_example; // string | Category of the attribute
var attributeName = attributeName_example; // string | Name of the attribute
var createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute
try
{
// Create contact attribute
apiInstance.CreateAttribute(attributeCategory, attributeName, createAttribute);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.CreateAttribute: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| attributeCategory | string | Category of the attribute | |
| attributeName | string | Name of the attribute | |
| createAttribute | CreateAttribute | Values to create an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateUpdateContactModel CreateContact (CreateContact createContact)
Create a contact
Creates new contacts on Brevo. Contacts can be created by passing either -
1. email address of the contact (email_id),
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"}
3. ext_id
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class CreateContactExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var createContact = new CreateContact(); // CreateContact | Values to create a contact
try
{
// Create a contact
CreateUpdateContactModel result = apiInstance.CreateContact(createContact);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.CreateContact: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| createContact | CreateContact | Values to create a contact |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void CreateDoiContact (CreateDoiContact createDoiContact)
Create Contact via DOI (Double-Opt-In) Flow
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class CreateDoiContactExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var createDoiContact = new CreateDoiContact(); // CreateDoiContact | Values to create the Double opt-in (DOI) contact
try
{
// Create Contact via DOI (Double-Opt-In) Flow
apiInstance.CreateDoiContact(createDoiContact);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.CreateDoiContact: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| createDoiContact | CreateDoiContact | Values to create the Double opt-in (DOI) contact |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateModel CreateFolder (CreateUpdateFolder createFolder)
Create a folder
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class CreateFolderExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
try
{
// Create a folder
CreateModel result = apiInstance.CreateFolder(createFolder);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.CreateFolder: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| createFolder | CreateUpdateFolder | Name of the folder |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateModel CreateList (CreateList createList)
Create a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class CreateListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var createList = new CreateList(); // CreateList | Values to create a list
try
{
// Create a list
CreateModel result = apiInstance.CreateList(createList);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.CreateList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| createList | CreateList | Values to create a list |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteAttribute (string attributeCategory, string attributeName)
Delete an attribute
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class DeleteAttributeExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var attributeCategory = attributeCategory_example; // string | Category of the attribute
var attributeName = attributeName_example; // string | Name of the existing attribute
try
{
// Delete an attribute
apiInstance.DeleteAttribute(attributeCategory, attributeName);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.DeleteAttribute: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| attributeCategory | string | Category of the attribute | |
| attributeName | string | Name of the existing attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteContact (string identifier, string identifierType = null)
Delete a contact
There are 2 ways to delete a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
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.
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.
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class DeleteContactExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var identifier = identifier_example; // string | Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded)
var identifierType = identifierType_example; // string | 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 (optional)
try
{
// Delete a contact
apiInstance.DeleteContact(identifier, identifierType);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.DeleteContact: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | string | Email (urlencoded) OR ID of the contact OR EXT_ID attribute (urlencoded) | |
| identifierType | string | 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 | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteFolder (long? folderId)
Delete a folder (and all its lists)
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class DeleteFolderExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var folderId = 789; // long? | Id of the folder
try
{
// Delete a folder (and all its lists)
apiInstance.DeleteFolder(folderId);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.DeleteFolder: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | long? | Id of the folder |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteList (long? listId)
Delete a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class DeleteListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
try
{
// Delete a list
apiInstance.DeleteList(listId);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.DeleteList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteMultiAttributeOptions (string attributeType, string multipleChoiceAttribute, string multipleChoiceAttributeOption)
Delete a multiple-choice attribute option
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class DeleteMultiAttributeOptionsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var attributeType = attributeType_example; // string | Type of the attribute
var multipleChoiceAttribute = multipleChoiceAttribute_example; // string | Name of the existing multiple-choice attribute
var multipleChoiceAttributeOption = multipleChoiceAttributeOption_example; // string | Name of the existing multiple-choice attribute option that you want to delete
try
{
// Delete a multiple-choice attribute option
apiInstance.DeleteMultiAttributeOptions(attributeType, multipleChoiceAttribute, multipleChoiceAttributeOption);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.DeleteMultiAttributeOptions: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| attributeType | string | Type of the attribute | |
| multipleChoiceAttribute | string | Name of the existing multiple-choice attribute | |
| multipleChoiceAttributeOption | string | Name of the existing multiple-choice attribute option that you want to delete |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAttributes GetAttributes ()
List all attributes
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetAttributesExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
try
{
// List all attributes
GetAttributes result = apiInstance.GetAttributes();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetAttributes: " + e.Message );
}
}
}
}This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetExtendedContactDetails GetContactInfo (string identifier, string identifierType = null, string startDate = null, string endDate = null)
Get a contact's details
There are 2 ways to get a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
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.
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
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.
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetContactInfoExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var identifier = identifier_example; // string | Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded)
var identifierType = identifierType_example; // string | 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 (optional)
var startDate = startDate_example; // string | **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)
var endDate = endDate_example; // string | **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. (optional)
try
{
// Get a contact's details
GetExtendedContactDetails result = apiInstance.GetContactInfo(identifier, identifierType, startDate, endDate);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetContactInfo: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | string | Email (urlencoded) OR ID of the contact OR its SMS attribute value OR EXT_ID attribute (urlencoded) | |
| identifierType | string | 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 | [optional] |
| startDate | string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] |
| endDate | string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContactCampaignStats GetContactStats (string identifier, string startDate = null, string endDate = null)
Get email campaigns' statistics for a contact
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetContactStatsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var identifier = identifier_example; // string | Email (urlencoded) OR ID of the contact
var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate (optional)
var endDate = endDate_example; // string | 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 (optional)
try
{
// Get email campaigns' statistics for a contact
GetContactCampaignStats result = apiInstance.GetContactStats(identifier, startDate, endDate);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetContactStats: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | string | Email (urlencoded) OR ID of the contact | |
| startDate | string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional] |
| endDate | string | 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 | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContacts GetContacts (long? limit = null, long? offset = null, string modifiedSince = null, string createdSince = null, string sort = null, long? segmentId = null, List<long?> listIds = null, string filter = null)
Get all the contacts
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetContactsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var limit = 789; // long? | Number of documents per page (optional) (default to 50)
var offset = 789; // long? | Index of the first document of the page (optional) (default to 0)
var modifiedSince = modifiedSince_example; // string | 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. (optional)
var createdSince = createdSince_example; // string | 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. (optional)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
var segmentId = 789; // long? | Id of the segment. **Either listIds or segmentId can be passed.** (optional)
var listIds = new List<long?>(); // List<long?> | Ids of the list. **Either listIds or segmentId can be passed.** (optional)
var filter = filter_example; // string | 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\")** (optional)
try
{
// Get all the contacts
GetContacts result = apiInstance.GetContacts(limit, offset, modifiedSince, createdSince, sort, segmentId, listIds, filter);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetContacts: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | long? | Number of documents per page | [optional] [default to 50] |
| offset | long? | Index of the first document of the page | [optional] [default to 0] |
| modifiedSince | string | 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. | [optional] |
| createdSince | string | 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. | [optional] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
| segmentId | long? | Id of the segment. Either listIds or segmentId can be passed. | [optional] |
| listIds | List<long?> | Ids of the list. Either listIds or segmentId can be passed. | [optional] |
| filter | string | 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") | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContacts GetContactsFromList (long? listId, string modifiedSince = null, long? limit = null, long? offset = null, string sort = null)
Get contacts in a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetContactsFromListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
var modifiedSince = modifiedSince_example; // string | 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. (optional)
var limit = 789; // long? | Number of documents per page (optional) (default to 50)
var offset = 789; // long? | Index of the first document of the page (optional) (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Get contacts in a list
GetContacts result = apiInstance.GetContactsFromList(listId, modifiedSince, limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetContactsFromList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list | |
| modifiedSince | string | 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. | [optional] |
| limit | long? | Number of documents per page | [optional] [default to 50] |
| offset | long? | Index of the first document of the page | [optional] [default to 0] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolder GetFolder (long? folderId)
Returns a folder's details
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetFolderExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var folderId = 789; // long? | id of the folder
try
{
// Returns a folder's details
GetFolder result = apiInstance.GetFolder(folderId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetFolder: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | long? | id of the folder |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null, string sort = null)
Get lists in a folder
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetFolderListsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var folderId = 789; // long? | Id of the folder
var limit = 789; // long? | Number of documents per page (optional) (default to 10)
var offset = 789; // long? | Index of the first document of the page (optional) (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Get lists in a folder
GetFolderLists result = apiInstance.GetFolderLists(folderId, limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetFolderLists: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | long? | Id of the folder | |
| limit | long? | Number of documents per page | [optional] [default to 10] |
| offset | long? | Index of the first document of the page | [optional] [default to 0] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFolders GetFolders (long? limit = null, long? offset = null, string sort = null)
Get all folders
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetFoldersExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var limit = 789; // long? | Number of documents per page (optional) (default to 10)
var offset = 789; // long? | Index of the first document of the page (optional) (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Get all folders
GetFolders result = apiInstance.GetFolders(limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetFolders: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | long? | Number of documents per page | [optional] [default to 10] |
| offset | long? | Index of the first document of the page | [optional] [default to 0] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetExtendedList GetList (long? listId, string startDate = null, string endDate = null)
Get a list's details
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
var startDate = startDate_example; // string | 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 (optional)
var endDate = endDate_example; // string | 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 (optional)
try
{
// Get a list's details
GetExtendedList result = apiInstance.GetList(listId, startDate, endDate);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list | |
| startDate | string | 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 | [optional] |
| endDate | string | 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 | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLists GetLists (long? limit = null, long? offset = null, string sort = null)
Get all the lists
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetListsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var limit = 789; // long? | Number of documents per page (optional) (default to 10)
var offset = 789; // long? | Index of the first document of the page (optional) (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Get all the lists
GetLists result = apiInstance.GetLists(limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetLists: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | long? | Number of documents per page | [optional] [default to 10] |
| offset | long? | Index of the first document of the page | [optional] [default to 0] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSegments GetSegments (long? limit, long? offset, string sort = null)
Get all the Segments
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class GetSegmentsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var limit = 789; // long? | Number of documents per page (default to 10)
var offset = 789; // long? | Index of the first document of the page (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Get all the Segments
GetSegments result = apiInstance.GetSegments(limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.GetSegments: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | long? | Number of documents per page | [default to 10] |
| offset | long? | Index of the first document of the page | [default to 0] |
| sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId ImportContacts (RequestContactImport requestContactImport)
Import contacts
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.
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class ImportContactsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var requestContactImport = new RequestContactImport(); // RequestContactImport | 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``
try
{
// Import contacts
CreatedProcessId result = apiInstance.ImportContacts(requestContactImport);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.ImportContacts: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| requestContactImport | RequestContactImport | 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`` |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails)
Delete a contact from a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class RemoveContactFromListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
var contactEmails = new RemoveContactFromList(); // RemoveContactFromList | Emails addresses OR IDs OR EXT_ID attributes of the contacts
try
{
// Delete a contact from a list
PostContactInfo result = apiInstance.RemoveContactFromList(listId, contactEmails);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.RemoveContactFromList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list | |
| contactEmails | RemoveContactFromList | Emails addresses OR IDs OR EXT_ID attributes of the contacts |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId RequestContactExport (RequestContactExport requestContactExport)
Export contacts
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.
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class RequestContactExportExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var requestContactExport = new RequestContactExport(); // RequestContactExport | Values to request a contact export
try
{
// Export contacts
CreatedProcessId result = apiInstance.RequestContactExport(requestContactExport);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.RequestContactExport: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| requestContactExport | RequestContactExport | Values to request a contact export |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute)
Update contact attribute
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class UpdateAttributeExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var attributeCategory = attributeCategory_example; // string | Category of the attribute
var attributeName = attributeName_example; // string | Name of the existing attribute
var updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute
try
{
// Update contact attribute
apiInstance.UpdateAttribute(attributeCategory, attributeName, updateAttribute);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.UpdateAttribute: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| attributeCategory | string | Category of the attribute | |
| attributeName | string | Name of the existing attribute | |
| updateAttribute | UpdateAttribute | Values to update an attribute |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateBatchContacts (UpdateBatchContacts updateBatchContacts)
Update multiple contacts
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class UpdateBatchContactsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var updateBatchContacts = new UpdateBatchContacts(); // UpdateBatchContacts | Values to update multiple contacts
try
{
// Update multiple contacts
apiInstance.UpdateBatchContacts(updateBatchContacts);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.UpdateBatchContacts: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| updateBatchContacts | UpdateBatchContacts | Values to update multiple contacts |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateContact (string identifier, UpdateContact updateContact, string identifierType = null)
Update a contact
There are 2 ways to update a contact
Option 1- https://api.brevo.com/v3/contacts/{identifier}
Option 2- https://api.brevo.com/v3/contacts/{identifier}?identifierType={}
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.
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
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class UpdateContactExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var identifier = identifier_example; // string | 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
var updateContact = new UpdateContact(); // UpdateContact | Values to update a contact
var identifierType = identifierType_example; // string | 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 (optional)
try
{
// Update a contact
apiInstance.UpdateContact(identifier, updateContact, identifierType);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.UpdateContact: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | string | 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 | |
| updateContact | UpdateContact | Values to update a contact | |
| identifierType | string | 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 | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder)
Update a folder
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class UpdateFolderExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var folderId = 789; // long? | Id of the folder
var updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder
try
{
// Update a folder
apiInstance.UpdateFolder(folderId, updateFolder);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.UpdateFolder: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| folderId | long? | Id of the folder | |
| updateFolder | CreateUpdateFolder | Name of the folder |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateList (long? listId, UpdateList updateList)
Update a list
using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.Model;
namespace Example
{
public class UpdateListExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new ContactsApi();
var listId = 789; // long? | Id of the list
var updateList = new UpdateList(); // UpdateList | Values to update a list
try
{
// Update a list
apiInstance.UpdateList(listId, updateList);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContactsApi.UpdateList: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| listId | long? | Id of the list | |
| updateList | UpdateList | Values to update a list |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]