client-reports
POST /v1/client-reports/sinks
Start connecting a Google account to receive one client's reports.
Authentication
Send an API key as a bearer token. The key must carry the sites.create permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/client-reports/sinks \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "client_id": <string>, "kind": <ClientReportSinkKind> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Returns Google's consent URL (open it in the same tab). Google asks only for drive.file — access to the files this app creates, nothing else in the account — plus the account's e-mail. On return the client's spreadsheet (one tab per figure set plus a history tab, rewritten with every new report) or folder (one PDF per report) is created in that account and the latest report is copied at once. Connecting again replaces the previous connection of the same kind for that client. Requires sites.create.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
client_id | string | Yes | — |
kind | ClientReportSinkKind | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
sink | ClientReportSink | Yes | — |
authorize_url | string | Yes | — |
Errors this endpoint can return
401 · 403 · 422 · 429 · 503