Hcms
Use this API to monitor communities other than Hive Community that do not provide an API for collecting posts, comments, and board information.
Prerequisites¶
Make sure you can access Hive Console > AI Service > Community Monitoring > Post Monitoring System > Community Settings. If you cannot access the menu, refer to the Hive Console Permission Management Guide to obtain permission. Register a new project in Text Abusing Detection.
Register post, comment, and board information¶
This API registers post, comment, and board information in an array. Each item in the array must contain exactly one of the following keys: content (post), comment, or board (board information). Different item types can be included in the same request.
Request URL¶
| Request information | Value |
|---|---|
| Live URL | https://hcms-backoffice.withhive.com/api/community/register-community-data |
| Sandbox URL | https://sandbox-hcms-backoffice.withhive.com/api/community/register-community-data |
| Test URL | https://test-hcms-backoffice.withhive.com/api/community/register-community-data |
| HTTP Method | POST |
| Content-Type | application/json |
Request Headers¶
| Field | Description | Type | Required |
|---|---|---|---|
| Content-Type | application/json | String | Y |
| api_key | Issued API Key value (either api_key_1 or api_key_2) | String | Y |
| game_name | Identifier of the game or project to register | String | Y |
Request Body¶
content (register a post)¶
| Field | Description | Type | Required |
|---|---|---|---|
| content_idx | Unique post ID | Integer | Y |
| lang | One of the supported language codes | String | Y |
| title | Post title | String | Y |
| body | Post body | String | Y |
| pid | Author account identifier | String | Y |
| register | Author nickname | String | Y |
| regdate | Registration date and time (yyyy-MM-dd HH | String | Y |
| link | URL of the original post | String | Y |
comment (register a comment)¶
| Field | Description | Type | Required |
|---|---|---|---|
| comment_idx | Unique comment ID | Integer | Y |
| lang | One of the supported language codes | String | Y |
| contents_idx | content_idx of the post containing the comment | Integer | Y |
| body | Comment body | String | Y |
| pid | Author account identifier | String | Y |
| register | Author nickname | String | Y |
| regdate | Registration date and time (yyyy-MM-dd HH | String | Y |
| link | Comment URL | String | Y |
board (register board information)¶
| Field | Description | Type | Required |
|---|---|---|---|
| board_idx | Unique board ID | Integer | Y |
| lang_code | One of the supported language codes | String | Y |
| board_name | Board name | String | Y |
board uses full replacement (delete and re-insert)
You must send the complete board list for the game every time. If you send only part of the list, all omitted boards are deleted.
Supported language codes¶
The codes are based on ISO 639-1. Use one of the following codes for the content/comment lang field or the board lang_code field.
| Code | Language (native name) | Language |
|---|---|---|
| ar | العربية | Arabic |
| de | Deutsch | German |
| en | English | English |
| es | Español | Spanish |
| fr | Français | French |
| id | Bahasa Indonesia | Indonesian |
| it | Italiano | Italian |
| ja | 日本語 | Japanese |
| ko | 한국어 | Korean |
| pt | Português | Portuguese |
| ru | русский | Russian |
| th | ไทย | Thai |
| tr | Türkçe | Turkish |
| vi | tiếng Việt | Vietnamese |
| zh-hans | 简体中文 | Simplified Chinese |
| zh-hant | 繁體中文 | Traditional Chinese |
Response¶
The response always includes content, comment, or board when the corresponding type is included in the request.
| Field | Description | Type | Required |
|---|---|---|---|
| content | Number of successful and failed items: | Object | Y (when the request includes content) |
| comment | Number of successful and failed items: | Object | Y (when the request includes comment) |
| board | Number of successful and failed items: { success, failed }. Because boards use full replacement, partial success is not possible; either success or failed is always 0. | Object | Y (when the request includes board) |
| failed_content_idx | content_idx values of failed items; [] if there are no failures | Array(Integer) | Y (when the request includes content) |
| failed_comment_idx | comment_idx values of failed items; [] if there are no failures | Array(Integer) | Y (when the request includes comment) |
| invalid_index | Zero-based array positions of items that do not contain exactly one of content, comment, and board | Array(Integer) | N (only when the request contains malformed items) |
If the registration API toggle for this project is disabled in the back office, the API returns only the following response with status code 200 instead of the fields above, and the data is not saved. This means that the request itself was received successfully.
| Field | Description | Type | Required |
|---|---|---|---|
| active | Always false | Boolean | Y (only when the project is inactive) |
| message | Reason why the data was not saved | String | Y (only when the project is inactive) |
{ "active": false, "message": "This project is currently inactive. The request was received successfully, but the data was not saved." }
Response code¶
| Code | Description |
|---|---|
| 200 | Request processed. Failures for individual items are indicated by failed_content_idx or failed_comment_idx; the status code remains 200. |
| 400 | The request array is empty or the game_name header is missing. |
| 401 | The api_key header is missing or does not match an issued key. |
| 404 | The specified game_name is not registered. |
| 500 | Internal server error, such as a database save failure. |
For 400, 401, and 404 errors, the response body is a single object containing the reason for failure, as shown below.
Request example¶
curl -X POST https://hcms-backoffice.withhive.com/api/community/register-community-data \
-H "Content-Type: application/json" \
-H "api_key: {Issued API Key}" \
-H "game_name: sample_game" \
-d '[
{
"content": {
"content_idx": 10234,
"lang": "en",
"title": "Question about the update",
"body": "I cannot connect after the latest patch.",
"pid": "player_00123",
"register": "sample_user_1",
"regdate": "2026-08-24 15:30:00",
"link": "https://community.example.com/sample_game/board/5/10234"
}
},
{
"comment": {
"comment_idx": 55021,
"lang": "en",
"contents_idx": 10234,
"body": "I am experiencing the same issue.",
"pid": "player_00987",
"register": "sample_user_2",
"regdate": "2026-08-24 15:31:10",
"link": "https://community.example.com/sample_game/board/5/10234#comment-55021"
}
},
{
"board": {
"board_idx": 5,
"lang_code": "en",
"board_name": "General Discussion"
}
}
]'
import java.util.List;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
public class HcmsRealtimeRegisterSample {
private final String apiKey = "<API_KEY>";
private final String gameName = "sample_game";
private final String url = "https://hcms-backoffice.withhive.com/api/community/register-community-data";
public void registerContent() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
String body = "[{\"content\":{"
+ "\"content_idx\":10234,"
+ "\"lang\":\"en\","
+ "\"title\":\"Question about the update\","
+ "\"body\":\"I cannot connect after the latest patch.\","
+ "\"pid\":\"player_00123\","
+ "\"register\":\"sample_user_1\","
+ "\"regdate\":\"2026-08-24 15:30:00\","
+ "\"link\":\"https://community.example.com/sample_game/board/5/10234\""
+ "}}]";
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json");
headers.set("api_key", apiKey);
headers.set("game_name", gameName);
RestTemplate restTemplate = new RestTemplate();
HttpEntity<String> entity = new HttpEntity<>(body, headers);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.POST, entity, String.class);
JsonNode result = objectMapper.readTree(response.getBody());
System.out.println(result.toString());
}
}
import requests
api_key = "<API_KEY>"
game_name = "sample_game"
url = "https://hcms-backoffice.withhive.com/api/community/register-community-data"
headers = {
"Content-Type": "application/json",
"api_key": api_key,
"game_name": game_name,
}
body = [
{
"content": {
"content_idx": 10234,
"lang": "en",
"title": "Question about the update",
"body": "I cannot connect after the latest patch.",
"pid": "player_00123",
"register": "sample_user_1",
"regdate": "2026-08-24 15:30:00",
"link": "https://community.example.com/sample_game/board/5/10234",
}
}
]
response = requests.post(url, headers=headers, json=body)
print(response.json())
Response example¶
{
"content": { "success": 1, "failed": 0 },
"comment": { "success": 1, "failed": 0 },
"board": { "success": 1, "failed": 0 },
"failed_content_idx": [],
"failed_comment_idx": []
}
Example: Two of five posts fail
Example: Items that do not contain exactly one of content, comment, and board
Index 1 contains both content and comment, while index 2 is an empty object ({}) that contains none of them.
Check registration readiness¶
This read-only API checks whether the specified game_name can receive requests through the registration API above, including whether the project is registered and whether an API Key has been issued. api_key authentication is not required.
Request URL¶
| Request information | Value |
|---|---|
| Live URL | https://hcms-backoffice.withhive.com/api/community/register-community-data/check |
| Sandbox URL | https://sandbox-hcms-backoffice.withhive.com/api/community/register-community-data/check |
| Test URL | https://test-hcms-backoffice.withhive.com/api/community/register-community-data/check |
| Method | GET |
Request Headers¶
| Field | Description | Type | Required |
|---|---|---|---|
| game_name | Identifier of the game or project to check | String | Y |
Response¶
| Field | Description | Type | Required |
|---|---|---|---|
| ready | true if an API Key has been issued and the project is active, meaning it can receive requests immediately. false if no API Key has been issued or if the project is inactive. | boolean | Y |
| message | Status description: no key, inactive (requests are received but not saved), or ready | string | Y |
Response code¶
| Code | Description |
|---|---|
| 200 | Check completed. The result is indicated by ready: true or false. |
| 400 | The game_name header is missing. |
| 404 | The specified game_name is not registered. |
Request example¶
curl -X GET https://hcms-backoffice.withhive.com/api/community/register-community-data/check \
-H "game_name: sample_game"
Response example¶
Notes¶
- Batch scope: Each request registers data for only the game specified in the game_name header.
- Duplicate handling: Resending the same content_idx or comment_idx saves a duplicate because the API does not provide idempotency. Boards are fully replaced, so duplicates are not an issue.
- Body length: There is no length limit for body.
- Key management: Reissuing a key invalidates the previous key immediately.