All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createTag | POST /tag | Create tag |
| deleteTag | DELETE /tag/{identifier} | Delete tag |
| getAllTags | GET /tag | Get all tags |
| getTag | GET /tag/{identifier} | Get tag by ID |
| updateTag | PUT /tag/{identifier} | Update tag |
RestRTag createTag(restETag)
Create tag
Creates a new tag for contact categorization.
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.TagApi();
let restETag = {"name":"VIP Customer"}; // RestETag |
apiInstance.createTag(restETag).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restETag | RestETag |
- Content-Type: application/json
- Accept: application/json
DeleteResponse deleteTag(identifier)
Delete tag
Deletes a tag from the system.
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.TagApi();
let identifier = "identifier_example"; // String | Tag identifier to update
apiInstance.deleteTag(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Tag identifier to update |
- Content-Type: Not defined
- Accept: application/json
[RestRTag] getAllTags(opts)
Get all tags
Retrieves all tags 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.TagApi();
let opts = {
'offset': 0, // Number | Number of tags to skip
'limit': 10 // Number | Maximum number of tags to return
};
apiInstance.getAllTags(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| offset | Number | Number of tags to skip | [optional] [default to 0] |
| limit | Number | Maximum number of tags to return | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
RestRTag getTag(identifier)
Get tag by ID
Retrieves detailed information about a specific tag.
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.TagApi();
let identifier = "identifier_example"; // String | Tag identifier to retrieve
apiInstance.getTag(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Tag identifier to retrieve |
- Content-Type: Not defined
- Accept: application/json
RestRTag updateTag(restETag, identifier)
Update tag
Updates an existing tag's name.
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.TagApi();
let restETag = new sendx.RestETag(); // RestETag |
let identifier = "identifier_example"; // String | Tag identifier to update
apiInstance.updateTag(restETag, identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restETag | RestETag | ||
| identifier | String | Tag identifier to update |
- Content-Type: application/json
- Accept: application/json