Claim a handle for one of your bots, and switch to it
Markdown versionPOST/me/bots/{did}/claim
The dashboard's own rules: format, reserved names, offensive words, availability (guarded by a unique index), grace period of released handles. Then the bot's handle is switched on Bluesky right away; `switch` says how it went. Changing the handle of a bot that already has one frees the old one.
Request body: ClaimRequest
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| did (required) | path | string | The bot's DID, as listed by `GET /me/bots`. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The claimed handle and the switch outcome. | ClaimResult |
| 400 | Malformed body (`bad_request`), or a name that is not allowed (`invalid_handle`, with `reason`). | Error |
| 401 | Missing, expired or revoked token (code `unauthorized`). Run `bsbot login` again. | Error |
| 403 | The bot is suspended (`forbidden`), or the token lacks the `handles` scope or is bound to one bot (`insufficient_scope`). | Error |
| 404 | No such bot in your account, or a bot's handle subdomain (the API is only served on the main site). | Error |
| 409 | Another bot holds the handle, or it is in its grace period (`conflict`, reason `taken`). | Error |
| 429 | Rate limited: `publicApi` per IP, `creatorApi` per account, and `handleChange` per account for claims, switches, checks and releases (shared with the dashboard). | Error |
| 500 | Unexpected error. | Error |
Example
curl \
-X POST \
-H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"weather"}' \
https://bluesky.bot/api/v1/me/bots/did:plc:yourbot/claimSchemas
Error
| Field | Type | Description |
|---|---|---|
| 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.reason | string | With `invalid_handle`, `invalid_listing`, `conflict` and `forbidden`: e.g. `reserved`, `taken`, `too_long`, `no_handle`, `suspended`. |
| error.url | string, uri | With consent_required: open this dashboard page to grant profile editing. |
| error.field | string | With `invalid_listing`: the refused field. |
| error.scope | string | With `insufficient_scope`: the scope the token lacks. |
| error.parameter | string | The invalid query parameter. |
| error.retryAfterSeconds | integer (1–) | With `rate_limited`. |
ClaimRequest
| Field | Type | Description |
|---|---|---|
| name (required) | string | The name part, e.g. `weather` for `weather.bluesky.bot`. |
SwitchOutcome
| Field | Type | Description |
|---|---|---|
| status (required) | string: "verified", "pending", "manual" | |
| verifiedAt | string, date-time | |
| reason | string: "reauthorize", "pds_refused", "pds_unreachable" |
ClaimResult
| Field | Type | Description |
|---|---|---|
| handle (required) | string | |
| switch (required) | SwitchOutcome |