{"revision":"6ba549855354e504","language":"en","entry":{"id":"approve-move","kind":"endpoint","group":"manage","title":"Approve a move","method":"POST","path":"/v1/moves/{nonce}/approve","paths":[],"summary":"At the old address, signed by an active device key of the card: the card's next version that adds the move's key as a device, the receipt and the SHA-256 of the secret. Checked as a publication would be, kept and not published.","response":"200 with nonce, identity and version.","parameters":[{"name":"nonce","description":"The move's nonce: 22 characters of base64url.","in":"path","required":true}],"sample":"/v1/moves/MOVE_NONCE/approve","access":"signed","base":"directory","notes":["Moving a browser from the directory's old address to its new one (since 6 November 2026): a key lives on the origin that made it, so the new address makes a key of its own and the card adds it with a version signed at the old address, in the same browser. The version is kept until the new key comes back with the secret."],"errors":["400 invalid_json","400 invalid_nonce","400 invalid_parameter","400 invalid_signature_alg","400 invalid_timestamp","400 wrong_format","401 invalid_signature","401 missing_signature","401 stale_timestamp","403 key_banned","403 signer_not_authorised","404 no_move","404 not_found","409 move_approved","409 move_done","409 replayed_nonce","409 version_conflict","410 move_expired","413 payload_too_large","422 invalid_move","429 rate_limited","500 internal_error","503 busy"],"related":["signed-requests"],"bodyFields":[{"name":"label","description":"The version's label, as for a publication.","in":"body","required":true},{"name":"body","description":"The version's body.","in":"body","required":true},{"name":"signature","description":"The label's signature by the key that signs the request.","in":"body","required":true},{"name":"secretHash","description":"SHA-256 of the move's 32-byte secret, lowercase hex.","in":"body","required":true},{"name":"retire","description":"Whether the old key retires itself afterwards.","in":"body","required":true},{"name":"chat","description":"Whether the old browser holds chat keys to hand over.","in":"body","required":true},{"name":"receipt","description":"The receipt, veil-rubrica:move-receipt:v1 and its eight lines.","in":"body","required":true},{"name":"receiptSignature","description":"The receipt's Ed25519 signature in hex by the same key.","in":"body","required":true}],"live":false,"responseObjects":[],"errorFormat":"json","errorDetails":[{"status":400,"code":"invalid_json","description":"The body is not a JSON object, contains duplicate keys or has trailing data.","action":"Send one valid JSON object with `Content-Type` application/json.","scope":"endpoint"},{"status":400,"code":"invalid_nonce","description":"The signed-request nonce has an invalid format.","action":"Generate a fresh 16 to 128-character nonce using letters, digits, _ or -.","scope":"endpoint"},{"status":400,"code":"invalid_parameter","description":"A path, query or body field is missing, malformed or outside its accepted range.","action":"Correct the field named in `error.message` before sending again.","scope":"endpoint"},{"status":400,"code":"invalid_signature_alg","description":"`X-Signature-Alg` is unsupported.","action":"Use a supported signing algorithm and matching key/signature encoding.","scope":"endpoint"},{"status":400,"code":"invalid_timestamp","description":"The signed-request timestamp is not Unix milliseconds.","action":"Use an integer Unix timestamp in milliseconds and sign the corrected request.","scope":"endpoint"},{"status":400,"code":"wrong_format","description":"The request or the read belongs to the other log format than this server’s: a v1 record on a format 2 log, or a format 2 read on a format 1 log.","action":"Read `format` in GET /v1/log (absent means 1) and send the shape of that format.","scope":"endpoint"},{"status":401,"code":"invalid_signature","description":"The HTTP request signature does not verify.","action":"Sign the exact method, path and body bytes, without changing them afterwards.","scope":"endpoint"},{"status":401,"code":"missing_signature","description":"The request requires a device signature and its headers are missing or unreadable.","action":"Send `X-Public-Key`, `X-Signature` and the signed-request metadata. An API key does not replace a device signature.","scope":"endpoint"},{"status":401,"code":"stale_timestamp","description":"The signed timestamp is outside the accepted clock window.","action":"Compare the server Date header with your clock, then generate a fresh nonce, timestamp and signature.","scope":"endpoint"},{"status":403,"code":"key_banned","description":"The device signing key is suspended by Veil staff.","action":"Use an authorised active key or ask staff to review the restriction.","scope":"endpoint"},{"status":403,"code":"signer_not_authorised","description":"The organisation member or signing role cannot publish this change.","action":"Check accepted membership and the role required for the change.","scope":"endpoint"},{"status":404,"code":"no_move","description":"This directory has one address, so there is no browser to move.","action":"Make a card or log in at this address.","scope":"endpoint"},{"status":404,"code":"not_found","description":"The requested card, key, alias, code or resource was not found.","action":"Check the identifier. Temporary codes and previews may already have expired or been used.","scope":"endpoint"},{"status":409,"code":"move_approved","description":"The move was approved already.","action":"Complete it from the new address, or start a new move.","scope":"endpoint"},{"status":409,"code":"move_done","description":"The move is done: the new key is on the card.","action":"Nothing to do. Read the card to see the new key.","scope":"endpoint"},{"status":409,"code":"replayed_nonce","description":"The signing key already used this nonce.","action":"Check whether the previous request succeeded before making a fresh signed request.","scope":"endpoint"},{"status":409,"code":"version_conflict","description":"The version cannot be published against the card’s current state.","action":"Read the latest card, reconcile the intended change and sign a new version.","scope":"endpoint"},{"status":410,"code":"move_expired","description":"The move waited more than ten minutes.","action":"Start a new move.","scope":"endpoint"},{"status":413,"code":"payload_too_large","description":"The request body exceeds this endpoint’s byte limit.","action":"Reduce the encoded body. API-key management accepts at most 8 KiB.","scope":"endpoint"},{"status":422,"code":"invalid_move","description":"The approval is not a move: its version must add exactly the move's key as a device of the card, and its receipt must name the move, the card, the two keys, the version and the choices, signed by the key that signs the request.","action":"Build the version and the receipt again from the card and the move as they are now.","scope":"endpoint"},{"status":429,"code":"rate_limited","description":"An anonymous, signed-request or API-key allowance was exceeded.","action":"Wait at least `Retry-After` seconds. Share a queue and retry budget across your workers.","scope":"endpoint"},{"status":500,"code":"internal_error","description":"An unexpected server error occurred. Internal details are not returned.","action":"Retry reads with bounded backoff. Check write results before sending a new signed operation.","scope":"endpoint"},{"status":503,"code":"busy","description":"The application has reached a temporary concurrency or database limit.","action":"Wait `Retry-After` seconds and retry with bounded backoff.","scope":"endpoint"}],"sections":[{"kind":"code","language":"shell","code":"curl -fsS -X POST 'https://veil.pub/v1/moves/MOVE_NONCE/approve' \\\n  -H \"X-Public-Key: $OLD_KEY\" -H \"X-Signature: $REQUEST_SIGNATURE\" --json @approval.json"}],"responses":[{"status":200,"contentType":"application/json","description":"200 with nonce, identity and version.","fields":[{"name":"nonce","type":"string","description":"The move."},{"name":"identity","type":"integer","description":"The card's number."},{"name":"version","type":"integer","description":"The version that adds the new key."}]}],"responseHeaders":[{"name":"Content-Type","value":"application/json","description":"Use the declared media type before choosing a parser."},{"name":"Date","value":"HTTP date","description":"Server time. Compare it with your clock when signing requests."},{"name":"Cache-Control","value":"no-store","description":"Do not persist private or temporary responses in a shared cache."},{"name":"Retry-After","value":"integer seconds, on rate_limited or busy","description":"Wait at least this long before retrying. Other 429/503 codes do not necessarily include it."}],"documentationUrl":"https://veil.pub/docs/approve-move","supportsBrowserFetch":false,"browserMode":"local-or-server"}}