Users - Login
Authenticate a user and generate a JWT token.
POST /users/login
Request Body |
{ |
Success Response |
HTTP/1.1 200 OK { "user": { // User object properties, "token": "xxxxxxxxxxxxxxxxxxxx" } } |
Error Response |
HTTP/1.1 401 Unauthorized |
Users - Logout
Sign out a user.
POST /users/logout
Request Headers |
Authorization: Bearer <token> |
Success Response |
HTTP/1.1 204 No Content {} |
Users - Your Profile - Get
Retrieve the profile of the authenticated user.
GET /users
Request Headers |
Authorization: Bearer <token> |
Success Response |
HTTP/1.1 200 OK { "user": { // User profile object } } |
Error Response |
HTTP/1.1 401 Unauthorized { // Error details } |
Users - Your Profile - Replace
Update the profile of the authenticated user.
PUT /users
Request Headers |
Authorization: Bearer <token> |
Request Body |
{ "user": { "name": "John Doe", "company": "Acme Corporation" } } |
Success Response |
HTTP/1.1 200 OK { "user": { // Updated user profile object } } |
Error Response |
HTTP/1.1 401 Unauthorized { // Error details } |
Users - Your Profile - Partial Update
Update specific fields of the authenticated user's profile.
PATCH /users
Request Headers |
Authorization: Bearer <token> |
Request Body |
{ "user": { "name": "John Doe", "company": "Acme Corporation" } } |
Success Response |
HTTP/1.1 200 OK { "user": { // Updated user profile object } } |
Error Response |
HTTP/1.1 401 Unauthorized { // Error details } |
โ