API Reference
Authentication
Email+password sign-in/sign-up, magic link authentication, and session management.
Creates a new user account with email and password.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
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" }'{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}Authenticates a user with email and password, starting a new session.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/auth/sign-in/email" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "string" }'{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}curl -X POST "https://example.com/api/auth/sign-out"{ "status": true}curl -X GET "https://example.com/api/auth/get-session"{ "user": { "id": "string", "email": "user@example.com", "name": "string", "emailVerified": true }, "session": { "id": "string", "expiresAt": "2019-08-24T14:15:22Z" }}