API ReferenceFriends
Deny a friend request
Rejects a pending incoming friend request from the specified user. The request is rejected and no friendship is created.
Triggers the friend:denied ws event to the target user.
Path Parameters
username*string
Header Parameters
Response Body
application/json
curl -X POST "https://example.com/api/me/friend-requests/string/deny"{ "success": true, "data": { "id": 1, "createdAt": "2024-01-01T12:00:00Z", "fromId": "123e4567-e89b-12d3-a456-426614174000", "toId": "987e6543-e21b-34d5-a678-426614174000", "status": "pending", "from": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "John Doe", "username": "johndoe", "createdAt": "2024-01-01T12:00:00Z", "updatedAt": "2024-01-01T12:00:00Z", "botOwnerId": null, "rating": 1200, "rd": 350, "vol": 0.06 }, "to": { "id": "987e6543-e21b-34d5-a678-426614174000", "name": "Jane Doe", "username": "janedoe", "createdAt": "2024-01-01T12:00:00Z", "updatedAt": "2024-01-01T12:00:00Z", "botOwnerId": null, "rating": 1200, "rd": 350, "vol": 0.06 } }}Accept a friend request POST
Accepts a pending incoming friend request from the specified user. This creates a friendship between both accounts. Triggers the `friend:accepted` ws event to the target user.
Send a friend request POST
Sends a friend request to a target user by their username. It stays pending until the target user either accepts or denies it. Triggers the `friend:request` ws event to the target user.