Import 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 /import/content

Import up to 1000 pieces of content into Lasso per request.

Default rate limit: 60 requests per minute.

application/json

Body

  • contents array[object] Required

    A piece of content (e.g. a chat message, comment or post) to be moderated by Lasso. Content must contain at least one of text, image_urls, video_urls, audio_urls or pdf_urls.

    At least 1 but not more than 1000 elements.

    Hide contents attributes Show contents attributes object

    A piece of content (e.g. a chat message, comment or post) to be moderated by Lasso. Content must contain at least one of text, image_urls, video_urls, audio_urls or pdf_urls.

    • 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 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
POST /import/content
curl \
 --request POST 'https://api.lassomoderation.com/api/v1/import/content' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"contents\": [\n    {\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\": \"clpmqe04e00gjsarrtctnyr7d\",\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\": \"clpmqe03y00ftsarr9hwvsf1x\",\n        \"name\": \"Mobile Chat\"\n      },\n      \"subcategory\": {\n        \"id\": \"clpmqe03y00fvsarrqv084d4x\",\n        \"name\": \"General Channel\",\n        \"created_by_user_id\": \"clg3k5ypi000gsad0v1znilap\",\n        \"metadata\": {\n          \"description\": \"This channel is used for general communication\"\n        }\n      }\n    }\n  ]\n}"'
Request example
{
  "contents": [
    {
      "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": "clpmqe04e00gjsarrtctnyr7d",
        "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": "clpmqe03y00ftsarr9hwvsf1x",
        "name": "Mobile Chat"
      },
      "subcategory": {
        "id": "clpmqe03y00fvsarrqv084d4x",
        "name": "General Channel",
        "created_by_user_id": "clg3k5ypi000gsad0v1znilap",
        "metadata": {
          "description": "This channel is used for general communication"
        }
      }
    }
  ]
}
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"
}