Publish a person’s next version
Change keys, linked accounts, alias or other signed card fields.
/v1/identities/{n}/versions- Access
- Signed request
- Client
- Local or server client
Parameters#
| Name | Location | Meaning |
|---|---|---|
nRequired | Path | Permanent positive card number. |
JSON body#
| Name | Location | Meaning |
|---|---|---|
recordRequired | JSON | The complete canonical identity or organisation record, including its history fields. |
signatureRequired | JSON | The record signature, separate from the request signature header. |
logoData | JSON | The image that record.logo names by hash, in standard padded base64 on one line. Required when the version brings a new image. With an unchanged image it can be left out, and if sent it must match. |
nonceRequired | JSON | A fresh 16 to 128 character nonce using letters, digits, underscore or hyphen. |
timestampRequired | JSON | Unix milliseconds within two minutes of the server clock. |
label | JSON | Format 2: the label as a JSON object; the server encodes it canonically and checks the signature on those bytes. |
body | JSON | Format 2: the body as a JSON object, its hash in label.body. |
pictureData | JSON | Format 2: the bytes of a new picture the body names by hash, in standard padded base64. |
This call also needs the common signed-request headers, nonce and timestamp. Prepare and sign request.json before using the example. Request signing
Request examples#
curl -fsS -X POST \
-H "X-Public-Key: $PUBLIC_KEY" \
-H "X-Signature: $REQUEST_SIGNATURE" --json @request.json \
"https://veil.rip/v1/identities/1/versions"Response#
201 with n, id, url, token, version, commitment, logIndex, publishedAt and checkpoint. The response follows witnessed publication.
| Field | Type | Meaning |
|---|---|---|
n | integer | Permanent card number. |
id | string | Version-one commitment in hex. |
url | string | Permanent card URL. |
token | string | Stable log pseudonym in base64url. |
version | integer | Published version number. |
commitment | string | This version’s commitment in hex. |
logIndex | integer | Zero-based log index. |
publishedAt | string | Earliest cosignature time at publication. |
checkpoint | Checkpoint | First checkpoint covering the version. |
Expand a nested object for its fields. Types ending in null allow a null value; optional fields may be absent. Other fields are present in that object.
Checkpoint Checkpoint
| Field | Type | Meaning |
|---|---|---|
size | integer | Number of leaves in the signed tree. |
root | string | Root hash in base64. |
note | string | Full signed note, including log and witness signatures. |
Response headers#
| Header | Value | Meaning |
|---|---|---|
Content-Type | application/json | Use the declared media type before choosing a parser. |
Date | HTTP date | Server time. Compare it with your clock when signing requests. |
Location | relative URL | Published card/proof address, or permanent widget redirect target. |
Retry-After | integer seconds, on rate_limited or busy | Wait at least this long before retrying. Other 429/503 codes do not necessarily include it. |
Usage notes#
- On a log in format 2 the body is {label, body, signature, pictureData?}, with clientSalt and saltTicket required for version 1; a record is refused with wrong_format.
- From 29 October 2026 a person’s body can carry addExternalKey {type, pub, fp, label, proof: {anchor, at, by, sig, variant?}} and removeExternalKey {fp}: public keys from elsewhere with their proof of possession. proof.variant names the form of the challenge that was signed when it isn’t the bytes as offered (crlf, bom, noeol and their combinations). The challenge and the checks are in the guide to public keys from elsewhere (external-keys-file) and in docs/formato-v2.md, section 4.
Errors#
API errors return an error object. Use error.code for program logic; error.message is English text for people and can change. Response and error guide
| HTTP | Code | Meaning and next step |
|---|---|---|
| 400 | invalid_alias | The alias does not meet the ASCII name rules. Use 3 to 32 lowercase ASCII letters, digits, hyphens or underscores; start with a letter and end with a letter or digit. |
| 400 | invalid_json | The body is not a JSON object, contains duplicate keys or has trailing data. Send one valid JSON object with |
| 400 | invalid_name | A name contains invisible, direction-control or unsupported format characters. Use a visible name in the accepted Unicode form and sign the corrected request. |
| 400 | invalid_parameter | A path, query or body field is missing, malformed or outside its accepted range. Correct the field named in |
| 400 | wrong_format | 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. Read |
| 403 | identity_banned | The acting identity is suspended by Veil staff. Wait for the restriction to end or ask staff to review it. |
| 403 | key_mismatch | The signing key does not have authority over this card or operation. Use an active device key with the required owner or member role. |
| 403 | recovery_key_only | A recovery-only operation was signed with a different role. Use the recovery key in the documented recovery flow. |
| 403 | role_not_allowed | The signing role is not allowed to make this change. Use a key with the required role. |
| 403 | signer_not_authorised | The organisation member or signing role cannot publish this change. Check accepted membership and the role required for the change. |
| 404 | not_found | The requested card, key, alias, code or resource was not found. Check the identifier. Temporary codes and previews may already have expired or been used. |
| 409 | account_locked | Moderation prevents this account from being claimed. Check the current card’s public moderation state. |
| 409 | alias_quarantined | The alias is in its 30-day release quarantine. Inspect |
| 409 | alias_reserved | The chosen alias is reserved for the service. Choose another alias. |
| 409 | alias_taken | The alias is claimed or a publication has reserved it. Choose another alias or check availability again after the publication finishes. |
| 409 | already_member | This membership already exists. Read current memberships before publishing another invitation. |
| 409 | erase_pending | On a format 2 log, the card has an erasure waiting. Its signed closing names the current version, so the card cannot publish until the erasure is cancelled. Cancel the erasure with POST /v1/identities/{n}/erase/cancel, then publish the version. |
| 409 | grant_used | A verification or membership grant has already been consumed. Check the resulting card version, then obtain a fresh grant if still needed. |
| 409 | invitation_withdrawn | The organisation no longer offers the invitation. Ask for a new invitation. |
| 409 | key_already_used | A device key already belongs to an identity and cannot be reused by another. Use the existing card or generate a fresh device key. |
| 409 | takeover_already_open | A takeover for this linked account is already open. Read the pending takeover instead of opening another. |
| 409 | version_conflict | The version cannot be published against the card’s current state. Read the latest card, reconcile the intended change and sign a new version. |
| 410 | erased | The card existed and was erased or removed. The response also carries its public erasure receipt. Stop using this card as current authority. Retain only the public receipt if needed. |
| 413 | payload_too_large | The request body exceeds this endpoint’s byte limit. Reduce the encoded body. API-key management accepts at most 8 KiB. |
| 422 | cannot_revoke_self | Self-revocation would leave no active signing key, or a recovery key is being revoked without its replacement. Keep another active key. Replace a recovery key in the same version that revokes it. |
| 422 | external_limit | The card would hold more than 16 public keys from elsewhere, or one addExternalKey operation is larger than 16 KiB in canonical JSON. Remove a key first. A removal in the same version also frees a place. |
| 422 | grant_expired | The verification or membership grant expired. Obtain a fresh grant before publishing the version. |
| 422 | invalid_grant | The verification or membership grant is invalid or belongs to another operation. Use the grant issued for this exact card, account or membership. |
| 422 | invalid_logo | The image fails type, size, dimensions or content validation. Correct the image according to |
| 422 | invalid_op | An operation is unknown, malformed, not one of this card’s type or version, or changes nothing. Correct the operation named in |
| 422 | invalid_record | The identity version violates the signed-record rules. Correct the validation issue, canonicalise the record and sign it again. |
| 422 | invalid_record_signature | The identity-version signature does not verify. Sign the exact canonical record with its identity-version prefix and declared key. |
| 422 | key_expired | The OpenPGP key or its signing subkey has expired. Extend its expiry on your machine (gpg --quick-set-expire), then paste the key again and sign a new challenge. |
| 422 | key_extra_packets | The OpenPGP key still carries a photo, another person’s certification, or other material a card does not keep. Add the key from your card’s page, which keeps only what a card holds: the key, its signing subkeys and the user IDs you choose. |
| 422 | key_revoked | The OpenPGP key carries a revocation signature. A revoked key can’t go on a card. Bring a key you still use. |
| 422 | key_unsupported | A key type Veil does not hold: SSH keys on a security key (sk-…), ECDSA P-521, SSH certificates, an OpenPGP key other than version 4, or an OpenPGP algorithm other than RSA, ECDSA P-256 or P-384 and Ed25519. Use one of the listed types: ssh-ed25519, ssh-ecdsa-p256, ssh-ecdsa-p384, ssh-rsa, pgp, minisign, ed25519, ml-dsa-44, ml-dsa-65, ml-dsa-87. |
| 422 | key_weak | RSA under 2048 bits or DSA, in SSH or in OpenPGP, an Ed25519 point of small order, or an RSA signature made with SHA-1 (ssh-rsa). Bring a stronger key. ssh-keygen -Y sign signs RSA with rsa-sha2-512 by default. |
| 422 | keys_limit | On a format 2 log, the version would leave a person with more than 64 active keys. Revoke a key first. A revocation in the same version also frees a place. |
| 422 | label_mismatch | The label’s prev, body, auth or state is not what the chain, the body and the operations give. Read the card again, plan the operations on its current state and sign the new label. |
| 422 | last_owner | The change would leave an organisation without an accepted owner. Add or accept another owner before removing the last one. |
| 422 | links_need_verification | A new account link has no acceptable verification grant. Complete the account proof before publishing its link. |
| 422 | membership_needs_grant | An organisation membership lacks its acceptance grant. Accept the invitation and include its grant in the next signed version. |
| 422 | not_a_person | The card is an organisation where a person is required. Use the organisation endpoint or an eligible person’s card. |
| 422 | private_key_material | A text in an addExternalKey operation holds private key material: a PEM or OpenSSH private key, a PGP private block or secret key packet, a minisign secret key, a 64-byte Ed25519 secret key, or an ML-DSA seed or secret key. Nothing is stored and the answer never repeats the text. Treat that key as exposed and replace it. Send only the public key and the signature of the challenge. |
| 422 | proof_anchor | The quoted checkpoint is not from this log, lacks the log’s signature or the quorum of cosignatures, or its root is not the log’s root at that size. Quote the cosigned checkpoint note as the card gives it in index.checkpoint.note, whole. |
| 422 | proof_invalid | The challenge names another device key than the one signing the version, or the signature is not the key’s signature of the challenge for this card. The message names the cause: another key, another SSH namespace, a hash that doesn’t count, the challenge saved as UTF-16 or with an empty line after it, other text, or a form other than the one proof.variant names. Sign the exact challenge bytes again from the browser that publishes the version: with namespace veil for SSH, as a detached or clear-signed signature of the file for OpenPGP. A copy saved on Windows (CRLF, a UTF-8 BOM, no final line feed) counts when proof.variant names its form. |
| 422 | proof_stale | The checkpoint quoted by the challenge was cosigned more than 7 days ago, or the stated time at is older than 7 days or ahead of the server’s clock. Make a new challenge from the card’s latest checkpoint and sign it again. |
| 502 | log_mismatch | The log response did not match the expected signed entry or proof. Do not accept the publication as verified. Check the card and log before retrying. |
| 503 | log_unavailable | The public log cannot currently be read, verified or used for publication. For reads, keep the result unverified and try later. Before retrying a write, read the card to check whether publication completed. |
Shared request errors
| HTTP | Code | Meaning and next step |
|---|---|---|
| 400 | invalid_nonce | The signed-request nonce has an invalid format. Generate a fresh 16 to 128-character nonce using letters, digits, _ or -. |
| 400 | invalid_signature_alg |
Use a supported signing algorithm and matching key/signature encoding. |
| 400 | invalid_timestamp | The signed-request timestamp is not Unix milliseconds. Use an integer Unix timestamp in milliseconds and sign the corrected request. |
| 401 | invalid_signature | The HTTP request signature does not verify. Sign the exact method, path and body bytes, without changing them afterwards. |
| 401 | missing_signature | The request requires a device signature and its headers are missing or unreadable. Send |
| 401 | stale_timestamp | The signed timestamp is outside the accepted clock window. Compare the server Date header with your clock, then generate a fresh nonce, timestamp and signature. |
| 403 | key_banned | The device signing key is suspended by Veil staff. Use an authorised active key or ask staff to review the restriction. |
| 409 | replayed_nonce | The signing key already used this nonce. Check whether the previous request succeeded before making a fresh signed request. |
| 429 | rate_limited | An anonymous, signed-request or API-key allowance was exceeded. Wait at least |
| 500 | internal_error | An unexpected server error occurred. Internal details are not returned. Retry reads with bounded backoff. Check write results before sending a new signed operation. |
| 503 | busy | The application has reached a temporary concurrency or database limit. Wait |