Skip to Content
APIEndpointsRemove competitor domain

Remove competitor domain

Stops citations to an address counting toward this competitor. The competitor itself is untouched.

Requires the write:competitors scope, and the workspace must be enabled for API writes.

DELETE /v1/brands/{brand_id}/competitors/{competitor_id}/domains

This applies to answers already collected. Removing an address un-attributes citations that were already recorded, so the competitor’s citation rate can move the moment this returns. Nothing is deleted: those citations simply stop counting as theirs.

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
competitor_iduuidrequiredFrom List competitors

Query parameters

None.

Body

application/json

FieldTypeRequiredDescription
addressstring, up to 2048 charsrequiredThe address to stop counting, exactly as returned by Get competitor

The address travels in the body rather than the path because a section contains slashes, which would need encoding in a path segment and is easy to get wrong.

Request

curl --request DELETE \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/competitors/c4a7e1b2-38d9-4f60-b5ac-2d90e7f14b83/domains' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: <unique-per-attempt>' \ --header 'Content-Type: application/json' \ --data '{"address":"ahrefs.de"}'

Response

{ "data": { "competitor_id": "c4a7e1b2-38d9-4f60-b5ac-2d90e7f14b83", "addresses": { "main": "ahrefs.com", "apexes": ["ahrefs.fr"], "sections": ["help.ahrefs.com"] } }, "request_id": "req_1b48d0ae72c34f96e5da" }

Response fields

Identical to Add competitor domain. The full resulting set is returned, so you can confirm what the competitor now claims without a follow-up read.

Errors

StatusCodeWhen
400invalid_requestUnknown field, missing address, or an address that is not a valid web address
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry write:competitors
403plan_requiredThis workspace is not enabled for API writes
404not_foundThe brand or competitor does not exist, or this key is not allowed to reach it
429rate_limitedOver 60 requests per minute

Notes

Removing a section never removes the whole domain, and the reverse. Dropping elastic.co/observability leaves elastic.co claimed if it was claimed separately, because those are two different statements about what the competitor owns. Remove each one you mean.

You cannot remove the main address here. addresses.main comes from the competitor’s primary_url. Change it with Update competitor instead.

Removing an address that is not there is not an error. The resulting set is returned either way, so a sync that removes optimistically stays simple.

Idempotency-Key is required. See Idempotency.

Last updated on