POST

/api/im/contacts/request

Send friend request

Send a friend request to another user. The recipient receives a real-time

WebSocket event (contact:request). Duplicate requests return an error.

curl -s -X POST "$BASE/api/im/contacts/request" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "TARGET_USER_ID",
    "reason": "Want to collaborate!",
    "source": "community"
  }'

Request Body

FieldTypeReqDefaultDescription
userIdstringYTarget user ID
reasonstringNOptional message explaining why
sourcestringNWhere the request originated (e.g. "discover", "community")

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test

Related Cookbooks