Request friend

Prev Next

Available in Classic and VPC

Send a friend request to another user. The user who receives the request can view the request history via notifications.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /v1/api/friendship/request

Request headers

For information about the headers common to all Ncloud Chat APIs, see Ncloud Chat request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
userId String Required User ID
friendId String Required Friend ID
message String Optional Friend request message

Request example

The request example is as follows:

curl --location --request POST 'https://dashboard-api.ncloudchat.naverncp.com/v1/api/friendship/request' \
--header 'x-api-key: {API Key}' \
--header 'x-project-id: {Project ID}' \
--header 'Content-Type: application/json' \
--data '{
            "userId": "guestID2",
            "friendId": "user_5",
            "message": "You are requested."
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
data.requestFriend.friendship Object - Friend request information
data.requestFriend.friendship.project_id String - Project ID
data.requestFriend.friendship.id String - Unique ID
data.requestFriend.friendship.status String - Request progress status
data.requestFriend.friendship.user_id String - User ID
data.requestFriend.friendship.user Object - User information
data.requestFriend.friendship.user.id String - User ID
data.requestFriend.friendship.user.name String - User name
data.requestFriend.friendship.user.profile String - User profile image
data.requestFriend.friendship.friend Object - Friend information
data.requestFriend.friendship.friend.id String - Friend ID
data.requestFriend.friendship.friend.name String - Friend name
data.requestFriend.friendship.friend.profile String - Friend profile image
data.requestFriend.friendship.friend_id String - Friend ID
data.requestFriend.friendship.created_at String - Creation date and time
  • ISO 8601 format
data.requestFriend.friendship.updated_at String - Information modification date and time
  • ISO 8601 format
data.requestFriend.friendship.requested_at String - Friend request date and time
  • ISO 8601 format

Response status codes

For information about the HTTP status codes common to all Ncloud Chat APIs, see Common Ncloud Chat response status codes.

Response example

The response example is as follows:

{
    "data": {
        "requestFriend": {
            "friendship": {
                "project_id": "8be54b8b-*****-****-****-84c0d5df2e9c",
                "id": "58478769-****-****-****-8cff6c4a5d75",
                "status": "requested",
                "user_id": "d71157d7-****-****-****-3c4cd4fef46e",
                "user": {
                    "id": "TWVtYmVy****************************************ZDRmZWY0NmU=",
                    "name": "Admin",
                    "profile": ""
                },
                "friend": {
                    "id": "TWVt**********VyXzU=",
                    "name": "a",
                    "profile": ""
                },
                "friend_id": "user_5",
                "created_at": null,
                "updated_at": null,
                "requested_at": "2025-07-24T13:58:23+09:00"
            }
        }
    }
}