Instance

Check an address change

Returns what changing the addresses would do, whether a write needs confirmation and whether a new sign-in address answers as this instance, and writes nothing. Requires config.manage.

POST
/config/address-check

Authorization

bearerAuth
headerAuthorizationBearer <token>

Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).

Request body

application/json
  1. body

The address change to check, written as PATCH /config writes it.

sign_in_address?|

The sign-in address to try, an origin with no path. null tries removing it, so the server's default applies.

addresses?array<string>|

The addresses to try, each an origin with no path. null tries removing them, so the server's default applies.

Response body

About errors

Returns what the change would do.

application/json
  1. response

What a change of address would do. Nothing is written.

sign_in_address*string

The sign-in address after the change.

addresses*array<string>

The addresses after the change.

requires_confirmation*boolean

true if a write of this change needs confirm_sign_in_address_change: true: the sign-in address of a claimed instance moves.

consequences*array<>

Everything the change does, empty if it does nothing.

next_steps*array<>

What the owner would do after the change, in order. Empty unless the sign-in address moves.

sign_in_address_check?

Whether the new sign-in address answers as this instance, as a write of the change checks it. Present when requires_confirmation is true.

  • validation_error: an address isn't an origin with no path, or the settings can't be used together.
application/json
  1. response

An error response.

error*

What went wrong.

unauthorized: the request has no credential, or its credential is not valid. For a key that has expired, details.expired_at says when it expired.

application/json
  1. response

An error response.

error*

What went wrong.

  • forbidden: you don't hold config.manage. details.required_scope names it.
application/json
  1. response

An error response.

error*

What went wrong.

request_timeout: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests.

application/json
  1. response

An error response.

error*

What went wrong.

instance_changed: X-Marfa-Instance-Id names another instance. Nothing is written. Rebuild the working copy from the instance at this address.

application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

request_too_large: the request body is larger than this instance accepts.

application/json
  1. response

An error response.

error*

What went wrong.

rate_limited: you sent too many requests. Wait for the number of seconds in Retry-After, then try again.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

write_contention: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, details.reason is restore_running.

application/json
  1. response

An error response.

error*

What went wrong.

insufficient_storage: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless details.write_outcome is unknown, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again.

application/json
  1. response

An error response.

error*

What went wrong.

curl -X POST 'http://localhost:8600/config/address-check' \  -H 'Content-Type: application/json' \  -d '{}'
About errors
{  "sign_in_address": "https://marfa.example.com",  "addresses": [    "https://marfa.example.com"  ],  "requires_confirmation": true,  "consequences": [    {      "code": "browser_sessions_end",      "sentence": "Everyone signed in on a browser is signed out.",      "count": 1    },    {      "code": "apps_sign_in_again",      "sentence": "Apps connected to this instance have to sign in again.",      "count": 2    }  ],  "next_steps": [    {      "code": "sign_in",      "sentence": "Sign in again at the new address.",      "url": "https://marfa.example.com/auth/sign-in"    },    {      "code": "add_passkey",      "sentence": "Add a passkey at the new address. Passkeys made for the old address work again only if the sign-in address moves back.",      "url": "https://marfa.example.com/auth/sign-in?prompt=login&return_to=/auth/owner/passkeys"    }  ],  "sign_in_address_check": {    "passed": true  }}