Web API
Work your team's boards, projects, feedback, people and webhooks from code, with a team key.
The Web API comes with Pro and Organization. It reaches everything your team holds: boards and projects, the
feedback on them, who can open them, the team's members and its webhooks. Every address below starts with
https://pagecomment.com/api/v1, or your team's own domain once it is live.
The full reference, with every field, is an OpenAPI 3.1 document at
/api/v1/openapi.json. Load it into Postman, Insomnia or any OpenAPI client.
Keys
An admin creates a key on the team page, under Agent keys. The key is shown once. Send it on every call:
curl https://pagecomment.com/api/v1/team \
-H "Authorization: Bearer pck_…"
A key acts as an admin of its team and reaches nothing outside it. Replies and notes it posts are signed with the key's name, and the audit log records its changes under that name. Revoking it on the team page stops it at once. A key belongs to the team, so it keeps working when the person who made it leaves.
Errors
Every error answers with { "error": "…" }.
| Status | Means |
|---|---|
| 400 | The body or query is not valid. issues names the field. |
| 401 | No key, or one that was revoked. |
| 402 | The team's plan does not include this. feature names it. A team below Pro gets this on every call. |
| 404 | Not found, or not one of your team's. |
| 409 | The change would break a rule: a page captured from behind a sign-in cannot open to the link, and a team keeps at least one admin. |
Team
| Call | Does |
|---|---|
GET /team |
The team, its plan, member count, and the key in use |
PATCH /team |
Rename it: { "name": "…" } |
GET /team/members |
Members and their roles |
POST /team/invites |
Email an invitation: { "email": "…", "role": "member" } |
PATCH /team/members/{userId} |
Change a role: { "role": "admin" } |
DELETE /team/members/{userId} |
Remove someone |
GET /team/activity |
The last 50 comments across the team's boards |
GET /team/search?q= |
Find boards and comments |
Roles other than member and admin need the Organization plan.
Boards
| Call | Does |
|---|---|
GET /boards |
Every board, with its link, visibility and open request count |
POST /boards |
A new board for { "url": "https://…" }, or file an anonymous board with { "boardId": "…" } |
GET /boards/{id} |
The board and every annotation on it, with threads |
PATCH /boards/{id} |
Any of title, visibility, archived |
DELETE /boards/{id} |
Take it out of the team. Nothing is deleted; it goes back to an anonymous, link-open board |
GET /boards/{id}/captures |
Whether the page is captured, and a link that captures it again |
GET /boards/{id}/shares |
Who it is shared with |
POST /boards/{id}/shares |
Share it by email: { "email": "…" } |
DELETE /boards/{id}/shares/{email} |
Stop sharing with someone |
visibility is one of link (anyone with the link), view (anyone reads, the team writes), team (members
only) or invited (the team and the people it is shared with). New boards default to team.
curl -X PATCH https://pagecomment.com/api/v1/boards/$BOARD \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"title":"Admissions","visibility":"view"}'
A board's first capture happens in a browser. POST /boards returns a captureLink that opens it ready to
capture, in a browser with the PageComment extension or on the board itself.
Projects
| Call | Does |
|---|---|
GET /projects |
Every project |
POST /projects |
A project of one new board per address: { "urls": […], "title": "…" }, up to 50 pages |
GET /projects/{id} |
The project and its pages |
PATCH /projects/{id} |
Any of title, visibility, archived. Visibility applies to every page |
DELETE /projects/{id} |
Take it and its pages out of the team |
POST /projects/{id}/pages |
Add urls as new boards, or move in boards the team holds |
DELETE /projects/{id}/pages/{boardId} |
Take a page out. Its board and marks are kept |
GET /projects/{id}/captures |
Which pages are captured, with links for the rest |
GET, POST /projects/{id}/shares |
As for a board, covering every page |
DELETE /projects/{id}/shares/{email} |
As for a board |
Feedback
| Call | Does |
|---|---|
GET /requests |
Every open or in-progress request across the team, oldest first |
GET /events?after= |
What happened since a cursor: new comments, replies and status changes |
GET /boards/{id}/annotations?status= |
A board's annotations |
GET /boards/{id}/annotations/{annotationId} |
One annotation and its thread |
PATCH /boards/{id}/annotations/{annotationId} |
Set status to open, in_progress, resolved or dismissed, with an optional note posted as a reply |
POST /boards/{id}/annotations/{annotationId}/replies |
Reply: { "text": "…" } |
POST /boards/{id}/suggestions |
Propose a text change: { "text": "…", "suggestion": "…" } |
An annotation carries a kind (comment, area, selection or inspect) and, where the reviewer pointed at
an element, a target with its selector and markup.
curl -X PATCH https://pagecomment.com/api/v1/boards/$BOARD/annotations/$ID \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"status":"resolved","note":"Fixed in https://github.com/u/site/pull/42"}'
To follow along without a webhook, call GET /events once with no after. It returns the current cursor and
no events. Pass that cursor back as after each time; you get at most 100 events a call.
Webhooks
| Call | Does |
|---|---|
GET /team/webhooks |
The team's webhooks |
POST /team/webhooks |
Add one: { "url": "https://…" }. The secret comes back once |
DELETE /team/webhooks/{hookId} |
Remove one |
POST /team/webhooks/{hookId}/enable |
Turn one back on after 20 failures in a row |
POST /team/webhooks/{hookId}/test |
Send a sample event |
Every delivery names the board it is about and, when that board is a page of a project, the project
(id, title and link); otherwise project is null, so a receiver can send each project somewhere of its
own. Every delivery is signed. X-PageComment-Signature is sha256= followed by the HMAC-SHA256, under the
webhook's secret, of the X-PageComment-Timestamp header, a dot, and the raw body. Changes a key makes are not
sent back to the team's webhooks, so a script never hears its own replies.
MCP
An AI coding agent can work through the team's MCP server at /team/{id}/mcp with the same key. See
AI agents. The two share a key, and anything an agent cannot do over MCP, such as renaming a
board or sharing it, it can do here.