Synchronously add or update content

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
POST /content/sync

Add or update content to the platform synchronously. Only use this for low volume use-cases. For high availability and higher rate limits use the async /content endpoint.

The request waits for the moderation rules to run and returns the resulting status and actions. When the moderation result is not available within 15 seconds the request returns timeout: true; in that case poll the get content status endpoint for the result. Ingesting videos synchronously is not supported — use the async /content endpoint for videos.

Default rate limit: 120 requests per minute (free workspaces: 1000 pieces of content per week).

application/json

Body

User, subcategory & category will be automatically created in Lasso if they don't exist yet.

  • content_id string Required

    Maximum length is 100.

  • parent_content_id string

    Set this if this is a reply to another comment/chat message

    Maximum length is 100.

  • created_at string(date-time)

    ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

  • category object Required

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

    Hide category attributes Show category attributes object
    • id string Required

      Maximum length is 100.

    • name string Required

      Maximum length is 100.

  • 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.

  • user object Required

    Model for a user that you can send to Lasso. If the id of the user does not yet exist a new user will be made.

    Hide user attributes Show user attributes object
    • id string Required

      Maximum length is 100.

    • name string

      Maximum length is 100.

    • created_at string(date-time)

      ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

    • email_domain string

      The email domain of your user. So "user@example.com" would be "example.com"

      Maximum length is 100.

    • email string

      Maximum length is 100.

    • phone_number string

      Maximum length is 100.

    • country_code string

      Two letter code according to the https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 standard

      Minimum length is 2, maximum length is 2.

    • ip_address string

      The IP address of the user

      Maximum length is 100.

    • profile_image_url string(uri)

      Maximum length is 1400.

    • signup_method string

      The method the user has used to sign up on your platform. This can be email, google, facebook, apple, phone, twitter, or unknown.

      Maximum length is 100.

    • metadata object | null

      Extra free-form data about the object as key-value pairs. Values can be strings, numbers, booleans, null, or an object with one more level of key-value pairs.

      • The metadata may be at most 4KB (4096 bytes) when serialized as JSON.
      • Keys are not allowed to contain /.
    • category_id string

      Set this if the user is only part of a specific category. Cannot be changed after the user is created.

      Maximum length is 100.

    • type string

      Specify what kind of user this is in your platform. By default this is a "normal" user. The "state_actor" type requires the DSA compliance feature.

      Values are normal, moderator, admin, trusted, testing, or state_actor. Default value is normal.

    • status string | null

      Optional status to set the initial status of the user. This status is only applied when creating the user, not when it is updated. Use the update status API for this.

      Values are allowed, flagged, or hidden.

    • tags array[string]

      The identifiers of the tags. When tags is set, it will override all currently set tags on the user.

      Not more than 100 elements. Maximum length of each is 100.

    • published_at string(date-time) | null

      (optional) ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

      This field can be used to let Lasso know this object has not yet been published.

      • If the field is set to null the object is marked as not yet published.
      • If the field is set to a date, we use that date as the published date.
      • If the field is not specified, we assume the created at date as the published date. Note: this field can only be set when creating the object, use the publish endpoint to publish it.
    • photo_id_urls array[string(uri)]

      Photo IDs can be used to recognize this user's face in the content.

      Not more than 25 elements. Maximum length of each is 1400.

  • text string

    Maximum length is 4000.

  • image_urls array[string(uri)]

    Not more than 10 elements. Maximum length of each is 1400.

  • video_urls array[string(uri)]

    Not more than 5 elements. Maximum length of each is 1400.

  • audio_urls array[string(uri)]

    Not more than 5 elements. Maximum length of each is 1400.

  • pdf_urls array[string(uri)]

    Not more than 5 elements. Maximum length of each is 1400.

  • metadata object | null

    Extra free-form data about the object as key-value pairs. Values can be strings, numbers, booleans, null, or an object with one more level of key-value pairs.

    • The metadata may be at most 4KB (4096 bytes) when serialized as JSON.
    • Keys are not allowed to contain /.
  • status string | null

    Optional status to set the initial status of the content. This status will only be set when creating the content, not when it is updated. Use the update status API for this.

    Values are allowed, flagged, or hidden.

  • published_at string(date-time) | null

    (optional) ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

    This field can be used to let Lasso know this object has not yet been published.

    • If the field is set to null the object is marked as not yet published.
    • If the field is set to a date, we use that date as the published date.
    • If the field is not specified, we assume the created at date as the published date. Note: this field can only be set when creating the object, use the publish endpoint to publish it.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • success boolean Required
    • status string | null

      Note: This is not set when the request times out

      Values are allowed, flagged, or hidden.

    • timeout boolean

      Only set when the synchronous request times out. In this case use the content status to poll the status of the content.

    • actions array[object]

      Note: This is not set when the request times out

      Hide actions attributes Show actions attributes object

      An action that was taken on an object (e.g. a status change), in the same format as webhook action payloads.

      • action_id string Required
      • action_created_at string(date-time) Required

        ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

      • action_type string Required
      • type string Required
      • tags_added array[string]
      • rule_id string
      • actor_id string
      • content object
        Hide content attributes Show content attributes object
        • id string Required
        • created_at string(date-time) Required

          ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601

        • category_id string Required
        • subcategory_id string Required
        • user_id string Required
        • tags array[string] Required
      • status string | null

        The status of an object

        Values are allowed, flagged, or hidden.

      • previous_status string | null

        The status of an object

        Values are allowed, flagged, or hidden.

      • policy_id string
      • policy_name string
  • 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
POST /content/sync
curl \
 --request POST 'https://api.lassomoderation.com/api/v1/content/sync' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"content_id\": \"clpmqe04600g7sarrxxg0mbjo\",\n  \"created_at\": \"2022-07-21T18:12:39.000Z\",\n  \"text\": \"This is the content of the message 🎉\",\n  \"image_urls\": [\n    \"https://example.com/image.png\"\n  ],\n  \"video_urls\": [\n    \"https://example.com/video.mov\"\n  ],\n  \"audio_urls\": [\n    \"https://example.com/audio.mp3\"\n  ],\n  \"metadata\": {\n    \"likes\": 8\n  },\n  \"parent_content_id\": \"clpwuqoxi0001saas891t1jn7\",\n  \"user\": {\n    \"id\": \"clpmqe04k00grsarr9jqdq1mq\",\n    \"created_at\": \"2022-07-21T18:12:39.000Z\",\n    \"name\": \"John Doe\",\n    \"email_domain\": \"gmail.com\",\n    \"signup_method\": \"google\",\n    \"country_code\": \"US\",\n    \"profile_image_url\": \"https://www.example.com/profile/image.png\",\n    \"metadata\": {\n      \"tag_line\": \"I am a person of mystery...\",\n      \"connections\": 8\n    }\n  },\n  \"category\": {\n    \"id\": \"clpmr76lz00icsarraeb9334v\",\n    \"name\": \"Mobile Chat\"\n  },\n  \"subcategory\": {\n    \"id\": \"clczbfbhh0000sa90h45xv3cg\",\n    \"name\": \"General Channel\",\n    \"created_by_user_id\": \"clg3k5ypi000gsad0v1znilap\",\n    \"metadata\": {\n      \"description\": \"This channel is used for general communication\"\n    }\n  }\n}"'
Request example
{
  "content_id": "clpmqe04600g7sarrxxg0mbjo",
  "created_at": "2022-07-21T18:12:39.000Z",
  "text": "This is the content of the message 🎉",
  "image_urls": [
    "https://example.com/image.png"
  ],
  "video_urls": [
    "https://example.com/video.mov"
  ],
  "audio_urls": [
    "https://example.com/audio.mp3"
  ],
  "metadata": {
    "likes": 8
  },
  "parent_content_id": "clpwuqoxi0001saas891t1jn7",
  "user": {
    "id": "clpmqe04k00grsarr9jqdq1mq",
    "created_at": "2022-07-21T18:12:39.000Z",
    "name": "John Doe",
    "email_domain": "gmail.com",
    "signup_method": "google",
    "country_code": "US",
    "profile_image_url": "https://www.example.com/profile/image.png",
    "metadata": {
      "tag_line": "I am a person of mystery...",
      "connections": 8
    }
  },
  "category": {
    "id": "clpmr76lz00icsarraeb9334v",
    "name": "Mobile Chat"
  },
  "subcategory": {
    "id": "clczbfbhh0000sa90h45xv3cg",
    "name": "General Channel",
    "created_by_user_id": "clg3k5ypi000gsad0v1znilap",
    "metadata": {
      "description": "This channel is used for general communication"
    }
  }
}
Response examples (200)
{
  "success": true,
  "status": "flagged",
  "actions": [
    {
      "action_id": "clyimre7x001sei5oaa3k8wmn",
      "action_created_at": "2024-07-12T11:44:26.300Z",
      "action_type": "ChangeStatus",
      "status": "flagged",
      "previous_status": null,
      "rule_id": "clesjpsib0001ukkq5e62gwnw",
      "content": {
        "id": "5065614664",
        "created_at": "2024-07-12T11:44:25.500Z",
        "category_id": "chat",
        "subcategory_id": "chat-community",
        "user_id": "therese",
        "tags": [
          "another-tag"
        ]
      },
      "type": "content",
      "policy_id": "other",
      "policy_name": "Other"
    }
  ]
}
{
  "success": true,
  "timeout": 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"
}