Bluesky custom domain handle checker

Markdown version

GET/tools/custom-handle-checker

Checks why a custom domain handle is invalid: the handle syntax, the DNS TXT record at `_atproto.<domain>`, the file `/.well-known/atproto-did`, the DID document and what Bluesky shows, then gives the exact record to add. Asks fresh every time; costs 2 calls.

Parameters

NameInTypeDescription
domain (required)querystringThe domain to check, e.g. `alice.example.com`.
expectedquerystringOptional: the account the domain should point to, as a handle or a DID.

Responses

StatusDescriptionBody
200The tool's answer, with the canonical URL of its page.ToolCustomHandleChecker
400Invalid query parameter (code `bad_request`).Error
401Unknown, expired or revoked token (code `unauthorized`). Without an `Authorization` header, the tool answers anonymously.Error
404Not found. Also returned on a bot's handle subdomain: the API is only served on the main site.Error
429Rate limited: `toolsApi` (60 a minute) and `toolsApiDaily` (2,000 a day) per IP, or 10 times both per account with a creator's token. A tool that fans out costs more than one call.Error
500Unexpected error.Error
502The service the tool asks did not answer (code `upstream_error`).Error

Example

bash
curl \
  -G \
  --data-urlencode "domain=bsky.app" \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/tools/custom-handle-checker

Schemas

Error

FieldTypeDescription
error (required)object
error.code (required)string: "bad_request", "invalid_handle", "not_found", "rate_limited", "internal_error", "unauthorized", "forbidden", "conflict", "invalid_grant", "upstream_error", "insufficient_scope", "invalid_listing", "consent_required"
error.message (required)string
error.reasonstringWith `invalid_handle`, `invalid_listing`, `conflict` and `forbidden`: e.g. `reserved`, `taken`, `too_long`, `no_handle`, `suspended`.
error.urlstring, uriWith consent_required: open this dashboard page to grant profile editing.
error.fieldstringWith `invalid_listing`: the refused field.
error.scopestringWith `insufficient_scope`: the scope the token lacks.
error.parameterstringThe invalid query parameter.
error.retryAfterSecondsinteger (1–)With `rate_limited`.

ToolCustomHandleChecker

FieldTypeDescription
tool (required)string = "custom-handle-checker"The tool's slug.
url (required)stringThe canonical URL of the tool's page on Bluesky.bot.
result (required)objectThe tool's answer.
result.domain (required)stringThe domain checked, normalised.
result.did (required)string | nullThe DID the domain points to (DNS first, then HTTPS); null when none.
result.expected (required)object | nullThe expected account; null without one.
result.method (required)string: "dns", "https", "both", "none"The methods that work: `dns`, `https`, `both` or `none`.
result.verification (required)string: "verified", "not_verified", "could_not_check"`verified` only when DNS or the HTTPS file gives the DID and the DID document claims the domain back (the AppView alone never verifies); `could_not_check` when one of them did not answer; `not_verified` otherwise.
result.ok (required)booleanVerified, and no check fails, the AppView's included.
result.problems (required)integerHow many checks fail.
result.warnings (required)integerHow many checks warn.
result.checks (required)object[]The seven checks, in order.
result.checks[].id (required)string: "syntax", "dns", "https", "agreement", "document", "expected", "appview"`syntax`, `dns`, `https`, `agreement`, `document`, `expected` or `appview`, in this order.
result.checks[].status (required)string: "pass", "fail", "warning", "not_checked"`pass`, `fail`, `warning` or `not_checked`.
result.checks[].reason (required)stringWhy, as a stable code, listed on the tool's documentation page.
result.checks[].details (required)objectWhat the check saw: TXT values, DIDs, an HTTP status, a handle.
result.record (required)objectThe DNS record to add.
result.record.name (required)stringThe host to type in the panel of `zone`: `_atproto`, or `_atproto.alice` for `alice.example.com` in `example.com`.
result.record.fullName (required)stringThe full name, for panels that want it.
result.record.zone (required)stringThe DNS zone the record goes in, found by an SOA lookup.
result.record.zoneGuessed (required)booleanNo SOA answered: the zone is the domain's last two labels.
result.record.type (required)string = "TXT"The record type: `TXT`.
result.record.value (required)string | nullThe value, `did=<did>`; null while the DID is unknown.
result.file (required)objectThe other way: the HTTPS file.
result.file.url (required)stringWhere to serve the file.
result.file.body (required)string | nullWhat it must hold: the DID alone; null while unknown.
result.bot (required)booleanThe account behind the domain is a self-labelled bot.