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

# Set Client Custom Field Value

> Sets a value on an existing company-wide custom field for a specific client. This does not create a new field definition.

<Note>
  This endpoint **sets a value** on an existing company-wide custom field for a specific client — it does not create a new field definition. Custom field definitions are managed at the company level.
</Note>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json POST /clients/{id}/custom-fields
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /clients/{id}/custom-fields:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Client ID
    post:
      tags:
        - Clients
      summary: Set Client Custom Field Value
      description: >-
        Sets a value on an existing company-wide custom field for a specific
        client. This does not create a new field definition.
      operationId: post-client-custom-field
      requestBody:
        description: Custom field ID and the value to set.
        content:
          application/json:
            schema:
              type: object
              properties:
                custom_field_id:
                  type: string
                  description: The company-wide custom field definition ID.
                value:
                  type: string
                  description: The value to set for this client.
              required:
                - custom_field_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientCustomFieldValue'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Missing custom field ID:
                  value:
                    code: CLI-600
                    error: Custom field ID is required
                Invalid value:
                  value:
                    code: CLI-700
                    error: Invalid custom field value
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid API key:
                  value:
                    code: ATH-100
                    error: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Insufficient permissions:
                  value:
                    code: CLI-1900
                    error: Insufficient permissions to manage clients
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Not found:
                  value:
                    code: CLI-300
                    error: Client not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Unexpected error:
                  value:
                    code: CLI-2000
                    error: An unexpected error occurred
components:
  schemas:
    ClientCustomFieldValue:
      title: ClientCustomFieldValue
      type: object
      description: A custom field with its value for a specific client.
      properties:
        id:
          type: string
          description: Custom field definition ID.
        name:
          type: string
          description: Custom field name.
        value:
          type: string
          nullable: true
          description: The value set for this client.
        field_type:
          type: string
          description: Field type (e.g., text, dropdown, checkbox).
        options:
          type: array
          description: Available options for dropdown/select fields.
          items:
            type: object
            properties:
              title:
                type: string
              value:
                type: string
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````