Sign in
Sign up and sign in with a one-time code emailed to you, typed into the terminal. No web page.
Send code
https://api.akter.dev/v1/sign-in/codesEmail a six-digit sign-in code, or a recovery code with purpose recovery. It works once for 10 minutes, and a newer code replaces it.
Request bodySendCode
emailstringrequiredAn email address, such as ada@example.com.
purpose"signIn" | "recovery"signIn emails a code that signs in, creating the account the first time; recovery emails the same kind of code worded for someone who lost their session.
Response 202CodeSent
emailstringrequiredAn email address, such as ada@example.com.
expiresAtstringrequired
Errors
429RateLimitedError
Verify code
https://api.akter.dev/v1/sign-in/sessionsTurn an emailed code into a session, creating the account on its first sign-in. Creating one needs acceptedTerms, the current version of the terms of service and privacy notice; without it the answer is TermsNotAcceptedError with that version, and the code still works. The session's secret is shown once; endOtherSessions signs every other session out.
Request bodyVerifyCode
acceptedTermsstringThe version of the terms of service and privacy notice the person accepted, as the
version:line ofakter docs legal/terms. Required when the code creates an account.codestringrequiredThe 6-digit code from the email.
emailstringrequiredAn email address, such as ada@example.com.
endOtherSessionsbooleanAlso revoke every other session of the account, as a recovery does after a lost machine.
Response 201SignedIn
accountAccountrequiredaccount.acceptedTermsAcceptedTermsThe terms of service and privacy notice the account accepted at sign-up, and when. Accounts made before sign-up asked have none.
account.acceptedTerms.acceptedAtstringrequiredaccount.acceptedTerms.versionstringrequiredThe version of the terms of service and privacy notice, as their
version:line.account.createdAtstringrequiredaccount.emailstringrequiredAn email address, such as ada@example.com.
account.idstringrequiredAn opaque id that starts with usr_.
createdbooleanrequiredtrue when this code created the account.
secretstringrequiredThe session's bearer secret, as_ and 32 characters. Exchange it at POST /v1/tokens. It is returned once and never again.
sessionSessionrequiredsession.createdAtstringrequiredsession.expiresAtstringrequiredsession.idstringrequiredAn opaque id that starts with ses_.
Errors
401CodeRejectedError422TermsNotAcceptedError429RateLimitedError