Overview
POST
/friends/requests/{id}/declinefriendsDecline a pending friend request (addressee only)
Create a record in decline.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- idpathstring
Responses
200
The declined friendship
- idstring
- ecosystemIdstring
- requesterIdstring
- addresseeIdstring
- status"pending" | "accepted" | "declined"
- createdAtstring
- updatedAtstring
Example
{
"id": "string",
"ecosystemId": "string",
"requesterId": "string",
"addresseeId": "string",
"status": "pending",
"createdAt": "string",
"updatedAt": "string"
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}403
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}409
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/friends/requests/{id}/decline" \
-H "Authorization: Bearer YOUR_TOKEN"JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/friends/requests/{id}/decline", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
},
});
const data = await res.json();