All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createPostCategory | POST /post/category | Create post category |
| deletePostCategory | DELETE /post/category/{identifier} | Delete post category |
| getAllPostCategories | GET /post/category | Get all post categories |
| getPostCategory | GET /post/category/{identifier} | Get post category by ID |
| updatePostCategory | PUT /post/category/{identifier} | Update post category |
RestRPostCategory createPostCategory(restEPostCategory)
Create post category
Creates a new category for organizing blog posts.
// 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.PostCategoryApi;
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");
PostCategoryApi apiInstance = new PostCategoryApi(defaultClient);
RestEPostCategory restEPostCategory = new RestEPostCategory(); // RestEPostCategory |
try {
RestRPostCategory result = apiInstance.createPostCategory(restEPostCategory);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostCategoryApi#createPostCategory");
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 |
|---|---|---|---|
| restEPostCategory | RestEPostCategory |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | ✅ Category created successfully | - |
| 400 | ❌ Bad Request - Invalid input data | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 409 | ❌ Conflict - Resource already exists | - |
MessageResponse deletePostCategory(identifier)
Delete post category
Soft deletes a post category.
// 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.PostCategoryApi;
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");
PostCategoryApi apiInstance = new PostCategoryApi(defaultClient);
String identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
try {
MessageResponse result = apiInstance.deletePostCategory(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostCategoryApi#deletePostCategory");
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 | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Category deleted successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
| 500 | ❌ Internal Server Error - System error occurred | - |
List<RestRPostCategory> getAllPostCategories()
Get all post categories
Retrieves all blog post 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.PostCategoryApi;
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");
PostCategoryApi apiInstance = new PostCategoryApi(defaultClient);
try {
List<RestRPostCategory> result = apiInstance.getAllPostCategories();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostCategoryApi#getAllPostCategories");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Categories retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
RestRPostCategory getPostCategory(identifier)
Get post category by ID
Retrieves a specific post category.
// 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.PostCategoryApi;
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");
PostCategoryApi apiInstance = new PostCategoryApi(defaultClient);
String identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
try {
RestRPostCategory result = apiInstance.getPostCategory(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostCategoryApi#getPostCategory");
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 | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Category retrieved successfully | - |
| 401 | ❌ Unauthorized - Invalid or missing API key | - |
| 404 | ❌ Not Found - Resource does not exist | - |
RestRPostCategory updatePostCategory(identifier, restEPostCategory)
Update post category
Updates a post category.
// 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.PostCategoryApi;
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");
PostCategoryApi apiInstance = new PostCategoryApi(defaultClient);
String identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
RestEPostCategory restEPostCategory = new RestEPostCategory(); // RestEPostCategory |
try {
RestRPostCategory result = apiInstance.updatePostCategory(identifier, restEPostCategory);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PostCategoryApi#updatePostCategory");
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 | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` | |
| restEPostCategory | RestEPostCategory |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | ✅ Category updated successfully | - |
| 400 | ❌ Bad Request - Invalid input data | - |
| 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 | - |