SurfacedBySurfacedBy Docs
DocumentationAPIReference

Domains

List, inspect, add, and remove the domains your workspace tracks.

Ask an AI:Open in ChatGPTOpen in Claude

A tracked domain is the unit everything else in the Data API hangs off: the id returned here is the domain_id you pass to every other domain endpoint. The API sees the domains of the workspace the key belongs to, the same domains the dashboard shows for that workspace.

Professional and Agency keys can list and inspect domains. Adding and removing a domain are write operations and need an Agency key with the write scope, plus an Idempotency-Key header. A key acts with the current workspace role of the member who created it, so adding or removing a domain also needs that member to be an admin or the owner of the workspace today. Adding a domain further needs that member's access not to be limited to certain domains. Otherwise the request returns 403 workspace_access_required.

Domain object

FieldDescription
idDomain id, used as domain_id elsewhere.
domainThe domain name, lowercased.
statusactive for a tracked domain; deleted after removal. Other values, such as paused, can appear.
created_atWhen the domain was added.
last_scan_atWhen the most recent Full Check finished, or null.
next_scan_atWhen the next scheduled Full Check is due, or null.
scan_countNumber of completed Full Checks.
latest_visibility_scoreVisibility Score from the most recent Daily Check or Full Check (0 to 100), or null.
latest_brand_coverage_pctBrand Coverage from the most recent Daily Check or Full Check, as a percentage, or null.
latest_market_positionMarket Position from the most recent Full Check (1 is first), or null.

Adding and removing

Adding a domain takes a JSON body with one field, the bare domain name:

{ "domain": "yourbrand.com" }

It returns 201 with the new domain object. The Data API cannot start checks. Adding follows the same rules as the dashboard:

  • A domain that is already tracked in the workspace returns 409 domain_already_tracked.
  • A workspace at its plan's or trial's domain limit returns 402 domain_limit_reached, with limit_kind, current, and max in the body.
  • A domain that was removed from the workspace earlier comes back with its history: its past checks, and the prompts it tracked before removal.

Removing a domain works the same way as in the dashboard. Checks that are queued or running for it are cancelled, its tracked prompts are archived (which frees them from the workspace prompt limit), and it leaves the workspace's domain list. The response is {"id": "...", "deleted": true}. Adding the same domain again later restores its history.

GET
/domains
/domains

Query Parameters

cursorCursor

Opaque cursor returned by the previous page

Header Parameters

X-API-KeyX-Api-Key

curl -X GET "https://api.surfacedby.com/api/v1/ext/domains?cursor=string" \
  -H "X-API-Key: string"

Successful Response

null

POST
/domains
/domains

Request Body

application/jsonRequired

[key: string]any

Header Parameters

X-API-KeyX-Api-Key

Idempotency-KeyIdempotency-Key

curl -X POST "https://api.surfacedby.com/api/v1/ext/domains" \
  -H "X-API-Key: string" \
  -H "Idempotency-Key: string" \
  -H "Content-Type: application/json" \
  -d '{}'

Successful Response

null

GET
/domains/{domain_id}
/domains/{domain_id}

Path Parameters

domain_id
Required
Domain Id

Header Parameters

X-API-KeyX-Api-Key

curl -X GET "https://api.surfacedby.com/api/v1/ext/domains/string" \
  -H "X-API-Key: string"

Successful Response

null

DELETE
/domains/{domain_id}
/domains/{domain_id}

Path Parameters

domain_id
Required
Domain Id

Header Parameters

X-API-KeyX-Api-Key

Idempotency-KeyIdempotency-Key

curl -X DELETE "https://api.surfacedby.com/api/v1/ext/domains/string" \
  -H "X-API-Key: string" \
  -H "Idempotency-Key: string"

Successful Response

null

On this page