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

# Delete API key by name

> Delete API key by name.



## OpenAPI

````yaml https://agentex.dev-sgp.scale.com/openapi.json delete /agent_api_keys/name/{api_key_name}
openapi: 3.1.0
info:
  title: Agentex API
  version: 0.1.0
servers: []
security: []
paths:
  /agent_api_keys/name/{api_key_name}:
    delete:
      tags:
        - Agent APIKeys
      summary: Delete API key by name
      description: Delete API key by name.
      operationId: delete_agent_api_key_by_name_agent_api_keys_name__api_key_name__delete
      parameters:
        - name: api_key_name
          in: path
          required: true
          schema:
            type: string
            title: Api Key Name
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Agent Id
        - name: agent_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Agent Name
        - name: api_key_type
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/AgentAPIKeyType'
            default: external
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                title: >-
                  Response Delete Agent Api Key By Name Agent Api Keys Name  Api
                  Key Name  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentAPIKeyType:
      type: string
      enum:
        - internal
        - external
        - github
        - slack
      title: AgentAPIKeyType
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````