API
Everything the dashboard does with sites, scans and issues, over HTTPS with an API key.
Make a key in Org settingsthenAPI keys. Choose what it may do and, if you like, the one site it is limited to. The API is part of the Pro plan and up.
A key is shown once
Copy it when you make it and keep it in a secret store. Ranky can't show it again.
How the API works
Every address starts withhttps://ranky.dev/api/v1OpenAPI 3.1 document
- Every answer is JSON:
{ "data": … }, lists withnextCursor, errors as{ "error": { code, message, fields? } }. - Send an API key as
Authorization: Bearer rk_…. A key holds scopes and acts with the role of the person who made it, so it never does more than they can. A key limited to one site sees that site only. - Each key may make 120 calls a minute; past that the answer is 429 with Retry-After.
- Lists are paged with
cursor(thenextCursorof the page before), never by offset. - Objects may carry fields not listed here; new fields can appear at any time.
Projects
List sites
GET /projectsEvery site of the org (a key limited to one site sees that one).
An API key with the read scope, or a signed-in person.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- data.id
string (uuid)- data.slug
string- data.name
string- data.rootUrl
string (uri)- data.hostname
string- data.ownership
one of unverified, verified, lost- data.schedule
string, or null- data.maxPages
integer- data.createdAt
string (date-time)- data.lastScan
object, or null- data.health
number, or null- data.openIssues
objectCounts by severity.
Add a site
POST /projectsAn API key with the projects:write scope, or a signed-in person.
- url
stringThe site's address.- nameoptional
string
- data.id
string (uuid)- data.slug
string- data.name
string- data.rootUrl
string (uri)- data.hostname
string- data.ownership
one of unverified, verified, lost- data.schedule
string, or null- data.maxPages
integer- data.createdAt
string (date-time)- data.lastScan
object, or null- data.health
number, or null- data.openIssues
objectCounts by severity.- data.verification
object
Get a site
GET /projects/{id}An API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string (uuid)- data.slug
string- data.name
string- data.rootUrl
string (uri)- data.hostname
string- data.ownership
one of unverified, verified, lost- data.schedule
string, or null- data.maxPages
integer- data.createdAt
string (date-time)- data.lastScan
object, or null- data.health
number, or null- data.openIssues
objectCounts by severity.- data.verification
object
Scans
List a site's scans
GET /projects/{id}/scansNewest first, each with its summary once it has one.
An API key with the read scope, or a signed-in person.
- {id}
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- data.id
string (uuid)- data.kind
one of full, deploy, scheduled, verify, preview_compare- data.status
one of queued, running, finalizing, done, partial, failed, cancelled- data.pending
integer- data.pagesCrawled
integer- data.createdAt
string (date-time)- data.startedAt
string (date-time), or null- data.finishedAt
string (date-time), or null- data.error
string, or null- data.stopReason
string, or null- data.deploymentId
string (uuid), or null- data.projectId
string (uuid)- data.summary
object, or null- data.deployment
object, or null
Start a scan
POST /projects/{id}/scansAn empty body starts a full scan.
An API key with the scans:write scope, or a signed-in person.
- {id}
string
- kindoptional
one of full, verify- urlsoptional
list of stringFor a verify scan: the addresses to check.
- waiting
boolean- data.id
string (uuid)- data.kind
one of full, deploy, scheduled, verify, preview_compare- data.status
one of queued, running, finalizing, done, partial, failed, cancelled- data.pending
integer- data.pagesCrawled
integer- data.createdAt
string (date-time)- data.startedAt
string (date-time), or null- data.finishedAt
string (date-time), or null- data.error
string, or null- data.stopReason
string, or null- data.deploymentId
string (uuid), or null- data.projectId
string (uuid)
Get a scan
GET /scans/{id}An API key with the read scope, or a signed-in person.
- {id}
string
- summary
object, or null- data.id
string (uuid)- data.kind
one of full, deploy, scheduled, verify, preview_compare- data.status
one of queued, running, finalizing, done, partial, failed, cancelled- data.pending
integer- data.pagesCrawled
integer- data.createdAt
string (date-time)- data.startedAt
string (date-time), or null- data.finishedAt
string (date-time), or null- data.error
string, or null- data.stopReason
string, or null- data.deploymentId
string (uuid), or null- data.projectId
string (uuid)
Get a scan's report
GET /scans/{id}/reportWhat the scan found new, what came back, and what it resolved. A preview scan carries preview, its comparison with production. gate is the site's quality gate held against the new issues and regressions (a preview's new issues), null until the scan has finished.
An API key with the read scope, or a signed-in person.
- {id}
string
- data.scan
object- data.summary
object, or null- data.deployment
object, or null- data.new
object- data.regressed
object- data.resolved
object- data.preview
object, or null- data.gate
object, or null
Cancel a scan
POST /scans/{id}/cancel200 for a scan that was waiting; 202 with stopping for one that is closing.
An API key with the scans:write scope, or a signed-in person.
- {id}
string
- stopping
boolean- data.id
string (uuid)- data.kind
one of full, deploy, scheduled, verify, preview_compare- data.status
one of queued, running, finalizing, done, partial, failed, cancelled- data.pending
integer- data.pagesCrawled
integer- data.createdAt
string (date-time)- data.startedAt
string (date-time), or null- data.finishedAt
string (date-time), or null- data.error
string, or null- data.stopReason
string, or null- data.deploymentId
string (uuid), or null- data.projectId
string (uuid)
Issues
List a site's issues
GET /projects/{id}/issuesOpen issues, most severe first, unless the query says otherwise. The first page also carries total and counts.
An API key with the read scope, or a signed-in person.
- {id}
string- ?statusoptional
string- ?severityoptional
string- ?categoryoptional
string- ?ruleoptional
string- ?templateoptional
string- ?assigneeoptional
string- ?sortoptional
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- totaloptional
integer- countsoptional
object- data.id
string (uuid)- data.ruleId
string- data.title
string- data.severity
one of critical, high, medium, low, info- data.category
one of seo, qa, a11y, perf, security, infra- data.status
one of open, resolved, ignored, accepted_risk- data.scope
one of page, template, project- data.message
string- data.url
string, or null- data.templateKey
string, or null- data.affectedCount
integer- data.regressions
integer- data.flaky
boolean- data.firstSeenAt
string (date-time)
Get an issue
GET /issues/{id}With the rule's fix guidance, the evidence and the issue's history.
An API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string (uuid)- data.ruleId
string- data.title
string- data.severity
one of critical, high, medium, low, info- data.category
one of seo, qa, a11y, perf, security, infra- data.status
one of open, resolved, ignored, accepted_risk- data.scope
one of page, template, project- data.message
string- data.url
string, or null- data.templateKey
string, or null- data.affectedCount
integer- data.regressions
integer- data.flaky
boolean- data.firstSeenAt
string (date-time)- data.projectId
string (uuid)- data.guidance
objectWhy it matters and how to fix it, from the rule.- data.evidence
object- data.history
list of object- data.changes
list of object- data.regressionHistory
list of object- data.verifiable
objectWhether Verify fix can check it: how many addresses, or why not.
Change an issue
PATCH /issues/{id}note is the reason for ignored or accepted_risk (required for the latter); assignee a member's user ID or null.
An API key with the issues:write scope, or a signed-in person.
- {id}
string
- statusoptional
one of ignored, accepted_risk, open- noteoptional
string, or null- assigneeoptional
string (uuid), or null
- data.id
string (uuid)- data.ruleId
string- data.title
string- data.severity
one of critical, high, medium, low, info- data.category
one of seo, qa, a11y, perf, security, infra- data.status
one of open, resolved, ignored, accepted_risk- data.scope
one of page, template, project- data.message
string- data.url
string, or null- data.templateKey
string, or null- data.affectedCount
integer- data.regressions
integer- data.flaky
boolean- data.firstSeenAt
string (date-time)- data.changed
boolean
Verify a fix
POST /issues/{id}/verifyA verify scan of the issue's addresses. 200 when one is already on its way.
An API key with the scans:write scope, or a signed-in person.
- {id}
string
- data.scanId
string (uuid)- data.waiting
boolean- data.already
boolean
Comment on an issue
POST /issues/{id}/commentsAn API key with the issues:write scope, or a signed-in person.
- {id}
string
- text
string
List a template issue's pages
GET /issues/{id}/pagesBy URL; the cursor is the URL the page before ended with.
An API key with the read scope, or a signed-in person.
- {id}
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- data.issueId
string (uuid)- data.url
string- data.status
one of open, resolved, ignored, accepted_risk
List saved filters
GET /projects/{id}/saved-filtersAn API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string (uuid)- data.name
string- data.search
string
Save a filter
POST /projects/{id}/saved-filtersAn API key with the issues:write scope, or a signed-in person.
- {id}
string
- name
string- queryoptional
stringThe issues list's query string.
- data.id
string (uuid)- data.name
string
Delete a saved filter
DELETE /saved-filters/{id}An API key with the issues:write scope, or a signed-in person.
- {id}
string
Changes and pages
List a site's changes
GET /projects/{id}/changesNewest first, with the deploys recorded among them. The first page also carries total and counts.
An API key with the read scope, or a signed-in person.
- {id}
string- ?fieldoptional
string- ?templateoptional
string- ?significanceoptional
one of major, minor- ?sinceoptional
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- deployments
list of object- data.id
string (uuid)- data.field
string- data.pageId
string (uuid), or null- data.url
string, or null- data.templateKey
string, or null- data.affectedCount
integer- data.before
any- data.after
any- data.significance
one of major, minor- data.at
string (date-time)
List a site's pages
GET /projects/{id}/pagesAn API key with the read scope, or a signed-in person.
- {id}
string- ?qoptional
string- ?templateoptional
string- ?statusoptional
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- totaloptional
integer- data.id
string (uuid)- data.url
string- data.templateKey
string, or null- data.lastStatus
integer, or null- data.lastCrawledAt
string (date-time), or null- data.openIssues
integer
Deploys
Report a deploy
POST /projects/{id}/deployments202 with the scan it started: a deploy scan for production, and for a preview a scan of the preview's address compared with production (its report carries preview). 200 for a deployId reported before. A preview's url must be on another host than the site.
An API key with the deployments:create scope, or a signed-in person.
- {id}
string
- url
string- environmentoptional
one of production, preview- commitShaoptional
string- branchoptional
string- deployIdoptional
string- prNumberoptional
integer- authoroptional
string
- waiting
boolean- duplicate
boolean- data.deployment
object- data.scan
object, or null
Alerts
List alert channels
GET /alert-channelsThe org's email addresses and Slack, Discord and webhook channels.
An API key with the read scope, or a signed-in person.
- data.id
string (uuid)- data.type
one of email, slack, discord, webhook- data.address
string, or null- data.verified
boolean
Add an alert channel
POST /alert-channels{ address } for email (a confirmation email goes out), or { type, url, name? } for a hook. A webhook's signing secret is shown this once.
An API key with the alerts:write scope, or a signed-in person.
Remove an alert channel
DELETE /alert-channels/{id}An API key with the alerts:write scope, or a signed-in person.
- {id}
string
Send a new confirmation link
POST /alert-channels/{id}/resendAn API key with the alerts:write scope, or a signed-in person.
- {id}
string
List a site's alert rules
GET /projects/{id}/alert-rulesAn API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string (uuid)- data.minSeverity
one of critical, high, medium, low, info- data.categories
list of string- data.ruleIds
list of string- data.cooldownMinutes
integer- data.channelIds
list of string (uuid)- data.notifyResolved
boolean
Add an alert rule
POST /projects/{id}/alert-rulesAn API key with the alerts:write scope, or a signed-in person.
- {id}
string
- minSeverity
one of critical, high, medium, low, info- categoriesoptional
list of string- ruleIdsoptional
list of string- minAffectedPercentoptional
number or string, or null- cooldownMinutesoptional
integer- channelIds
list of string (uuid)- notifyResolvedoptional
boolean
- data.id
string (uuid)
Get an alert rule
GET /alert-rules/{id}An API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string (uuid)- data.minSeverity
one of critical, high, medium, low, info- data.categories
list of string- data.ruleIds
list of string- data.cooldownMinutes
integer- data.channelIds
list of string (uuid)- data.notifyResolved
boolean- data.projectId
string (uuid)
Replace an alert rule
PATCH /alert-rules/{id}Send the whole rule, as for adding one.
An API key with the alerts:write scope, or a signed-in person.
- {id}
string
- minSeverity
one of critical, high, medium, low, info- channelIds
list of string (uuid)
- data.id
string (uuid)
Delete an alert rule
DELETE /alert-rules/{id}An API key with the alerts:write scope, or a signed-in person.
- {id}
string
Send a test alert
POST /alert-rules/{id}/testAn API key with the alerts:write scope, or a signed-in person.
- {id}
string
- data.sent
integer
List a site's alert history
GET /projects/{id}/alertsAn API key with the read scope, or a signed-in person.
- {id}
string- ?cursoroptional
stringWhere the page before ended (its nextCursor).- ?limitoptional
integerHow many, 1 to 100.
- nextCursor
string, or nullPass it as ?cursor= for the next page; null on the last.- data.id
string (uuid)- data.kind
one of new_issues, regressions, resolved, digest, test, ownership, report- data.status
one of pending, sent, failed, suppressed- data.createdAt
string (date-time)- data.sentAt
string (date-time), or null
Infrastructure
List maintenance windows
GET /projects/{id}/maintenance-windowsThe site's windows, and the one in force now (alerts wait until it ends).
An API key with the read scope, or a signed-in person.
- {id}
string
- active
object, or null- data.id
string- data.kind
one of once, weekly- data.when
string- data.note
string, or null- data.state
one of active, upcoming, ended, weekly- data.nextStartsAt
string (date-time), or null
List outages
GET /projects/{id}/incidentsThe site's outages of the last 90 days, newest first.
An API key with the read scope, or a signed-in person.
- {id}
string
- data.id
string- data.startedAt
string (date-time)- data.endedAt
string (date-time), or null- data.durationMs
integer- data.reason
string- data.inMaintenance
boolean
Get an outage
GET /projects/{id}/incidents/{incidentId}With its timeline. latest names the newest.
An API key with the read scope, or a signed-in person.
- {id}
string- {incidentId}
string
- data.incident
object- data.timeline
list of object
API keys
List API keys
GET /api-keysEvery key of the org, also the deploy keys of each site. Never the key itself.
A signed-in person. API keys are refused.
- data.id
string (uuid)- data.name
string- data.prefix
string- data.scopes
list of one of read, projects:write, scans:write, issues:write, alerts:write, deployments:create- data.project
object, or null- data.state
one of active, ending, revoked, expired- data.createdAt
string (date-time)- data.lastUsedAt
string (date-time), or null- data.expiresAt
string (date-time), or null- data.revokedAt
string (date-time), or null
Make an API key
POST /api-keysThe key is in secret, shown this once.
A signed-in person. API keys are refused.
- name
string- scopes
list of one of read, projects:write, scans:write, issues:write, alerts:write, deployments:create- projectIdoptional
string (uuid), or nullLimit the key to one site.
- data.id
string (uuid)- data.name
string- data.prefix
string- data.scopes
list of one of read, projects:write, scans:write, issues:write, alerts:write, deployments:create- data.project
object, or null- data.state
one of active, ending, revoked, expired- data.createdAt
string (date-time)- data.lastUsedAt
string (date-time), or null- data.expiresAt
string (date-time), or null- data.revokedAt
string (date-time), or null- data.secret
string
Rotate an API key
POST /api-keys/{id}/rotateA new key with the same name, scopes and site. The old one keeps working for graceHours (default 24, 0 stops it at once).
A signed-in person. API keys are refused.
- {id}
string
- graceHoursoptional
integer
- data.id
string (uuid)- data.name
string- data.prefix
string- data.scopes
list of one of read, projects:write, scans:write, issues:write, alerts:write, deployments:create- data.project
object, or null- data.state
one of active, ending, revoked, expired- data.createdAt
string (date-time)- data.lastUsedAt
string (date-time), or null- data.expiresAt
string (date-time), or null- data.revokedAt
string (date-time), or null- data.secret
string- data.replaces
object
Revoke an API key
DELETE /api-keys/{id}Twice is not an error.
A signed-in person. API keys are refused.
- {id}
string
- data.key
object- data.changed
boolean
List a site's deploy keys
GET /projects/{id}/api-keysA signed-in person. API keys are refused.
- {id}
string
- data.id
string (uuid)- data.name
string- data.prefix
string- data.createdAt
string (date-time)
Make a deploy key
POST /projects/{id}/api-keysA key for this site that can only report deploys. secret is shown this once.
A signed-in person. API keys are refused.
- {id}
string
- name
string
- data.id
string (uuid)- data.name
string- data.prefix
string- data.createdAt
string (date-time)- data.secret
string
Revoke a deploy key
DELETE /projects/{id}/api-keys/{keyId}A signed-in person. API keys are refused.
- {id}
string- {keyId}
string
- data.key
object- data.changed
boolean
Dashboard
Search the org
GET /searchWhat the command palette finds. For people only.
A signed-in person. API keys are refused.
- ?qoptional
string- ?projectoptional
string (uuid)
- data.projects
list of object- data.pages
list of object- data.issues
list of object
This document
GET /openapi.jsonAnyone.
- openapi
string