Documentation menu
You are reading docs for v0.4. Read the current version.

API reference

12 operations in clients. Raw spec: openapi.json.

GET/api/v1/clients

GET /api/clients

Responses

StatusDescription
200

Security: bearer

POST/api/v1/clients

POST /api/clients — instant-first (IF1/IF2): idempotency-keyed and returns the read-your-write `mutation` metadata.

Request body

CreateClientRequest

Responses

StatusDescription
200
409idempotency key reused

Security: bearer

GET/api/v1/clients/{id}

GET /api/clients/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200

Security: bearer

GET/api/v1/clients/{id}/assets

GET /api/clients/{id}/assets

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/clients/{id}/assets

POST /api/clients/{id}/assets

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

CreateAssetRequest

Responses

StatusDescription
200

Security: bearer

GET/api/v1/clients/{id}/completeness

GET /api/clients/{id}/completeness — backend documentation-completeness scoring (Wave 17 lane 13): the weights live SERVER-side now, replacing the honest client-side metadata scoring the clients lane shipped. Same shape, same pro-ration doctrine: score = round(earned / maxKnown × 100) with null legs (leg absent) pro-rated OUT, never a silent zero.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404client not visible in scope

Security: bearer

GET/api/v1/clients/{id}/contacts

GET /api/clients/{id}/contacts

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/clients/{id}/contacts

POST /api/clients/{id}/contacts

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

CreateContactRequest

Responses

StatusDescription
200

Security: bearer

GET/api/v1/clients/{id}/contacts/activity

GET /api/clients/{id}/contacts/activity

Derived, never written: email on this client's tickets, portal replies and calls, matched to the contact's own address or number. A contact with no matching event is absent from the answer rather than sent with a zero.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200

Security: bearer

GET/api/v1/clients/{id}/sites

clients_list_sites

Parameters

NameInTypeRequiredDescription
idpathstringYes
include_archivedquerybooleanNoArchived sites are hidden by default; the archive view asks for them.

Responses

StatusDescription
200

Security: bearer

POST/api/v1/clients/{id}/sites

POST /api/clients/{id}/sites

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

CreateSiteRequest

Responses

StatusDescription
200

Security: bearer

POST/api/v1/clients/{id}/sites/{site_id}/archive

POST /api/clients/{client_id}/sites/{site_id}/archive — hide the site from lists and pickers without deleting it. The 200 body is the updated site, `archived_at` included.

Parameters

NameInTypeRequiredDescription
idpathstringYes
site_idpathstringYes

Request body

ArchiveSiteRequest

Responses

StatusDescription
200
404site not visible in scope (rls_sparse)

Security: bearer