---
title: "Custom Field"
method: POST
path: "/companies/{companyId}/customfields"
tags: ["Company"]
---

# Custom Field

`POST /companies/{companyId}/customfields`

## Request

- Base URL: `https://api.paychex.com`
- URL: `https://api.paychex.com/companies/{companyId}/customfields`
- Auth: none declared
- TypeScript: <https://skmtc.dev/paychex/apis/external-api/docs/companies/:companyId/customfields/post.ts> (a function with typed inputs; its response is checked against the schema)

Create CustomFields at the company level which a company could be assigned.

## Path parameters

- `companyId` string, required

## Request body

- CustomFieldsResource
  - `customFieldId` string: The unique identifier that is autogenerated when a custom field is created
  - `customFieldName` string: The name of the custom field
  - `categoryId` string: The unique identifier that is autogenerated when creating a category
  - `required` boolean: Where to indicate if the custom field is required on the worker where true = required and false = not required
  - `checkStub` boolean: Where to indicate if the custom field is required on the worker's pay stub, where true = required and false = not required
  - `employeeEditable` boolean: Where to indicate if the custom field is able to be edited by the employee, where true = required and false = not required
  - `type` 'DROPDOWN' | 'TEXT' | 'BOOLEAN' | 'DATE' | 'NUMERIC, NUMERIC__0_00_ OR NUMERIC__0_0000_': The type of field the custom field is.
  - `booleanValue` boolean: The value for BOOLEAN type (true / false)
  - `links` Link[]
    - `rel` string
    - `href` string
    - `hreflang` string
    - `media` string
    - `title` string
    - `type` string
    - `deprecation` string
    - `profile` string
    - `name` string
  - `dateValue` string, date-time: The value for DATE type , example : 2012-02-01T05:00:00Z
  - `textValue` string: The value for TEXT type (any text, alphanumeric, special characters allowed)
  - `maxTextLength` number: The maximum allowed value for textValue
  - `numericValue` number: Numeric data type can have three formats namely - whole number, second decimal place and fourth decimal place, example: 12 , 12.34 or 12.3456
  - `dropdown` CustomFieldsDropdownResource[]
    - `dropdownId` string: The unique identifier that is autogenerated when dropdown list is created
    - `dropdownValue` string: The value for dropdown list
    - `dropdownDefault` boolean: The default value for dropdown list

## Response `200`

successful operation

- object
  - `content` CustomFieldsResource
    - `customFieldId` string: The unique identifier that is autogenerated when a custom field is created
    - `customFieldName` string: The name of the custom field
    - `categoryId` string: The unique identifier that is autogenerated when creating a category
    - `required` boolean: Where to indicate if the custom field is required on the worker where true = required and false = not required
    - `checkStub` boolean: Where to indicate if the custom field is required on the worker's pay stub, where true = required and false = not required
    - `employeeEditable` boolean: Where to indicate if the custom field is able to be edited by the employee, where true = required and false = not required
    - `type` 'DROPDOWN' | 'TEXT' | 'BOOLEAN' | 'DATE' | 'NUMERIC, NUMERIC__0_00_ OR NUMERIC__0_0000_': The type of field the custom field is.
    - `booleanValue` boolean: The value for BOOLEAN type (true / false)
    - `links` Link[]
      - `rel` string
      - `href` string
      - `hreflang` string
      - `media` string
      - `title` string
      - `type` string
      - `deprecation` string
      - `profile` string
      - `name` string
    - `dateValue` string, date-time: The value for DATE type , example : 2012-02-01T05:00:00Z
    - `textValue` string: The value for TEXT type (any text, alphanumeric, special characters allowed)
    - `maxTextLength` number: The maximum allowed value for textValue
    - `numericValue` number: Numeric data type can have three formats namely - whole number, second decimal place and fourth decimal place, example: 12 , 12.34 or 12.3456
    - `dropdown` CustomFieldsDropdownResource[]
      - `dropdownId` string: The unique identifier that is autogenerated when dropdown list is created
      - `dropdownValue` string: The value for dropdown list
      - `dropdownDefault` boolean: The default value for dropdown list
  - `links` Link[]
    - `rel` string
    - `href` string
    - `hreflang` string
    - `media` string
    - `title` string
    - `type` string
    - `deprecation` string
    - `profile` string
    - `name` string

## Other responses

- `400`: The value for the one of the field is invalid
- `401`: Unauthorized
- `403`: User doesn't have access to this endpoint (API-2), Client has been end dated (API-68)
- `404`: Invalid resource ID (API-7)
- `405`: Unsupported method type (API-59)
- `406`: Unsupported Accept header
- `500`: Internal Server Error.

---

[API](https://skmtc.dev/paychex/apis/external-api.md) - [All operations](https://skmtc.dev/paychex/apis/external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paychex/apis/external-api/revisions/07161d3e073f?raw)
