veil

Read a card’s account alerts

The alerts in force on the card’s accounts, one per account, and every alert in the log, each with what a client checks it with.

GET/v1/identities/{n}/alerts
Access
Public; API key optional
Client
Browser fetch supported

Parameters#

NameLocationMeaning
nRequiredPathPermanent positive card number.

Request examples#

cURL
curl -fsS 'https://veil.rip/v1/identities/1/alerts'

Response#

HTTP 200application/json

The card’s alerts.

FieldTypeMeaning
cardobjectn, type, name, token and url of the card.
inForcearray<object>The alerts in force, one per account (the latest unless it is regained).
alertsarray<object>Every alert of the card in the log, newest first, at most 200.

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.

Alert
FieldTypeMeaning
idintegerThe entry’s position in the log: the statement’s permanent id.
kindstringstatement or alert.
nintegerThe card the statement is by.
signerobjectn and token of the person card whose key signed: the card itself, or an owner or admin of an organisation.
statementstringThe statement as signed, canonical JSON. Its fields are repeated below for display.
saltstring32 bytes in hex: c of the entry is SHA-256(salt ‖ statement).
entrystringThe log entry with its signature, as the log holds it.
iintegerThe entry’s position in the log (the same as id).
publishedAtstring | nullThe earliest cosignature on the first checkpoint holding the entry.
checkpointobject | nullsize and note of the cosigned checkpoint that dates the entry. Null when the log could not be read.
inclusionarray<string> | nullThe entry’s RFC 6962 inclusion proof in that checkpoint, hex, deepest first.
platformstringThe platform of the account.
subjectstringThe account’s stable id, as GET /v1/lookup takes it.
displaystringThe handle the card shows for it.
statestringstolen, abandoned, moved or regained.
sincestring | nullFor stolen: the date it was stolen, YYYY-MM-DD.
toobject | nullFor moved: handle, and subject when the new account is linked to the card.
logIndexintegerThe entry’s position in the log.

Response headers#

HeaderValueMeaning
Content-Typeapplication/jsonUse the declared media type before choosing a parser.
DateHTTP dateServer time. Compare it with your clock when signing requests.
Cache-Controlno-cacheAsk again each time: a new statement or alert shows at once.

What to verify#

Check each item before you show it as the card’s: canonical statement, c = SHA-256(salt ‖ statement), the entry’s signature over "veil-rubrica:card-entry:v2\n" and the entry without signature, with a key active for the signer at position i (from the signer’s authority versions), and the inclusion in a checkpoint signed by the log and cosigned by a quorum. The list itself is the server’s word: it can leave out an entry.

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

HTTPCodeMeaning and next step
400invalid_parameter

A path, query or body field is missing, malformed or outside its accepted range.

Correct the field named in error.message before sending again.

400wrong_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 format in GET /v1/log (absent means 1) and send the shape of that format.

404not_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.

410erased

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.

Shared request errors
HTTPCodeMeaning and next step
429rate_limited

An anonymous, signed-request or API-key allowance was exceeded.

Wait at least Retry-After seconds. Share a queue and retry budget across your workers.

500internal_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.

503busy

The application has reached a temporary concurrency or database limit.

Wait Retry-After seconds and retry with bounded backoff.