Skip to content

Latest commit

 

History

History
384 lines (300 loc) · 12.4 KB

File metadata and controls

384 lines (300 loc) · 12.4 KB

ListApi

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

createList

RestRList createList(restEList)

Create list

Creates a new contact list.

Example

// 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.ListApi;

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");

    ListApi apiInstance = new ListApi(defaultClient);
    RestEList restEList = new RestEList(); // RestEList | 
    try {
      RestRList result = apiInstance.createList(restEList);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ListApi#createList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
restEList RestEList

Return type

RestRList

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 ✅ List created successfully -
400 ❌ Bad Request - Invalid input data -
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 -

deleteList

DeleteResponse deleteList(identifier)

Delete list

Deletes a list.

Example

// 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.ListApi;

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");

    ListApi apiInstance = new ListApi(defaultClient);
    String identifier = "identifier_example"; // String | List identifier to delete
    try {
      DeleteResponse result = apiInstance.deleteList(identifier);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ListApi#deleteList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
identifier String List identifier to delete

Return type

DeleteResponse

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 ✅ List 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 -

getAllLists

List<RestRList> getAllLists(offset, limit, search)

Get all lists

Retrieves all contact lists in your team.

Example

// 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.ListApi;

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");

    ListApi apiInstance = new ListApi(defaultClient);
    Integer offset = 0; // Integer | Number of records to skip for pagination
    Integer limit = 10; // Integer | Maximum number of lists to return (max: 500)
    String search = "search_example"; // String | Search lists by name
    try {
      List<RestRList> result = apiInstance.getAllLists(offset, limit, search);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ListApi#getAllLists");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
offset Integer Number of records to skip for pagination [optional] [default to 0]
limit Integer Maximum number of lists to return (max: 500) [optional] [default to 10]
search String Search lists by name [optional]

Return type

List<RestRList>

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 ✅ Lists retrieved successfully -
401 ❌ Unauthorized - Invalid or missing API key -
500 ❌ Internal Server Error - System error occurred -

getList

RestRList getList(identifier)

Get list by ID

Retrieves detailed information about a specific list.

Example

// 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.ListApi;

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");

    ListApi apiInstance = new ListApi(defaultClient);
    String identifier = "identifier_example"; // String | List identifier - `list_OcuxJHdiAvujmwQVJfd3ss` 
    try {
      RestRList result = apiInstance.getList(identifier);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ListApi#getList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
identifier String List identifier - `list_OcuxJHdiAvujmwQVJfd3ss`

Return type

RestRList

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 ✅ List 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 -

updateList

RestRList updateList(identifier, restEList)

Update list

Updates an existing list's settings.

Example

// 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.ListApi;

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");

    ListApi apiInstance = new ListApi(defaultClient);
    String identifier = "identifier_example"; // String | List identifier to update
    RestEList restEList = new RestEList(); // RestEList | 
    try {
      RestRList result = apiInstance.updateList(identifier, restEList);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ListApi#updateList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
identifier String List identifier to update
restEList RestEList

Return type

RestRList

Authorization

TeamApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 ✅ List 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 -