Update Competitor
Change a competitor of a domain. Rename it, replace its name variations, or change its active or dedicated state.
curl --request POST \
--url 'https://api.aiclicks.io/api/v1/competitors/update' \
--header 'Authorization: Bearer ak_live_xxx' \
--header 'Content-Type: application/json' \
--data '{
"competitor_id": "f6a7b8c9-3333-4eee-8fff-000000000001",
"competitor_name": "Acme Rival",
"competitor_variations": ["Acme", "AcmeRival Inc"],
"is_dedicated": true,
"active": true
}'
import httpx, os
resp = httpx.post(
"https://api.aiclicks.io/api/v1/competitors/update",
json={
"competitor_id": "f6a7b8c9-3333-4eee-8fff-000000000001",
"competitor_name": "Acme Rival",
"competitor_variations": ["Acme", "AcmeRival Inc"],
"is_dedicated": True,
"active": True,
},
headers={"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"},
)
resp.raise_for_status()
print(resp.json()["data"]["competitor"])
const resp = await fetch("https://api.aiclicks.io/api/v1/competitors/update", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AICLICKS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
competitor_id: "f6a7b8c9-3333-4eee-8fff-000000000001",
competitor_name: "Acme Rival",
competitor_variations: ["Acme", "AcmeRival Inc"],
is_dedicated: true,
active: true,
}),
});
const { data } = await resp.json();
console.log(data.competitor);
{
"data": {
"message": "Competitor updated successfully",
"competitor": {
"id": "f6a7b8c9-3333-4eee-8fff-000000000001",
"created_at": "2026-08-18T10:00:11.218Z",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"name": "Acme Rival",
"website": "acmerival.com",
"is_dedicated": true,
"active": true,
"updated_at": "2026-11-09T09:12:40.511Z",
"variations": ["Acme", "AcmeRival Inc"]
}
},
"generated_at": "2026-11-09T09:12:40.602Z"
}
{
"detail": "Maximum 10 dedicated competitors allowed per domain"
}
{
"detail": "Invalid or revoked API key"
}
{
"detail": "Access denied: User is not a member of the team that owns this domain"
}
{
"detail": "Competitor not found"
}
{
"detail": "Too many requests. Please try again later."
}
This endpoint changes one competitor row. Send the competitor_id and only the fields to change. The endpoint does not change fields that you do not send.
Get the competitor_id from GET /api/v1/competitors. The endpoint finds the domain from the competitor, so you do not send a domain_id.
A competitor is tracked when is_dedicated and active are both true. If an update makes an untracked competitor tracked, the endpoint checks the dedicated-competitor limit of the domain. If the domain is at the limit, the endpoint returns 400.
You cannot change the website of a competitor with this endpoint. To change the website, add a new competitor with POST /api/v1/competitors.
Authorizations
Your API key in the format Bearer ak_live_<your-key>. Create a key in the dashboard under Settings → Developers.
An optional UUID for log correlation. If you do not send one, the server makes one and returns it in the response.
Body parameters
The UUID of the competitor to change. Get it from GET /api/v1/competitors.
The new display name, for example "Acme Rival".
The new list of alternative names and spellings. This list replaces the old list. The server removes duplicates without regard to letter case. Send [] to remove all variations.
Set true to make the competitor a dedicated brand. Set false to make it a plain entry.
Set true to track the competitor. Set false to stop tracking it. The row and its history stay.
Send at least one field in addition to competitor_id. If you send no field to change, the endpoint returns 400.
Response
The result of the update.
The status text, "Competitor updated successfully".
The competitor row after the update. It has the same fields as the competitor object in POST /api/v1/competitors: id, created_at, domain_id, name, website, is_dedicated, active, updated_at and variations.
The ISO-8601 time when the server made this response.
Response headers
| Header | Description |
|---|---|
X-Request-Id | The request id. If you sent one, the server returns it. |
X-RateLimit-Limit | The maximum number of requests per minute for this key. |
X-RateLimit-Remaining | The number of requests that remain in this minute. |
X-RateLimit-Reset | The Unix time in seconds when the window starts again. |
Caching
This endpoint is not cached. A successful update clears the cached competitor data of the domain. The next read shows the change.
Errors
The request has no field to change. Or the update makes the competitor tracked and the domain is at its dedicated-competitor limit. If a field has the wrong type, the endpoint returns 422.
The API key is missing, malformed or revoked.
The developer_access flag of the team is off. Or the domain of the competitor is not in the scope of your key. Or your user is not a member of the team that owns the domain.
No competitor has this competitor_id.
You sent too many requests. Read the Retry-After header to know how long to wait.