Body
User, topic & project will be automatically created in Lasso if they don't exist yet.
-
content_id string Required
-
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.
-
project object Required
Model for a project that a message can be part of. If the project does not yet exist in Lasso it will be created.
-
topic object Required
Model for a topic that a message can be part of. If the topic does not yet exist in Lasso it will be created.
-
created_at string(date)
ISO Date e.g. 2022-07-21T18:12:39.000Z
https://en.wikipedia.org/wiki/ISO_8601 -
text string
-
image_urls array[string]
Maximum length of each is
400
. -
video_urls array[string]
Maximum length of each is
400
. -
metadata object
POST /content
curl \
-X POST https://api.lassomoderation.com/api/v1/content \
-H "Content-Type: application/json" \
-H "Authorization: Bearer lasso.a35afd...a6ea" \
-d '{"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"],"metadata":{"likes":8},"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}},"project":{"id":"clpmr76lz00icsarraeb9334v","created_at":"2022-07-21T18:12:39.000Z","name":"Mobile Chat"},"topic":{"id":"clczbfbhh0000sa90h45xv3cg","created_at":"2022-07-21T18:12:39.000Z","name":"General Channel","createdByUserId":"clg3k5ypi000gsad0v1znilap","metadata":{"description":"This channel is used for general communication"}}}'
Request example
# Headers
Authorization: Bearer lasso.a35afd...a6ea
# Payload
{
"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"
],
"metadata": {
"likes": 8
},
"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
}
},
"project": {
"id": "clpmr76lz00icsarraeb9334v",
"created_at": "2022-07-21T18:12:39.000Z",
"name": "Mobile Chat"
},
"topic": {
"id": "clczbfbhh0000sa90h45xv3cg",
"created_at": "2022-07-21T18:12:39.000Z",
"name": "General Channel",
"createdByUserId": "clg3k5ypi000gsad0v1znilap",
"metadata": {
"description": "This channel is used for general communication"
}
}
}
Response examples (200)
{
"success": true
}