All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createList | POST /list | Create list |
| deleteList | DELETE /list/{identifier} | Delete list |
| getAllLists | GET /list | Get all lists |
| getList | GET /list/{identifier} | Get list by ID |
| updateList | PUT /list/{identifier} | Update list |
RestRList createList(restEList)
Create list
Creates a new contact list.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.ListApi();
let restEList = {"name":"Premium Members"}; // RestEList |
apiInstance.createList(restEList).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEList | RestEList |
- Content-Type: application/json
- Accept: application/json
DeleteResponse deleteList(identifier)
Delete list
Deletes a list.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.ListApi();
let identifier = "identifier_example"; // String | List identifier to delete
apiInstance.deleteList(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | List identifier to delete |
- Content-Type: Not defined
- Accept: application/json
[RestRList] getAllLists(opts)
Get all lists
Retrieves all contact lists in your team.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.ListApi();
let opts = {
'offset': 0, // Number | Number of records to skip for pagination
'limit': 10, // Number | Maximum number of lists to return (max: 500)
'search': "search_example" // String | Search lists by name
};
apiInstance.getAllLists(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| offset | Number | Number of records to skip for pagination | [optional] [default to 0] |
| limit | Number | Maximum number of lists to return (max: 500) | [optional] [default to 10] |
| search | String | Search lists by name | [optional] |
- Content-Type: Not defined
- Accept: application/json
RestRList getList(identifier)
Get list by ID
Retrieves detailed information about a specific list.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.ListApi();
let identifier = "identifier_example"; // String | List identifier - `list_OcuxJHdiAvujmwQVJfd3ss`
apiInstance.getList(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | List identifier - `list_OcuxJHdiAvujmwQVJfd3ss` |
- Content-Type: Not defined
- Accept: application/json
RestRList updateList(restEList, identifier)
Update list
Updates an existing list's settings.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.ListApi();
let restEList = {"name":"2024 Newsletter Subscribers"}; // RestEList |
let identifier = "identifier_example"; // String | List identifier to update
apiInstance.updateList(restEList, identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEList | RestEList | ||
| identifier | String | List identifier to update |
- Content-Type: application/json
- Accept: application/json