| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests⦠| |||
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.
NoteFor 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.
WarningCustom 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
| URI | api_gateway/v1/badges/customField |
| HTTP method | POST |
| Pagination supported | No |
| Rate limit | NA |
| Batch support | NA |
Request body parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| name* | String | The name of the custom field. |
| isMandatory | Boolean | Indicates if the custom field is mandatory. Default value: 0 |
| defaultValue | String | The default value of the custom field. |
| dataType* | Enum | The 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 Name | Data Type | Description |
|---|---|---|
| id | String | The unique identifier of the custom field. |
| orgId | Integer | The org ID the custom field belongs to. |
| name | String | The name of the custom field. |
| isMandatory | Boolean | Indicates if the custom field is mandatory. |
| defaultValue | String | The default value of the custom field. |
| isActive | Boolean | Indicates if the custom field is active. |
| dataType | String | The data type of the custom field. |
| createdOn | Date | The timestamp when the custom field was created. Timestamp in the ISO 8601 standard format format YYYY-MM-DDTHH:MM:SS.SSSZ. |
| createdOnISO | String | 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. |
| createdBy | Integer | The identifier of the user who created the custom field. |
| lastUpdatedOn | Date | The timestamp when the custom field was last updated, in epoch timestamp format. |
| lastUpdatedOnISO | String | 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. |
| lastUpdatedBy | Integer | The identifier of the user who last updated the custom field. |
| errors | Object | A list of errors if any. |
| warnings | Object | A list of warnings if any. |
Error codes
| Error codes | Description |
|---|---|
| 740 | Custom field name cannot be duplicate. |
| 741 | Custom field Data Type is mandatory. |
| 744 | Custom field default value should be a number. |
| 742 | Mandatory custom field should have default Value. |
