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

# Update Project API Key

> Updates an API key's name and/or marks it as the project default.



## OpenAPI

````yaml /openapi.yaml put /v1/projects/{projectId}/api-keys/{keyId}
openapi: 3.1.0
info:
  title: AnchorBrowser API
  version: 1.0.0
  description: APIs to manage all browser-related actions and configuration.
servers:
  - url: https://api.anchorbrowser.io
    description: API server
security: []
paths:
  /v1/projects/{projectId}/api-keys/{keyId}:
    put:
      tags:
        - Projects
      summary: Update Project API Key
      description: Updates an API key's name and/or marks it as the project default.
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
        - name: keyId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                is_default:
                  type: boolean
      responses:
        '200':
          description: API key updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectApiKey'
        '404':
          description: Project or API key not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlatErrorResponse'
        '500':
          description: Failed to update API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlatErrorResponse'
      security:
        - api_key_header: []
components:
  schemas:
    ProjectApiKey:
      type: object
      properties:
        id:
          type: string
        apikey:
          type: string
        name:
          type: string
    FlatErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: integer
          description: HTTP status code.
      required:
        - error
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: anchor-api-key
      description: API key passed in the header

````