Skip to main content
PUT
/
api
/
friends
/
{friendshipId}
Update friendship status
curl --request PUT \
  --url https://serengo.zias.be/api/friends/{friendshipId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "accept"
}
'
{
  "id": "<string>",
  "requesterId": "<string>",
  "addresseeId": "<string>",
  "status": "pending",
  "requester": {
    "id": "<string>",
    "username": "<string>",
    "profilePicture": "<string>"
  },
  "addressee": {
    "id": "<string>",
    "username": "<string>",
    "profilePicture": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

friendshipId
string
required

Body

application/json
action
enum<string>
required
Available options:
accept,
decline,
block

Response

200 - application/json

Friendship updated

id
string
requesterId
string
addresseeId
string
status
enum<string>
Available options:
pending,
accepted,
blocked
requester
object
addressee
object