All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| identifyContact | POST /contact/identify | Identify contact |
| trackContact | POST /contact/track | Track contact |
IdentifyResponse identifyContact(identifyRequest)
Identify contact
Legacy endpoint for identifying contacts. Creates or updates a contact. 🎯 Key Features: - Creates contact if doesn't exist - Updates if email already exists - Supports custom fields and tags
// 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.TrackingApi;
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");
TrackingApi apiInstance = new TrackingApi(defaultClient);
IdentifyRequest identifyRequest = new IdentifyRequest(); // IdentifyRequest |
try {
IdentifyResponse result = apiInstance.identifyContact(identifyRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingApi#identifyContact");
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 |
|---|---|---|---|
| identifyRequest | IdentifyRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Contact identified successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 422 | ❌ Unprocessable Entity - Invalid request format | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
TrackResponse trackContact(trackRequest)
Track contact
Legacy endpoint for tracking contact behavior through tags. 🎯 Key Features: - Add or remove tags - Trigger automations - Track user behavior
// 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.TrackingApi;
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");
TrackingApi apiInstance = new TrackingApi(defaultClient);
TrackRequest trackRequest = new TrackRequest(); // TrackRequest |
try {
TrackResponse result = apiInstance.trackContact(trackRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TrackingApi#trackContact");
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 |
|---|---|---|---|
| trackRequest | TrackRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Contact tracked 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 | - |