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

# Revoke platform API key

> Revokes one of the caller's API keys, so it authenticates nothing from then on.

Use this tool when you need to:
- Revoke a leaked or unused API key
- Cut off a script or CI job that holds a key

Examples:
- DELETE /user/platform-keys/{platformKeyID}
- DELETE /user/platform-keys/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21

Hints:
- platformKeyID is the key's id from listPlatformKeys, not the raw key; a malformed uuid is refused with 422. It answers 204.
- The key stays listed by listPlatformKeys with revoked_at set, and a request made with it is refused with 401 from then on.
- Use createPlatformKey instead to mint a replacement.
- Any authenticated caller may revoke their own; an API key is checked in its pinned organization, where a viewer or billing role is refused with 403 org_role_insufficient. A key that is not the caller's, or is already revoked, is 404.



## OpenAPI

````yaml api-reference/openapi.json DELETE /user/platform-keys/{platformKeyID}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /user/platform-keys/{platformKeyID}:
    delete:
      tags:
        - platform-keys
      summary: Revoke platform API key
      description: >-
        Revokes one of the caller's API keys, so it authenticates nothing from
        then on.


        Use this tool when you need to:

        - Revoke a leaked or unused API key

        - Cut off a script or CI job that holds a key


        Examples:

        - DELETE /user/platform-keys/{platformKeyID}

        - DELETE /user/platform-keys/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21


        Hints:

        - platformKeyID is the key's id from listPlatformKeys, not the raw key;
        a malformed uuid is refused with 422. It answers 204.

        - The key stays listed by listPlatformKeys with revoked_at set, and a
        request made with it is refused with 401 from then on.

        - Use createPlatformKey instead to mint a replacement.

        - Any authenticated caller may revoke their own; an API key is checked
        in its pinned organization, where a viewer or billing role is refused
        with 403 org_role_insufficient. A key that is not the caller's, or is
        already revoked, is 404.
      operationId: revokePlatformKey
      parameters:
        - in: path
          name: platformKeyID
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '204':
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformKeysErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformKeysErrorResponse'
          description: Not Found
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformKeysErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformKeysErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformKeysErrorResponse'
          description: Internal Server Error
components:
  schemas:
    PlatformKeysErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - cli_upgrade_required
            - client_outdated
            - conflict
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - method_not_allowed
            - not_acceptable
            - not_found
            - not_implemented
            - payment_required
            - precondition_failed
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - session_auth_required
            - unauthenticated
            - unsupported_media_type
            - validation_failed
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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