openapi: 3.1.0
x-stoplight:
  id: flgib01r3r3kp
info:
  title: Lasso Moderation API
  version: '1.0'
  description: 'API for Lasso''s content moderation platform. To generate an API token, please go to https://app.lassomoderation.com/settings.'
  contact:
    name: Ruud Visser
    email: info@lassomoderation.com
    url: 'https://www.lassomoderation.com'
  termsOfService: 'https://www.lassomoderation.com/terms-conditions/'
servers:
  - url: 'https://api.lassomoderation.com/api/v1'
    description: Lasso Moderation API V1
paths:
  /content:
    parameters: []
    post:
      summary: Add/update content
      operationId: post-content
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Add or update content to the platform
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content_id
                - subcategory
                - category
                - user
              properties:
                content_id:
                  type: string
                  x-stoplight:
                    id: 41mjr4906nvjk
                parent_content_id:
                  type: string
                  x-stoplight:
                    id: svk5jshwbso8u
                  description: Set this if this is a reply to another comment/chat message
                created_at:
                  $ref: '#/components/schemas/Date'
                  x-stoplight:
                    id: nnul0ipl8a243
                subcategory:
                  $ref: '#/components/schemas/Subcategory'
                  x-stoplight:
                    id: msg3ng1upomlx
                category:
                  $ref: '#/components/schemas/Category'
                  x-stoplight:
                    id: i5m7mva0fg6vx
                user:
                  $ref: '#/components/schemas/User'
                text:
                  type: string
                  x-stoplight:
                    id: 6rxxyk6wiio5c
                  maxLength: 4000
                image_urls:
                  type: array
                  x-stoplight:
                    id: 594qqoy6u5jkb
                  items:
                    x-stoplight:
                      id: ueuhqarsrnvsk
                    type: string
                    maxLength: 1400
                video_urls:
                  type: array
                  x-stoplight:
                    id: 6a5trk6hs0qlh
                  items:
                    x-stoplight:
                      id: qe70rmumbfhmc
                    type: string
                    maxLength: 1400
                audio_urls:
                  type: array
                  x-stoplight:
                    id: 151imdx32h6gs
                  items:
                    x-stoplight:
                      id: ep615hq0f8agh
                    type: string
                    maxLength: 1400
                metadata:
                  type: object
                  x-stoplight:
                    id: vuu177iefrgke
                published_at:
                  x-stoplight:
                    id: o3fgo3o0ua6y3
                  description: |-
                    (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 content has not yet been published.
                    - If the field is set to `null` the user 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 content, use the publish endpoint to publish the content.
                  type: string
            examples:
              Example 1:
                value:
                  content_id: clpmqe04600g7sarrxxg0mbjo
                  created_at: '2022-07-21T18:12:39.000Z'
                  text: "This is the content of the message \U0001F389"
                  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
                    createdByUserId: clg3k5ypi000gsad0v1znilap
                    metadata:
                      description: This channel is used for general communication
        description: 'User, subcategory & category will be automatically created in Lasso if they don''t exist yet.'
  /content/sync:
    parameters: []
    post:
      summary: Synchronously add/update content
      operationId: post-content-sync
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    success: true
                    status: flagged
                    actions:
                      - action_id: clyimre9e001xei5oo0xm5f42
                        action_created_at: '2024-07-12T11:44:26.344Z'
                        action_type: AddTags
                        tags_added:
                          - another-tag
                        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
                          project_id: chat
                          topic_id: chat-community
                          analysis:
                            threat: 0.008065036
                            toxicity: 0.112953395
                            profanity: 0.059447967
                            identity_attack: 0.007473567
                            language: en
                        type: content
                      - action_id: clyimre7x001sei5oaa3k8wmn
                        action_created_at: '2024-07-12T11:44:26.300Z'
                        action_type: ChangeStatus
                        status: flagged
                        previous_status: allowed
                        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
                          project_id: chat
                          topic_id: chat-community
                          analysis:
                            threat: 0.008065036
                            toxicity: 0.112953395
                            profanity: 0.059447967
                            identity_attack: 0.007473567
                            language: en
                        type: content
                        policy_id: other
                        policy_name: Other
                required:
                  - success
                properties:
                  success:
                    type: boolean
                  status:
                    $ref: '#/components/schemas/Status'
                    description: 'Note: This is not set when the request times out'
                  timeout:
                    type: boolean
                    x-stoplight:
                      id: 7sztx22ays9yr
                    description: |-
                      Only set when the synchronous request times out.
                      In this case use the content status to poll the status of the content.
                  actions:
                    type: array
                    description: 'Note: This is not set when the request times out'
                    items:
                      type: object
                      required:
                        - action_id
                        - action_created_at
                        - action_type
                        - type
                      properties:
                        action_id:
                          type: string
                        action_created_at:
                          $ref: '#/components/schemas/Date'
                        action_type:
                          type: string
                        type:
                          type: string
                        tags_added:
                          type: array
                          items:
                            type: string
                        rule_id:
                          type: string
                        actor_id:
                          type: string
                          x-stoplight:
                            id: 4xn6y5lq8r2lz
                        content:
                          type: object
                          required:
                            - id
                            - created_at
                            - category_id
                            - subcategory_id
                            - user_id
                            - tags
                          properties:
                            id:
                              type: string
                            created_at:
                              $ref: '#/components/schemas/Date'
                            category_id:
                              type: string
                            subcategory_id:
                              type: string
                            user_id:
                              type: string
                            tags:
                              type: array
                              items:
                                type: string
                        status:
                          $ref: '#/components/schemas/Status'
                        previous_status:
                          $ref: '#/components/schemas/Status'
                        policy_id:
                          type: string
                        policy_name:
                          type: string
              examples:
                Example 1:
                  value:
                    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
      description: |-
        Add or update content to the platform synchronously. Only use this for low volume use-cases.
        For high availablity and higher rate limits use the async /content endpoint.
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content_id
                - category
                - subcategory
                - user
              properties:
                content_id:
                  type: string
                parent_content_id:
                  type: string
                  description: Set this if this is a reply to another comment/chat message
                created_at:
                  $ref: '#/components/schemas/Date'
                category:
                  $ref: '#/components/schemas/Category'
                subcategory:
                  $ref: '#/components/schemas/Subcategory'
                user:
                  $ref: '#/components/schemas/User'
                text:
                  type: string
                  maxLength: 4000
                image_urls:
                  type: array
                  items:
                    type: string
                    maxLength: 1400
                video_urls:
                  type: array
                  items:
                    type: string
                    maxLength: 1400
                audio_urls:
                  type: array
                  x-stoplight:
                    id: 2ipx7k4sa43au
                  items:
                    x-stoplight:
                      id: 7ji615ml5hv41
                    type: string
                    maxLength: 1400
                metadata:
                  type: object
                published_at:
                  x-stoplight:
                    id: feahcw4v5oo9z
                  description: |-
                    (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 content has not yet been published.
                    - If the field is set to `null` the user 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 content, use the publish endpoint to publish the content.
                  type: string
            examples:
              Example 1:
                value:
                  content_id: clpmqe04600g7sarrxxg0mbjo
                  created_at: '2022-07-21T18:12:39.000Z'
                  text: "This is the content of the message \U0001F389"
                  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
                    createdByUserId: clg3k5ypi000gsad0v1znilap
                    metadata:
                      description: This channel is used for general communication
        description: 'User, subcategory & category will be automatically created in Lasso if they don''t exist yet.'
      x-stoplight:
        id: 674nkkot046fv
  /import/content:
    parameters: []
    post:
      summary: Import Content
      operationId: post-import-content
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: |-
        Import up to a 1000 pieces of content into Lasso per request. 
        Rate limit: 60 per minute
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contents:
                  type: array
                  x-stoplight:
                    id: 7ta1l89rwv1ma
                  items:
                    x-stoplight:
                      id: fu1qy6h20oy64
                    type: object
                    maxProperties: 1000
                    minProperties: 1
                    required:
                      - content_id
                      - user
                      - category
                      - subcategory
                    properties:
                      content_id:
                        type: string
                        x-stoplight:
                          id: 3a1vnzjdrmm7x
                      user:
                        $ref: '#/components/schemas/User'
                      category:
                        $ref: '#/components/schemas/Category'
                        x-stoplight:
                          id: 3ygmvb5hpe1wf
                      subcategory:
                        $ref: '#/components/schemas/Subcategory'
                        x-stoplight:
                          id: jhzgo17no8ea4
                      created_at:
                        $ref: '#/components/schemas/Date'
                        x-stoplight:
                          id: kihyv1my06rlg
                      status:
                        $ref: '#/components/schemas/Status'
                        x-stoplight:
                          id: lfksvwiu94wxf
                        description: '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.'
                      text:
                        type: string
                        x-stoplight:
                          id: 8twt08zkevf2l
                        maxLength: 4000
                      image_urls:
                        type: array
                        x-stoplight:
                          id: 313iuc55mohvp
                        items:
                          x-stoplight:
                            id: 09qbdzuv7bbbl
                          type: string
                          maxLength: 1400
                      video_urls:
                        type: array
                        x-stoplight:
                          id: teydlvxt9ucqw
                        items:
                          x-stoplight:
                            id: xzy2yx0dl600n
                          type: string
                          maxLength: 1400
                      audio_urls:
                        type: array
                        x-stoplight:
                          id: wk1jxk4097twu
                        items:
                          x-stoplight:
                            id: kmo42750p7320
                          type: string
                          maxLength: 1400
                      metadata:
                        type: object
                        x-stoplight:
                          id: kuhbvsen9k7tp
                      parent_content_id:
                        type: string
                        x-stoplight:
                          id: 2ujtvmz1q9n1i
                        description: The ID of the parent content. This could for instance be the content this is a reply to.
            examples:
              Example 1:
                value:
                  contents:
                    - content_id: clpmqe04600g7sarrxxg0mbjo
                      created_at: '2022-07-21T18:12:39.000Z'
                      text: "This is the content of the message \U0001F389"
                      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
                        createdByUserId: clg3k5ypi000gsad0v1znilap
                        metadata:
                          description: This channel is used for general communication
        description: ''
      x-stoplight:
        id: ih5zpnhytgj7u
  /user:
    parameters: []
    post:
      summary: Add/update users
      operationId: post-user
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Add or update a user
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  $ref: '#/components/schemas/User'
              required:
                - user
            examples:
              Example 1:
                value:
                  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
        description: ''
  /import/users:
    parameters: []
    post:
      summary: Import Users
      operationId: post-import-users
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: |-
        Import up to a 1000 users into Lasso per request. 
        Rate limit: 60 per minute
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                users:
                  type: array
                  x-stoplight:
                    id: wxrdu86quf41o
                  items:
                    $ref: '#/components/schemas/User'
                    x-stoplight:
                      id: lo0wixqu4pubm
              required:
                - users
            examples:
              Example 1:
                value:
                  users:
                    - 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
        description: ''
      x-stoplight:
        id: f4kh0sf14aqko
  /status:
    parameters: []
    put:
      summary: Update object status
      operationId: update-status
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: 'Update the status of content, users or subcategories. This endpoint should only be used if you have actions that change the object''s status. Call this endpoint if you want to sync the status of the object(s) with Lasso.'
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  $ref: '#/components/schemas/Status'
                  x-stoplight:
                    id: xnsfb8vq09c81
                moderator_email:
                  type: string
                  x-stoplight:
                    id: q0detz13gp7ds
                  format: email
                  example: moderator@example.com
                content_ids:
                  type: array
                  x-stoplight:
                    id: zeu5y3xluvhmz
                  items:
                    x-stoplight:
                      id: 2bevrqpcllucq
                    type: string
                subcategory_ids:
                  type: array
                  x-stoplight:
                    id: lq3kooe6g2dpx
                  items:
                    x-stoplight:
                      id: p55bh58k37bb8
                    type: string
                user_ids:
                  type: array
                  x-stoplight:
                    id: xvcw050eubl59
                  items:
                    x-stoplight:
                      id: w049dj2vyfd1f
                    type: string
                temporary:
                  type: object
                  x-stoplight:
                    id: ygiiu1t7o8qn7
                  additionalProperties: false
                  description: 'Can be used when temporarily hidding/banning a user. To ban a user for 2 weeks, set `ban_duration` to `2` and the `ban_duration_period` to `week`.'
                  properties:
                    ban_duration:
                      type: number
                      x-stoplight:
                        id: gpr8x3zs6ynpm
                    ban_duration_period:
                      x-stoplight:
                        id: x7wzga1y5j707
                      enum:
                        - hour
                        - day
                        - week
                policy_id:
                  type: string
                  x-stoplight:
                    id: 3pecp5954w5lt
                  description: The id of the policy that is used for the status change
                category_id:
                  type: string
                  x-stoplight:
                    id: iu7mf2eegvwk8
                  description: Required when updating subcategories
            examples:
              Example 1:
                value:
                  status: hidden
                  moderator_email: moderator@example.com
                  content_ids:
                    - clemwm8ix0007sa8stctcndvj
              Example 2:
                value:
                  status: allowed
                  user_ids:
                    - cleslnvoo0006ukjygou5r4r6
                  message_ids:
                    - clf43i7hw00nusax3u298ucmu
                    - clf43i6v600ltsax3mjdko2r1
        description: |-
          Send status updates in bulk by sending a list of IDs, or send a single ID in a list.
          Optionally, you can send the email of a moderator if you want to attribute the action to this moderator. Otherwise, it will by default attribute it to the API bot.
  /user/publish:
    parameters: []
    put:
      summary: Publish User
      operationId: publish-user
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
        4XX:
          description: Will return a 400 when the user is already published
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    x-stoplight:
                      id: jgjva74baj68k
                  error:
                    type: string
                    x-stoplight:
                      id: sb5mqb3rxupbz
              examples:
                Example 1:
                  value:
                    success: false
                    error: User already published
      description: Mark the user as published
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
                - published_at
              properties:
                user_id:
                  type: string
                  x-stoplight:
                    id: dp1ub3225wj2d
                published_at:
                  $ref: '#/components/schemas/Date'
                  x-stoplight:
                    id: cob3y2i5ev0sw
                  description: The date the user was published
            examples:
              Example 1:
                value:
                  user_id: clemwm8ix0007sa8stctcndvj
                  published_at: '2022-07-21T18:12:39.000Z'
        description: Mark a user as published.
      x-stoplight:
        id: o4chguepyb6ux
  /content/publish:
    parameters: []
    put:
      summary: Publish Content
      operationId: publish-content
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
        4XX:
          description: Will return a 400 when the content is already published
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
              examples:
                Example 1:
                  value:
                    success: false
                    error: User already published
      description: Mark content as published
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content_id
                - published_at
              properties:
                content_id:
                  type: string
                  x-stoplight:
                    id: 84aiukkbc094w
                published_at:
                  $ref: '#/components/schemas/Date'
                  description: The date the user was published
            examples:
              Example 1:
                value:
                  content_id: clemwm8ix0007sa8stctcndvj
                  published_at: '2022-07-21T18:12:39.000Z'
        description: Mark content as published.
      x-stoplight:
        id: zzksc95tm3ddp
  /content/metadata:
    parameters: []
    put:
      summary: Update Metadata
      operationId: metadata-content
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - metadata
                properties:
                  success:
                    type: boolean
                  metadata:
                    type: object
                    x-stoplight:
                      id: w1usrwz6m1t3f
              examples:
                Example 1:
                  value:
                    success: true
        4XX:
          description: Will return a 400 when the content is already published
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
              examples:
                Example 1:
                  value:
                    success: false
                    error: User already published
      description: Update the metadata of content without creating a new version of the content
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content_id
                - metadata
              properties:
                content_id:
                  type: string
                metadata:
                  type: object
                  x-stoplight:
                    id: 7iiwq5wbx6q3c
            examples:
              Example 1:
                value:
                  content_id: clemwm8ix0007sa8stctcndvj
                  metadata:
                    likes: 12
                    replies: 4
        description: Update the metadata of content without creating a new version of the content
      x-stoplight:
        id: xdedjyw10h6rd
  '/status/{contentId}':
    parameters:
      - schema:
          type: string
        name: contentId
        in: path
        required: true
    get:
      summary: Get content status
      tags: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    success: true
                    status: allowed
                    actions:
                      - action_id: clyiud8xy001o7uaj2aj841hz
                        action_created_at: '2024-07-12T15:17:23.205Z'
                        action_type: ChangeStatus
                        status: allowed
                        previous_status: allowed
                        actor_id: clesgbw2m000lukh42yesbmk0
                        content:
                          id: '1188620289'
                          created_at: '2024-07-11T15:41:06.027Z'
                          category_id: chat
                          subcategory_id: chat-community
                          user_id: jasmine
                          tags:
                            - another-tag
                          project_id: chat
                          topic_id: chat-community
                        type: content
                      - action_id: clyhfrwg2000awx1zzi1ieygo
                        action_created_at: '2024-07-11T15:41:06.434Z'
                        action_type: ChangeStatus
                        status: flagged
                        previous_status: allowed
                        rule_id: clsygya4g000nuku4u42jwyqj
                        content:
                          id: '1188620289'
                          created_at: '2024-07-11T15:41:06.027Z'
                          category_id: chat
                          subcategory_id: chat-community
                          user_id: jasmine
                          tags:
                            - another-tag
                          project_id: chat
                          topic_id: chat-community
                        type: content
                        policy_id: other
                        policy_name: Other
                      - action_id: clyhfrwft0007wx1z2nk8wsc1
                        action_created_at: '2024-07-11T15:41:06.414Z'
                        action_type: AddTags
                        tags_added:
                          - another-tag
                        rule_id: clesjpsib0001ukkq5e62gwnw
                        content:
                          id: '1188620289'
                          created_at: '2024-07-11T15:41:06.027Z'
                          category_id: chat
                          subcategory_id: chat-community
                          user_id: jasmine
                          tags:
                            - another-tag
                          project_id: chat
                          topic_id: chat-community
                        type: content
                      - action_id: clyhfrweo0002wx1z402kp4id
                        action_created_at: '2024-07-11T15:41:06.383Z'
                        action_type: ChangeStatus
                        status: flagged
                        previous_status: allowed
                        rule_id: clesjpsib0001ukkq5e62gwnw
                        content:
                          id: '1188620289'
                          created_at: '2024-07-11T15:41:06.027Z'
                          category_id: chat
                          subcategory_id: chat-community
                          user_id: jasmine
                          tags:
                            - another-tag
                          project_id: chat
                          topic_id: chat-community
                        type: content
                        policy_id: other
                        policy_name: Other
                required:
                  - success
                  - status
                  - actions
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  actions:
                    type: array
                    items:
                      type: object
                      required:
                        - action_id
                        - action_created_at
                        - action_type
                        - type
                      properties:
                        action_id:
                          type: string
                        action_created_at:
                          type: string
                        action_type:
                          type: string
                        type:
                          type: string
                        status:
                          type: string
                        previous_status:
                          type:
                            - string
                        content:
                          type: object
                          required:
                            - id
                            - created_at
                            - category_id
                            - subcategory_id
                            - user_id
                            - tags
                          properties:
                            id:
                              type: string
                            created_at:
                              type: string
                            category_id:
                              type: string
                            subcategory_id:
                              type: string
                            user_id:
                              type: string
                            tags:
                              type: array
                              items:
                                type: string
                        tags_added:
                          type: array
                          items:
                            type: string
                        actor_id:
                          type: string
                        rule_id:
                          type: string
                        policy_id:
                          type: string
                        policy_name:
                          type: string
              examples:
                Example 1:
                  value:
                    success: true
                    status: flagged
                    actions:
                      - action_id: clyhfrweo0002wx1z402kp4id
                        action_created_at: '2024-07-11T15:41:06.383Z'
                        action_type: ChangeStatus
                        status: flagged
                        previous_status: null
                        rule_id: clesjpsib0001ukkq5e62gwnw
                        content:
                          id: '1188620289'
                          created_at: '2024-07-11T15:41:06.027Z'
                          category_id: chat
                          subcategory_id: chat-community
                          user_id: '9876545634'
                          tags:
                            - another-tag
                        type: content
                        policy_id: other
                        policy_name: Other
      operationId: get-status-content
      x-stoplight:
        id: 6wd86ult2iudi
      description: |-
        Get the status and the actions taken upon a piece of content. 
        When the status is `null` this means that we have not yet ran the moderation rules against the content.
      parameters:
        - schema:
            type: string
          in: header
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          name: Authorization
  /subcategory:
    parameters: []
    put:
      summary: Update Subcategory
      operationId: update-subcategory
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Update the name and other metadata of a subcategory
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - category_id
                - subcategory
              properties:
                category_id:
                  type: string
                  x-stoplight:
                    id: z9n55sj132viw
                  description: 'ID of the category the subcategory is part of '
                subcategory:
                  $ref: '#/components/schemas/Subcategory'
                  x-stoplight:
                    id: f40umrkh1pfbd
            examples:
              Example 1:
                value:
                  category_id: some-category-id
                  subcategory:
                    id: some-subcategory-id
                    name: Updated subcategory name
                    metadata:
                      total_users: 12
        description: ''
      x-stoplight:
        id: ek3cj1xcpxdqc
  /category:
    parameters: []
    put:
      summary: Update Category
      operationId: update-category
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Update the name of a category
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - category
              properties:
                category:
                  $ref: '#/components/schemas/Category'
                  x-stoplight:
                    id: h243yibg6n0fg
            examples:
              Example 1:
                value:
                  category:
                    id: some-category-id
                    name: Updated category name
        description: ''
      x-stoplight:
        id: m42k3o2d4wdwp
  /lists:
    parameters: []
    post:
      summary: Create list
      operationId: create-list
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  listId:
                    type: string
                    x-stoplight:
                      id: 9ybj3vstqt3a0
              examples:
                Example 1:
                  value:
                    success: true
                    listId: clp765qpz06r0saam8dv1p6uh
      description: Create a new list
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  x-stoplight:
                    id: 2u4vvtzwrt0zp
                type:
                  type: string
                  x-stoplight:
                    id: g8plp6iilc6us
              required:
                - name
                - type
            examples:
              Example 1:
                value:
                  name: Bad word list
                  type: strings
        description: ''
      x-stoplight:
        id: 9rdiw5svk933y
    get:
      summary: List lists
      operationId: get-lists
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    x-stoplight:
                      id: imiqqnb472j60
                  lists:
                    type: array
                    x-stoplight:
                      id: 9husk2awm2u1n
                    items:
                      x-stoplight:
                        id: 8vhiwlgse8m7k
                      type: object
                      properties:
                        id:
                          type: string
                          x-stoplight:
                            id: oh86oe4tvte56
                        createdAt:
                          $ref: '#/components/schemas/Date'
                          x-stoplight:
                            id: ueqivv1a7xjvn
                        name:
                          type: string
                          x-stoplight:
                            id: 8ru234ygvc414
                        type:
                          type: string
                          x-stoplight:
                            id: aey55x27jc8sb
                        items:
                          type: number
                          x-stoplight:
                            id: w4nsmfq00vyn3
              examples:
                Example 1:
                  value:
                    success: true
                    lists:
                      - id: clp72q7pv06pqsaamyeqn1bb8
                        createdAt: '2023-11-20T15:40:49.940Z'
                        name: Bad words
                        type: strings
                        items: 23
                      - id: clp72pz7f06plsaamj7vv3iq9
                        createdAt: '2023-11-20T15:40:38.873Z'
                        name: Allowed domains
                        type: urls
                        items: 10
                      - id: clfha90p90000sa0lwso8ehub
                        createdAt: '2023-03-20T20:32:03.021Z'
                        name: Banned countries
                        type: locations
                        items: 3
      x-stoplight:
        id: kva3ss5snc084
      description: List all lists
      parameters:
        - schema:
            type: string
          in: header
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          name: Authorization
  '/lists/{listId}':
    parameters:
      - schema:
          type: string
        name: listId
        in: path
        required: true
        description: The id of the list
    get:
      summary: List items
      operationId: get-lists-items
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  list:
                    type: object
                    additionalProperties:
                      type:
                        - object
                        - string
                        - array
                      x-stoplight:
                        id: zrpdcua08qhw6
                      properties:
                        id:
                          type: string
                        createdAt:
                          $ref: '#/components/schemas/Date'
                        name:
                          type: string
                        type:
                          type: string
                        items:
                          type: array
                          items:
                            x-stoplight:
                              id: 9y9pb18cxhplj
                            type: string
              examples:
                Example 1:
                  value:
                    success: true
                    list:
                      id: clf3twurb0005sas3keq74fqp
                      createdAt: '2023-03-11T10:33:41.304Z'
                      name: Bad words
                      type: strings
                      items:
                        - shut up
                        - f*ck
      description: Get all items in a list
      parameters:
        - schema:
            type: string
          in: header
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          name: Authorization
      x-stoplight:
        id: kmm4r14kko2ck
    post:
      summary: Add list items
      operationId: add-list-items
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  addedItems:
                    type: array
                    x-stoplight:
                      id: 20vk31u78ipba
                    items:
                      x-stoplight:
                        id: elxsi3swu58bg
                      type: string
              examples:
                Example 1:
                  value:
                    success: true
                    addedItems:
                      - bad word
                      - another bad word
      description: Add new items to a list
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  x-stoplight:
                    id: w5k7lm3wpqy6x
                  items:
                    x-stoplight:
                      id: xdffuxc5llcdl
                    type: string
              required:
                - items
            examples:
              Example 1:
                value:
                  items:
                    - Bad word
                    - other bad word
        description: ''
      x-stoplight:
        id: ob615lal4cqnf
    delete:
      summary: ''
      operationId: delete-lists-items
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    x-stoplight:
                      id: 20z4bqg548439
                    type: boolean
                  deletedItems:
                    type: array
                    x-stoplight:
                      id: imv9lnjud2vk1
                    items:
                      x-stoplight:
                        id: 3ru37egzosi9z
                      type: string
              examples:
                Example 1:
                  value:
                    success: true
                    deletedItems:
                      - bad word
      x-stoplight:
        id: 7t1lvthg5jkb9
      description: Delete items from a list
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  x-stoplight:
                    id: pqbbq795n0jjf
                  items:
                    x-stoplight:
                      id: 74gwrgfazbsbf
                    type: string
              required:
                - items
            examples:
              Example 1:
                value:
                  items:
                    - Bad word
  /user-reports:
    get:
      summary: Get report policy options
      tags:
        - reporting
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - policies
                properties:
                  success:
                    type: boolean
                    x-stoplight:
                      id: ol3mgz33k0498
                  policies:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - name
                      properties:
                        id:
                          type: string
                          example: rude_gestures
                        name:
                          type: string
                          example: Rude Gestures
                        description:
                          type: string
                          x-stoplight:
                            id: s6vrvsh9yl4eo
                        translations:
                          type: object
                          x-stoplight:
                            id: lk4nh1kyn35mh
                          required:
                            - name
                          properties:
                            name:
                              type: object
                              x-stoplight:
                                id: mjicsesrccit1
                              properties:
                                en:
                                  type: string
                                  x-stoplight:
                                    id: ncby8t63iiseu
                                fr:
                                  type: string
                                  x-stoplight:
                                    id: 6kj9b5uni39lk
                                de:
                                  type: string
                                  x-stoplight:
                                    id: 1990g4qo5r662
                            description:
                              type: object
                              x-stoplight:
                                id: 92rhltrgh1xjx
                              properties:
                                en:
                                  type: string
                                  x-stoplight:
                                    id: 01irwtdos6dfi
                                fr:
                                  type: string
                                  x-stoplight:
                                    id: p7jpljp0y49gc
                                de:
                                  type: string
                                  x-stoplight:
                                    id: i7m7uzx77yyf2
              examples:
                Example 1:
                  value:
                    success: true
                    policies:
                      - id: rude_gestures
                        name: Rude Gestures
                        description: Images containing rude gestures
                        translations:
                          name:
                            en: Rude Gestures
                            nl: Onbeschofte gebaren
                          description:
                            en: Images containing rude gestures
                            nl: Afbeeldingen met onbeschofte gebaren
                      - id: other
                        name: Other
      operationId: get-reports
      description: Get all the possible policy options that a user can select when making a user report.
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
          name: Authorization
    post:
      summary: Make report
      tags:
        - reporting
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
              examples:
                Example 1:
                  value:
                    success: true
      operationId: post-reports
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                report:
                  type: object
                  required:
                    - reported_by_id
                    - policy_id
                  properties:
                    reported_by_id:
                      type: string
                      example: some_user_id
                      description: The id of the user who makes the report
                    reported_by_type:
                      type: string
                      enum:
                        - normal
                        - admin
                        - moderator
                      example: normal
                      description: 'You can specify if the report was made by a normal user, admin or moderator.'
                    user_id:
                      type: string
                      description: The user id of the user who is reported (optional)
                      example: some_user_id
                    content_id:
                      type: string
                      example: some_content_id
                      description: The id of the image or message that is being repoted(optional)
                    policy_id:
                      type: string
                      description: The id of the policy that the user specifies
                      example: other
                    extra_info:
                      type: string
                      example: Some explanation from the user why it is reported
              required:
                - report
            examples:
              Example 1:
                value:
                  report:
                    reported_by_id: some_user_id
                    reported_by_type: normal
                    user_id: some_user_id
                    content_id: some_content_id
                    policy_id: other
                    extra_info: Some explanation from the user why it is reported
        description: 'Make a report about a user, message or image. '
      description: This endpoint should be called when a user on your product reports another user or piece of content.
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
    parameters: []
  /user/delete:
    post:
      summary: Delete user
      operationId: delete-user
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Delete all information from a specific user. This endpoint should be used in case a user would like to delete all their information from your and our systems (e.g. GDPR).
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                  description: The id of the user your would like to delete
                reason:
                  type: string
                  description: In case you want to give it a reason. e.g. GDPR request
              required:
                - user_id
            examples:
              Example 1:
                value:
                  user_id: clczbfbhh0000sa90h45xv3cg
                  reason: GDPR Deletion Request
    parameters: []
  /user/delete-batch:
    post:
      summary: Delete user in batch
      operationId: delete-user-batch
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              examples:
                Example 1:
                  value:
                    success: true
      description: Delete all information from a specific users in batch. This endpoint should be used in case a user would like to delete all their information from your and our systems (e.g. GDPR).
      parameters:
        - schema:
            type: string
            example: Bearer lasso.a35afd...a6ea
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user_ids
              properties:
                user_ids:
                  type: array
                  x-stoplight:
                    id: xnmb7g4c66ut3
                  minItems: 0
                  maxItems: 1000
                  description: The ids of the user your would like to delete
                  items:
                    x-stoplight:
                      id: b9qsk5thanptm
                    type: string
                reason:
                  type: string
                  description: In case you want to give it a reason. e.g. GDPR request
            examples:
              Example 1:
                value:
                  user_ids:
                    - clczbfbhh0000sa90h45xv3cg
                    - clx0bg0g9000yu4zvb7e7o36t
                  reason: GDPR Deletion Request
      x-stoplight:
        id: cv27uh9ps9stz
    parameters: []
  '/user/{userId}':
    parameters:
      - schema:
          type: string
        name: userId
        in: path
        required: true
    get:
      summary: Get User
      tags: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    success: true
                    user:
                      id: some_user_id
                      created_at: '2024-03-05T14:02:02.236Z'
                      name: Fred
                      profile_image_url: 'https://i.pravatar.cc/180?u=some_user_id'
                      email: fred@privaterelay.appleid.com
                      email_domain: privaterelay.appleid.com
                      country_code: US
                      status: allowed
                      type: normal
                      temporarily_banned_until: '2024-03-05T15:19:12.522Z'
                      strike_until: '2024-03-05T15:19:12.522Z'
                      last_accepted_profile_name: Fred
                      last_accepted_profile_image: 'https://i.pravatar.cc/180?u=some_user_id'
                required:
                  - success
                  - user
                properties:
                  success:
                    type: boolean
                  user:
                    type: object
                    required:
                      - id
                      - created_at
                      - status
                      - type
                    properties:
                      id:
                        type: string
                      created_at:
                        type: string
                      name:
                        type: string
                      profile_image_url:
                        type: string
                      email:
                        type: string
                      email_domain:
                        type: string
                      country_code:
                        type: string
                      status:
                        type: string
                      type:
                        type: string
                      temporarily_banned_until:
                        $ref: '#/components/schemas/Date'
                        description: Only set when the user is temporarily banned
                      strike_until:
                        $ref: '#/components/schemas/Date'
                        description: Only set when the user currently has a strike
                      last_accepted_profile_name:
                        description: The last profile image that was accepted by Lasso.
                        type: string
                      last_accepted_profile_image:
                        type: string
                        description: The last profile image that was accepted by Lasso
              examples:
                Example 1:
                  value:
                    success: true
                    user:
                      id: user_api_test
                      created_at: '2024-03-05T14:02:02.236Z'
                      name: Fred
                      profile_image_url: 'https://i.pravatar.cc/180?u=2user_api_test'
                      email: fred@privaterelay.appleid.com
                      email_domain: privaterelay.appleid.com
                      country_code: NL
                      status: hidden
                      type: normal
                      strike_until: '2024-03-05T15:19:12.522Z'
                      last_accepted_profile_name: Fred
      operationId: get-user
      x-stoplight:
        id: o3fm8t5t408u1
      description: Get information about a user
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: 'Bearer token, to generate see https://app.lassomoderation.com/settings'
components:
  schemas:
    Category:
      type: object
      x-stoplight:
        id: sgow9tvpb94v5
      x-examples:
        Example 1:
          id: '-N7X4_YiO6x7Eg9NrDOu'
          created_at: '2023-01-25T14:24:19.676Z'
          text: "\U0001F64C\U0001F970"
      description: Model for a category that a message can be part of. If the category does not yet exist in Lasso it will be created.
      examples:
        - id: clczbfbhh0000sa90h45xv3cg
          created_at: '2022-07-21T18:12:39.000Z'
          name: Mobile Chat
      title: Category
      x-internal: false
      properties:
        id:
          type: string
          example: clczbfbhh0000sa90h45xv3cg
        name:
          type: string
          maxLength: 100
          example: Mobile Chat
      required:
        - id
        - name
    Date:
      title: Date
      x-stoplight:
        id: aqsiv7cn2xhat
      x-tags:
        - date
      type: string
      format: date-time
      example: '2022-07-21T18:12:39.000Z'
      description: |-
        ISO Date e.g. 2022-07-21T18:12:39.000Z
        https://en.wikipedia.org/wiki/ISO_8601
      examples:
        - '2022-07-21T18:12:39.000Z'
      x-internal: false
    Status:
      title: Status
      x-stoplight:
        id: af5n70t4ljngc
      x-tags:
        - date
      type: string
      example: hidden
      description: The status of an object
      examples:
        - '2022-07-21T18:12:39.000Z'
      x-internal: false
      enum:
        - allowed
        - flagged
        - hidden
    Subcategory:
      type: object
      x-stoplight:
        id: cnm0wrckofxug
      x-examples:
        Example 1:
          id: '-N7X4_YiO6x7Eg9NrDOu'
          created_at: '2023-01-25T14:24:19.676Z'
          text: "\U0001F64C\U0001F970"
      description: Model for a subcategory that a message can be part of. If the subcategory does not yet exist in Lasso it will be created.
      examples:
        - id: clczbfbhh0000sa90h45xv3cg
          created_at: '2022-07-21T18:12:39.000Z'
          name: General Channel
          metadata:
            description: This channel is used for general communication
          createdByUserId: clg3k5ypi000gsad0v1znilap
          image_url: 'https://webistetoimage.com/channel_image.png'
      title: Subcategory
      x-internal: false
      properties:
        id:
          type: string
          example: clczbfbhh0000sa90h45xv3cg
          x-stoplight:
            id: 3s03tpmvbwe8h
        name:
          type: string
          maxLength: 300
          example: General Channel
          x-stoplight:
            id: zr1s97vg9t8lp
        created_by_user_id:
          type: string
          x-stoplight:
            id: 48asdykvppsvo
          description: The ID of the user that created this subcategory
        metadata:
          type: object
          description: Extra information about the subcategory
          x-stoplight:
            id: cv65xfosmu9yj
        image_url:
          type: string
          x-stoplight:
            id: mpuxaxjpkeciw
      required:
        - id
        - name
    User:
      type: object
      x-stoplight:
        id: d27c5d8492c39
      x-examples:
        Example 1:
          user:
            id: 17633#7336
            created_at: '2022-07-21T18:12:39.000Z'
            email_domain: hotmail.com
            signup_method: apple.com
      examples:
        - user:
            id: clczbfbhh0000sa90h45xv3cg
            created_at: '2022-07-21T18:12:39.000Z'
            name: John Doe
            email_domain: gmail.com
            signup_method: google
            country_code: US
            ip_address: 123.123.123.123
            profile_image_url: 'https://www.example.com/profile/image.png'
            metadata:
              tag_line: I am a person of mystery...
              connections: 8
      description: 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.
      x-internal: false
      title: User
      required:
        - id
      properties:
        id:
          type:
            - string
          example: clczbfbhh0000sa90h45xv3cg
        name:
          type: string
        created_at:
          $ref: '#/components/schemas/Date'
        email_domain:
          type: string
          example: '@gmail.com'
          description: The email domain of your user. So "user@example.com" would be "example.com"
        email:
          type: string
          x-stoplight:
            id: 2in3xaso7otmh
        phone_number:
          type: string
          x-stoplight:
            id: 6ooqc42hmlr9x
        country_code:
          type: string
          description: 'Two letter code according to the https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 standard'
        ip_address:
          type: string
          x-stoplight:
            id: oiaxj2dg2qvj4
          description: 'The IP address of the user '
        profile_image_url:
          type: string
          example: 'https://www.example.com/profile/image.png'
        signup_method:
          type: string
          example: google
          description: 'The method the user has used to sign up on your platform. This can be apple, facebook, google, email, password, or unknown.'
        metadata:
          type: object
        category_id:
          type: string
          x-stoplight:
            id: hl9lda6lo3ytt
          description: Set this if the user is only part of a specific category
        type:
          x-stoplight:
            id: xjzpd5j57zetp
          enum:
            - normal
            - moderator
            - admin
            - trusted
            - testing
          default: normal
          description: Specify what kind of user this is in your platform. By default this is a "normal" user
        status:
          $ref: '#/components/schemas/Status'
          x-stoplight:
            id: tjirw5082s7y4
        tags:
          type: array
          x-stoplight:
            id: 4r8i1qne5mrib
          description: 'The identifiers of the tags. When tags is set, it will override all currently set tags on the user.'
          items:
            x-stoplight:
              id: annn95w7t1xiu
            type: string
        published_at:
          x-stoplight:
            id: tzlztmpb6l1fv
          description: |-
            (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 user has not yet been published.
            - If the field is set to `null` the user 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 user, use the publish endpoint to publish the user.
          type: string
        photo_id_urls:
          type: array
          x-stoplight:
            id: kzs9lhzc5i1fg
          description: Photo IDs can be used to recognize this user's face in the content.
          items:
            x-stoplight:
              id: 22uea7xj4em2q
            type: string
            example: 'https://www.example.com/profile/image.png'
  securitySchemes: {}
x-internal: false
