{"revision":"0ed62d2c742f8e20","language":"en","entry":{"id":"notices-unsubscribe","kind":"endpoint","group":"manage","title":"Stop the email notices from an email’s link","method":"POST","path":"/v1/notices/unsubscribe","paths":[],"summary":"Opts a card out with the token of its emails’ stop link, without a key: n and t in the query (a mail program’s one-click POST, RFC 8058) or {\"n\", \"token\"} in the body.","response":"The card’s number and on: false.","parameters":[{"name":"n","description":"Card number.","in":"query","required":true},{"name":"t","description":"The token of the stop link.","in":"query","required":true}],"sample":"/v1/notices/unsubscribe?n=CARD_NUMBER&t=TOKEN","access":"public-write","base":"directory","notes":["The token is the server’s Ed25519 signature for the card’s number, so it works only for that card. The emails link to the page /notices/stop with the number and the token after the #, so they never reach a log; opening that page changes nothing until the person presses the button."],"errors":["400 invalid_parameter","403 invalid_token","429 rate_limited","500 internal_error","503 busy"],"related":[],"sections":[{"kind":"code","language":"shell","code":"curl -fsS -X POST \"https://veil.rip/v1/notices/unsubscribe?n=CARD_NUMBER&t=TOKEN\""}],"live":false,"responses":[{"status":200,"contentType":"application/json","description":"The card’s number and on: false.","fields":[{"name":"n","type":"integer","description":"Card number."},{"name":"on","type":"boolean","description":"Always false."}]}],"responseObjects":[],"errorFormat":"json","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":403,"code":"invalid_token","description":"The stop link’s token is not the server’s signature for this card.","action":"Copy the whole link from the email, or opt out from the account page.","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"}],"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":"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.rip/docs/notices-unsubscribe","supportsBrowserFetch":false,"browserMode":"local-or-server"}}