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

# Delete User

> Syteca ACB REST API endpoint to delete a Syteca user — for offboarding, contractor cleanup, and IdP-driven deprovisioning.

Deletes a Syteca user. For **domain users**, this removes only the Syteca link — the AD account itself is unaffected. For **Internal users**, this permanently removes the user from Syteca.

<Note>
  For ACB deployments updated from a version prior to 1.2, switch to the `https://{hostname}/EkranACB` server in the Playground.
</Note>

### Permissions required

The Access Token must be issued to a user with the [administrative User Management permission](/docs/administration/users/administrative-permissions).

### Common use cases

* **Offboarding automation** — HRIS termination triggers user deletion in Syteca.
* **Contractor cleanup** — Auto-delete contractor accounts after engagement end-date.
* **IdP deprovisioning** — Okta / Azure AD removes the user → webhook calls this endpoint.

### Historical session data is preserved

Deleting a user **does not** delete their historical session recordings or audit log entries. Their user name remains visible in session metadata for compliance retention; only the user account itself (permissions, group memberships, login capability) is removed.

### Errors

See [Status codes](/docs/api/acb/api-reference#status-codes). Common errors:

* **403 Forbidden** — user lacks administrative User Management permission, or the request would delete the last user with User Management permission (preventing lockout).
* **404 Not Found** — user doesn't exist.

<Warning>
  Syteca prevents deletion of the **last user with administrative User Management permission** — this would lock all administrative access to the system. To replace the last User Management admin, create the replacement user with User Management permission first, then delete the prior user.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="Get user details" icon="user-search" href="/docs/api/acb/endpoints/get-user-details">Verify the user before deletion.</Card>
  <Card title="Remove from user group" icon="users-round" href="/docs/api/acb/endpoints/remove-user-from-group">Remove group membership without deleting the user.</Card>
  <Card title="Create internal user" icon="user-plus" href="/docs/api/acb/endpoints/create-internal-user">Re-create if accidentally deleted.</Card>
  <Card title="API reference" icon="square-code" href="/docs/api/acb/api-reference">Status codes.</Card>
</CardGroup>


## OpenAPI

````yaml DELETE /api/user-management/users/{userId}
openapi: 3.0.1
info:
  title: Application Credentials Broker API
  description: API for managing users in the Application Credentials Broker system
  version: 1.0.0
  contact:
    name: API Support
    email: support@example.com
servers:
  - url: https://your-syteca-host/SytecaACB
    description: On-premises Syteca ACB service (v1.2 or later)
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
  - url: https://your-syteca-host/EkranACB
    description: Legacy URL prefix for ACB deployments updated from pre-v1.2
    variables:
      hostname:
        default: your-syteca-host.example.com
        description: Your Syteca Application Server hostname
security:
  - AccessTokenAuth: []
paths:
  /api/user-management/users/{userId}:
    delete:
      tags:
        - UserManagement
      summary: Delete user (internal/domain)
      description: Delete an internal or domain user by ID
      parameters:
        - name: userId
          in: path
          required: true
          description: ID of the user to delete (internal or domain)
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: User was successfully deleted
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
      required:
        - status
        - message
  securitySchemes:
    AccessTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Access token for authentication

````