All postsIntegrations

Getting started with the ReviewMySites REST API

From making a key to reading comments, resolving one and replying, with requests you can paste into a terminal.

ReviewMySites team · 5 min read

The REST API lets your own code read a project's comments, move them along and reply to them. Here are your first requests, from making a key to resolving a comment. The API is part of Pro.

Make a key

Go to Workspace settings and open API keys, or follow API keys from Work tools in a project's Integrations. Give it a name that says what will use it, and copy it: it is shown once. Owners and admins can make keys.

A key reaches every project in its workspace and acts as the person who made it, so its changes appear under their name. It stops working if it is revoked, if that person is no longer an owner or admin, or if the workspace leaves Pro.

Keep it on a serverA key is as powerful as its maker. Never put one in code that runs in a browser. The API sends no CORS headers, so a web page could not use it anyway.

Your first request

Send the key as a bearer token. /me tells you which workspace it reaches:

Terminalcurl https://app.reviewmysites.com/api/v1/me \
  -H "Authorization: Bearer rms_live_…"
Answer{
  "workspace": { "id": "…", "name": "Acme studio" },
  "acting_as": { "id": "…", "name": "Sam" },
  "read_only": false
}

Read projects and comments

List your projects, then look at one. A project can be named by its id or its project ID, such as acme-website:

Terminalcurl https://app.reviewmysites.com/api/v1/projects \
  -H "Authorization: Bearer rms_live_…"

curl https://app.reviewmysites.com/api/v1/projects/acme-website \
  -H "Authorization: Bearer rms_live_…"

The second answer lists what a comment can be set to: the project's statuses, its tags, and the people who can be assigned.

Comments come newest first, 50 at a time. Filter by status or by when they last changed, and follow next_cursor for the next page:

Terminalcurl "https://app.reviewmysites.com/api/v1/projects/acme-website/comments?status=open&limit=10" \
  -H "Authorization: Bearer rms_live_…"

Change a comment

Send any of status, priority, assignee_id, due_on and tag_ids. Any other field is refused. It does exactly what the board does: the history is written, people are notified, and your Slack or Teams cards follow.

Terminalcurl -X PATCH https://app.reviewmysites.com/api/v1/comments/COMMENT_ID \
  -H "Authorization: Bearer rms_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "status": "resolved" }'

Reply

Terminalcurl -X POST https://app.reviewmysites.com/api/v1/comments/COMMENT_ID/replies \
  -H "Authorization: Bearer rms_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "text": "Fixed in today’s deploy." }'

Replies are plain text, up to 5,000 characters. They are refused with a 409 on a project that keeps its conversations in a chat app.

Subscribe to events

Instead of asking for new comments again and again, subscribe a URL and receive them as webhooks. The answer holds the hook's id and its signing secret, once. It also shows in the project's settings as added through the API.

Terminalcurl -X POST https://app.reviewmysites.com/api/v1/projects/acme-website/hooks \
  -H "Authorization: Bearer rms_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/hooks/rms", "events": ["comment.created"] }'

curl -X DELETE https://app.reviewmysites.com/api/v1/hooks/HOOK_ID \
  -H "Authorization: Bearer rms_live_…"

Errors and limits

Every error has the same shape: { "error": { "code": "not_found", "message": "…" } }.

StatusMeans
401No key, a revoked key, or its maker is no longer an owner or admin
402The workspace is not on Pro
403Not allowed, or the workspace is read-only
404Not found, or not in this key’s workspace (the two look the same)
429Too many requests: 120 reads and 60 writes a minute, per key
This covers the common requests. The full reference, with every field of a comment, is in the developer docs.

Keep reading

All posts

Let your client point at it.

Free for your first project. No card, and your clients never need an account.

Start free