All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createCustomField | POST /customfield | Create custom field |
| deleteCustomField | DELETE /customfield/{identifier} | Delete custom field |
| getAllCustomFields | GET /customfield | Get all custom fields |
| getCustomField | GET /customfield/{identifier} | Get custom field by ID |
| updateCustomField | PUT /customfield/{identifier} | Update custom field |
RestRCustomField createCustomField(restECustomField)
Create custom field
Creates a new custom field for storing contact data.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.CustomFieldApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
CustomFieldApi apiInstance = new CustomFieldApi(defaultClient);
RestECustomField restECustomField = new RestECustomField(); // RestECustomField |
try {
RestRCustomField result = apiInstance.createCustomField(restECustomField);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomFieldApi#createCustomField");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| restECustomField | RestECustomField |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | ✅ Custom field created successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 403 | ❌ Forbidden - Resource name already exists | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
DeleteResponse deleteCustomField(identifier)
Delete custom field
Deletes a custom field (data is preserved). 🎯 Key Features: - Remove unused fields - Data remains on contacts - Clean up field list
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.CustomFieldApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
CustomFieldApi apiInstance = new CustomFieldApi(defaultClient);
String identifier = "identifier_example"; // String | Custom field identifier to update
try {
DeleteResponse result = apiInstance.deleteCustomField(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomFieldApi#deleteCustomField");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Custom field identifier to update |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Custom field deleted successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
List<RestRCustomField> getAllCustomFields(offset, limit, search)
Get all custom fields
Retrieves all custom fields defined for your team.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.CustomFieldApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
CustomFieldApi apiInstance = new CustomFieldApi(defaultClient);
Integer offset = 0; // Integer | Number of fields to skip for pagination
Integer limit = 10; // Integer | Maximum number of fields to return
String search = "search_example"; // String | Search custom fields by name (case-insensitive partial matching). **Examples:** - `points` - Finds \"Loyalty points\", \"Reward points\"
try {
List<RestRCustomField> result = apiInstance.getAllCustomFields(offset, limit, search);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomFieldApi#getAllCustomFields");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| offset | Integer | Number of fields to skip for pagination | [optional] [default to 0] |
| limit | Integer | Maximum number of fields to return | [optional] [default to 10] |
| search | String | Search custom fields by name (case-insensitive partial matching). Examples: - `points` - Finds "Loyalty points", "Reward points" | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Custom fields retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
RestRCustomField getCustomField(identifier)
Get custom field by ID
Retrieves details about a specific custom field.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.CustomFieldApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
CustomFieldApi apiInstance = new CustomFieldApi(defaultClient);
String identifier = "identifier_example"; // String | Custom field identifier to update
try {
RestRCustomField result = apiInstance.getCustomField(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomFieldApi#getCustomField");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Custom field identifier to update |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Custom field retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
RestRCustomField updateCustomField(identifier, restECustomField)
Update custom field
Updates a custom field definition.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.CustomFieldApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
CustomFieldApi apiInstance = new CustomFieldApi(defaultClient);
String identifier = "identifier_example"; // String | Custom field identifier to update
RestECustomField restECustomField = new RestECustomField(); // RestECustomField |
try {
RestRCustomField result = apiInstance.updateCustomField(identifier, restECustomField);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CustomFieldApi#updateCustomField");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Custom field identifier to update | |
| restECustomField | RestECustomField |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Custom field updated successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 403 | ❌ Forbidden - Resource name already exists | - |
| 404 | ❌ Not Found - Resource does not exist | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 500 | ❌ Internal Server Error - System error occurred | - |