/v1/auth/login
Log in
Authenticate and set a session cookie on the response. Send "email", or send "username" — which takes a name or an address, as the sign-in form does. At least one is required; if both are sent, "username" is the one used. Failures answer 401 for bad credentials, 422 for a body the validator refused, or 403 with a code of account_banned or account_suspended.
{ "email": "user@example.com", "password": "secret" }
{ "success": true, "user": { "id": "…", "username": "alice", "role": "user" }, "redirectTo": "/home" }
05 / Social
Social
Friends, followers, and the wall.
/v1/friendsList friendsEvery accepted friendship for the current account.
{ "success": true, "friends": [{ "id": "…", "username": "bob" }] }/v1/friendsSend requestOpen a friend request to another account.
{ "addresseeId": 123 }{ "success": true, "friendship": { "status": "pending" } }/v1/friends/respondRespond to requestAccept or decline an incoming request.
{ "friendshipId": "…", "action": "accept" }{ "success": true }/v1/followersFollowersAccounts following the current user.
{ "success": true, "followers": [{ "username": "…" }], "total": 42 }/v1/followFollowFollow another account.
{ "followingId": 123 }{ "success": true }/wallWall postsPublic wall posts, paginated.
Parameters
pageoptional page number, default 1{ "success": true, "posts": [{ "id": "…", "content": "Hello world", "username": "alice" }] }/wallCreate wall postPost to the public wall. Requires authentication.
{ "content": "Hello, world!" }{ "success": true, "post": { "id": "…" } }