> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tranthor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add or remove a user in a manual segment

> Add one customer to, or remove them from, a manual segment. Segments with any other entry rule are refused.



## OpenAPI

````yaml post /api/admin/users/manual-segment
openapi: 3.1.0
info:
  title: Tranthor API
  description: Tranthor API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/admin/users/manual-segment:
    post:
      tags:
        - Users
      description: >-
        Add one customer to, or remove them from, a manual segment. Segments
        with any other entry rule are refused.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspaceId:
                  type: string
                userId:
                  minLength: 1
                  type: string
                segmentId:
                  format: uuid
                  type: string
                operation:
                  anyOf:
                    - type: string
                      enum:
                        - Add
                    - type: string
                      enum:
                        - Remove
              required:
                - workspaceId
                - userId
                - segmentId
                - operation
        required: true
      responses:
        '204':
          description: An empty String
          content:
            application/json:
              schema:
                description: An empty String
                type: string
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - adminApiKey: []
components:
  securitySchemes:
    adminApiKey:
      type: http
      scheme: bearer
      description: >-
        An Admin API key, sent as `Authorization: Bearer <key>`. Create one in
        Settings.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.