Skip to main content
DELETE
/
users
/
@me
/
relationships
/
{userId}
Delete relationship
curl --request DELETE \
  --url https://api.example.com/users/@me/relationships/{userId} \
  --header 'Authorization: <authorization>'
{
  "400": {},
  "401": {}
}
Deletes an active friendship, cancels an outgoing friend request, or rejects an incoming friend request.

Path parameters

userId
string
required
The unique identifier (ID) of the user whose relationship you want to delete

Authorization

Authorization
string
required
JWT token for authentication. Must be provided in the format: Bearer <token>

Response

Returns a 204 No Content status code on successful deletion. No response body is returned.

Error codes

400
Bad Request
The relationship does not exist.RelationshipDoesNotExistException
{
  "message": "You do not currently have an outgoing, incoming, or active relationship with \"username\""
}
You attempted to delete a relationship that doesn’t exist.
401
Unauthorized
Authorization token was not provided or is invalid.
{
  "message": "Unauthorized"
}

Example request

curl -X DELETE "http://localhost:8080/users/@me/relationships/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer your-jwt-token"

Example response

On success, the endpoint returns a 204 No Content status with no response body.

Use cases

Delete an accepted friendship

Remove a user from your friends list by providing their user ID.

Cancel an outgoing friend request

Cancel a pending friend request you sent to another user.

Reject an incoming friend request

Decline a friend request from another user.

Build docs developers (and LLMs) love