Friend Events
FRIEND_REQUEST_CREATE
EVENT
FRIEND_REQUEST_CREATESent when a friend request is sent: to the recipient, and to the sender's sessions so they can add it to their sent requests. Compare sender_id with your own ID to tell which one you are.
| Field | Type | Description |
|---|---|---|
id | string | Friend request ID |
sender_id | string | ID of the user who sent the request |
username | string | Username of the sender |
alias | string? | Display name of the sender |
avatar | string? | Avatar attachment ID of the sender |
{
"type": "FRIEND_REQUEST_CREATE",
"data": {
"id": "019cf96a-f1b5-72c5-830f-75e85355db00",
"sender_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
"username": "MARCROCK22",
"alias": null,
"avatar": "9bd6da82-c850-424b-89a0-9e4733263a45"
}
}FRIEND_REQUEST_ACCEPT
EVENT
FRIEND_REQUEST_ACCEPTSent when a friend request is accepted and a new friendship is established: to the user who sent the request, and to the sessions of the user who accepted it (that request also returns the new Friend object).
| Field | Type | Description |
|---|---|---|
id | string | Friendship ID |
request_id | string | Original friend request ID |
sender_id | string | ID of the user who sent the original request |
recipient_id | string | ID of the user who accepted the request |
user ? | User | The other party in the friendship, from the receiver's side: the user who accepted for the sender, the sender for the user who accepted |
{
"type": "FRIEND_REQUEST_ACCEPT",
"data": {
"id": "019cf96a-02c6-72c5-830f-75e85355dc00",
"request_id": "019cf96a-f1b5-72c5-830f-75e85355db00",
"sender_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
"recipient_id": "019cf96a-13d7-72c5-830f-75e85355dd00",
"user": {
"id": "019cf96a-13d7-72c5-830f-75e85355dd00",
"username": "MARCROCK22",
"alias": null,
"avatar": "9bd6da82-c850-424b-89a0-9e4733263a45",
"banner": null,
"custom": "",
"flags": 1,
"badges": 1,
"is_bot": false,
"email_verified": true,
"created_at": "2025-10-30T00:22:21.000Z",
"updated_at": "2026-04-06T12:00:00.000Z",
"deleted_at": null
}
}
}FRIEND_REQUEST_REJECT
EVENT
FRIEND_REQUEST_REJECTSent to both the sender and the recipient when a friend request ends without a friendship: the recipient rejected it or the sender cancelled it.
| Field | Type | Description |
|---|---|---|
id | string | Friend request ID |
{
"type": "FRIEND_REQUEST_REJECT",
"data": {
"id": "019cf96a-f1b5-72c5-830f-75e85355db00"
}
}FRIEND_REMOVE
EVENT
FRIEND_REMOVESent to both users when a friendship is removed: to the removed friend, and to the sessions of the user who removed it.
| Field | Type | Description |
|---|---|---|
user_id | string | ID of the other user in the friendship, from the receiver's side: the one who removed it for the removed friend, the removed friend for the one who removed it |
{
"type": "FRIEND_REMOVE",
"data": {
"user_id": "019cf96a-3d5b-72c5-830f-75e85355d078"
}
}