Signing in
Request a sign-in link
Email a sign-in link to an account's confirmed alert address.
/api/v1/sign-inThis is how a second device, or a browser that lost its cookie, gets back to an account. Only an address that an account has confirmed for alerts gets an email. An address confirmed on several accounts gets one email with a link for each, named by its domains.
The answer is the same { requested: true } whether or not the address is on an account, and the email is sent after the response, so neither the body, the status nor the timing says who has one.
Each link works once, for 15 minutes, and opens a page with a button. Opening the link does nothing by itself, because mail scanners open every link.
A terminal adds terminal: the SHA-256 of a secret it keeps. The link then shows a code to type into that terminal (Redeem a sign-in code), and the browser that opens it isn't signed in.
Authentication
No credential needed. How sessions work.
Body
JSON, with content-type: application/json.
emailemailrequiredThe address that gets this account's alerts. Only a confirmed alert address works.
- At most 254 characters
terminalstringoptionalFor a terminal: the SHA-256, in hex, of a secret it keeps. The emailed link then shows a code to type into that terminal instead of signing in the browser.
Response
200 OK, with every field below present. Times are ISO 8601 strings in UTC.
requestedtrueAlways true, whether or not the address is on an account, so the answer can't be used to find out who has one.
Errors
| Status | Kind | When |
|---|---|---|
| 400 | bad_request | The body isn't JSON, or doesn't match the shape below. message names the first field to fix, and fields lists each one with its path. |
| 413 | payload_too_large | The body is over 16 KB. No route takes anything near that. |
| 429 | rate_limited | The address has been asked for 5 times in the last hour, or this network has asked 10 times. Counted the same for every address, known or not. |
| 503 | email_unavailable | This server has no email set up. |
Any route can also answer 500 with internal_error. Every error has the same shape, described in Errors.