Need some help  with accessiBe?
Find your answers  here!

Initiate an audit via API

Customers can initiate an accessFlow audit using our API. The availability of this feature depends on your accessFlow package.

When you initiate an audit via API, it resets the audit cycle schedule. The next upcoming audit gets skipped, and the cycle resumes with the audit after that.

On this page

Run an audit

Runs an audit on the specified domain. 

Contact Customer Support to get the apiToken. The apiToken must be included in the header.

Endpoint

POST /trigger-scan

Request

Headers

NameDescription
x-api-tokenThe apiToken received from Customer Support.

Body parameters

NameTypeDescription
domainstringThe domain to be audited. For example, domain.com. If page and auditId are not provided then this will trigger a full site audit. Required
pagestringIf specified, only this page will be audited. For example, /pricing
auditIdstringThe issue number at the top of the remediation panel. Specify this to trigger an audit only on the page containing the specified issue.

Request example

POST https://accessflow.accessibe.com/api/v3/trigger-scan
{
    "data": {
        "domain": "yourdomain.com"
    }
}

Response

The API returns a JSON indicating the success of the scan.

{
   "success": true,
    "context": "apiRequest",
    "message": "Scan triggered: all pages",
    "data": {}
}

Run an audit on a list of pages

Runs an audit on a list of pages in the specified domain.

Contact Customer Support to get the apiToken. The apiToken must be included in the header.

Endpoint

POST /trigger-page-scan

Request

Headers

NameDescription
x-api-tokenThe apiToken received from Customer Support.

Body parameters

NameTypeDescription
domainstringThe domain to be audited. For example, domain.com. Required
pagesstringA list of comma-delimited web page paths to audit. Required
For example, /privacy-policy
upsertbooleanIndicates whether to audit previously unaudited pages. Set to true to audit unaudited pages or set to false to skip auditing pages that haven't been audited yet. Default value is false.

Request example

POST https://accessflow.accessibe.com/api/v3/trigger-page-scan
{
    "data": {
        "domain": "yourdomain.com",
        "pages": [
          "/privacy-policy",
          "/catalog"
        ],
        "upsert": false
    }
}

Response 

The API returns a JSON with an array of webpageIds and webpageUrls that were scanned. The array is used as a query parameter in the POST /page-scan-status endpoint to get the audit status of a list of pages.

{
    "success": true,
    "context": "apiRequest",
    "message": "Page scan triggered",
    "data": {
      "webpageIds": [
        "123",
        ...
      ],
      "webpageUrls": [
        "<https://accessflow.accessibe.com/audits/123>",
        ...
      ]
    }
}

Get pages audit status

Gets the status of a list of pages, indicating whether each page is currently in the process of being audited.

Contact Customer Support to get the apiToken. The apiToken must be included in the header.

Endpoint

POST /page-scan-status

Request

Headers

NameDescription
x-api-tokenThe apiToken received from Customer Support.

Body parameters

NameTypeDescription
domainstringThe domain to be audited. For example, domain.com. Required
webpageIdsstringThe array of webpageIds and webpageUrls in the response from POST /trigger-page-scan.

Request example

POST https://accessflow.accessibe.com/api/v3/page-scan-status
{
    "data": {
        "domain": "domain.com"
        "webpageIds": [
          "123",
          "456"
        ]
    }
}

Response 

The API returns a JSON indicating the status of the audit on each page. A response of true indicates that the page is in the process of being audited.

{
   "success": true,
   "context": "apiRequest",
   "message": "Scan status",
   "data": {
     "isScanning": true,
     "issuesFound": 10
  }
}