JustPin

Docs / API

REST API

Read the feedback on your sites, reply to it and change its status from your own scripts and tools. Every request acts as you, on the sites of your teams.

Introduction

Every piece of feedback in JustPin is a pin: a comment a reviewer placed on an element of a site, with a screenshot and the technical details needed to find the element in your code. The API gives you the same pins you see in the dashboard, so you can pull them into a task tracker, a script or your own tooling.

All endpoints live under one base URL:

https://app.justpin.it/api/v1

The API is included in the Solo, Studio and Agency plans. Sites of a team on the Free plan are left out of the list of sites, and requests for them return 403.

Working with an AI coding agent? Agents like Claude Code are easier to connect through the JustPin MCP server: one command, then approve the connection in your browser. No token to copy. See AI agents.

Authentication

The API uses personal API tokens. To create one:

  1. Sign in at app.justpin.it and open your Profile.
  2. Under API tokens, give the token a name that says where you use it, like "GitHub Actions" or "Deploy script", and click Create token.
  3. Copy the token right away. JustPin shows it only once.

Send the token as a bearer token in the Authorization header of every request:

curl https://app.justpin.it/api/v1/user \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

A token acts as you: it reaches the sites of every team you belong to, and anything it does is done in your name. Keep it secret, like a password, and store it in an environment variable or a secrets manager, never in your code.

  • Tokens are valid for one year. Your profile shows when each token expires.
  • Revoke a token in your profile when you no longer need it, or when it may have leaked. It stops working immediately.
  • Your team sees an AI label with the token's name on the replies and status changes it makes, like "Done by AI" with "Via Deploy script", so they can check them. Your clients never see this label: to them, it comes from you.
  • The OAuth connections of AI agents on the MCP server cannot be used for the API, and API tokens are not shown among your connected agents.

Requests and responses

  • Send Accept: application/json with every request, and Content-Type: application/json with a request body.
  • Responses are JSON. A single object or list is wrapped in a data key.
  • Dates are ISO 8601 strings in UTC, like 2026-10-12T09:41:00+00:00.
  • A site is identified by its id, a string of digits you get from List sites. It is the same number you see in the site's dashboard URL.
  • A pin is identified by its number on its site, the same #12 you see in the dashboard and in emails.

Screenshot and file URLs

Screenshots and attached files are never public. Their URLs in API responses are signed and expire after 60 minutes. Download what you need right away, or request the pin again for fresh URLs.

Errors

JustPin uses standard HTTP status codes. Error responses have a message that explains what went wrong.

StatusMeaning
401The token is missing, expired or revoked.
403The token cannot do this: it is not an API token, your email address is not confirmed, or the site's team is on a plan without the API.
404The site or pin does not exist, or it belongs to a team you are not a member of.
422The request is not valid. errors lists the problems per field.
429Too many requests. Wait the number of seconds in the Retry-After header.

A validation error looks like this:

{
  "message": "A pin marked won't do needs a message that tells the reviewer why.",
  "errors": {
    "message": [
      "A pin marked won't do needs a message that tells the reviewer why."
    ]
  }
}

Rate limits

You can send 120 requests per minute, counted across all your API tokens together. Every response includes the X-RateLimit-Limit and X-RateLimit-Remaining headers. Above the limit, requests return 429 with a Retry-After header.

Pagination

List pins returns its results in pages of 25 pins. Ask for up to 100 per page with per_page, and for another page with page. The easiest way through all pages is the links.next URL in the response, which keeps your filters:

{
  "data": [ ... ],
  "links": {
    "first": "https://app.justpin.it/api/v1/sites/1248213/pins?page=1",
    "last": "https://app.justpin.it/api/v1/sites/1248213/pins?page=3",
    "prev": null,
    "next": "https://app.justpin.it/api/v1/sites/1248213/pins?page=2"
  },
  "meta": {
    "current_page": 1,
    "last_page": 3,
    "per_page": 25,
    "total": 61
  }
}

Follow links.next until it is null to get every pin.

Get the current user

Returns the team member the token belongs to, with their teams. Use it to check that a token works, and which of your teams have API access.

GET/user
{
  "data": {
    "first_name": "Arne",
    "last_name": "Peeters",
    "name": "Arne Peeters",
    "email": "[email protected]",
    "teams": [
      {
        "id": "k3v9x2m7qa4t",
        "name": "Turpoint",
        "role": "admin",
        "plan": "studio",
        "api_access": true
      }
    ]
  }
}

List sites

Returns the sites of all your teams whose plan includes the API, sorted by name.

GET/sites
{
  "data": [
    {
      "id": "1248213",
      "name": "Bakery Janssens",
      "url": "https://bakery.be/",
      "allowed_domains": ["bakery.be", "www.bakery.be"],
      "team": { "id": "k3v9x2m7qa4t", "name": "Turpoint" },
      "accepts_comments": true,
      "comments_close_at": null,
      "unresolved_pins": 4,
      "dashboard_url": "https://app.justpin.it/projects/1248213",
      "created_at": "2026-10-01T08:12:44+00:00"
    }
  ]
}
FieldDescription
idThe site's id, used in the URLs of the other endpoints.
allowed_domainsThe domains the JustPin script runs on for this site. Handy to match a site to the project you work on.
accepts_commentsWhether the site is open for comments. On a closed site you cannot reply.
comments_close_atWhen the site closes, or closed, for comments. null when it stays open.
unresolved_pinsThe number of pins that still need work: open, in progress or reopened.

Get a site

Returns one site, with the same fields as in List sites.

GET/sites/{site}

List pins

Returns the pins of a site by number, oldest first. By default, only the pins that still need work. Each pin includes its first comment, the element's details and the screenshot URLs, but not its replies or history: get the pin for those.

GET/sites/{site}/pins
Query parameterDescription
statusunresolved (default: open, in progress and reopened), all, or one status, like done.
page_urlOnly pins on this page of the site: a path like /about, or a full URL. A path without a query string also matches the page with any query string, so /shop matches /shop?sort=price.
per_pagePins per page, from 1 to 100. Defaults to 25.
pageThe page of results to return. See Pagination.
curl "https://app.justpin.it/api/v1/sites/1248213/pins?status=unresolved&page_url=/about" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Each item is a pin object without comments and activities.

Get a pin

Returns one pin with everything needed to act on it: the whole thread of comments and replies with their attached files, the screenshots and the status history.

GET/sites/{site}/pins/{number}

The response is a pin object, including comments and activities.

Change a pin's status

Moves a pin to another status, for example to done once you made the change. Add a message to post it as a reply in the same step.

PATCH/sites/{site}/pins/{number}
Body parameterDescription
statusRequired. The new status.
messageA reply the reviewer sees, up to 5,000 characters. Required for wont_do, to tell the reviewer why. Not possible on a site that is closed for comments.
curl -X PATCH https://app.justpin.it/api/v1/sites/1248213/pins/12 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"status": "done", "message": "The header is darker now."}'

Returns the updated pin, like Get a pin. Setting the status a pin already has changes nothing, so you can safely retry a request. The change is added to the pin's history, and the people in the pin's thread get an email about pins marked done or won't do, bundled with the site's other updates.

Reply to a pin

Posts a reply on a pin, for example to ask the reviewer a question. The reviewer sees it on the review page and gets it by email. Post an internal note instead to write something only your team sees.

POST/sites/{site}/pins/{number}/comments
Body parameterDescription
bodyRequired. The reply in plain text, up to 5,000 characters.
internaltrue for a note only your team sees. Defaults to false. Replies on internal pins are always internal.
curl -X POST https://app.justpin.it/api/v1/sites/1248213/pins/12/comments \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"body": "Do you mean the header on every page, or only on the homepage?"}'

Returns the new comment with status 201:

{
  "data": {
    "id": 5821,
    "body": "Do you mean the header on every page, or only on the homepage?",
    "internal": false,
    "author": { "type": "team_member", "name": "Arne Peeters" },
    "agent": "Deploy script",
    "attachments": [],
    "created_at": "2026-10-12T09:41:00+00:00",
    "edited_at": null
  }
}

A site that is closed for comments returns 422. Replying does not change the pin's status.

Pin statuses

StatusMeaning
openNew feedback that nobody picked up yet.
in_progressA team member is working on it.
doneFixed. There is no approval step: done means done.
reopenedThe reviewer replied on a done pin, or someone reopened it.
wont_doClosed without a change, with a reason the reviewer sees.

open, in_progress and reopened together are the unresolved pins.

The pin object

{
  "data": {
    "number": 12,
    "status": "open",
    "internal": false,
    "page_url": "https://bakery.be/about",
    "page_path": "/about",
    "comment": "Make the header darker",
    "author": { "type": "reviewer", "name": "Jan Janssens" },
    "replies_count": 1,
    "element": {
      "selector": "body > header.site-header",
      "xpath": "/html/body/header",
      "text": "Bakery Janssens",
      "source_hint": "resources/views/partials/header.blade.php:4",
      "computed_styles": {
        "background-color": "rgb(214, 196, 170)",
        "color": "rgb(38, 33, 32)"
      }
    },
    "environment": {
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...",
      "platform": "macOS",
      "language": "nl-BE",
      "viewport_width": 1440,
      "viewport_height": 900,
      "device_pixel_ratio": 2,
      "scroll_x": 0,
      "scroll_y": 0
    },
    "click_offset": { "x": 0.42, "y": 0.5 },
    "snapshots": [
      {
        "kind": "before",
        "captured_by": "client",
        "width": 1440,
        "height": 900,
        "url": "https://…/viewport.png?token=…&expires=…",
        "created_at": "2026-10-11T14:02:10+00:00"
      }
    ],
    "comments": [
      {
        "id": 5810,
        "body": "Make the header darker",
        "internal": false,
        "author": { "type": "reviewer", "name": "Jan Janssens" },
        "agent": null,
        "attachments": [],
        "created_at": "2026-10-11T14:02:09+00:00",
        "edited_at": null
      },
      {
        "id": 5815,
        "body": "Looking into it today.",
        "internal": false,
        "author": { "type": "team_member", "name": "Arne Peeters" },
        "agent": null,
        "attachments": [],
        "created_at": "2026-10-11T15:30:00+00:00",
        "edited_at": null
      }
    ],
    "activities": [
      {
        "action": "status_changed",
        "from_status": "open",
        "to_status": "in_progress",
        "actor": { "type": "team_member", "name": "Arne Peeters" },
        "agent": null,
        "created_at": "2026-10-11T15:30:02+00:00"
      }
    ],
    "dashboard_url": "https://app.justpin.it/projects/1248213/pins/12",
    "created_at": "2026-10-11T14:02:09+00:00",
    "updated_at": "2026-10-11T15:30:02+00:00"
  }
}
FieldDescription
numberThe pin's number on its site, shown as #12.
internalWhether only your team sees the pin.
page_url, page_pathThe page the pin was placed on, as a full URL and as a path with its query string.
comment, authorThe feedback the pin was placed with, and who wrote it. author.type is reviewer (usually your client) or team_member.
replies_countThe number of replies after the first comment.
elementHow to find the element: its CSS selector, xpath, visible text, an optional source_hint pointing to the template that renders it, and its computed_styles when the pin was placed.
environmentThe reviewer's browser, platform, language, viewport size, pixel ratio and scroll position.
click_offsetWhere in the element the reviewer clicked, from 0 to 1 across its width (x) and height (y).
snapshotsScreenshots of the page with the element outlined. kind is before for the screenshot taken when the pin was placed, or after for one taken when it was marked done. captured_by is client (the reviewer's browser) or server. The url expires after 60 minutes.
commentsThe whole thread, oldest first, including internal notes (internal: true). agent names the AI agent or API token that wrote a comment for its author. Attached files have a name, mime type, size in bytes, and an expiring url. Only in Get a pin.
activitiesThe status history, oldest first. Only in Get a pin.
dashboard_urlOpens the pin on the review page, for team members who are signed in.

Example: fix open feedback

This script lists the unresolved pins on a site, so you can work through them, and marks one done with a short reply for the client. It uses Node.js 18 or later, without dependencies.

const API = 'https://app.justpin.it/api/v1';
const headers = {
  Authorization: `Bearer ${process.env.JUSTPIN_TOKEN}`,
  Accept: 'application/json',
  'Content-Type': 'application/json',
};

async function justpin(path, options = {}) {
  const response = await fetch(API + path, { headers, ...options });

  if (!response.ok) {
    throw new Error(`${response.status}: ${(await response.json()).message}`);
  }

  return response.json();
}

// Find the site by its domain.
const { data: sites } = await justpin('/sites');
const site = sites.find((site) => site.allowed_domains.includes('bakery.be'));

// List every unresolved pin, page by page.
let url = `/sites/${site.id}/pins?per_page=100`;

while (url) {
  const page = await justpin(url);

  for (const pin of page.data) {
    console.log(`#${pin.number} ${pin.page_path}: ${pin.comment}`);
    console.log(`  ${pin.element.source_hint ?? pin.element.selector}`);
  }

  url = page.links.next?.replace(API, '');
}

// Mark #12 done, with a reply the client sees.
await justpin(`/sites/${site.id}/pins/12`, {
  method: 'PATCH',
  body: JSON.stringify({ status: 'done', message: 'The header is darker now.' }),
});

Questions about the API, or missing something? Mail us at [email protected].