Create custom field for badges

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This API allows you to create a custom field for the badge.

There is no limit on the number of custom fields that can be defined at an org level for badges.

šŸ‘

Note

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call.

🚧

Warning

Custom field name should be unique and is case sensitive.

Example request

curl --location 'https://eu.api.capillarytech.com/api_gateway/v1/badges/customField' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: Basic bWFkaHYQ==' \
--header 'Cookie: _cfuvid=2wODcKsHz5O4nH9if.oAaM9mGGlxP9toYWBAik.SBbc-1773312258300-0.0.1.1-604800000' \
--data '
{
  "name": "CF20 dates",
  "isMandatory": false,
  "defaultValue": "0",
  "dataType": "STRING"
}
'

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Default access group

Resource information

URIapi_gateway/v1/badges/customField
HTTP methodPOST
Pagination supportedNo
Rate limitNA
Batch supportNA

Request body parameters

Parameter NameData TypeDescription
name*StringThe name of the custom field.
isMandatoryBooleanIndicates if the custom field is mandatory.
Default value: 0
defaultValueStringThe default value of the custom field.
dataType*EnumThe data type of the custom field's value. Supported values: INTEGER, BOOLEAN, DATE, STRING.
{
    "name": "CF20 dates",
    "isMandatory": false,
    "defaultValue": "0",
    "dataType": "STRING"
}

Example response

{
    "data": {
        "id": "69c0e1c823ba8848e5979a67",
        "orgId": 100737,
        "name": "CF20 dates",
        "isMandatory": false,
        "defaultValue": "0",
        "isActive": true,
        "dataType": "STRING",
        "createdOn": 1774248392.637564000,
        "createdOnISO": "2026-03-23T06:46:32Z",
        "createdBy": 75197372,
        "lastUpdatedOn": 1774248392.637564000,
        "lastUpdatedOnISO": "2026-03-23T06:46:32Z",
        "lastUpdatedBy": 75197372
    },
    "errors": [],
    "warnings": []
}

Response parameters

Parameter NameData TypeDescription
idStringThe unique identifier of the custom field.
orgIdIntegerThe org ID the custom field belongs to.
nameStringThe name of the custom field.
isMandatoryBooleanIndicates if the custom field is mandatory.
defaultValueStringThe default value of the custom field.
isActiveBooleanIndicates if the custom field is active.
dataTypeStringThe data type of the custom field.
createdOnDateThe timestamp when the custom field was created. Timestamp in the ISO 8601 standard format format YYYY-MM-DDTHH:MM:SS.SSSZ.
createdOnISOString

The timestamp when the custom field was created, in ISO 8601 format, returned in the server time zone.

EU server example 2025-12-16T14:30:45Z → 16 December 2025, 14:30:45 (UTC)

India server example 2025-12-16T14:30:45+05:30 → 16 December 2025, 14:30:45 (IST)

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

createdByIntegerThe identifier of the user who created the custom field.
lastUpdatedOnDateThe timestamp when the custom field was last updated, in epoch timestamp format.
lastUpdatedOnISOString

The timestamp when the custom field was last updated, in ISO 8601 format, returned in the server time zone.

EU server example 2025-12-16T14:30:45Z → 16 December 2025, 14:30:45 (UTC)

India server example 2025-12-16T14:30:45+05:30 → 16 December 2025, 14:30:45 (IST)

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

lastUpdatedByIntegerThe identifier of the user who last updated the custom field.
errorsObjectA list of errors if any.
warningsObjectA list of warnings if any.

Error codes

Error codesDescription
740Custom field name cannot be duplicate.
741Custom field Data Type is mandatory.
744Custom field default value should be a number.
742Mandatory custom field should have default Value.

Body Params
string
required
boolean
string
string
enum
required
Allowed:
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json