Skip to content
Appearance

Build on VisualBug.

Control the widget from your own code, read and create feedback with the REST API, and react to changes with signed webhooks.

The widget

Add the script with your project key. Optional: data-position with bottom-right, bottom-left, top-right or top-left.

Open the widget from your own button, for example a "Report a problem" link in your footer:

  • VisualBug.open() opens the feedback form
  • VisualBug.inspect() starts element selection
  • VisualBug.destroy() removes the widget
  • VisualBug.init({...}) starts it manually

Hide anything from session replays with data-vb-mask or the class vb-mask.

After a report is sent, the page receives a visualbug:submitted event with the reference, the task number and what was sent.

<script async
  src="https://visualbug.healthsdriven.com/sdk/visualbug.js"
  data-project-key="YOUR_PROJECT_KEY"
  data-position="bottom-left"></script>
<a href="#" onclick="VisualBug.open(); return false">
  Report a problem
</a>

<script>
window.addEventListener('visualbug:submitted', (e) => {
  console.log('Thanks! Reference', e.detail.reference);
});
</script>

REST API

Create a key under API & Developers in your workspace and choose its scopes. Send it as a Bearer token. Answers are JSON; lists are paged.

Scopes: projects:read, feedback:read, feedback:write, tasks:read, tasks:write, comments:write, members:read.

curl https://visualbug.healthsdriven.com/api/v1/tasks?status=open \
  -H "Authorization: Bearer vb_YOUR_KEY"
MethodPathWhat it doesScope
GET /api/v1/me The key and workspace you are using -
GET /api/v1/projects List projects (websites) projects:read
GET /api/v1/projects/{id} One project projects:read
GET /api/v1/feedback List feedback, with filters feedback:read
GET /api/v1/feedback/{reference} One report with its details feedback:read
GET /api/v1/feedback/{reference}/screenshot The screenshot image feedback:read
POST /api/v1/projects/{id}/feedback Create feedback (for example from your own form) feedback:write
PATCH /api/v1/feedback/{reference} Change the status feedback:write
GET /api/v1/tasks List tasks tasks:read
GET /api/v1/tasks/{number} One task tasks:read
PATCH /api/v1/tasks/{number} Change title, status, priority, assignee or due date tasks:write
GET /api/v1/tasks/{number}/comments Comments on a task tasks:read
POST /api/v1/tasks/{number}/comments Add a comment comments:write
GET /api/v1/members People who can be assigned members:read

Webhooks

Add an endpoint under Webhooks and pick the events: task.created, task.assigned, task.status_changed, comment.created, or all.

Each request is a JSON POST with the header X-VisualBug-Signature: t=TIMESTAMP,v1=SIGNATURE. The signature is an HMAC-SHA256 of t=TIMESTAMP. followed by the raw body, made with your endpoint's secret. Reject requests whose timestamp is more than a few minutes old.

Failed deliveries are retried, and every attempt is listed with its response.

// Node.js: check a VisualBug webhook
const crypto = require('crypto');

function isFromVisualBug(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
  const expected = crypto.createHmac('sha256', secret)
    .update(`t=${parts.t}.${rawBody}`).digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && crypto.timingSafeEqual(
    Buffer.from(expected), Buffer.from(parts.v1));
}

Start building with a free workspace.

Free plan, no credit card. Installs with one line of code or the WordPress plugin.