API Reference
Authentication
Email+password sign-in/sign-up, magic link authentication, and session management.
POST
Creates a new user account with email and password.
application/json- body
email*stringFormat
emailpassword*stringLength
8 <= lengthname*stringUser created and session started
application/json- response
user?session?curl -X POST 'https://example.com/api/auth/sign-up/email' \ -H 'Content-Type: application/json' \ -d '{ "email": "user@example.com", "password": "stringst", "name": "string"}'Example Response200
{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}POST
Authenticates a user with email and password, starting a new session.
application/json- body
email*stringFormat
emailpassword*stringSession started
application/json- response
user?session?curl -X POST 'https://example.com/api/auth/sign-in/email' \ -H 'Content-Type: application/json' \ -d '{ "email": "user@example.com", "password": "string"}'Example Response200
{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}POST
Ends the current session.
Session ended
application/json- response
status?booleancurl -X POST 'https://example.com/api/auth/sign-out'Example Response200
{ "status": true}GET
Returns the current session and user information if authenticated.
Current session data
application/json- response
user?session?curl -X GET 'https://example.com/api/auth/get-session'Example Response200
{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}