Update the name and other metadata of a subcategory. The subcategory (and category) is created if it does not exist yet.
Default rate limit: 120 requests per minute.
PUT
/subcategory
curl \
--request PUT 'https://api.lassomoderation.com/api/v1/subcategory' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '"{\n \"category_id\": \"some-category-id\",\n \"subcategory\": {\n \"id\": \"some-subcategory-id\",\n \"name\": \"Updated subcategory name\",\n \"metadata\": {\n \"total_users\": 12\n }\n }\n}"'
Request example
{
"category_id": "some-category-id",
"subcategory": {
"id": "some-subcategory-id",
"name": "Updated subcategory name",
"metadata": {
"total_users": 12
}
}
}
Response examples (200)
{
"success": true
}
Response examples (400)
{
"success": false,
"error": {
"content_id": "Value can be at most 100 characters"
}
}
Response examples (401)
{
"success": false,
"error": "Invalid API key"
}
Response examples (429)
{
"error": "Too many requests, check headers for limits"
}