Ask a directory to list your instance
POST /admin/federation/directories/{id}/publish/register
The second step of listing your instance in a directory: call it once you’ve requested a challenge and added the DNS TXT record it gave you.
Your instance saves the details you send on the subscription, then sends them to the directory with the challenge token and your instance’s public key. The directory checks the DNS record; your instance doesn’t check it first.
Read publish_status in the response:
listed: the directory accepted the listing.pending_dns: the directory couldn’t see the DNS record yet, andpublish_last_errorhas its message. Wait for DNS to update, then call this again. The same challenge works until it expires.failed: the directory refused the listing or couldn’t be reached, andpublish_last_errorsays why. Request a new challenge withPOST /admin/federation/directories/{id}/publish/challengebefore you try again.
All three come back with 200. You get 400 if there’s no challenge
waiting (publish_status isn’t pending_dns), if the challenge has
expired, or if your instance has no base URL or its federation key
isn’t available.
Listings and DNS records are public. Being listed lets other instances find yours; it doesn’t pair you with them or share anything.
Needs the system.admin capability.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”How your instance should appear in the directory’s listing. Your instance saves it on the subscription, so it’s still there for the next attempt.
object
Responses
Section titled “ Responses ”The subscription, with the outcome in publish_status and publish_last_error.
One directory your instance subscribes to: the operator key saved when you subscribed, how the last poll went and, if you’ve asked to be listed there, where your instance’s listing stands.
object
The directory operator’s Ed25519 public key in PEM, as the directory reported it when you subscribed. Polls accept only listings signed with this key.
The fingerprint the directory reported for its key when you subscribed. Your instance doesn’t check it against operator_public_key.
How the most recent poll went: ok, or why it failed. unreachable covers connection errors and any HTTP status other than 200, and signature_failed means the listing’s signature didn’t verify against operator_public_key. It’s never_polled until the first poll.
What went wrong in the most recent poll. Empty when it succeeded or there hasn’t been one.
How often the background poller refreshes this directory, in seconds. New subscriptions get 21600 (six hours), and the API can’t change it.
Where your instance’s listing in this directory stands, as your instance last recorded it: not_published until you request a challenge, then pending_dns, then listed or failed. It isn’t checked against the directory, so it can still say listed after the directory removes the listing. pending_register isn’t used.
Why the last attempt to list your instance didn’t go through. Cleared when you request a new challenge or the listing succeeds.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completed