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).
Body
User, subcategory & category will be automatically created in Lasso if they don't exist yet.
-
Maximum length is
100. -
Set this if this is a reply to another comment/chat message
Maximum length is
100. -
ISO Date e.g. 2022-07-21T18:12:39.000Z https://en.wikipedia.org/wiki/ISO_8601
-
Model for a category that content can be part of. If the category does not yet exist in Lasso it will be created.
-
Model for a subcategory that content can be part of. If the subcategory does not yet exist in Lasso it will be created.
-
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.
-
Maximum length is
4000. -
Not more than
10elements. Maximum length of each is1400. -
Not more than
5elements. Maximum length of each is1400. -
Not more than
5elements. Maximum length of each is1400. -
Not more than
5elements. Maximum length of each is1400. -
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
/.
-
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, orhidden. -
(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
nullthe 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.
- If the field is set to
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}"'
{
"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"
}
}
}
{
"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
}
{
"success": false,
"error": {
"content_id": "Value can be at most 100 characters"
}
}
{
"success": false,
"error": "Invalid API key"
}
{
"error": "Too many requests, check headers for limits"
}