GET /users
X-API-Key: sk_live_abc123xyz456GET /users/usr_123
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...GET /users
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=GET /users
Authorization: Bearer <access_token>JWT Authentication (or Bearer Token)JWT (this is optional but adds clarity)PUT /users/{id})GET /users/{id} β View user profile (should only see your own or have permission)PUT /users/{id} β Update user data (must be the user or admin)DELETE /users/{id} β Delete user account (must be the user or admin)POST /user/logout β Logout (must be logged in)POST /users β Create user (signup is public)POST /user/login β Login (can't be authenticated before logging in!)POST /user/login is specialβit doesn't require auth, but it returns a token.GET /users/{id}:PUT /users/{id}:DELETE /users/{id}:POST /user/logout:POST /users (Create user):POST /user/login:POST /user/login endpoint{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "2024-12-31T23:59:59Z",
"user": {
"id": "usr_3Oy2JIS7TMJgEXfM",
"email": "jane.smith@example.com",
"firstName": "Jane",
"lastName": "Smith"
}
}token (string, required) β The JWT tokenexpiresAt (string, date-time, required) β When the token expiresuser (object, optional) β User information