API reference
People
24 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/permissionsEvery permission a role can include, the built-in roles, and API key scopes
Every permission a role can include, the built-in roles, and API key scopes
Example
curl "https://ca-api.clocklap.com/v1/permissions" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/usersList users
List users
Query parameters
| Name | Type | Description |
|---|---|---|
search | string | |
status | "invited" | "active" | "suspended" | "archived" | |
location_id | string | |
role | string | |
department | string | |
app | "none" | "manual" | "automatic" | none: no phone yet; manual: phone without "Always" location; automatic: geofencing works |
limit | integer | Default 100 |
cursor | string |
Example
curl "https://ca-api.clocklap.com/v1/users" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/usersAdd a person (sends an invite by default)
Add a person (sends an invite by default)
Body (JSON)
| Name | Type | Description |
|---|---|---|
emailrequired | string (email) | |
namerequired | string | |
phone | string or null | |
employee_no | string or null | |
title | string or null | |
department | string or null | |
locale | "en" | "fr" | "es" | |
home_location_id | string or null | |
manager_id | string or null | |
tags | array of string | |
hourly_rate_cents | integer or null | |
billable_rate_cents | integer or null | |
location_ids | array of string | |
role_key | string | |
role_scope_location_id | string or null | |
send_invite | boolean | |
external_ids | object |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","name":"Example"}'Responses
200
GET/v1/users/{id}Get one user
Get one user
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/users/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PATCH/v1/users/{id}Update one user
Update one user
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
email | string (email) | |
name | string | |
phone | string or null | |
employee_no | string or null | |
title | string or null | |
department | string or null | |
locale | "en" | "fr" | "es" | |
home_location_id | string or null | |
manager_id | string or null | |
tags | array of string | |
hourly_rate_cents | integer or null | |
billable_rate_cents | integer or null | |
location_ids | array of string | |
external_ids | object |
Example
curl -X PATCH "https://ca-api.clocklap.com/v1/users/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
200
POST/v1/users/{id}/activateActivate
Activate
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/activate" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/users/{id}/anonymizeRemove an archived person's personal details now (keeps payroll records)
Remove an archived person's personal details now (keeps payroll records)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/anonymize" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/users/{id}/archiveArchive
Archive
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/archive" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/users/{id}/devicesThe phones someone has signed in on (app version, location permission, last seen)
The phones someone has signed in on (app version, location permission, last seen)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/users/{id}/devices" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/users/{id}/exportExport everything held about a person (data-subject request)
Export everything held about a person (data-subject request)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/users/{id}/export" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/users/{id}/historyWho changed what about this person
Who changed what about this person
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/users/{id}/history" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/users/{id}/identitiesList identities
List identities
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/users/{id}/identities" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
DELETE/v1/users/{id}/identities/{identity_id}Delete one identity
Delete one identity
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | |
identity_idrequired | string |
Example
curl -X DELETE "https://ca-api.clocklap.com/v1/users/{id}/identities/{identity_id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/users/{id}/inviteResend the invite email (only to people who haven't joined yet; the link goes to their inbox only)
Resend the invite email (only to people who haven't joined yet; the link goes to their inbox only)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/invite" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PUT/v1/users/{id}/kiosk-pinSet kiosk pin
Set kiosk pin
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
pinrequired | string |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/kiosk-pin" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"pin":"string"}'Responses
200
PUT/v1/users/{id}/locationsSet locations
Set locations
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
location_idsrequired | array of string |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/locations" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"location_ids":["string"]}'Responses
200
POST/v1/users/{id}/mfa/resetReset someone's two-step verification (lost phone); they set it up again at next sign-in
Reset someone's two-step verification (lost phone); they set it up again at next sign-in
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/mfa/reset" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
PUT/v1/users/{id}/rolesSet roles
Set roles
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
rolesrequired | array of object | |
roles[].rolerequired | string | |
roles[].scope_location_id | string or null |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/roles" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"roles":[{"role":"string","scope_location_id":"sco_01J…"}]}'Responses
200
PUT/v1/users/{id}/scheduleWeekly schedule (used for late/absent alerts)
Weekly schedule (used for late/absent alerts)
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
shiftsrequired | array of object | |
shifts[].location_idrequired | string | |
shifts[].weekdayrequired | integer | |
shifts[].start_timerequired | string | |
shifts[].end_timerequired | string |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/schedule" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"shifts":[{"location_id":"loc_01J…","weekday":0,"start_time":"string","end_time":"string"}]}'Responses
200
PUT/v1/users/{id}/start-dateStart date, for anniversaries and accrual waiting periods
Start date, for anniversaries and accrual waiting periods
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
hired_on | string or null |
Example
curl -X PUT "https://ca-api.clocklap.com/v1/users/{id}/start-date" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hired_on":"string"}'Responses
200
POST/v1/users/{id}/suspendSuspend
Suspend
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/{id}/suspend" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/users/actionsDo the same thing to many people (suspend, archive, resend invites, add or remove locations, set a role). Each person succeeds or fails on their own.
Do the same thing to many people (suspend, archive, resend invites, add or remove locations, set a role). Each person succeeds or fails on their own.
Body (JSON)
| Name | Type | Description |
|---|---|---|
user_idsrequired | array of string | |
actionrequired | "suspend" | "activate" | "archive" | "resend_invite" | "add_locations" | "remove_locations" | "set_role" | |
location_ids | array of string | |
role | string | |
scope_location_id | string or null |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/actions" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_ids":["string"],"action":"suspend"}'Responses
200
POST/v1/users/bulkImport many people (each row is independent)
Import many people (each row is independent)
Body (JSON)
| Name | Type | Description |
|---|---|---|
usersrequired | array of object | |
users[].emailrequired | string (email) | |
users[].namerequired | string | |
users[].phone | string or null | |
users[].employee_no | string or null | |
users[].title | string or null | |
users[].department | string or null | |
users[].locale | "en" | "fr" | "es" | |
users[].home_location_id | string or null | |
users[].manager_id | string or null | |
users[].tags | array of string | |
users[].hourly_rate_cents | integer or null | |
users[].billable_rate_cents | integer or null | |
users[].location_ids | array of string | |
users[].role_key | string | |
users[].role_scope_location_id | string or null | |
users[].send_invite | boolean | |
users[].external_ids | object |
Example
curl -X POST "https://ca-api.clocklap.com/v1/users/bulk" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"users":[{"email":"[email protected]","name":"Example"}]}'Responses
200
GET/v1/users/departmentsDepartments in use, for filters
Departments in use, for filters
Example
curl "https://ca-api.clocklap.com/v1/users/departments" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200