KlockworkKlockworkAPI
Agency

Workspace

Agency profile, preferences, notifications, and plan access.

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

Get the business profile

GET /api/public/agency/business-profile

Response 200: { profile: BusinessProfile }

FieldTypeRequired
clerkOrgIdstring, min 1yes
legalNamestringyes
tradeNamestring or nullyes
tinstring or nullyes
vatStatus"non_vat" or "vat_registered"yes
addressLinestringyes
citystringyes
provincestringyes
provinceIsostringyes
countrystring, min 1, max 8yes
invoiceEmailstringyes
phonestring or nullyes
websitestring or nullyes
createdAtstringyes
updatedAtstringyes

Replace the business profile

PUT /api/public/agency/business-profile

Request body:

FieldTypeRequired
legalNamestring, max 200yes
tradeNamestring, max 200, default ""no
tinstring, max 64, default ""no
vatStatus"non_vat" or "vat_registered"yes
addressLinestring, max 300yes
citystring, max 120yes
provincestring, max 120yes
provinceIsostring, max 16yes
countrystring, min 2, max 8yes
invoiceEmailstring, max 254yes
phonestring, max 40, default ""no
websitestring, max 300, default ""no

Response 200: { profile: BusinessProfile }

FieldTypeRequired
clerkOrgIdstring, min 1yes
legalNamestringyes
tradeNamestring or nullyes
tinstring or nullyes
vatStatus"non_vat" or "vat_registered"yes
addressLinestringyes
citystringyes
provincestringyes
provinceIsostringyes
countrystring, min 1, max 8yes
invoiceEmailstringyes
phonestring or nullyes
websitestring or nullyes
createdAtstringyes
updatedAtstringyes

Get preferences

GET /api/public/agency/preferences

Response 200: { preferences: Preferences }

FieldTypeRequired
clerkOrgIdstring, min 1yes
timezonestring, min 1yes
dateFormat"DD MMM YYYY" or "MMM DD, YYYY" or "YYYY-MM-DD"yes
weekStartsOn"monday" or "tuesday" or "wednesday" or "thursday" or "friday" or "saturday" or "sunday"yes
workDaysPerWeekinteger, min 1, max 7yes
timeFormat"h12" or "h24"yes
defaultCurrencystring, min 1, max 8yes
localestringyes
createdAtstringyes
updatedAtstringyes

Replace preferences

PUT /api/public/agency/preferences

Request body:

FieldTypeRequired
timezonestring, min 1yes
dateFormat"DD MMM YYYY" or "MMM DD, YYYY" or "YYYY-MM-DD"yes
weekStartsOn"monday" or "tuesday" or "wednesday" or "thursday" or "friday" or "saturday" or "sunday"yes
workDaysPerWeekinteger, min 1, max 7yes
timeFormat"h12" or "h24"yes
defaultCurrencystring, min 1, max 8yes
localestringyes

Response 200: { preferences: Preferences }

FieldTypeRequired
clerkOrgIdstring, min 1yes
timezonestring, min 1yes
dateFormat"DD MMM YYYY" or "MMM DD, YYYY" or "YYYY-MM-DD"yes
weekStartsOn"monday" or "tuesday" or "wednesday" or "thursday" or "friday" or "saturday" or "sunday"yes
workDaysPerWeekinteger, min 1, max 7yes
timeFormat"h12" or "h24"yes
defaultCurrencystring, min 1, max 8yes
localestringyes
createdAtstringyes
updatedAtstringyes

Get notification settings

GET /api/public/agency/notification-settings

Response 200: { settings: NotificationSettings }

FieldTypeRequired
clerkOrgIdstring, min 1yes
emailInvoicePaidbooleanyes
emailInviteAcceptedbooleanyes
emailPayoutSentbooleanyes
createdAtstringyes
updatedAtstringyes

Replace notification settings

PUT /api/public/agency/notification-settings

Request body:

FieldTypeRequired
emailInvoicePaidbooleanyes
emailInviteAcceptedbooleanyes
emailPayoutSentbooleanyes

Response 200: { settings: NotificationSettings }

FieldTypeRequired
clerkOrgIdstring, min 1yes
emailInvoicePaidbooleanyes
emailInviteAcceptedbooleanyes
emailPayoutSentbooleanyes
createdAtstringyes
updatedAtstringyes

Get plan access

GET /api/public/agency/access

Response 200: Access

FieldTypeRequired
planstringyes
subscriptionExemptbooleanyes
partnerCoveredbooleanyes
partnerobject or nullyes
sponsoredbooleanyes
seatCheckoutEnabledbooleanyes
seatMonthlyCentsinteger, min -9007199254740991yes
premiumChargeCentsinteger, min -9007199254740991yes
partialDiscountCentsinteger, min -9007199254740991yes

partner object:

FieldTypeRequired
statusstringyes
subscriptionExemptbooleanyes

On this page