KlockworkKlockworkAPI
Agency

Assignments

Assign a talent to an agency client.

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": {} }.

List assignments

GET /api/public/agency/assignments

Query:

FieldTypeRequired
clientIdstring (uuid)no
talentIdstring (uuid)no
status"active" or "pending" or "ended" or "open" or "all"no

Response 200: { assignments: Assignment[] }

FieldTypeRequired
idstring (uuid)yes
clerkOrgIdstring, min 1yes
talentIdstring (uuid)yes
clientIdstring (uuid)yes
status"active" or "pending" or "ended"yes
talentDisplayNamestring, min 1 or nullno
clientDisplayNamestring, min 1 or nullno
createdAtstringyes
updatedAtstringyes

Create an assignment

POST /api/public/agency/assignments

Send an existing talent id, or a nested talent object that creates the talent and the assignment together. Assigning the same talent twice returns 400 { "error": "This talent is already assigned to this client" }.

Request body:

One of these bodies. Shape 1:

FieldTypeRequired
clientIdstring (uuid)yes
talentIdstring (uuid)yes

One of these bodies. Shape 2:

FieldTypeRequired
clientIdstring (uuid)yes
talentobjectyes

talent object:

FieldTypeRequired
displayNamestring, min 1yes
contactNamestring, min 1yes
contactEmailstring (email)yes
hourlyRatenumber, min 0yes
currencystring, min 1, max 8yes
hoursPerDaynumberyes
shiftStartstringyes
shiftEndstringyes
timezonestring, min 1yes
status"active" or "archived" or "pending"no
unpaidBreakHoursnumber, min 0 or nullno
payoutHintsstring or nullno
paymentTermsOverridestring or nullno
internalNotesstring or nullno
colorTagstring or nullno

Response 201: { assignment: Assignment }

FieldTypeRequired
idstring (uuid)yes
clerkOrgIdstring, min 1yes
talentIdstring (uuid)yes
clientIdstring (uuid)yes
status"active" or "pending" or "ended"yes
talentDisplayNamestring, min 1 or nullno
clientDisplayNamestring, min 1 or nullno
createdAtstringyes
updatedAtstringyes

Get an assignment

GET /api/public/agency/assignments/{id}

Response 200: { assignment: Assignment }

FieldTypeRequired
idstring (uuid)yes
clerkOrgIdstring, min 1yes
talentIdstring (uuid)yes
clientIdstring (uuid)yes
status"active" or "pending" or "ended"yes
talentDisplayNamestring, min 1 or nullno
clientDisplayNamestring, min 1 or nullno
createdAtstringyes
updatedAtstringyes

Update an assignment

PATCH /api/public/agency/assignments/{id}

Request body:

FieldTypeRequired
status"ended" or "active" or "pending"yes

Response 200: { assignment: Assignment }

FieldTypeRequired
idstring (uuid)yes
clerkOrgIdstring, min 1yes
talentIdstring (uuid)yes
clientIdstring (uuid)yes
status"active" or "pending" or "ended"yes
talentDisplayNamestring, min 1 or nullno
clientDisplayNamestring, min 1 or nullno
createdAtstringyes
updatedAtstringyes

On this page