Skip to content

Replies

The Replies API allows querying replies associated with specific contracts and parent IDs, as well as retrieving summaries of reply counts and user participation.

POST /api/v1/reply/summary

Description: Retrieves a summary of replies for specific target contracts and parent IDs, including the total count and whether the current user has participated in the discussion.

Authentication Required: No

Name Type Required Description
targetContract string Yes Ethereum address of the target contract
parentIds array Yes Array of parent IDs to fetch reply summaries for
currentUserProfileId integer or null No Profile ID of the current user to check for participation

Code: 200 OK

{
"ok": true,
"data": {
"0x2820b3aB3543ADB80810f11F2651f0DD9A04E801": {
"1": {
"count": 0,
"participated": false
}
}
}
}
Property Type Description
ok boolean Success status
data object Map of target contracts to parent IDs to reply summaries
data[targetContract] object Map of parent IDs to reply summaries for a specific target contract
data[targetContract][parentId] object Reply summary for a specific parent ID
data[targetContract][parentId].count integer Total number of replies
data[targetContract][parentId].participated boolean Whether the current user has participated in the discussion

Code: 400 Bad Request

{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"fields": [
{
"code": "invalid_type",
"expected": "number",
"message": "Expected number, received nan",
"path": ["currentUserProfileId"],
"received": "nan"
}
]
}
}
Terminal window
http POST "https://api.ethos.network/api/v1/reply/summary" \
targetContract=0x2820b3aB3543ADB80810f11F2651f0DD9A04E801 \
parentIds:='[1]' \
currentUserProfileId:=null
  • The reply summary endpoint provides an efficient way to get the total number of replies and participation status without fetching all the individual replies.
  • The structure of the response allows querying multiple target contracts and parent IDs in a single request.
  • When currentUserProfileId is null, the participated field will always be false.