API reference
Custom fields
3 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/custom-fieldsThe workspace’s custom fields for people, locations, projects and time entries
The workspace’s custom fields for people, locations, projects and time entries
Staff see only the fields shown to them. Values appear as custom_fields on each record, keyed by key.
Query parameters
| Name | Type | Description |
|---|---|---|
entity | "person" | "location" | "project" | "time_entry" | |
include_archived | boolean |
Example
curl "https://ca-api.clocklap.com/v1/custom-fields" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/custom-fieldsAdd a custom field (people who edit time rules)
Add a custom field (people who edit time rules)
Body (JSON)
| Name | Type | Description |
|---|---|---|
entityrequired | "person" | "location" | "project" | "time_entry" | |
key | string | |
labelrequired | string | |
typerequired | "text" | "number" | "boolean" | "choice" | "date" | |
options | array of string | |
required | boolean | |
visible_to_staff | boolean | |
help | string or null | |
position | integer |
Example
curl -X POST "https://ca-api.clocklap.com/v1/custom-fields" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entity":"person","label":"string","type":"text"}'Responses
200
PATCH/v1/custom-fields/{id}Rename, reorder, change choices, require, hide from staff or archive a field (its key and type stay)
Rename, reorder, change choices, require, hide from staff or archive a field (its key and type stay)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
label | string | |
options | array of string | |
required | boolean | |
visible_to_staff | boolean | |
help | string or null | |
position | integer | |
archived | boolean |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/custom-fields/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200