All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createPost | POST /post | Create blog post |
| deletePost | DELETE /post/{identifier} | Delete post |
| getAllPosts | GET /post | Get all posts |
| getPost | GET /post/{identifier} | Get post by ID |
| updatePost | PUT /post/{identifier} | Update post |
RestRPost createPost(restEPost)
Create blog post
Creates a new blog post.
// 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.PostApi;
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");
PostApi apiInstance = new PostApi(defaultClient);
RestEPost restEPost = new RestEPost(); // RestEPost |
try {
RestRPost result = apiInstance.createPost(restEPost);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostApi#createPost");
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 |
|---|---|---|---|
| restEPost | RestEPost |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | ✅ Post created successfully | - |
| 400 | ❌ Bad Request - Invalid input data | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 409 | ❌ Conflict - Resource already exists | - |
MessageResponse deletePost(identifier)
Delete post
Soft deletes a blog post. 🎯 Key Features: - Soft delete - Preserve data - Remove from listings
// 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.PostApi;
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");
PostApi apiInstance = new PostApi(defaultClient);
String identifier = "contact_BnKjkbBBS500CoBCP0oChQ"; // String | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) **Format:** `<prefix>_<22-character-id>`
try {
MessageResponse result = apiInstance.deletePost(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostApi#deletePost");
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 | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) Format: `<prefix>_<22-character-id>` |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Post deleted successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
List<RestRPost> getAllPosts(offset, limit)
Get all posts
Retrieves all blog posts with pagination. 🎯 Key Features: - Filter by status - Search functionality - Sort options - Include metadata
// 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.PostApi;
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");
PostApi apiInstance = new PostApi(defaultClient);
Integer offset = 0; // Integer | Number of posts to skip
Integer limit = 10; // Integer | Maximum number of posts to return
try {
List<RestRPost> result = apiInstance.getAllPosts(offset, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostApi#getAllPosts");
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 posts to skip | [optional] [default to 0] |
| limit | Integer | Maximum number of posts to return | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Posts retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
RestRPost getPost(identifier)
Get post by ID
Retrieves a specific blog post. 🎯 Key Features: - Full post content - SEO metadata - Related posts - Engagement metrics
// 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.PostApi;
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");
PostApi apiInstance = new PostApi(defaultClient);
String identifier = "contact_BnKjkbBBS500CoBCP0oChQ"; // String | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) **Format:** `<prefix>_<22-character-id>`
try {
RestRPost result = apiInstance.getPost(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostApi#getPost");
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 | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) Format: `<prefix>_<22-character-id>` |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Post retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
RestRPost updatePost(identifier, restEPost)
Update post
Updates an existing blog post. 🎯 Key Features: - Edit content - Update metadata - Change status - Modify tags/categories
// 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.PostApi;
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");
PostApi apiInstance = new PostApi(defaultClient);
String identifier = "contact_BnKjkbBBS500CoBCP0oChQ"; // String | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) **Format:** `<prefix>_<22-character-id>`
RestEPost restEPost = new RestEPost(); // RestEPost |
try {
RestRPost result = apiInstance.updatePost(identifier, restEPost);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostApi#updatePost");
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 | Resource identifier with prefix (e.g., `contact_BnKjkbBBS500CoBCP0oChQ`) Format: `<prefix>_<22-character-id>` | |
| restEPost | RestEPost |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Post updated successfully | - |
| 400 | ❌ Bad Request - Invalid input data | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |