API Reference
Base URL: https://api.thepixelhouse.co.uk
All endpoints require authentication via API key (Bearer token) or session cookie. Responses follow { data: T } for success and { error: { code, message } } for errors.
Authentication
Include your API key in the Authorization header as a Bearer token. API keys are created in your dashboard under Settings. Keys are hashed before storage and shown only once at creation time. Keep your key secure and never commit it to version control.
Authorization: Bearer ak_your_api_key_here
Rate limiting
API requests are rate-limited per account based on your plan. When you exceed your limit, the API returns a 429 Too Many Requests status. Rate limit information is included in every response via headers:
X-RateLimit-Limit— maximum requests per windowX-RateLimit-Remaining— requests remaining in the current windowX-RateLimit-Reset— UTC epoch time when the window resets
Pagination
List endpoints return paginated results using cursor-based pagination. Pass the cursor query parameter to fetch the next page. The default page size is 25 items, configurable up to 100 via the limit parameter.
GET /v1/screenshots?limit=25&cursor=ss_abc123
The response includes a nextCursor field. When this field is null, you have reached the end of the list.
Error codes
Error responses include a machine-readable code and a human-readable message. Common error codes:
validation_errorRequest body or query parameters failed validationunauthorizedMissing or invalid API keyforbiddenAPI key does not have access to the requested resourcenot_foundThe requested resource does not existrate_limitedToo many requests or monthly screenshot limit reachedinternal_errorAn unexpected error occurred on our sideEndpoints
All endpoints use the https://api.thepixelhouse.co.uk base URL. Timestamps are in ISO 8601 UTC format. All IDs are prefixed for type safety: ss_ (screenshot), bl_ (baseline), cmp_ (comparison), mon_ (monitor), prj_ (project).
/v1/screenshotsCapture a new screenshot/v1/screenshotsList screenshots for a project/v1/screenshots/:idGet screenshot metadata/v1/screenshots/:id/imageGet screenshot image (PNG)/v1/screenshots/:idDelete a screenshot/v1/baselinesCreate or promote a baseline/v1/baselinesList baselines for a project/v1/baselines/:idGet baseline metadata/v1/baselines/:idUpdate baseline screenshot/v1/baselines/:idDeactivate a baseline/v1/comparisonsCompare two screenshots/v1/comparisonsList comparisons for a project/v1/comparisons/:idGet comparison result/v1/comparisons/:id/diffGet diff overlay image (PNG)/v1/comparisons/:id/approveApprove changes and update baseline/v1/tests/runCapture and compare in one call/v1/tests/:idGet test result/v1/projectsCreate a project/v1/projectsList projects/v1/projects/:idGet project details/v1/projects/:idUpdate project settings/v1/projects/:idDelete a project/v1/monitorsCreate a scheduled monitor/v1/monitorsList monitors/v1/monitors/:idGet monitor details and recent runs/v1/monitors/:idUpdate monitor settings/v1/monitors/:idDelete a monitor/v1/monitors/:id/pausePause a monitor/v1/monitors/:id/resumeResume a monitor/v1/alertsCreate an alert rule/v1/alertsList alert rules/v1/alerts/:idUpdate an alert rule/v1/alerts/:idDelete an alert rule/v1/api-keysCreate an API key/v1/api-keysList API keys/v1/api-keys/:idRevoke an API key/v1/billing/checkoutCreate Stripe Checkout session/v1/billing/portalCreate Stripe Customer Portal session