POST https://api.hivemoderation.com/api/v1/custom_index/{custom_index_id}/remove/sync
Sends a request to remove an item from the specified custom index. The synchronous endpoint keeps the HTTP request open until the request completes, then sends the results directly in the response message.
API key from Hive Moderation Dashboard (per-application).
Content-Type
String
Yes
Submit JSON data in the request body.
Request Body Parameters
Parameter (* required)
Type
Description
custom_index_id *
String
ID of the custom index to add the item to. This value should go in the URL path.
custom_index_item_id *
String
Publicly accessible URL for the media to be sent.
Sync Response
Response Fields
Field
Type
Always Returned
Description
task_id
String
Yes
Task ID for the add request.
custom_index_item_id
String
Yes
ID for the custom index item created.
message
String
Yes
Status message.
Example Responses
Example Success (200 OK)
{
"task_id": "db416d21-3924-11f1-9b98-05973c9d24f9",
"custom_index_item_id": "2bM21a29PFBc9vB5xxKoHL_e2aa8d0b-9ff1-4f57-88e9-3fc3e748623e_2_e30523ae589f61d9bea4d6b2da969373a8e8ac3af67312fb90f51e2f5da2086e",
"message": "Media successfully removed from the index"
}
Example Error Response (400 Bad Request)
{
"error": true,
"status": 400,
"error_code": "INVALID_CUSTOM_INDEX_ITEM",
"message": "This Custom Index Item (2bM21a29PFBc9vB5xxKoHL_e2aa8d0b-9ff1-4f57-88e9-3fc3e748623e_3_60e622f9ab7e9f9a5de2afe344ff0d98502b488dfecd9b8c0ba7b7390cda8ad3) does not exist",
"show_alert": false
}
Async Request
POST https://api.hivemoderation.com/api/v1/custom_index/{custom_index_id}/remove/async
Removes an item from a custom index. The asynchronous endpoint immediately sends a response acknowledging receipt of the request, along with a unique task_id. It then closes the connection. Once the task is completed, Hive will send a POST request to the provided callback_url containing the completed task's results.
API key from Hive Moderation Dashboard (per-application).
Content-Type
String
Yes
Submit JSON data in the request body.
Request Body Parameters
The async endpoint has all the same parameters as the sync endpoint, plus the following:
Parameter
Type
Required
Description
callback_url
String
No
URL to receive callback when task completes.
Async Response
An async request will immediately return a response to the user. This will be a response to let the user know that the request has been received (or if an error occurred). After the async task is completed, another response will be sent to the callback_url provided in the initial request. This response will be identical to the sync task's response, which will indicate details about the custom index item id, task id, and API response message.
Response Fields
Field
Type
Always Returned
Description
task_id
String
Yes
Task ID for the add request.
custom_index_item_id
String
Yes
ID of the custom index item.
message
String
Yes
Status message.
Example Responses
Example Success (200 OK)
{
"task_id": "bb5bfd91-3924-11f1-9437-2b2a3631b20e",
"custom_index_item_id": "2bM21a29PFBc9vB5xxKoHL_e2aa8d0b-9ff1-4f57-88e9-3fc3e748623e_3_60e622f9ab7e9f9a5de2afe344ff0d98502b488dfecd9b8c0ba7b7390cda8ad3",
"message": "We received your task (remove item from index)."
}