Appearance
Integrations & API
Settings → Integrations provides programmatic access to your organisation's data through a documented REST API, two kinds of credential, and outbound webhooks. All integration management requires the Manage Integrations permission.
The OpenAPI description
The full, current description of the public API is served as OpenAPI 3.1 JSON from:
https://your-phanera-host/api/v1/openapi.jsonThe Integrations page shows the URL with a copy button and a link to open it. Import it into Postman, Insomnia, an SDK generator or an integration platform rather than transcribing endpoints by hand. It is generated from the code itself — endpoint summaries, parameter notes and field descriptions all come from the source — so it cannot drift from what the API actually does.
It describes /api/v1 and nothing else. Phanera's own interface talks to a separate, internal API which is not a published contract and may change without notice; only /api/v1 is versioned and stable.
Choosing how integrations authenticate
Under Accepted credentials you choose which kinds of credential the public API will accept from your integrations:
- API keys — on by default. A single long-lived secret, simple to configure.
- OAuth 2.0 client credentials — off by default. A client id and secret are exchanged for an access token that expires within the hour.
Either is enough on its own, and both can be live at once while you migrate from one to the other. Turning one off takes effect immediately for every integration using it — existing credentials of that kind start getting 401 without being revoked. With neither accepted, the public API is closed to your organisation entirely, which is a legitimate way to switch it off.
An authority whose policy forbids long-lived shared secrets in configuration files should turn API keys off and use OAuth.
API keys
Organisation-scoped (not user-scoped): a key sees its organisation's whole caseload.
- Click Create Token and give it a descriptive name.
- The raw token (prefixed
rvk_) is displayed once — copy it immediately and store it securely. Only a hash is kept on the server; the token can never be shown again.
Send it as either header:
Authorization: Bearer rvk_your_token_here
X-Api-Key: rvk_your_token_hereTokens can be revoked at any time and stop working immediately. Creation and revocation are recorded in the admin audit log, by name — never the key itself.
What the credential then does is recorded too. Opening a case, downloading a document and pulling a report or Power BI feed each land in the record-access log under the credential's name, alongside the officers who did the same things; token exchanges and refused credentials land in the access log beside the sign-ins. A credential reads the whole caseload with no person behind it, so it is held to the same trail a person is.
OAuth 2.0 client credentials
A client-credentials application (RFC 6749 §4.4) for integrations that must not hold a permanent secret.
- Turn OAuth 2.0 client credentials on under Accepted credentials.
- Click New client and name it. The client ID and client secret are shown once — the secret is never retrievable again.
- Exchange them for an access token:
bash
curl -X POST "https://your-phanera-host/api/v1/oauth/token" \
-d "grant_type=client_credentials" \
-d "client_id=rvc_..." \
-d "client_secret=..."json
{ "access_token": "rvo_...", "token_type": "Bearer", "expires_in": 3600 }- Send the access token on every other call:
Authorization: Bearer rvo_your_access_tokenTokens expire after an hour; ask for another when yours is refused. Revoking a client deletes every access token it has issued, so access stops at once rather than at the end of the hour.
The token endpoint answers the same way for a wrong secret as for a client id that does not exist — deliberately, so it cannot be used to work out which client ids are real.
What the API covers
Every endpoint is under /api/v1, returns JSON, and sees exactly one organisation — the one the credential belongs to.
Case management
| Method | Endpoint | Description |
|---|---|---|
| GET | /requests | Paged list. Same filters as the requests queue (search, status, type, department, dates). Page size capped at 100 |
| GET | /requests/{id} | Full case detail |
| POST | /requests | Log a new case. Answers are keyed by the request type's form field ids and validated exactly as a portal submission is |
| GET | /requests/{id}/timeline | The case's audit history |
| GET | /requests/{id}/messages | Correspondence with the requester |
| GET | /requests/{id}/attachments | Documents held against the case |
| GET | /requests/{id}/attachments/{attachmentId}/download | A ten-minute direct download URL for one document |
Metadata
| Method | Endpoint | Description |
|---|---|---|
| GET | /metadata/request-types | Request types, deadline spans and form definitions |
| GET | /metadata/categories | Subject categories |
| GET | /metadata/departments | Departments |
| GET | /metadata/exemptions?requestTypeId= | The exemption library for one request type |
| GET | /metadata/statuses | The case status vocabulary |
Reporting
/reports/compliance, /reports/volume, /reports/response-times, /reports/overdue, /reports/exemptions, /reports/workload, /reports/costs, /reports/ico-annual-return, /reports/custom-field — the same computations the Reports tab shows, at whole-organisation scope.
Audit records
| Method | Endpoint | Description |
|---|---|---|
| GET | /audit/access | Sign-in events |
| GET | /audit/admin | Configuration changes |
| GET | /audit/timeline | Case events across the organisation |
| GET | /audit/record-access | Who opened, downloaded or exported what |
All four are paged and filterable by date, so a nightly job can take yesterday's rows rather than re-reading everything.
Power BI datasets
| Method | Endpoint | Description |
|---|---|---|
| GET | /powerbi/cases | One row per case, every identifier resolved to a name, with the compliance columns already derived. openOnly=true narrows it to the live caseload |
| GET | /powerbi/monthly | One row per month per request type: received, closed, in time, late, compliance rate |
See Connecting Power BI below.
Paging
List endpoints return items alongside page, pageSize, totalCount and hasNextPage. Page through until hasNextPage is false. Pages hold at most 100 rows, except the Power BI feeds which allow 1000.
Example
bash
curl -H "Authorization: Bearer rvk_..." \
"https://your-phanera-host/api/v1/requests?Page=1&PageSize=50"Connecting Power BI
- In Power BI Desktop: Get Data → Web → Advanced.
- URL:
https://your-phanera-host/api/v1/powerbi/cases?pageSize=1000 - Add an HTTP request header parameter:
Authorizationwith the valueBearer rvk_...(or an OAuth access token). - Power BI shows the JSON; expand
itemsinto a table.
Use /powerbi/monthly as a second query for a pre-aggregated compliance table, and relate the two on receivedMonth / month.
The case feed excludes trashed, spam and merged-away cases, so its row count matches what you would call your caseload. Add &openOnly=true for open cases only — the same two statuses (closed, transferred) the product's own dashboard treats as finished, so your report's "open requests" card matches the one on screen.
Columns you would otherwise have to derive
These come ready, so a report does not have to reimplement the compliance rules — and two reports cannot end up disagreeing about what "overdue" means:
| Column | What it holds |
|---|---|
complianceBand | Overdue, Due this week, Due next week or Within timescale for an open case; blank for a closed one. Weeks are calendar weeks beginning Monday |
daysOverdue | Days past the deadline — to the response for a closed case, to now for an open one. Blank when the case is not overdue, so an average is not dragged down by every case answered on time |
isOpen | Not closed and not transferred away |
isOverdue, answeredInTime, daysOpen | As they say |
directorate | The one department a case belongs to, or Mixed where it spans several. Group on this. departments keeps the full Housing; Resources list for a detail table — grouping on that instead grows a long tail of one-case combinations |
title | What was asked for, as it reads in the queue. The full request text is on GET /api/v1/requests/{id} |
receivedMonth | 2026-08, to build a time axis on without parsing dates |
Reporting on something we do not model
Every authority reports on a dimension the product has no field for — a Strategic Director, a service area, a corporate priority. Define it as a custom field on the request type and it appears in the feed's customFields object, keyed by field key, with no change to the integration. GET /api/v1/metadata/request-types lists the keys against their labels.
In Power BI, customFields arrives as a record: expand it once and each field becomes a column.
Dimensions that belong to a department, not a case
If the value is really an attribute of the directorate rather than of the individual case — a Strategic Director usually is — put it in a small lookup table in Power BI and relate it to directorate. Typing it on every case is how a spreadsheet ends up with three spellings of the same person's name.
Refreshing on a schedule
An OAuth access token expires after an hour, which is shorter than most refresh schedules. For a scheduled refresh, either use an API key or have your gateway fetch a fresh token before each run.
Webhooks
Webhooks push notifications to your systems when request lifecycle events happen. Each webhook subscription has:
- A target URL (HTTPS endpoint you control)
- A set of subscribed events
- A signing secret, displayed once at creation — use it to verify that deliveries genuinely came from Phanera
Events
| Event | Fired when |
|---|---|
request.created | A new request is created (portal, staff, or inbound email) |
request.closed | A request is closed |
request.overdue | A request passes its statutory deadline |
Delivery format
Each subscription chooses the shape of the body it receives:
| Format | Use it for |
|---|---|
| JSON | An integration. The body is Phanera's own event envelope — { id, event, createdAt, data } — signed with HMAC-SHA256 in the X-Phanera-Signature header |
| Microsoft Teams | A Teams channel. The body is a Teams message containing an Adaptive Card, so the event arrives as something a person can read |
Choose Microsoft Teams when the target URL is a Teams channel webhook — either the URL from the channel's Workflows connector (Power Automate) or a classic Incoming Webhook. A Teams channel renders what it is sent rather than parsing it, so a subscription left on JSON and pointed at a channel posts nothing readable, and Teams will still answer successfully.
The card names the event and lists the fields the event carries — the case reference, its title, its status and its deadline. It carries nothing beyond what the JSON body would have carried: no case description, no requester details, no correspondence.
Existing webhooks are unaffected — a subscription created before this setting existed delivers JSON, as it always has.
Delivery & reliability
- Deliveries are signed with the webhook's secret so you can authenticate the payload.
- Use the Test button to send a test ping to your endpoint and confirm connectivity.
- If deliveries fail repeatedly, the webhook is automatically disabled. Fix your endpoint, then click Activate to re-enable it and reset the failure count.
Webhook creation, deletion and reactivation are recorded in the admin audit log, with the destination URL — never the signing secret.