Skip to main content

Scheduled audit API

Schedule an audit to be generated in the future, optionally on a recurring basis

Written by Andrew Waite

This page explains how to use our API to schedule website audits in Insites.


Schedule a business audit

Method: POST

The request body must be JSON encoded. The fields run_date, repeat_runs, frequency and frequency_unit are required; the other fields listed below are optional.

Property

Definition

Example

run_date

String – The UTC formatted date on which the audit should run

2019-11-30T13:30:00

repeat_runs

Boolean – Determines whether the audits should be repeated at certain intervals

true

frequency

Integer – Determines how often audits should be repeated. Always required, including when repeat_runs is false, although it only controls scheduling when repeat_runs is true.

2

frequency_unit

String – The unit used for frequency: days, weeks or months. Always required and must contain one of these values, including when repeat_runs is false.

days

stop_automatically

Boolean – Determines if the audits should stop after a certain number of repeats

true

repeats_remaining

Integer – Determines how many repeats should be executed. Required if stop_automatically is true

3

notify_contacts

Boolean – Determines if a notification email should be sent when a scheduled audit completes

true

notification_emails

JSON encoded string – Specifies the email addresses which will be notified if notify_contacts is true

[{text:”name@email.com”}]

notification_medium

String – Determines whether the audit should be shared as a pdf or a link

pdf

Expected response

If successful, you would expect a 200 response.


Retrieve a business audit schedule

Method: GET

Expected response

If successful, you would expect a 200 response, with a body like this:

{
"status": "success",
"schedule": [SCHEDULE DATA]
}
Did this answer your question?