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

# Change the status of a user



## OpenAPI

````yaml patch /users/{id-or-identifier}
openapi: 3.0.0
info:
  title: Identity
  description: ''
  version: 0.0.1
  contact:
    name: Delay Support
    url: https://d3lay.com/support
    email: dev@d3lay.com
servers:
  - url: http://localhost:{port}
    description: Local development server
    variables:
      port:
        enum:
          - '80'
          - '8080'
        default: '8080'
  - url: https://hive.test.delay.dev
    description: Integration testing server
security: []
tags:
  - name: User
  - name: Workspace
paths:
  /users/{id-or-identifier}:
    patch:
      tags:
        - User
      summary: Change the status of a user
      parameters:
        - $ref: '#/components/parameters/IDOrIdentifier'
        - $ref: '#/components/parameters/APIVersionHeader'
        - $ref: '#/components/parameters/ContentTypeHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - onboarding
                    - inactive
                    - suspended
                    - risky
                  example: inactive
                review_comment:
                  type: string
                  example: User is suspended due to abuse of the system.
              required:
                - status
      responses:
        '200':
          description: Success
          headers:
            X-Message:
              $ref: '#/components/headers/X-Message'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
              examples:
                created:
                  summary: User status updated
                  value:
                    id: d4add56e-c345-4ac9-b392-7a890a60559a
                    identifier: ben
                    name: Benjamin Zhang
                    email: z@benwk.com
                    user_type: saas_admin
                    status: active
                    created_at: '2023-05-06T00:00:00Z'
                    updated_at: '2023-05-06T00:00:00Z'
                    created_by: 98d91cd7-860d-4869-937a-5af32eff2f4a
                    updated_by: 98d91cd7-860d-4869-937a-5af32eff2f4a
          links: {}
        '400':
          $ref: b06f6465-79d8-4843-8f77-2322f3f60e07
          links: {}
        '401':
          $ref: e12596e7-ef96-4a65-a1f5-583cabaf1d66
          links: {}
        '403':
          $ref: 956dd0ef-ce7d-487d-83f7-63a8e9985cee
          links: {}
        '404':
          $ref: ba4a28df-a1c0-4499-b581-bdbb4a7a33ba
          links: {}
        '429':
          $ref: 8ffdc13c-c35b-4efa-babb-653b02e9b200
          links: {}
        '500':
          $ref: f3448cdd-8abe-41a4-91cb-986f10eefabc
          links: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  parameters:
    IDOrIdentifier:
      name: id-or-identifier
      in: path
      description: ''
      required: true
      example: delay
      schema:
        type: string
    APIVersionHeader:
      name: X-API-Version
      in: header
      description: Your API version
      schema:
        type: string
        enum:
          - v1
        default: v1
    ContentTypeHeader:
      name: Content-Type
      in: header
      description: ''
      required: false
      example: application/json
      schema:
        type: string
        enum:
          - application/json
          - application/xml
          - application/x-www-form-urlencoded
          - application/octet-stream
          - application/pdf
          - text/plain
          - text/html
          - multipart/form-data
  headers:
    X-Message:
      description: Message for the API request
      schema:
        type: string
      example: >
        Data retrieved successfully Data not found Data created successfully
        Data updated successfully Data deleted successfully
  schemas:
    WorkspaceResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
        identifier:
          type: string
          example: delay
        name:
          type: string
          example: Delay Technologies
        owner_id:
          type: string
          format: uuid
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        workspace_type:
          type: string
          enum:
            - single_user
            - multi_user
          example: multi_user
        domain_name:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
          description: REQUIRE metadata permissions
        updated_by:
          type: string
          format: uuid
          example: 98d91cd7-860d-4869-937a-5af32eff2f4a
          description: REQUIRE metadata permissions
      required:
        - id
        - identifier
        - name
        - workspace_type
        - created_at
        - updated_at
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````