Fediverse and Bluesky

The fediverse

activitypub-service

This installation on the fediverse, by ActivityPub: what other servers ask of it and send to it, a person's choice to be on it, finding somebody elsewhere, and the servers it refuses (federation.md). Optional: an installation may not run it.

Where WebFinger is

GET/.well-known/host-meta

An XRD document (RFC 6415), for servers that look for WebFinger this way.

Who: Anyone, signed in or not

Answers

  • 200
    the XRD document
    string application/xrd+xml

Request

curl "https://api.example.org/.well-known/host-meta"

Who an account is

GET/.well-known/webfinger

WebFinger (RFC 7033): where another server finds somebody here by their handle.

Who: Anyone, signed in or not

Parameters

  • resourcestringin query
    acct:ana@example.org, or the address of somebody's actor.

Answers

  • 200
    OK
    activitypub.JRD application/jrd+json
  • 400
    no resource, or not one that is asked about
  • 404
    nobody here by that name is on the fediverse

Request

curl "https://api.example.org/.well-known/webfinger"

The old accounts the viewer's account also is

GET/activitypub/aliases

Its alsoKnownAs: what another server checks before it lets somebody move from there to here.

Who: Somebody signed in

Answers

Request

curl "https://api.example.org/activitypub/aliases" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "also_known_as": [
    {
      "handle": "string",
      "uri": "https://example.org/"
    }
  ]
}

Name the old accounts the viewer's account also is

PUT/activitypub/aliases

Each is found on its own server and kept, as a lookup is; the list takes the place of the one before. For somebody on the fediverse; not an account on this site. Their followers' servers are sent their description again.

Who: Somebody signed in

Body application/json

  • also_known_aslist of string

Answers

  • 200
    OK
    activitypub.Aliases application/json
  • 400
    also_known_as_required or too_many_aliases
    Refusal application/json
  • 401
    no token, or one that has expired
  • 404
    one could not be found, as for a lookup (lookup_not_found, lookup_is_here for one on this site, …), with alias naming it
    activitypub.AliasRefusal application/json
  • 409
    not_on_fediverse or not_a_person
    Refusal application/json
  • 502
    lookup_failed
    Refusal application/json

Request

curl -X PUT "https://api.example.org/activitypub/aliases" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "also_known_as": [
      "string"
    ]
  }'

Answer · 200

{
  "also_known_as": [
    {
      "handle": "string",
      "uri": "https://example.org/"
    }
  ]
}

The servers refused

GET/activitypub/blocks

Who: A super administrator

Parameters

  • qstringin query
    Words the name or the reason holds.
  • startintegerin query
    How many to pass over.
  • limitintegerin query
    The most to send: 50 unless asked, 200 at most.

Answers

  • 200
    OK
    object application/json
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this

Request

curl "https://api.example.org/activitypub/blocks" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "data": [
    {
      "created_at": "2026-10-27T09:30:00Z",
      "created_by": 1,
      "domain": "string",
      "reason": "string"
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total": 1
  }
}

Refuse a server, or change why

POST/activitypub/blocks

Nothing from it is taken, and nothing is sent to it.

Who: A super administrator

Body application/json

  • domainstring
    The server's name, or an address or a handle on it.
  • reasonstring
    Why it is refused.

Answers

  • 201
    Created
    DomainBlock application/json
  • 400
    domain_required: the request names no server; domain_unreadable: it is not a server's name; domain_is_here: it is this installation
    Refusal application/json
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this

Request

curl -X POST "https://api.example.org/activitypub/blocks" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "string",
    "reason": "string"
  }'

Answer · 201

{
  "created_at": "2026-10-27T09:30:00Z",
  "created_by": 1,
  "domain": "string",
  "reason": "string"
}

Stop refusing a server

DELETE/activitypub/blocks/{domain}

Who: A super administrator

Parameters

  • domainstringrequiredin path
    Its name: spam.example.

Answers

  • 204
    done
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this
  • 404
    it is not refused

Request

curl -X DELETE "https://api.example.org/activitypub/blocks/<domain>" \
  -H "Authorization: Bearer $TOKEN"

Who from other networks is kept here

GET/activitypub/known-profiles

Newest first. q narrows it to the names and handles it is found in. For administrators: these people did not ask to be listed.

Who: An administrator

Parameters

  • qstringin query
    Words the name or the reason holds.
  • startintegerin query
    How many to pass over.
  • limitintegerin query
    The most to send: 50 unless asked, 200 at most.

Answers

  • 200
    OK
    object application/json
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this

Request

curl "https://api.example.org/activitypub/known-profiles" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "data": [
    {
      "created_at": "2026-10-27T09:30:00Z",
      "follower_count": 1,
      "handle": "string",
      "id": 42,
      "name": "string",
      "network": "string",
      "type": "string",
      "uri": "https://example.org/"
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total": 1
  }
}

Find somebody on another server

GET/activitypub/lookup

They are kept here, so that they can be followed as anybody is. Thirty lookups in ten minutes.

Who: Somebody signed in

Parameters

  • qstringin query
    Their handle (@alice@mastodon.example) or the address of their profile there.

Answers

  • 200
    OK
    activitypub.RemotePerson application/json
  • 400
    lookup_unreadable
    Refusal application/json
  • 401
    no token, or one that has expired
  • 404
    lookup_not_found, lookup_is_here, lookup_not_a_person or lookup_refused
    Refusal application/json
  • 409
    the installation is not on the fediverse: site_private or site_unreachable
    Refusal application/json
  • 429
    too_many_lookups
    Refusal application/json
  • 502
    lookup_failed
    Refusal application/json

Request

curl "https://api.example.org/activitypub/lookup" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "alias": "string",
  "body": "string",
  "id": 42,
  "locked": false,
  "name": "string",
  "origin_domain": "string",
  "type": "string",
  "uri": "https://example.org/",
  "url": "https://example.org/"
}

Whether the viewer's account moved

GET/activitypub/move

To which account and when, and, within thirty days of a move, when it may move again.

Who: Somebody signed in

Answers

Request

curl "https://api.example.org/activitypub/move" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "may_move_at": "2026-10-27T09:30:00Z",
  "moved_at": "2026-10-27T09:30:00Z",
  "moved_to": {
    "handle": "string",
    "uri": "https://example.org/"
  }
}

Move the viewer's account to another

POST/activitypub/move

To an account elsewhere that names this one in its alsoKnownAs, read afresh. Its description gains movedTo; its followers' servers are sent a Move, and its followers here follow the new account; its profile says where it went. The account can then no longer post, like, follow or tag, until it moves back. Not within thirty days of the last move.

Who: Somebody signed in, who has just proved who they are again

Body application/json

  • tostring

Answers

  • 200
    OK
    activitypub.MoveStatus application/json
  • 400
    to_required
    Refusal application/json
  • 401
    no token, or one that has expired
  • 403
    step_up_required: the viewer must prove who they are again first (/reauth)
    Refusal application/json
  • 404
    the account could not be found, as for a lookup; lookup_is_here for one on this site, which is not moved to: a username is changed instead
    Refusal application/json
  • 409
    not_on_fediverse, not_a_person, moved_already, moved_lately or not_named_there: the new account does not name this one
    Refusal application/json
  • 502
    lookup_failed
    Refusal application/json

Request

curl -X POST "https://api.example.org/activitypub/move" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "string"
  }'

Answer · 200

{
  "may_move_at": "2026-10-27T09:30:00Z",
  "moved_at": "2026-10-27T09:30:00Z",
  "moved_to": {
    "handle": "string",
    "uri": "https://example.org/"
  }
}

Take the viewer's move back

DELETE/activitypub/move

The profile no longer points to the new account, its description no longer says it moved, and the account may post, like and follow again. Its followers stay with the new account; moving from there to here brings them back, which other servers allow only after this. The thirty days before another move still count from the move.

Who: Somebody signed in

Answers

  • 200
    OK
    activitypub.MoveStatus application/json
  • 401
    no token, or one that has expired
  • 409
    not_moved, not_on_fediverse or not_a_person
    Refusal application/json

Request

curl -X DELETE "https://api.example.org/activitypub/move" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "may_move_at": "2026-10-27T09:30:00Z",
  "moved_at": "2026-10-27T09:30:00Z",
  "moved_to": {
    "handle": "string",
    "uri": "https://example.org/"
  }
}

Read somebody on another server again

POST/activitypub/people/{id}/refresh

When what was kept of them is more than an hour old: whether they approve their followers, their name, their words, their pictures. Asked by the web app when their profile is opened; refreshed says whether to read the profile again. A failure there leaves what was kept, and says nothing.

Who: Somebody signed in

Parameters

  • idintegerrequiredin path
    The person's id here: somebody kept from another server.

Answers

  • 200
    OK
    activitypub.Refreshed application/json
  • 401
    no token, or one that has expired
  • 404
    profile_not_kept: nobody from another server is kept under that id
    Refusal application/json
  • 409
    the installation is not on the fediverse: site_private or site_unreachable
    Refusal application/json

Request

curl -X POST "https://api.example.org/activitypub/people/<id>/refresh" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "refreshed": false
}

Copy a post's pictures here again

POST/activitypub/posts/{id}/pictures

The pictures of a post from another server that has been left alone a while are removed from storage, and the post says so (media_removed). Asked here, they are read again from where they came from. For anybody signed in who may see the post.

Who: Somebody signed in

Parameters

  • idintegerrequiredin path
    The post's id here.

Answers

  • 200
    OK
    PicturesRestored application/json
  • 401
    no token, or one that has expired
  • 404
    media_not_removed: there is no such post the viewer may see, or its pictures are here
    Refusal application/json
  • 410
    media_gone
    Refusal application/json
  • 429
    too_many_requests
    Refusal application/json
  • 502
    media_failed
    Refusal application/json

Request

curl -X POST "https://api.example.org/activitypub/posts/<id>/pictures" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "restored": 1
}

The accounts refused

GET/activitypub/refused-accounts

Newest first. q narrows it to the names, handles and reasons it is found in.

Who: An administrator

Parameters

  • qstringin query
    Words the name or the reason holds.
  • startintegerin query
    How many to pass over.
  • limitintegerin query
    The most to send: 50 unless asked, 200 at most.

Answers

  • 200
    OK
    object application/json
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this

Request

curl "https://api.example.org/activitypub/refused-accounts" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "data": [
    {
      "created_at": "2026-10-27T09:30:00Z",
      "created_by": 1,
      "handle": "string",
      "id": 42,
      "identifier": "string",
      "name": "string",
      "network": "string",
      "reason": "string"
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total": 1
  }
}

Refuse an account from another network

POST/activitypub/refused-accounts

By the profile kept here (actor_id), or by a handle or an address (address): @user@server, an actor's address, a Bluesky handle or a DID. Nothing from it is taken, nothing is sent to it, it cannot be looked up or followed, and what is here of it is removed: at once on the fediverse, within a minute on Bluesky.

Who: An administrator

Body application/json

  • actor_idinteger
    The profile kept here.
  • addressstring
    Or a handle or an address: @user@server, an actor's address, a Bluesky handle or a DID.
  • reasonstring
    Why it is refused, for the administrators who come after.

Answers

  • 201
    Created
    RefusedAccount application/json
  • 400
    account_required: the request names no account; account_unreadable: the address is not one
    Refusal application/json
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this
  • 404
    account_not_found
    Refusal application/json
  • 409
    is_local: the profile is this installation's own; already_refused: it, or its server, is refused already
    Refusal application/json

Request

curl -X POST "https://api.example.org/activitypub/refused-accounts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "actor_id": 42,
    "address": "string",
    "reason": "string"
  }'

Answer · 201

{
  "created_at": "2026-10-27T09:30:00Z",
  "created_by": 1,
  "handle": "string",
  "id": 42,
  "identifier": "string",
  "name": "string",
  "network": "string",
  "reason": "string"
}

Stop refusing an account

DELETE/activitypub/refused-accounts/{id}

What was removed does not come back: the account can be looked up and followed again.

Who: An administrator

Parameters

  • idintegerrequiredin path
    Its number on the list.

Answers

  • 204
    done
  • 401
    no token, or one that has expired
  • 403
    the viewer may not do this
  • 404
    it is not refused

Request

curl -X DELETE "https://api.example.org/activitypub/refused-accounts/<id>" \
  -H "Authorization: Bearer $TOKEN"

Whether the viewer is on the fediverse, and could be

GET/activitypub/settings

Who: Somebody signed in

Parameters

  • person_idintegerin query
    The person's id, or a website's for one of its administrators. The viewer when left out.

Answers

  • 200
    OK
    activitypub.Settings application/json
  • 400
    person_unreadable
    Refusal application/json
  • 401
    no token, or one that has expired
  • 403
    somebody else's, and the viewer is not a site administrator, nor an administrator of the website asked about
  • 404
    there is no such person

Request

curl "https://api.example.org/activitypub/settings" \
  -H "Authorization: Bearer $TOKEN"

Answer · 200

{
  "actor": "string",
  "available": false,
  "discoverable": false,
  "enabled": false,
  "handle": "string",
  "indexable": false,
  "reason": "string"
}

Go on the fediverse, or leave it

PUT/activitypub/settings

It is each person's own choice, off until they make it, and only for somebody whose profile is open to everybody. A website's is its administrators' (?person_id= with its id).

Who: Somebody signed in

Body application/json

  • discoverableboolean
    Whether other servers may list them in their directories.
  • enabledboolean
    Whether the viewer is on the fediverse from now on. Leaving tells the servers that knew them, and some of those do not take them back (federation.md).
  • indexableboolean
    Whether other servers may find them in search.

Answers

  • 200
    OK
    activitypub.Settings application/json
  • 400
    enabled_required: nothing to change; person_unreadable
    Refusal application/json
  • 401
    no token, or one that has expired
  • 403
    somebody else's, and the viewer is not an administrator of the website asked about
  • 409
    why they cannot be: site_private, site_unreachable or profile_not_public; moved for leaving an account that moved away, which would take the way to the new one with it
    Refusal application/json

Request

curl -X PUT "https://api.example.org/activitypub/settings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "discoverable": false,
    "enabled": false,
    "indexable": false
  }'

Answer · 200

{
  "actor": "string",
  "available": false,
  "discoverable": false,
  "enabled": false,
  "handle": "string",
  "indexable": false,
  "reason": "string"
}

The installation itself

GET/ap/actor

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). The actor that signs what the installation asks of other servers.

Who: Anyone, signed in or not

Answers

  • 200
    OK
    activitypub.Actor application/activity+json
  • 404
    the installation is not on the fediverse
  • 503
    its key cannot be read now

Request

curl "https://api.example.org/ap/actor"

A post, as other servers see it

GET/ap/notes/{uuid}

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). A Note, of somebody on the fediverse, open to everybody.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    The post's UUID.

Answers

  • 200
    OK
    activitypub.Note application/activity+json
  • 404
    there is no such post that went out

Request

curl "https://api.example.org/ap/notes/<uuid>"

A picture of a post

GET/ap/notes/{uuid}/pictures/{position}

For a server that was sent the post: a redirect to the picture in storage.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    The post's UUID.
  • positionintegerrequiredin path
    Which picture, from 0.

Answers

  • 302
    the picture is at the address in Location
  • 404
    there is no such picture of a post that went out

Request

curl "https://api.example.org/ap/notes/<uuid>/pictures/<position>"

The poster of a video post

GET/ap/notes/{uuid}/poster

For a server that was sent the post: a redirect to the picture in storage.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    The post's UUID.

Answers

  • 302
    the picture is at the address in Location
  • 404
    there is no such video of a post that went out

Request

curl "https://api.example.org/ap/notes/<uuid>/poster"

The video of a post

GET/ap/notes/{uuid}/video

For a server that was sent the post: a redirect to the file in storage.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    The post's UUID.

Answers

  • 302
    the file is at the address in Location
  • 404
    there is no such video of a post that went out

Request

curl "https://api.example.org/ap/notes/<uuid>/video"

Somebody here, as other servers see them

GET/ap/users/{uuid}

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). A Person, or an Organization for a Website, with their public key.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    Their UUID, as other servers know them.

Answers

  • 200
    OK
    activitypub.Actor application/activity+json
  • 404
    nobody here by that name is on the fediverse
  • 503
    their key cannot be read now

Request

curl "https://api.example.org/ap/users/<uuid>"

How many follow them

GET/ap/users/{uuid}/followers

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). A collection with its count and no items.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    Their UUID, as other servers know them.

Answers

Request

curl "https://api.example.org/ap/users/<uuid>/followers"

How many they follow

GET/ap/users/{uuid}/following

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). A collection with its count and no items.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    Their UUID, as other servers know them.

Answers

Request

curl "https://api.example.org/ap/users/<uuid>/following"

Take an activity from another server

POST/ap/users/{uuid}/inbox

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). Signed with HTTP Signatures; what is not signed by whoever is said to have done it is not believed. Six hundred a minute from one address. Taken, whether or not anything is done with it.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    Their UUID, as other servers know them.

Body application/activity+json

anything

Answers

  • 202
    taken
  • 400
    the request is not well formed, or a value in it is not one it may be
  • 401
    not signed, or the signature does not check, or not by whoever is said to have done it
  • 403
    the server it came from is refused
  • 404
    nobody here by that name is on the fediverse
  • 413
    too large
  • 429
    too many from one address
  • 503
    it could not be kept now; send it again

Request

curl -X POST "https://api.example.org/ap/users/<uuid>/inbox"

How many posts they have sent out

GET/ap/users/{uuid}/outbox

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). A collection with its count and no items.

Who: Anyone, signed in or not

Parameters

  • uuidstringrequiredin path
    Their UUID, as other servers know them.

Answers

  • 200
    OK
    activitypub.Collection application/activity+json
  • 404
    nobody here by that name is on the fediverse
  • 503
    it cannot be counted now

Request

curl "https://api.example.org/ap/users/<uuid>/outbox"

Take an activity from another server

POST/inbox

For other servers, in ActivityStreams (https://www.w3.org/TR/activitystreams-vocabulary/ (opens in a new tab)). Signed with HTTP Signatures; what is not signed by whoever is said to have done it is not believed. Six hundred a minute from one address. Taken, whether or not anything is done with it.

Who: Anyone, signed in or not

Body application/activity+json

anything

Answers

  • 202
    taken
  • 400
    the request is not well formed, or a value in it is not one it may be
  • 401
    not signed, or the signature does not check, or not by whoever is said to have done it
  • 403
    the server it came from is refused
  • 404
    nobody here by that name is on the fediverse
  • 413
    too large
  • 429
    too many from one address
  • 503
    it could not be kept now; send it again

Request

curl -X POST "https://api.example.org/inbox"

Written by Claude, reviewed by Rastin Mehr · About this