Import Users

POST /import/users

Import up to a 1000 users into Lasso per request. Rate limit: 60 per minute

Headers

application/json

Body

  • users array[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 users attributes Show users attributes object
    • id string Required
    • name string
    • created_at string(date)

      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"

    • email string
    • phone_number string
    • country_code string

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

    • ip_address string

      The IP address of the user

    • profile_image_url string
    • signup_method string

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

    • metadata object
    • category_id string

      Set this if the user is only part of a specific category

    • type

      Specify what kind of user this is in your platform. By default this is a "normal" user

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

    • status string

      The status of an object

      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.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • success boolean
POST /import/users
curl \
 --request POST 'https://api.lassomoderation.com/api/v1/import/users' \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer lasso.a35afd...a6ea" \
 --data '{"users":[{"id":"clczbfbhh0000sa90h45xv3cg","name":"John Doe","tags":["suspicious-user"],"metadata":{"tag_line":"I am a person of mystery...","connections":8},"created_at":"2022-07-21T18:12:39.000Z","country_code":"US","email_domain":"gmail.com","signup_method":"google","profile_image_url":"https://www.example.com/profile/image.png"}]}'
Request example
{
  "users": [
    {
      "id": "clczbfbhh0000sa90h45xv3cg",
      "name": "John Doe",
      "tags": [
        "suspicious-user"
      ],
      "metadata": {
        "tag_line": "I am a person of mystery...",
        "connections": 8
      },
      "created_at": "2022-07-21T18:12:39.000Z",
      "country_code": "US",
      "email_domain": "gmail.com",
      "signup_method": "google",
      "profile_image_url": "https://www.example.com/profile/image.png"
    }
  ]
}
Response examples (200)
{
  "success": true
}