{"revision":"0ed62d2c742f8e20","language":"en","entry":{"id":"card-alerts","kind":"endpoint","group":"cards","title":"Read a card’s account alerts","method":"GET","path":"/v1/identities/{n}/alerts","paths":[],"summary":"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.","response":"card, inForce (the alerts in force, newest first) and alerts (all of them).","parameters":[{"name":"n","description":"Permanent positive card number.","in":"path","required":true}],"sample":"/v1/identities/1/alerts","access":"public","base":"directory","notes":[],"errors":["400 invalid_parameter","400 wrong_format","401 invalid_api_key","403 api_key_scope","403 api_key_suspended","403 developer_suspended","404 not_found","410 erased","429 rate_limited","500 internal_error","503 busy"],"related":["publish-alert","lookup","person-card"],"sections":[{"kind":"code","language":"shell","code":"curl -fsS 'https://veil.rip/v1/identities/1/alerts'"}],"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.","live":false,"responses":[{"status":200,"contentType":"application/json","description":"The card’s alerts.","fields":[{"name":"card","type":"object","description":"n, type, name, token and url of the card."},{"name":"inForce","type":"array<object>","description":"The alerts in force, one per account (the latest unless it is regained)."},{"name":"alerts","type":"array<object>","description":"Every alert of the card in the log, newest first, at most 200."}]}],"responseObjects":[{"id":"card-alert","title":"Alert","fields":[{"name":"id","type":"integer","description":"The entry’s position in the log: the statement’s permanent id."},{"name":"kind","type":"string","description":"statement or alert."},{"name":"n","type":"integer","description":"The card the statement is by."},{"name":"signer","type":"object","description":"n and token of the person card whose key signed: the card itself, or an owner or admin of an organisation."},{"name":"statement","type":"string","description":"The statement as signed, canonical JSON. Its fields are repeated below for display."},{"name":"salt","type":"string","description":"32 bytes in hex: c of the entry is SHA-256(salt ‖ statement)."},{"name":"entry","type":"string","description":"The log entry with its signature, as the log holds it."},{"name":"i","type":"integer","description":"The entry’s position in the log (the same as id)."},{"name":"publishedAt","type":"string | null","description":"The earliest cosignature on the first checkpoint holding the entry."},{"name":"checkpoint","type":"object | null","description":"size and note of the cosigned checkpoint that dates the entry. Null when the log could not be read."},{"name":"inclusion","type":"array<string> | null","description":"The entry’s RFC 6962 inclusion proof in that checkpoint, hex, deepest first."},{"name":"platform","type":"string","description":"The platform of the account."},{"name":"subject","type":"string","description":"The account’s stable id, as GET /v1/lookup takes it."},{"name":"display","type":"string","description":"The handle the card shows for it."},{"name":"state","type":"string","description":"stolen, abandoned, moved or regained."},{"name":"since","type":"string | null","description":"For stolen: the date it was stolen, YYYY-MM-DD."},{"name":"to","type":"object | null","description":"For moved: handle, and subject when the new account is linked to the card."},{"name":"logIndex","type":"integer","description":"The entry’s position in the log."}]}],"errorFormat":"json","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-cache","description":"Ask again each time: a new statement or alert shows at once."}],"errorDetails":[{"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":"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_api_key","description":"The bearer credential is malformed, unknown, expired or revoked.","action":"Use an active key. To use anonymous public access, remove `Authorization` entirely. Invalid credentials never fall back automatically.","scope":"apiKey"},{"status":403,"code":"api_key_scope","description":"The API key lacks read or verify scope, or the endpoint does not accept bearer keys.","action":"Use the correct scope. Identity writes and key management still require a device signature.","scope":"apiKey"},{"status":403,"code":"api_key_suspended","description":"This API key is suspended.","action":"Ask staff to restore it; another key cannot lift an account suspension.","scope":"apiKey"},{"status":403,"code":"developer_suspended","description":"The owner’s API account is suspended or the owner card is unavailable.","action":"Check the owner account and any staff restriction. Creating another key does not bypass suspension.","scope":"apiKey"},{"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":410,"code":"erased","description":"The card existed and was erased or removed. The response also carries its public erasure receipt.","action":"Stop using this card as current authority. Retain only the public receipt if needed.","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":"common"},{"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":"common"},{"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":"common"}],"documentationUrl":"https://veil.rip/docs/card-alerts","supportsBrowserFetch":true,"browserMode":"fetch"}}