Update a competitor's name and Cibles
const url = 'https://api.traaker.ai/api/public/v1/brands/example/competitors/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","domain":"example","aliases":["example"],"domains":["example"],"subBrands":[{"name":"example","aliases":["example"],"domains":["example"]}],"pages":[{"category":"produit","url":"example","label":"example","subBrand":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.traaker.ai/api/public/v1/brands/example/competitors/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "domain": "example", "aliases": [ "example" ], "domains": [ "example" ], "subBrands": [ { "name": "example", "aliases": [ "example" ], "domains": [ "example" ] } ], "pages": [ { "category": "produit", "url": "example", "label": "example", "subBrand": "example" } ] }'Each list sent replaces the stored one; omitted ones are left as is. A competitor whose competitorId is its domain keeps that domain (remove and add again); a name-keyed one can set it with domain. Removing a sub-brand without resending pages keeps its pages, attached to the competitor itself.
Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »The competitor’s competitorId (see GET …/competitors): its main domain when it was added with one (e.g. florajet.com), else the slug of its name (e.g. ba-sh).
Request Bodyrequired
Section intitulée « Request Bodyrequired »Every list is the WHOLE list: on PATCH, a list sent replaces the stored one (empty clears it), a list omitted is left as is. Spends no credits; the competitors quota (429 QUOTA_EXCEEDED) and the brand’s Cibles signal pool apply.
object
Optional. Its main domain, e.g. florajet.com (a pasted URL is reduced to its host); without one the competitor is tracked by its name (no shared news profile, no « cité » by its own site until it has a domain). On POST a domain becomes the competitor’s competitorId; on PATCH it can only be set, changed or cleared (null) on a competitor whose competitorId is NOT its domain.
Other names the engines use for it. One per spelling; never the name itself.
Its other domains. A source on any of them counts as a citation.
Brands of this competitor recommended under their own name, each a brand like the competitor itself (its aliases, its domains); pages can be linked to one. They count as the competitor in ranks and mentions. One spelling per entry across the whole competitor; a domain the competitor or another sub-brand holds is dropped.
object
Key pages to follow.
object
Absolute http(s) URL.
Name of one of its subBrands; omitted = the competitor itself.
Responses
Section intitulée « Responses »OK
object
A tracked competitor with its Cibles (what Traaker matches for it in AI answers) and their counts. With window.measuredDays = 0 the counts are not measured yet, not zero.
object
Its main domain; null for a competitor tracked by its name only.
Its other domains, besides domain.
object
Most cited first.
object
The sub-brand it belongs to; null = the competitor itself.
object
Prompts where any of its Cibles matched, summed per day.
A day capped its counted Cibles: the counts are lower bounds.
object
Example
{ "data": { "pages": [ { "category": "produit" } ] }}Invalid or unknown query parameter or body field.
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 account’s subscription is not active.
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, competitor or target 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}An import or geocoding job is running on this brand’s Cibles; retry later.
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 Cibles store refused the row (unknown field for its category, a per-brand limit).
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, or a quota is full (code: QUOTA_EXCEEDED).
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}