Update Subcategory

PUT /subcategory

Update the name and other metadata of a subcategory

Headers

application/json

Body

  • category_id string Required

    ID of the category the subcategory is part of

  • subcategory object Required

    Model for a subcategory that a message can be part of. If the subcategory does not yet exist in Lasso it will be created.

    Hide subcategory attributes Show subcategory attributes object

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
PUT /subcategory
curl \
 -X PUT https://api.lassomoderation.com/api/v1/subcategory \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer lasso.a35afd...a6ea" \
 -d '{"category_id":"some-category-id","subcategory":{"id":"some-subcategory-id","name":"Updated subcategory name","metadata":{"total_users":12}}}'
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
}