Skip to content

Client portals API

Read and manage client portals, their settings, guests, members and comments, shared items, feedback threads, and the reports sent through a portal, and answer client feedback. Each route follows the same owner, admin, and member rules as the app.

A portal is a page you share with clients or the public. See Client portals for how portals work in the app. Reading needs portals:read, and listing the reports on a task also needs tasks:read. Anything that changes a portal, its feedback, or its reports needs portals:write. Portals must be turned on for the workspace. When they are off, or an admin disabled external sharing, the portal routes return 403.

Endpoints

Who can read what

A workspace API key acts as the member who created it. A personal API token acts as you. Either way the scope lets the request in, and the member's role decides what it can read.

Portals, guests, members, comments, items, events, insights
Workspace owners and admins. Other members get 403.
Feedback on a portal, the feedback inbox, and its count
Workspace owners and admins.
Portal discussion
Owners, admins, and members, the same as the app. The route returns 404 when the portal is closed, its discussion is off, or you cannot read the thread. Viewers cannot read it.
Shared docs
Workspace owners and admins.
Feedback on a post and a single feedback thread
Owners, admins, and members who can open the post. For a post a member cannot open, they get an empty list or a 404, never the feedback.
Portal reports
Owners, admins, and members with a portal publisher grant. Reports on a task are readable by anyone who can open the task.

Writing feedback

The feedback routes that write need portals:write and the same access as the app: owners, admins, and members who can open the post. Viewers get 403.

  • A reply to the guests (audience client) emails them and sends the portal.feedback_created webhook event. A reply with audience workspace is a note for your team only.
  • If a message for the guests mentions a workspace item the portal has not shared, nothing is sent. The route returns 409 with the code client_references_not_shared and a review whose issues list each item with its objectType, objectId, and whether you can share it in canShare. Share the items with the portal, then send again. Project Feed never shares them for you.
  • When review actions are on and a guest asked for changes, resolving does not close the thread. It tells the guest the fix is ready, and the thread stays open with awaitingClientVerification true until they verify it. That needs every linked task done and a newer version shared on the portal, or the route returns 409. Only the guest can reopen a thread that waits on their sign-off or one whose fix they confirmed, and only the guest can approve a change request. To close a fix the guest never checked, resolve it with noChangesNeeded true.
  • Resolve, reopen, address, and status take expectedUpdatedAt or an If-Match header with the ETag from GET /api/v1/client-feedback/:id. If the thread changed since you read it, nothing is written and the route returns 412 with the code precondition_failed. See Conditional requests.
  • Starting a thread and replying accept an idempotency key, so a retry does not send a second message. A retry after you lost access to the post returns 404. See Idempotency keys.

Managing portals

Creating, changing, and closing a portal, resetting its link, and managing its guests and shared docs are for owners and admins, and they follow the app's limits. A closed portal rejects further changes. A portal always has at least one project: creating one needs projectIds, and an update that sends projectIds replaces the whole list, so an empty list returns 400.

  • PATCH /api/v1/portals/:id and the revoke route take expectedUpdatedAt or an If-Match header with the ETag from GET /api/v1/portals/:id. A stale value returns 412.
  • Creating a portal, inviting a guest, sharing a post, and sharing a doc accept an idempotency key, so a retry does not repeat the change. A retry after you lost the access the change needed returns 404.
  • Removing a guest, taking an item off a portal, closing a closed portal, and stopping the sharing of a doc that is not shared are safe to repeat.
  • rotate-token invalidates the previous private link at once. Save the new token from the response, because no route returns it again.

Portal settings

Each settings route changes one part of a portal and returns the whole portal, with the new ETag. They are for owners and admins, need a portal that is open and not read-only, and run the app's own checks, so a plan limit or a workspace policy answers 403 and a taken address answers 409. GET /api/v1/portals/:id returns every value these routes write, so read it, change the part you need, and send that part back.

  • Every settings route takes expectedUpdatedAt or an If-Match header with the ETag from GET /api/v1/portals/:id. A stale value returns 412 and changes nothing.
  • The links, feedback, updates, and moderation routes replace their part as a whole, while the sections route changes only the sections you send. A value that does not match the shape returns 400 with the part in field.
  • Topics were removed from portals. The sections route ignores a topics value, and the portal still lists an empty topicsConfig.
  • A portal logo or banner is uploaded with the media upload flow and a portalLogo or portalBanner destination. The branding route only removes them.
  • updatesConfig.emailSignup decides who a public portal asks to sign up for update emails: signed_in by default, everyone, or off, which also stops the emails and keeps the mailing list.

Members and comment moderation

On a public portal, signed-in members can comment on shared posts. The comment lists show a comment's author as a member username or a team name, never an email address. Approving, rejecting, hiding, unhiding, and blocking are for owners and admins. A comment that is not in the state an action needs returns 409, and repeating an action that already took effect returns the comment unchanged.

  • Approve and reject take expectedEditedAt, the comment's editedAt or null if it was never edited. A comment edited after you read it returns 412, so you approve the text you saw.
  • A team comment is posted with POST /api/v1/portals/:id/items/:itemId/comments and shows at once. It accepts an idempotency key, and a retry after you lost access to the post returns 404.
  • Blocking a member stops their comments and reactions. hideAll also hides what they already posted, in the background.
  • The portal's moderationConfig says whether a member's first comments are held for approval.

Triaging reports

Turning a report into a task, linking it, dismissing it, marking it as spam, reopening it, and changing board visibility are for owners and admins. A report must be new or dismissed before you can make a task or link it, and new before you can dismiss it or mark it as spam. Reopen it first if it is in another state. Replies are also open to members with a portal publisher grant and to members who can write to the linked task. The reporter sees a reply and is emailed.

Each triage route returns the updated report, so you do not need a second read. Send expectedUpdatedAt or an If-Match header with the ETag from GET /api/v1/portal-submissions/:id to avoid overwriting a change someone else just made. Making a task from a report and replying to a report accept an idempotency key.

Sharing posts and asking for decisions

Sharing a post and asking for a decision use the same permission as the app: the post must be published, inside one of the portal's projects, and you must be allowed to share it externally. Taking an item off a portal is for owners and admins. A decision request needs review actions turned on for the portal.

Secrets and guest data

  • The portal link token is returned only by POST /api/v1/portals/:id/rotate-token, once, with Cache-Control: no-store. The portal object has no token field, and a portal's webUrl is the team's page in the app, not the guest link. Do not log that response.
  • Guest email addresses are visible only to owners and admins. They appear in email on guests and in openedBy on insights. A guest with no name or username also shows as their email address in name fields such as author.name, where members see null. A report's reporter email is never returned. Only reporter.emailStatus is.
  • Event metadata keeps IDs and status values such as feedbackId and version. It leaves out names, emails, and message text.
  • Attachment url values in reports are Project Feed media paths.

Paging, fields, and caching

Lists use cursor paging. Pass limit (up to 100, default 50) and send nextCursor back as cursor while hasMore is true. Reports allow at most 50 per page, and reports on a task at most 10. A limit outside the range returns 400 instead of being lowered. The inbox reads at most 100 open threads at a time. Feedback on a post and the list of shared docs are not paged. See Pagination.

fields selects fields on the portal, guest, item, feedback thread, and report routes, and on each result in a list. The events, insights, discussion, count, single thread, post feedback, and write routes return their full shape. See Choosing fields.

GET /api/v1/portals/:id, GET /api/v1/client-feedback/:id, and GET /api/v1/portal-submissions/:id send an ETag: the updatedAt, a dot, and a hash of the whole response body. Send it back as If-None-Match to get 304 when nothing changed. See Conditional requests.

Portal IDs and slugs

Routes that take a portal accept its ID. A public portal also answers to its slug, such as acme-updates. Invited portals have no slug. The portalId filter on reports accepts the same two forms.

Webhooks, MCP, and CLI

Portal webhook events carry IDs only. Use these reads to turn them into data. See Outbound webhooks. The hosted MCP server has a tool for each route, listed in the tool reference, and the CLI has pf portals.

Image preview
100%