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

# Add Custom Field

> Adds a custom field to a specific company.



## OpenAPI

````yaml POST /public/companies/{company_id}/custom-fields
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/companies/{company_id}/custom-fields:
    post:
      tags:
        - public
      description: Adds a custom field to a specific company.
      operationId: Add company custom field
      parameters:
        - in: path
          name: company_id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyCustomFields'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CompanyCustomFields'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CompanyCustomFields'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyCustomFields'
          description: Created. The custom field was successfully created.
        '400':
          description: Bad Request. Invalid data has been provided.
        '401':
          description: Unauthorized. Company does not belong to this client.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '404':
          description: Not Found. Company with this ID does not exist.
        '409':
          description: >-
            Conflict. A custom field with this name already exists for this
            company.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    CompanyCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time

````