Update subcategory

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-reference.lassomoderation.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Lasso Moderation API MCP server": {
    "url": "https://api-reference.lassomoderation.com/mcp"
  }
}

Close
PUT /subcategory

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.

application/json

Body

  • category_id string Required

    The ID of the category the subcategory is part of

  • subcategory object Required

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

    Hide subcategory attributes Show subcategory attributes object
    • id string Required

      Maximum length is 100.

    • name string Required

      Maximum length is 300.

    • created_by_user_id string

      The ID of the user that created this subcategory

      Maximum length is 100.

    • metadata object | null

      Extra information about the subcategory

    • image_url string(uri)

      Maximum length is 1400.

    • status string | null

      Optional status to set the initial status of the subcategory. Use the update status API to change it afterwards.

      Values are allowed, flagged, or hidden.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • success boolean Required
  • 400 application/json

    The request is invalid, see the error field for details

    Hide response attributes Show response attributes object
    • success boolean Required
    • error string | object Required

      A message describing the error. For validation errors this is an object with an error message per field.

  • 401 application/json

    The API token is missing or invalid

    Hide response attributes Show response attributes object
    • success boolean Required
    • error string | object Required

      A message describing the error. For validation errors this is an object with an error message per field.

  • 429 application/json

    The rate limit has been exceeded, check the X-RateLimit headers for limits

    Hide headers attributes Show headers attributes
    • X-RateLimit-Limit

      The rate limit interval in milliseconds

    • X-RateLimit-Remaining

      The number of requests remaining in the current interval

    • X-RateLimit-Reset

      The number of milliseconds until requests are allowed again

    Hide response attribute Show response attribute object
    • error string Required
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"
}