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

# API key für Service-Benutzer widerrufen

> Einen API key für einen Service-Benutzer widerrufen.

Gibt 404 zurück, wenn der key nicht gefunden wird, und 409, wenn er bereits widerrufen wurde.

<div id="permissions">
  ## Berechtigungen
</div>

Erfordert einen Service-Benutzer mit der Berechtigung `ManageAccountServiceUsers` auf Enterprise-Ebene.


## OpenAPI

````yaml de/v3-openapi.yaml DELETE /v3beta1/enterprise/service-users/{service_user_id}/api-keys/{api_key_id}
openapi: 3.1.0
info:
  description: Devin v3 API mit Service-User-Authentifizierung und RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/enterprise/service-users/{service_user_id}/api-keys/{api_key_id}:
    delete:
      tags:
        - service_user_api_keys
      summary: API key für Service-Benutzer widerrufen
      description: >-
        Einen API key für einen Service-Benutzer widerrufen.


        Gibt 404 zurück, wenn der key nicht gefunden wird, und 409, wenn er
        bereits widerrufen wurde.
      operationId: >-
        handle_revoke_service_user_api_key_v3beta1_enterprise_service_users__service_user_id__api_keys__api_key_id__delete
      parameters:
        - description: 'Service-Benutzer-ID (Präfix: service-user-)'
          in: path
          name: service_user_id
          required: true
          schema:
            example: service-user-abc123def456
            title: Service User Id
            type: string
        - in: path
          name: api_key_id
          required: true
          schema:
            title: Api Key Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyResponse'
          description: Erfolgreiche Antwort
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validierungsfehler
components:
  schemas:
    ApiKeyResponse:
      description: >-
        Gemeinsames Antwortmodell für API-key-Details (wird sowohl von PAT- als
        auch von Service-Benutzer-Endpunkten verwendet).
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        api_key_name:
          title: Api Key Name
          type: string
        created_at:
          title: Created At
          type: integer
        expires_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expires At
        is_active:
          title: Is Active
          type: boolean
        last_used_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Used At
        revoked_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Revoked At
      required:
        - api_key_id
        - api_key_name
        - created_at
        - expires_at
        - revoked_at
        - last_used_at
        - is_active
      title: ApiKeyResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Servicebenutzer-Anmeldedaten (Präfix: cog_)'
      scheme: bearer
      type: http

````