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 }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
legalName | string | yes |
tradeName | string or null | yes |
tin | string or null | yes |
vatStatus | "non_vat" or "vat_registered" | yes |
addressLine | string | yes |
city | string | yes |
province | string | yes |
provinceIso | string | yes |
country | string, min 1, max 8 | yes |
invoiceEmail | string | yes |
phone | string or null | yes |
website | string or null | yes |
createdAt | string | yes |
updatedAt | string | yes |
Replace the business profile
PUT /api/public/agency/business-profile
Request body:
| Field | Type | Required |
|---|---|---|
legalName | string, max 200 | yes |
tradeName | string, max 200, default "" | no |
tin | string, max 64, default "" | no |
vatStatus | "non_vat" or "vat_registered" | yes |
addressLine | string, max 300 | yes |
city | string, max 120 | yes |
province | string, max 120 | yes |
provinceIso | string, max 16 | yes |
country | string, min 2, max 8 | yes |
invoiceEmail | string, max 254 | yes |
phone | string, max 40, default "" | no |
website | string, max 300, default "" | no |
Response 200: { profile: BusinessProfile }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
legalName | string | yes |
tradeName | string or null | yes |
tin | string or null | yes |
vatStatus | "non_vat" or "vat_registered" | yes |
addressLine | string | yes |
city | string | yes |
province | string | yes |
provinceIso | string | yes |
country | string, min 1, max 8 | yes |
invoiceEmail | string | yes |
phone | string or null | yes |
website | string or null | yes |
createdAt | string | yes |
updatedAt | string | yes |
Get preferences
GET /api/public/agency/preferences
Response 200: { preferences: Preferences }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
timezone | string, min 1 | yes |
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 |
workDaysPerWeek | integer, min 1, max 7 | yes |
timeFormat | "h12" or "h24" | yes |
defaultCurrency | string, min 1, max 8 | yes |
locale | string | yes |
createdAt | string | yes |
updatedAt | string | yes |
Replace preferences
PUT /api/public/agency/preferences
Request body:
| Field | Type | Required |
|---|---|---|
timezone | string, min 1 | yes |
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 |
workDaysPerWeek | integer, min 1, max 7 | yes |
timeFormat | "h12" or "h24" | yes |
defaultCurrency | string, min 1, max 8 | yes |
locale | string | yes |
Response 200: { preferences: Preferences }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
timezone | string, min 1 | yes |
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 |
workDaysPerWeek | integer, min 1, max 7 | yes |
timeFormat | "h12" or "h24" | yes |
defaultCurrency | string, min 1, max 8 | yes |
locale | string | yes |
createdAt | string | yes |
updatedAt | string | yes |
Get notification settings
GET /api/public/agency/notification-settings
Response 200: { settings: NotificationSettings }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
emailInvoicePaid | boolean | yes |
emailInviteAccepted | boolean | yes |
emailPayoutSent | boolean | yes |
createdAt | string | yes |
updatedAt | string | yes |
Replace notification settings
PUT /api/public/agency/notification-settings
Request body:
| Field | Type | Required |
|---|---|---|
emailInvoicePaid | boolean | yes |
emailInviteAccepted | boolean | yes |
emailPayoutSent | boolean | yes |
Response 200: { settings: NotificationSettings }
| Field | Type | Required |
|---|---|---|
clerkOrgId | string, min 1 | yes |
emailInvoicePaid | boolean | yes |
emailInviteAccepted | boolean | yes |
emailPayoutSent | boolean | yes |
createdAt | string | yes |
updatedAt | string | yes |
Get plan access
GET /api/public/agency/access
Response 200: Access
| Field | Type | Required |
|---|---|---|
plan | string | yes |
subscriptionExempt | boolean | yes |
partnerCovered | boolean | yes |
partner | object or null | yes |
sponsored | boolean | yes |
seatCheckoutEnabled | boolean | yes |
seatMonthlyCents | integer, min -9007199254740991 | yes |
premiumChargeCents | integer, min -9007199254740991 | yes |
partialDiscountCents | integer, min -9007199254740991 | yes |
partner object:
| Field | Type | Required |
|---|---|---|
status | string | yes |
subscriptionExempt | boolean | yes |
