Xsolla-logo

Update user’s friends

post/users/me/relationships

Updates the friend list of the authenticated user.

SecurityBearer
Request
Request Body schema: application/json
action
string

Type of the action. Can be:

  • friend_request_add to send a friend request,
  • friend_request_cancel to cancel the friend request that was sent,
  • friend_request_approve to confirm the friend request,
  • friend_request_deny to cancel the friend request that was received,
  • friend_remove to delete the user from the friend list,
  • block to block the user,
  • unblock to unblock the user.
Enum: "friend_request_add" "friend_request_cancel" "friend_request_approve" "friend_request_deny" "friend_remove" "block" "unblock"
user
string <uuid>

ID of the user to change relationship with.

Responses
204

No Content

400

Bad Request

401

Forbidden

403

Forbidden

404

Not Found

Request samples
application/json
{
  • "action": "friend_request_add",
  • "user": "00000000-0000-0000-0000-000000000000"
}
Response samples
application/json
{
  • "error": {
    }
}