Overview
POST/friends/requests/{id}/acceptfriends

Accept a pending friend request (addressee only)

Create a record in accept.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • idpathstring
Responses
200

The accepted 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}/accept" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/friends/requests/{id}/accept", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  },
});
const data = await res.json();