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

# Rename Agent Profile

> Rename a profile atomically.

The stable id is preserved, so active pointers (keyed on id) survive
untouched.



## OpenAPI

````yaml /openapi/openhands-cloud.json post /api/agent-profiles/{name}/rename
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/agent-profiles/{name}/rename:
    post:
      tags:
        - Agent Profiles
      summary: Rename Agent Profile
      description: |-
        Rename a profile atomically.

        The stable id is preserved, so active pointers (keyed on id) survive
        untouched.
      operationId: rename_agent_profile_api_agent_profiles__name__rename_post
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 64
            pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
            title: Name
        - name: org_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameAgentProfileRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProfileMutationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RenameAgentProfileRequest:
      properties:
        new_name:
          type: string
          maxLength: 64
          minLength: 1
          pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
          title: New Name
      type: object
      required:
        - new_name
      title: RenameAgentProfileRequest
    AgentProfileMutationResponse:
      properties:
        name:
          type: string
          title: Name
        message:
          type: string
          title: Message
      type: object
      required:
        - name
        - message
      title: AgentProfileMutationResponse
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````