Documentation
Account and keys
View .mdOpenAPI

Set a domain's join mode

PATCHhttps://weights.fyi/run/v1/workspaces/domains/{domain}scope: manage
text
PATCH https://weights.fyi/run/v1/workspaces/domains/<domain>
Authorization: Bearer <token>                    scope: manage
Content-Type: application/json
Available since
2026-11-15 workspace domains: included in this build; see What is live for deployment status.
Answer time
synchronous: one database write.

Changes how a claimed email domain admits people whose verified address is at that domain: invite_only keeps invitations as the only way in, discoverable lets them join in one click, and auto_join adds them as members at sign-in.

The setting takes effect only while status is verified. Existing workspace owners and admins keep their roles; members previously removed by an owner or admin remain excluded until invited again.

Request

NameWhereRequiredMeaning
AuthorizationheaderyesBearer and a token with manage on the workspace.
domainpathyesThe claimed email domain, such as awow.io.
join_modebodyyesinvite_only, discoverable or auto_join.

Return value

200 OK:

FieldMeaning
domain, status, join_modeDomain name, verification state, and the updated admission mode.
created_at, verified_at, last_checked_atTimestamps in UTC.
dns_record, accepted_recordsThe TXT record instructions for this claim.

Errors

StatusCodeWhen it happensWhat to do
400invalid_request, invalid_jsonUnknown fields or an invalid join_mode.Send invite_only, discoverable or auto_join.
401unauthorized, invalid_token, token_revoked, token_expiredNo token, or one that does not work.Use a valid token.
403scope_required, workspace_role_required, operator_workspace_domainToken lacks manage, caller is not an owner or admin, or open join mode is not allowed here.Use an owner or admin manage token on a team workspace.
404domain_not_foundThis workspace has not claimed that domain.Check workspace.domains in GET /v1/workspaces.

Examples

sh
curl -s -X PATCH https://weights.fyi/run/v1/workspaces/domains/DOMAIN \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"join_mode": "auto_join"}'
json
{"domain": "awow.io", "status": "verified", "join_mode": "auto_join", "created_at": "2026-11-15T10:00:00Z", "verified_at": "2026-11-15T10:05:00Z", "last_checked_at": "2026-11-15T10:05:00Z"}

History

  • 2026-11-15 workspace domains: added.

See also