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
- The add-on. Client portals are a paid add-on (switch
clientPortalin plans), priced per portal licence. While it's off or has ended, reads still work so a firm can see what it made; writes answer403 add_on_required. An Owner who switched portals off gets403 feature_off. A self-hosted server has every feature on and needs no licences. - Portal licences. Only staff holding a portal licence work client portals, and a token acts as its owner: a token of someone without one sees no portals (the list is empty and one portal answers
404), and the app's own routes answer403 portal_licence_required. Owners and Admins hand licences out in Org Settings → Client portals. Clients never need one. - Client logins. Unlimited (fair use): the hosted ceiling is 500 client logins per paid staff seat, with at least 1,500 on Business. Contact us to agree a higher workspace limit. At the ceiling, new contact invitations pause; existing contacts keep access. Self-hosted installs have no ceiling unless the operator sets one.
- People only. Every portal route needs a personal token (or a person's OAuth connection) of someone in the workspace who isn't a Guest. An app token gets
403, and apps can't be added to a portal's channels. - Scopes.
| 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 |
- What a token reaches is what its owner reaches in the app. You see the portals you're on the staff of; Owners, Admins and people with Manage client portals set them up. A portal you can't open answers
404. - Never an email address. Contacts and invitations come with names and dates only.
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.
- Who it's from. We take mail only from your own account address when it passes DMARC, or from your own Gmail or Outlook forwarding rule (a trusted ARC seal from Google or Microsoft naming you). Anything else is refused, so a stranger can't write into a client's file.
- Which client. An email is filed on every client whose contacts' verified addresses, or the extra addresses you've added for that client, appear on it. One that matches no client waits in your Unfiled tray for 14 days: file it to a client (and remember the address), or drop it.
- Each client's own address. A client's Email view shows its own logging address, for mail from an address we don't know yet. Only that client's team can send to it.
- Setting up a rule. Gmail sends a confirmation code to your logging address when you add it as a forwarding address. The code appears on the Settings card; we never open Gmail's link for you. If your Microsoft 365 workspace blocks forwarding outside the company, the card says so (5.7.520).
- Hide and delete. The person who logged an email, or an Owner or Admin, can hide it from the rest of the team; the person who logged it can delete it.
- Kept. Logged email stays until the client is deleted (it's in both exports); the raw copy is kept 30 days, Unfiled email 14 days.
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.
- From your own address. In Settings → Calendar & connections → Client email logging, Send as your own address asks for your work address and emails it a six-digit code. The address must be on a domain your workspace verified for sending (a ticket queue's Your own address, on the Tickets add-on). Once confirmed, email to clients comes from you, and we check the domain again every time one goes.
- Otherwise "via Ramphearth". Without a confirmed address (or if the domain stops being verified) it goes as "You at Your firm via Ramphearth" from the hosted service's client-mail domain, with a line saying who sent it.
- Replies come back here. Every email carries a reply address on the logging domain, so the client's answer is filed on the same client and you're told in Activity. Tick Replies go to my own mailbox to have them go to you instead (they aren't filed then). Reply addresses stop working 90 days after the client is closed.
- Limits. 10 people per email, 30 emails an hour per person and the add-on's daily number per workspace. The word filter applies. An address that reports our mail as spam can't be emailed again, and the workspace's client email pauses until Ramphearth looks into it.
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.
Dialpad needs an admin's API key with call and text access (and Dialpad's message-content permission for a text's words; without it a text is logged with no words). Transcripts come from Dialpad AI when your plan has it.
Aircall needs an API ID and token made by an Admin. Aircall doesn't sign its deliveries, so the webhook address Ramphearth makes carries a secret part as well as Aircall's token. Aircall keeps six months of call history, which is as far back as a first read can go.
Neither Dialpad nor Aircall lets an app read a text back later, so texts arrive only through the webhook: a text sent while the connection was paused or broken isn't logged.
Which client. Add a client's numbers on their Timeline → Calls & texts (a contact's mobile, an office line). A call or text with one of them is logged on that client. A number on two clients goes to the staff member's Unfiled tray. A number on no client is never stored: the connection only counts it ("3 with numbers that match no client, not kept").
What's kept. Call details (who, when, how long, answered or missed) and texts are on. Voicemail transcripts are your choice. Call transcripts, summaries and recording links stay off until an Owner confirms: "Some states require everyone on a call to agree to recording. Turn this on only if your phone system announces that calls may be recorded." Pictures in a text are counted, not copied. A recording is a link fetched when someone opens it, and it plays on your phone system's site.
Who took the call. Match each person on your phone system to a member, and calls show who answered.
Log a call by hand covers a call made on any other phone: the number, who called, how long and a note.
Who sees them. Only the client's licensed staff, like logged email. Clients, other members, apps, tokens and
/v1never do. Hide and Delete work as they do for email.When the key stops working, the connection shows Needs a new key and nothing is read until you replace it. Disconnecting removes the webhook; what was logged stays on your clients.
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.
- Allowed websites. Owners and Admins keep the list in Org Settings → Client portals → Websites portals may show. Only
httpswebsites; Ramphearth's own addresses and the YouTube, Spotify and SoundCloud players can't be added. Taking a website off the list stops its tools loading at once. - Adding a tool. Portal staff (with a portal licence) open the portal → Tools and paste the address of a page on an allowed website. It starts as a draft only staff see; Show to clients publishes it, Preview loads it for staff.
- Click to load. A client sees a card naming the website and saying it's another company's site. Their browser contacts that website only when they press Load (or ticked Always load … on this device, kept in their browser for that website).
- A locked-down frame. The page loads inside a frame served from a separate address,
PORTAL_EMBED_URL(embed.ramphearth.comon our hosted service), whose security policy allows framing only that one page, through a link that lasts five minutes. The frame is sandboxed (scripts, forms and the tool's own sign-in only): it can't navigate the portal, open pop-ups, use the camera or microphone, or see the client's Ramphearth session. No referrer is sent. - What Ramphearth passes on: nothing. The firm connects the tool; the client's browser visits it directly, as if they'd opened it themselves. The address is stored encrypted, and the audit log records only which tool and which website.
- Self-hosting. Set
PORTAL_EMBED_URLto a second host name pointing at your server (listed in the self-hosting configuration guide); until then the Tools tab says tools can't be shown yet.
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:
- What it asks. A title, instructions and the items (uploads, questions, checkboxes and tasks; an approval or a signature names one file or envelope, so those stay one-off requests). The reminder schedule is the portal's unless you choose one.
- How often. Every month, every 3 months (quarterly), every year, every so many months (up to 24) or every so many weeks (up to 52), starting from the day the first period begins.
- When it's due and sent. Due a number of days after each period starts (0–365), and sent a number of days before it's due (0–90, and never more than one period ahead). "Monthly, due on the 10th, sent a week before" is a period starting on the 1st, due 9 days in, sent 7 days before.
- What the client sees. Each period's request arrives like any other, titled with its period ("Bank statements — October 2026"), with the usual email, Activity notice and reminders. The client never sees the recurring request itself.
- The cadence decides, not the client. Finishing one early doesn't bring the next one forward. Each period is made once: the server records which period each request is for, so a restart never sends two.
- Pause, close, reopen. Pausing a recurring request, or closing the portal, stops it. Resuming or reopening never sends the periods that were missed — only the next one that can still be on time. A draft portal starts sending when it goes live.
- Who sends it. Each request is sent as the person who set up the recurring request, while they're still on the portal's staff with a licence; otherwise as the portal's lead. If neither can, the recurring request shows why and tries again later.
- Changing or deleting. A change applies from the next period. Deleting a recurring request keeps the requests it already sent.
- In templates. A portal template can carry recurring requests too: applying it (to one portal or to many) sets them up, the first period starting a number of days after the start date you pick. Applying it again keeps the ones already there. Save as template includes a portal's active recurring requests.
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.
- What ships. One generic template, Small business security baseline, with five controls (access review, backups, security awareness training, an incident contact, a device inventory), each with a recurring evidence request. Edit it, copy it or ignore it; Ramphearth ships nothing for a particular law or profession.
- Your own checklists. In Org Settings → Client portal templates, open a template and Add a compliance checklist: its name, the line of work it's for (or none, for any client), the notice shown above it, the controls, and which requests each control's evidence comes from. Knowledge pages are made as drafts in the portal's firm-only channel; a contract comes from one of your contract templates (add it in the template's JSON as
documents, naming the contract template's id) and starts as a draft for the portal. - Templates as JSON. Each template's JSON button shows it as
{ "format": "ramphearth.portal-template/v1", "name", "body" }, and Load from JSON… opens one in the editor to review before saving — the way to load a whole set of checklists you've written elsewhere. The body'scomplianceis{ framework, vertical, notice, controls: [{ id, title, description }] }; a request or recurring request names the controls it evidences incontrols(lower-case ids from the framework);knowledgeis[{ key, title, text }];documentsis[{ key, title, contractTemplateId, controls }]. Staff ids are left out, and the server checks every part (and runs it through the word filter) when you save. - Applying it to a client. A client has a line of work (on the client's details). When you add a client, templates whose checklist is for that line of work are offered ("Apply the … template"), and ones for any client after them. Applying makes the client's portal if it has none yet (a draft first if your portal defaults say so, with no contacts invited) and then applies the template there through the portal's own steps — folders, requests, recurring requests, knowledge drafts and contracts. Applying again from the client's page keeps the first start date and makes nothing twice; from the portal it's the same with the same start date.
- Coverage. The client's page shows each checklist with every control Covered (its evidence was completed for the current period — a one-off request done, a recurring request's latest period done and not yet past the next due date, a contract completed), Overdue (a request or period past its due date) or Missing (nothing yet). The words come from the requests themselves, so they change on time without anyone ticking a box.
- Who sees it. Only the portal's staff with a portal licence (an eligible member without one is asked to get one). A client never sees controls, tags or coverage — to them it's ordinary requests. The dashboard's Compliance coverage widget shows counts only: controls covered, overdue and missing across the clients you work on.
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.