Agency
Time
Agency time request and response fields.
Base URL https://api.klockwork.org. Send X-Klockwork-Key or Authorization: Bearer kw_…. An agency key acts as the agency that created it. JSON bodies use these fields. A missing required field returns 400 with { "error": "Validation failed", "details": {} }.
from must be earlier than to. Otherwise the response is 400 { "error": "from must be before to" }.
List time
GET /api/public/agency/time
Query:
| Field | Type | Required |
|---|---|---|
from | string, min 1 | yes |
to | string, min 1 | yes |
Response 200: TimeReport
| Field | Type | Required |
|---|---|---|
summary | object | yes |
byTalent | array of object | yes |
entries | array of object | yes |
summary object:
| Field | Type | Required |
|---|---|---|
finishedHours | number, min 0 | yes |
openTimerCount | integer, min 0 | yes |
estimatedPay | number, min 0 | yes |
currency | string | yes |
byTalent items:
| Field | Type | Required |
|---|---|---|
talentId | string (uuid) | yes |
talentDisplayName | string | yes |
hourlyRate | number, min 0 | yes |
currency | string | yes |
finishedHours | number, min 0 | yes |
estimatedPay | number, min 0 | yes |
openStatus | "working" or "break" or "pending" or null | yes |
entryCount | integer, min 0 | yes |
entries items:
| Field | Type | Required |
|---|---|---|
id | string, min 1 | yes |
source | "timer" or "manual" | yes |
talentId | string (uuid) | yes |
talentDisplayName | string | yes |
clientId | string (uuid) or null | yes |
clientDisplayName | string or null | yes |
startedAt | string | yes |
endedAt | string or null | yes |
billableHours | number, min 0 | yes |
notes | string or null | yes |
breaks | array of object | yes |
openStatus | "working" or "break" or "pending" or null | yes |
entries[].breaks items:
| Field | Type | Required |
|---|---|---|
startedAt | string | yes |
endedAt | string or null | yes |
label | string | yes |
Create a time entry
POST /api/public/agency/time
Request body:
| Field | Type | Required |
|---|---|---|
talentId | string (uuid) | yes |
clientId | string (uuid) or null | no |
startedAt | string, min 1 | yes |
endedAt | string, min 1 | yes |
notes | string, max 4000 or null | no |
Response 201: { entry: TimeEntry }
| Field | Type | Required |
|---|---|---|
id | string, min 1 | yes |
source | "timer" or "manual" | yes |
talentId | string (uuid) | yes |
talentDisplayName | string | yes |
clientId | string (uuid) or null | yes |
clientDisplayName | string or null | yes |
startedAt | string | yes |
endedAt | string or null | yes |
billableHours | number, min 0 | yes |
notes | string or null | yes |
breaks | array of object | yes |
openStatus | "working" or "break" or "pending" or null | yes |
breaks items:
| Field | Type | Required |
|---|---|---|
startedAt | string | yes |
endedAt | string or null | yes |
label | string | yes |
