Skip to content
ClockLap Developers
API reference clocklap.com Get an API key

API reference

Media

8 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.

GET/v1/mediaPhotos (and recordings) on a project, client, site, time entry or invoice, newest first. Links expire after 10 minutes.

Photos (and recordings) on a project, client, site, time entry or invoice, newest first. Links expire after 10 minutes.

Query parameters

NameTypeDescription
attached_type"project" | "customer" | "location" | "time_entry" | "invoice"
attached_idstring
kind"photo" | "audio"
mine"0" | "1" | "true" | "false"
limitinteger
beforestring (date-time)

Example

curl "https://ca-api.clocklap.com/v1/media" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/mediaUpload a photo or voice recording (raw file body; Content-Type image/* or audio/*). Idempotent on id.

Upload a photo or voice recording (raw file body; Content-Type image/* or audio/*). Idempotent on id.

Query parameters

NameTypeDescription
idstring
kind"photo" | "audio"
attachstringComma list of type:id, e.g. project:prj_123,invoice:inv_456
captionstring
taken_atstring (date-time)
duration_snumber
visibility"private" | "project"

Example

curl -X POST "https://ca-api.clocklap.com/v1/media" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

GET/v1/media/{id}Get one media

Get one media

Path parameters

NameTypeDescription
idrequiredstring

Example

curl "https://ca-api.clocklap.com/v1/media/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

PATCH/v1/media/{id}Change the caption, or share it / keep it private

Change the caption, or share it / keep it private

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
captionstring or null
visibility"private" | "project"

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/media/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"caption":"string","visibility":"private"}'

Responses

200

DELETE/v1/media/{id}Remove a photo or recording (the file is deleted shortly after)

Remove a photo or recording (the file is deleted shortly after)

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/media/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/media/{id}/linksAlso attach it to other things

Also attach it to other things

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
attach_torequiredarray of object
attach_to[].typerequired"project" | "customer" | "location" | "time_entry" | "invoice"
attach_to[].idrequiredstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/media/{id}/links" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"attach_to":[{"type":"project","id":"id_01J…"}]}'

Responses

200

GET/v1/media/configWhether voice notes can be transcribed in this workspace, and upload limits

Whether voice notes can be transcribed in this workspace, and upload limits

Example

curl "https://ca-api.clocklap.com/v1/media/config" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200