Skip to Content
APIEndpointsStart a technical audit

Start a technical audit

Scan this brand’s primary domain for technical / AI-crawlability issues — the same audit the “Run audit” button triggers. Only one audit may run per brand at a time. Returns a job_id; poll List technical issues once it completes to see the results.

POST /brands/{brand_id}/technical/audits

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired on every write. See Idempotency

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body parameters

ParameterTypeRequiredDescription
include_link_analysisbooleanoptionalAlso check internal-link health. Defaults to true, matching the “Run audit” dialog.

Request

curl --request POST \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/technical/audits' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 9c2e5f1a-3b7d-4a6e-8c1f-2d5b7a9e6f30' \ --header 'Content-Type: application/json' \ --data '{}'

Response

{ "data": { "job_id": "3f8a1c2e-9b4d-4a6f-8c1e-2d5b7a9e6f30", "domain": "example.com", "total_urls": 214, "credit_cost": 20, "is_free_scan": false, "included_pages_remaining": 0 }, "request_id": "req_7c9e1f3a4b2d46f08a1c" }

Response fields

FieldTypeDescription
data.job_iduuidrequired. Pass to Get technical issue queries once the audit completes to see fresh results
data.domainstringrequired. The domain that was scanned — always the brand’s primary domain, never a choice
data.total_urlsintegerrequired. Pages found across the domain’s own sitemap(s) at the common locations (/sitemap.xml etc). 0 if none were found
data.credit_costintegerrequired. Estimated credits for the pages beyond the plan’s included pages this billing period, at 10 credits per 100 extra pages. 0 when the included pages cover the estimate
data.is_free_scanbooleanrequired. true when credit_cost is 0: the plan’s included pages cover the estimate
data.included_pages_remaininginteger | nullrequired. Included audit pages left in the current billing period before this audit. null when the plan includes unlimited pages
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestThe brand has no active domain
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
403quota_exceededInsufficient credits for this audit’s estimated cost
404not_foundThe brand does not exist, or this key is not allowed to reach it
409conflictAn audit is already running for this brand
429rate_limitedOver 300 requests per minute. See the Retry-After header

Notes

Sitemap discovery is scoped to the brand’s primary domain only. This checks the common sitemap locations (/sitemap.xml, /sitemap_index.xml, /sitemap1.xml, /sitemap-index.xml) against the domain on file — not robots.txt-referenced sitemaps, a custom sitemap URL, or the www/apex alternate host. If your sitemap lives somewhere else, this will undercount total_urls and the audit will still run, just against whatever it discovers plus link-following during the crawl itself.

total_urls is a discovery estimate, not the final page count. The real page count — and the real charge — is based on how many pages the crawl actually visits, which can differ from what the sitemap claimed.

There is no page-count or crawl-speed override. Every audit through this endpoint uses the platform’s own cap and normal crawl speed, the same defaults the “Run audit” dialog ships with — there is no equivalent of result_count here.

Every plan includes a number of audit pages per billing period, shared across the workspace’s brands. Pages inside the allowance cost nothing; pages beyond it cost 10 credits per 100, billed per started 10 pages (1 credit per 10), charged on completion for the pages actually scanned. This matches the “Run audit” dialog exactly.

Last updated on