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

# Revoke Key

> Kill one key: the agent and its other keys keep working. Revoking a key is not retiring an agent  
With `reason=compromised`, every key this one authorized by self-service (the successor it rotated to, siblings it added) is revoked with it (v0.3 §16.5)



## OpenAPI

````yaml /versions/2026-10-16.yaml delete /agents/keys/{did}/{keyId}
openapi: 3.1.0
info:
  title: Humanos API
  description: Humanos API
  version: '1.0'
  contact: {}
servers:
  - url: https://api.humanos.tech
security: []
tags:
  - name: humanosApp
    description: ''
paths:
  /agents/keys/{did}/{keyId}:
    delete:
      tags:
        - Agents
      summary: Revoke Key
      description: >-
        Kill one key: the agent and its other keys keep working. Revoking a key
        is not retiring an agent  

        With `reason=compromised`, every key this one authorized by self-service
        (the successor it rotated to, siblings it added) is revoked with it
        (v0.3 §16.5)
      operationId: agents_revokeKey
      parameters:
        - name: did
          required: true
          in: path
          description: The agent's DID, URL-encoded.
          schema:
            example: did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35
            type: string
        - name: keyId
          required: true
          in: path
          description: 'The key id (`<did>#key-<n>`), URL-encoded: its `#` sent as `%23`.'
          schema:
            example: >-
              did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1
            type: string
        - name: reason
          required: false
          in: query
          description: Why; `compromised` cascades to what the key authorized.
          schema:
            example: compromised
            type: string
        - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: Returns the keys revoked, the named one first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentKeyRevocationEntity'
        '400':
          description: The key is already revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: >-
                      did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1
                      is already revoked
                  error:
                    type: string
                    example: Bad Request
        '404':
          description: >-
            The agent is unknown or another organization operates it, or the
            agent holds no such key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                    example: >-
                      unknown key
                      did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-9
                  error:
                    type: string
                    example: Not Found
components:
  parameters:
    ApiVersion:
      name: API-Version
      in: header
      required: false
      schema:
        type: string
        pattern: ^\d{4}-\d{2}-\d{2}$
        example: '2026-10-16'
      description: >-
        Pin request, response, and webhook shapes to a specific dated API
        version (YYYY-MM-DD). Omit to use the version pinned to your API key
        (set when the key is created; new keys default to the latest version).
        New integrations should target the latest version.
  schemas:
    AgentKeyRevocationEntity:
      type: object
      properties:
        ok:
          type: boolean
          description: Whether the operation was successful
          example: true
        revoked:
          description: >-
            The keys revoked, the named one first. With `reason=compromised`,
            also every key it authorized by self-service.
          example:
            - >-
              did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1
          type: array
          items:
            type: string
      required:
        - ok
        - revoked

````

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