Aller au contenu

Create a Content Audit and start its first Run

POST
/brands/{brandId}/content-audits
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.

brandId
required
string
Idempotency-Key
string
>= 1 characters <= 255 characters
Media type application/json
object
name

Defaults to the first URL’s host.

string
>= 1 characters <= 200 characters
urls
required
Array<object>
>= 1 items <= 10000 items
object
url
required

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.

string format: uri
<= 2048 characters
contentType

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.

string
Allowed values: auto product category page article listing establishment encyclopedia profile job_posting
templateId

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.

string
pinned

Which of contentType / templateId were chosen by hand. Unset: whatever is given explicitly is pinned.

object
type
boolean
template
boolean
defaultContentType

For URLs without their own contentType. Unset or auto: the platform’s default (e.g. listing on Booking.com), else decided at analysis.

string
Allowed values: auto product category page article listing establishment encyclopedia profile job_posting
cadence

Re-run on a schedule (UTC night); once runs only now.

string
default: once
Allowed values: once daily weekly monthly
rewrite

Also rewrite every page, section by section along its Output Template (+2 credits each).

boolean
callbackUrl

POSTed { contentAuditId, runId, status, counts, score } when the Run ends. Signed with the account’s webhook secret when one is configured.

string format: uri

Accepted: the Run is queued

Media type application/json
object
data
required
object
contentAuditId
required
string
runId
required
string
meta
required
object
brandId
string

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).

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

Example generated

{
"statusCode": 1,
"message": "example",
"code": "example",
"retryAfterMs": 1
}

Missing, malformed or revoked API key.

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

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.

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

Example generated

{
"statusCode": 1,
"message": "example",
"code": "example",
"retryAfterMs": 1
}

API access is not enabled for this account.

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

Example generated

{
"statusCode": 1,
"message": "example",
"code": "example",
"retryAfterMs": 1
}

No such brand, Content Audit, Run or page on this account.

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

Example generated

{
"statusCode": 1,
"message": "example",
"code": "example",
"retryAfterMs": 1
}

Hourly rate limit exhausted.

Media type application/json
object
statusCode
required
integer
message
required
string
code

Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).

string
retryAfterMs

On 429 only, how long to wait before retrying, in milliseconds.

integer

Example generated

{
"statusCode": 1,
"message": "example",
"code": "example",
"retryAfterMs": 1
}