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

# Update Client

> Rename a client or change its owner. Omitted fields keep their current value.

**Required scope:** `client_portals:write`



## OpenAPI

````yaml https://api.ropes.ai/api/docs/openapi.json patch /api/public/clients/{clientId}
openapi: 3.0.0
info:
  title: Ropes Public API
  version: 1.0.0
  description: >-
    Public API for Ropes. Authenticate using your API key in the x-api-key
    header.
servers:
  - url: https://api.ropes.ai
    description: Production server
  - url: http://localhost:3001
    description: Local development server
security: []
paths:
  /api/public/clients/{clientId}:
    patch:
      tags:
        - Client Portals
      summary: Update Client
      description: >-
        Rename a client or change its owner. Omitted fields keep their current
        value.


        **Required scope:** `client_portals:write`
      parameters:
        - schema:
            type: string
            description: The client identifier
          required: true
          description: The client identifier
          name: clientId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateClientRequest'
      responses:
        '200':
          description: Client updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientResponse'
        '400':
          description: Invalid body, or ownerEmail is not a user in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - API key is missing the required scope
        '404':
          description: Client not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limit exceeded - contact support@ropes.ai for further
            assistance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateClientRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        ownerEmail:
          type: string
          nullable: true
          maxLength: 320
          format: email
          description: null removes the owner
      additionalProperties: false
    ClientResponse:
      type: object
      properties:
        client:
          $ref: '#/components/schemas/Client'
      required:
        - client
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Error message (alternative field)
    Client:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the client
        name:
          type: string
          description: Client company name
        domain:
          type: string
          nullable: true
          description: The client's email domain, unique in your organization
        ownerEmail:
          type: string
          nullable: true
          description: >-
            Your teammate who owns this client; new portals default to them as
            owner
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - domain
        - ownerEmail
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Each key carries scopes chosen when it is created: `candidates:read`,
        `candidates:write`, `assessments:read`, `assessments:write`,
        `problems:read`, `problems:write`, `results:read`, `id_checks:read`,
        `id_checks:write`, `jobs:read`, `jobs:write`, `client_portals:read`,
        `client_portals:write`. Keys created before scopes existed have full
        access. A request with a key that lacks an operation's scope returns 403
        naming the missing scope.

````

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