All pages

Start a domain audit

Starts the same whole-domain audit the dashboard runs. No body: the audit is of the domain in the path, at the web address saved against it.

POST/v1/editions/{slug}/audit

Parameters

ParamInNotes
slugpathThe domain UUID. It needs a web address saved against it and must be one you have verified; an unverified domain is refused.

Request

curl -X POST https://api.mastheads.app/v1/editions/3f9c1e84-2b7a-4d6e-9c15-8a0d7e6b4f21/audit \
  -H "Authorization: Bearer mh_live_your_key_here"

Response

202 Accepted
{
  "id": "2ea60d18-7f43-4c95-b1a8-40d9e7c36b52",
  "status": "crawling"
}

Like a report, an audit is not an article job. Poll GET /v1/editions/{slug}/audit/{crawl_id}, the same poll the dashboard drives, which is also what advances a finished crawl into its results. Once it is done that path carries the page count, the finish time and the audit's six views - add ?view= to pick one of overview, issues, filters, structure, ngrams or graph. Any key of yours can read it; it spends nothing.

Errors

StatusCodeWhen
401invalid_keyMissing, invalid, or revoked API key.
401account_closedThe account this key belongs to has been closed.
402plan_requiredThe account's current plan does not include the content API. This is checked on the request, not only when the key was made.
503unavailableThe plan or the data store could not be read. It refuses rather than guessing.
402payment_requiredA guard behind the door refused on plan or billing grounds. The message says which.
403key_read_onlyThe key was created as Read only. A key's permission is fixed when it is made, so create a new key with Full access.
403wrong_newsroomA full-access key spends only in the newsroom its owner was in when it was created. If that person now acts in a different newsroom, create a new key there. A read-only key is not gated this way.
403forbiddenA guard behind the door refused. The message says which.
404not_foundNo such domain on your account, or the path segment is not a UUID. Another tenant's domain is a 404, never a 403.
422invalid_paramsThe body did not validate: a missing or over-long input, an id that is not a UUID, more than 100 rows, or two rows sharing an id.
429rate_limitedOver this key's 20 paid actions an hour, or over its 120 requests/minute. Retry-After: 60, and nothing was started.

Every request needs a key - Authentication. The error shape and the full status table are on Rate limits & errors.