Add/update users

POST /user

Add or update a user

Headers

application/json

Body

  • 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

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
POST /user
curl \
 -X POST https://api.lassomoderation.com/api/v1/user \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer lasso.a35afd...a6ea" \
 -d '{"user":{"id":"clczbfbhh0000sa90h45xv3cg","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","tags":["suspicious-user"],"metadata":{"tag_line":"I am a person of mystery...","connections":8}}}'
Request example
# Headers
Authorization: Bearer lasso.a35afd...a6ea

# Payload
{
  "user": {
    "id": "clczbfbhh0000sa90h45xv3cg",
    "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",
    "tags": [
      "suspicious-user"
    ],
    "metadata": {
      "tag_line": "I am a person of mystery...",
      "connections": 8
    }
  }
}
Response examples (200)
{
  "success": true
}