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

# Deregister an EMP identity

> Removes a roaming identity from your organization. Two things to know first, your organization must always keep at least one identity, so you can't remove the last one, and you can't remove an identity that's still in use. Sort those out first, then remove it.



## OpenAPI

````yaml /openapi/emsp-tenant/openapi.yaml delete /emsp/v1/tenant/emp-identities/{emp_identity_id}
openapi: 3.0.0
info:
  title: Spirii EMSP - Tenant Management API
  description: 'Manages the EMSP tenant aggregate: tenant profile, EMP-Identities.'
  version: v1
  contact: {}
servers:
  - url: https://api.spirii.com
    description: Production
security: []
tags:
  - name: Tenant
    description: Tenant profile and published-network priority order
  - name: EMP Identity
    description: Register and manage a tenant’s EMP identities
paths:
  /emsp/v1/tenant/emp-identities/{emp_identity_id}:
    delete:
      tags:
        - EMP Identity
      summary: Deregister an EMP identity
      description: >-
        Removes a roaming identity from your organization. Two things to know
        first, your organization must always keep at least one identity, so you
        can't remove the last one, and you can't remove an identity that's still
        in use. Sort those out first, then remove it.
      operationId: tenant_delete_emp_identity
      parameters:
        - name: emp_identity_id
          required: true
          in: path
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            Client-generated unique key per operation intent (UUID). Same key +
            identical body replays the original response; same key + different
            body returns 409.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: ''
        '404':
          description: EMP identity not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
        '422':
          description: Cannot delete the last active EMP identity
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
components:
  schemas:
    ProblemDetailDto:
      type: object
      properties:
        type:
          type: string
          example: about:blank
          description: >-
            URI identifying the problem type (about:blank until the docs site is
            live)
        title:
          type: string
          example: Tenant not found
        status:
          type: number
          example: 404
        detail:
          type: string
          example: No tenant exists with id 0192...c3.
        instance:
          type: string
          example: /v1/tenant/profile
        code:
          type: string
          example: tenant_not_found
          description: Stable machine-readable error code
        trace_id:
          type: string
          example: abc123def456
          description: Correlation id; matches dd.trace_id in Datadog
        timestamp:
          type: string
          example: '2026-06-10T09:30:00.000Z'
          format: date-time
        errors:
          description: Field-level validation errors (validation failures only)
          type: array
          items:
            $ref: '#/components/schemas/ProblemFieldErrorDto'
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - trace_id
        - timestamp
    ProblemFieldErrorDto:
      type: object
      properties:
        field:
          type: string
          example: workspace_id
        code:
          type: string
          example: is_uuid
        message:
          type: string
          example: workspace_id must be a UUID
      required:
        - field
        - code
        - message

````