Client portals API

How to work a firm's client portals from a script, an automation or an assistant: list portals, send a client a request, add folders, move the work to a stage, read what happened, and hear when a client finishes a request or adds a file.

A client portal is a private space for one client: a Messages channel they see, a Firm only channel they don't, a file library, requests (files, answers, approvals, tasks) and stages. This guide is for the firm's side. A client's own view stays in the app: nothing here can be reached with a client's token.

Before you start

Scope Lets a token
portals:read list portals, read one, its files, requests and timeline
portals:write set up a portal, change it, its stages and branding, add folders, send and change requests

Portals

GET   /v1/orgs/{orgId}/portals
POST  /v1/orgs/{orgId}/portals          { "name": "Smith & Co", "kind": "business", "lead_user_id": "…", "staff_ids": ["…"] }
GET   /v1/portals/{portalId}
PATCH /v1/portals/{portalId}            { "welcome": "…", "show_progress": true, "require_2fa": true }
PATCH /v1/orgs/{orgId}/portal-branding  { "display_name": "Acme Accounting", "accent_light": "#1f6f43" }

POST takes an Idempotency-Key, so a retried request sets up one portal. category_id makes an existing category into a portal. PATCH can turn two-factor sign-in on, never off.

Stages and folders

PUT  /v1/portals/{portalId}/stages      { "names": ["Intake", "Documents", "Review", "Filed"] }
POST /v1/portals/{portalId}/stage       { "position": 1 }
GET  /v1/portals/{portalId}/files
POST /v1/portals/{portalId}/folders     { "name": "2024 Tax", "visibility": "shared" }

A new folder is Firm only unless you ask for "visibility": "shared". Moving to a stage may start requests from the portal's template, as it does in the app.

Requests

GET   /v1/portals/{portalId}/requests
GET   /v1/portals/{portalId}/requests/{requestId}
POST  /v1/portals/{portalId}/requests   { "title": "Tax documents", "due_on": "2027-01-15",
                                          "items": [{ "kind": "upload", "label": "W-2s" },
                                                    { "kind": "question", "label": "Any new dependents?", "config": { "question": "yesno" } }] }
PATCH /v1/portals/{portalId}/requests/{requestId}

Item kinds are upload, question, checkbox, approve and task (a sign item links an envelope sent in the app). A new request tells the client the way the app does: an email naming the firm, how many items and when (titles only if the firm chose that), and a line in their portal. internal_note is for your staff and never reaches the client. POST takes an Idempotency-Key.

The timeline

GET /v1/portals/{portalId}/timeline?limit=100

What happened, newest first: requests sent and completed, files added, stages, approvals. Each line has id, kind, at, text and firm_only, which marks a line the client never sees.

Evidence bundles

One client's record over a date range, as one ZIP for an auditor, an insurer or your own files. In the app it's Export evidence on the portal's History tab; from a script:

POST /v1/portals/{portalId}/evidence        { "from": "2026-01-01", "to": "2026-03-31", "include_internal": false }
GET  /v1/portals/{portalId}/evidence/{evidenceId}

Both need portals:read and a person's token: an app gets 403. from and to are UTC days, inclusive; leave them out for the last 90 days, and a range covers at most 1,830 days. Asking again while a bundle of that portal is still being made answers that one (200 instead of 202), and one person may ask for 10 a day per portal.

The bundle is made in the background; status goes pending → building → ready (or failed), and a ready bundle is kept for 7 days. Once it's ready, the person who asked gets download_url, a link that works for them alone, while they're still on the portal's staff; anyone else sees the bundle's status and counts but no link. counts says how much of each kind went in.

What's in it, each part read the way the app shows it to you:

Folder What
index.pdf, README.txt, manifest.json what the bundle covers, who made it, the counts, what was left out and why, and every file with its SHA-256
SHA256SUMS.txt the same hashes, for sha256sum -c SHA256SUMS.txt
timeline.json the portal's timeline over the range
requests/ completed requests with their answers and the files sent for them
files/ file versions added in the range
signatures/ completed signing envelopes: the signed document and its certificate, each as sealed
help/ Help requests: the public conversation only, never your team's notes, tags or assignee
invoices/ issued invoices (not drafts), for people who keep invoices
contracts/ contracts and their proposals

Without include_internal the bundle holds only what the client could see: no Firm only files, internal notes or firm-only timeline lines. With it, those go in too. Training records aren't part of it — Ramphearth doesn't keep any — and the README says so. A bundle never carries an email address or a secret.

Asking for one is on the workspace's audit log (portal.exported: who, the range and the counts) and on the portal's timeline as a firm-only line. Downloads are logged too (portal.export_downloaded).

A workflow can ask for one with the step Export a client's evidence (portal.export_evidence: a portal, a number of days and the internal tick). It runs as the workflow's owner, who must still be on that portal's staff; its output is the bundle's id, status and a link to the portal's History tab, where the owner downloads it, so a Notify step can send that link. A test run never asks for a bundle.

Client channels in the app

In Ramphearth a portal is a client: Create → Client makes one in a single step (name, kind, lead, the team, a template and the client's contacts, with "Send the invites now" ticked by default). The client gets a row under Clients in the sidebar and opens on tabs: Conversation (the portal's Messages channel, which the client sees), Internal notes (its Firm only channel, which they never see), Files, Requests, Billing and a firm-only Timeline. The channels keep their ids, so messages_channel_id and internal_channel_id here are the Conversation and Internal notes, and everything on this page works unchanged. Your client still sees "Messages" in their own portal.

Someone on a client's team who has no portal licence sees the client's name in the sidebar and a locked page with "Ask an Admin for a licence", nothing else.

Logging email with a client

When your server has a logging domain (CLIENT_LOG_EMAIL_DOMAIN, log.ramphearth.com on the hosted service), everyone with a portal licence gets a private address in Settings → Calendar & connections → Client email logging, like dana.k7q2m4x9p1r8t@log.ramphearth.com. Bcc it when you write to a client, or forward a client's email to it, and the email is filed on that client's Timeline under Email: only your team sees it, never the client. Attachments go to the client's Files in a Firm only Email attachments folder.

Logged and sent email isn't in /v1, MCP or events.

Emailing a client from Ramphearth

A client's Timeline → Email has Write an email, and each email there has Reply. You pick who it goes to from the client's own contacts and addresses (nobody else), write a subject and a message, and can attach files from the client's library: up to 10 MB is attached, anything bigger goes as a link (only for files the client can already open in their portal). It waits 10 seconds for Undo, then goes; the card shows Sent, Delivered, Delayed, Bounced or "Not sent" and why, with Try again.

Email sent from Ramphearth goes through our email provider (Resend), like every other email we send; it's listed on our privacy promise.

Calls and texts with a client

An Owner or Admin connects the firm's own phone system in Org Settings → Client portals → Calls and texts: Quo, Dialpad or Aircall. Paste an API key made in your phone system's settings (for Aircall, its API ID and API token): Ramphearth checks it, keeps it sealed and shows only its last four characters. It reads calls, voicemail and texts and makes one webhook so they arrive as they happen. It never sends a text, never reads your phone system's contacts, and never changes anything else in your account.

Embedded tools

A firm can show pages from its own outside tools in a portal's Tools tab: a scheduling page, a shared spreadsheet, a project board. It's set up in the app, not over the API.

Recurring requests

Some requests come back every month, quarter or year: bank statements, payroll reports, a tax organiser. Instead of sending each one by hand, portal staff (with a portal licence) set up a recurring request on the portal's Requests tab → Recurring:

Recurring requests are set up in the app; /v1 and MCP see the requests they send as ordinary requests.

Compliance checklists

A portal template can carry a compliance checklist: a named list of controls (things a client needs evidence for — "Access review", "Backups tested"), the requests and recurring requests that collect that evidence, knowledge pages for your team, and contracts started from your own contract templates. The checklist is your firm's own words, a starting point to review — not legal advice, and Ramphearth makes no claim that using one meets any law or standard.

Checklists, coverage and applying to a client are in the app only; /v1 and MCP see the requests a checklist sends as ordinary requests. An evidence export (one file per client with what each control was covered by) comes later.

What stays in the app

Inviting or removing a client, reminding them now, cancelling a request, deleting a folder, closing or deleting a portal, who may invite and what reminder emails say all happen in Ramphearth, where a person confirms them.

Events

portal.request_completed (every required item of a request is done), portal.file_uploaded (a file or a new version went into the library, by the client or your staff), portal.stage_changed and portal.request_overdue (an open request passed its due date; sent once per request, with recurring_id when a recurring request made it) go to event subscriptions, and from there to Zapier, Make and n8n. portal.request_overdue is also a Workflow trigger (A client request is overdue), so a workflow can tell the team or open a task.

A portal is private, so its events go only to a subscription that lists the portal's Messages channel (messages_channel_id on the portal) in channel_ids; a subscription for every channel never receives them, and only someone who can open the portal can list its channel. An event carries ids, the stage position, a file's size, version and SHA-256, and who did it. Names — the portal's, the request's title, the file's name, the stage's name — come along only when the org sends content in events. Answers, notes and email addresses are never sent.

For assistants

The MCP server has tools on these routes: list_portals, get_portal, list_portal_files, list_portal_requests and get_portal_timeline to read, export_portal_evidence and get_portal_evidence for evidence bundles (the download link goes to the person, never an app), and create_portal, update_portal, update_portal_branding, set_portal_stages, move_portal_stage, create_portal_folder, create_portal_request and update_portal_request to work. Confirm a request's items and due date with the person before sending it: the client is told.