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 sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.PostCategoryApi();
let restEPostCategory = {"name":"Product Updates"}; // RestEPostCategory |
apiInstance.createPostCategory(restEPostCategory).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEPostCategory | RestEPostCategory |
- Content-Type: application/json
- Accept: application/json
MessageResponse deletePostCategory(identifier)
Delete post category
Soft deletes a post category.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.PostCategoryApi();
let identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
apiInstance.deletePostCategory(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` |
- Content-Type: Not defined
- Accept: application/json
[RestRPostCategory] getAllPostCategories()
Get all post categories
Retrieves all blog post categories.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.PostCategoryApi();
apiInstance.getAllPostCategories().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
RestRPostCategory getPostCategory(identifier)
Get post category by ID
Retrieves a specific post category.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.PostCategoryApi();
let identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
apiInstance.getPostCategory(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` |
- Content-Type: Not defined
- Accept: application/json
RestRPostCategory updatePostCategory(restEPostCategory, identifier)
Update post category
Updates a post category.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.PostCategoryApi();
let restEPostCategory = new sendx.RestEPostCategory(); // RestEPostCategory |
let identifier = "post_category_YzS1wOU20yw87UUHKxMzwn"; // String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn`
apiInstance.updatePostCategory(restEPostCategory, identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEPostCategory | RestEPostCategory | ||
| identifier | String | The unique post category identifier to retrieve. - `post_category_YzS1wOU20yw87UUHKxMzwn` |
- Content-Type: application/json
- Accept: application/json