Create a Content Audit and start its first Run
const url = 'https://api.traaker.ai/api/public/v1/brands/example/content-audits';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","urls":[{"url":"https://example.com","contentType":"auto","templateId":"example","pinned":{"type":true,"template":true}}],"defaultContentType":"auto","cadence":"once","rewrite":false,"callbackUrl":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.traaker.ai/api/public/v1/brands/example/content-audits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "urls": [ { "url": "https://example.com", "contentType": "auto", "templateId": "example", "pinned": { "type": true, "template": true } } ], "defaultContentType": "auto", "cadence": "once", "rewrite": false, "callbackUrl": "https://example.com" }'Up to 10000 URLs, each scored on its own. Costs 1 credit per URL analysed (+2 per rewrite); the full amount must be available when the Run starts or the Run is refused. Creates have their own hourly rate limit, separate from the other routes. Poll GET …/runs/{runId} (or pass callbackUrl) for the result. Send an Idempotency-Key header to make retries safe: the same key within 24 h returns the first { contentAuditId, runId } and creates nothing.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Header Parameters
Section titled “ Header Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
Defaults to the first URL’s host.
object
Http(s) on a public host. Normalised before storing: the fragment, tracking parameters (utm_*, gclid, fbclid…) and platform session parameters are removed, the other parameters are sorted; duplicates (same URL after that) are removed.
Overrides defaultContentType and the platform default for this URL. auto (or unset with no default): the platform’s type when known, else decided at analysis from the page’s structured data.
Output Template: a built-in id (GET …/content-templates/library) or one of the account’s custom templates. Default: the platform × type template, else the type’s generic one.
Which of contentType / templateId were chosen by hand. Unset: whatever is given explicitly is pinned.
object
For URLs without their own contentType. Unset or auto: the platform’s default (e.g. listing on Booking.com), else decided at analysis.
Re-run on a schedule (UTC night); once runs only now.
Also rewrite every page, section by section along its Output Template (+2 credits each).
POSTed { contentAuditId, runId, status, counts, score } when the Run ends. Signed with the account’s webhook secret when one is configured.
Responses
Section titled “ Responses ”Accepted: the Run is queued
object
object
object
Example generated
{ "data": { "contentAuditId": "example", "runId": "example" }, "meta": { "brandId": "example" }}Invalid body: unknown field, unknown contentType (UNKNOWN_CONTENT_TYPE) or templateId (UNKNOWN_TEMPLATE), a URL that is not http(s) on a public host (INVALID_URLS, with the offending indexes), or more than 10 000 URLs (TOO_MANY_URLS).
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}Missing, malformed or revoked API key.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}The subscription is not active, or the balance does not cover the Run (INSUFFICIENT_CREDITS, with needed and available). Nothing was written.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}API access is not enabled for this account.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}No such brand, Content Audit, Run or page on this account.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}Hourly rate limit exhausted.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}