Activities
Overview
The Activities API allows you to access various types of user activities on the Ethos network, including vouches, reviews, attestations, slashes, invitations, and more. It provides endpoints for querying individual activities, bulk activities, activity actors, and activity votes.
Endpoints
Get Activity by Type and ID
Description: Retrieves a specific activity by its type and ID. The ID can be either an activity ID or a transaction hash for on-chain activities.
Authentication Required: No
Parameters
Path Parameters
type
string
Yes
Type of activity ('review', 'vouch', 'slash', 'attestation', 'invitation-accepted', 'unvouch', 'open-slash', 'closed-slash')
id
string
Yes
Activity ID or transaction hash
Query Parameters
currentUserProfileId
number
No
Optional profile ID of the requesting user for personalized data
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
Activity data
data.id
number
Activity ID
data.type
string
Activity type
data.timestamp
number
Unix timestamp of when the activity occurred
data.metadata
object
Activity metadata
data.metadata.author
object
Information about the author of the activity
data.metadata.subject
object
Information about the subject of the activity (if applicable)
data.metadata.message
string
Activity message (if applicable)
data.metadata.archived
boolean
Whether the activity is archived
data.metadata.voterProfileId
number
Profile ID of the voter (if the activity is a vote)
data.metadata.voteDirection
string
Direction of the vote (if the activity is a vote)
data.sortWeight
number
Weight used for sorting (usually same as timestamp)
Error Responses
Code: 404 Not Found
Code: 400 Bad Request
Code: 500 Internal Server Error
Example
Request
Response
Notes
If a transaction hash is provided as the ID, the API will first process the blockchain event and then retrieve the corresponding activity.
Only review, vouch, and slash activities are currently supported for transaction hash lookups.
Ethos credibility scores range from 0-2800 and are categorized into levels:
Untrusted: 0-799
Questionable: 800-1199
Neutral: 1200-1599
Reputable: 1600-1999
Exemplary: 2000-2800
The response structure may vary slightly depending on the activity type, with different fields in the data object.
The currentUserProfileId query parameter can be used to personalize certain aspects of the response, such as whether the current user has voted or participated in replies.
Get Actor by Userkey
Description: Retrieves actor information for a given userkey. Actors represent users in the context of activities.
Authentication Required: No
Parameters
Path Parameters
userkey
string
Yes
The userkey for the actor (e.g., "profileId:123", "address:0x1234...")
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
Actor data
data.userkey
string
The userkey for the actor
data.avatar
string
URL to the actor's avatar
data.name
string
Actor's display name
data.username
string
Actor's username
data.description
string
Actor's description
data.score
number
Actor's credibility score (0-2800 range)
data.scoreXpMultiplier
number
Actor's score XP multiplier
data.profileId
number
Actor's profile ID
data.primaryAddress
string
Actor's primary Ethereum address
Example
Request
Response
Notes
The API supports three userkey formats: profileId-based (e.g., "profileId:123"), address-based (e.g., "address:0x1234..."), and service-based (e.g., "service:x.com:username:username").
For service-based userkeys, the returned userkey may use the service's account ID instead of the username (e.g., "service:x.com:1234567890" instead of "service:x.com:username:username").
For non-existent userkeys, the API returns a 200 OK response with default values (empty strings, null values, zero score) rather than a 404 error.
Ethos credibility scores range from 0-2800 and are categorized into levels:
Untrusted: 0-799
Questionable: 800-1199
Neutral: 1200-1599
Reputable: 1600-1999
Exemplary: 2000-2800
Get Bulk Activities
Description: Retrieves multiple activities by their IDs and types.
Authentication Required: No
Parameters
Request Body
review
array of numbers
No
Array of review activity IDs
vouch
array of numbers
No
Array of vouch activity IDs
unvouch
array of numbers
No
Array of unvouch activity IDs
attestation
array of numbers
No
Array of attestation activity IDs
invitation-accepted
array of numbers
No
Array of invitation acceptance activity IDs
currentUserProfileId
number
No
Profile ID of the requesting user for personalized data
Responses
Success Response
Code: 200 OK
Error Responses
Code: 400 Bad Request
Example
Request
Notes
The results are ordered by timestamp in descending order (newest first).
At least one of the activity type arrays must be provided.
Get Unified Activities
Description: Retrieves activities with advanced filtering and pagination options.
Authentication Required: No
Parameters
Request Body
filter
array of strings
No
Types of activities to include (defaults to all types)
ids
object
No
Specific activity IDs by type
cache
boolean
No
Whether to use cached results (defaults to false)
orderBy
object
Yes
Sorting options
orderBy.field
string
Yes
Field to sort by (defaults to "timestamp")
orderBy.direction
string
Yes
Sort direction: "asc" or "desc" (defaults to "desc")
pagination
object
Yes
Pagination parameters
pagination.limit
number
Yes
Number of results to return
pagination.offsets
object
No
Offset for each activity type
currentUserProfileId
number or null
No
Profile ID of the requesting user for personalized data; must be explicitly set to null if not provided
authorProfileIds
array of numbers
No
Filter by author profile IDs
subjectProfileIds
array of numbers
No
Filter by subject profile IDs
authorServiceAccounts
array of objects
No
Filter by author service accounts
subjectServiceAccounts
array of objects
No
Filter by subject service accounts
activityByAuthorAddresses
array of strings
No
Filter by author addresses
activityForSubjectAddresses
array of strings
No
Filter by subject addresses
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
Response data container
data.values
array
Array of activity objects
data.limit
number
Number of results returned
data.offsets
object
Current pagination offsets
data.total
number
Total number of results matching the query
data.counts
object
Count of results by activity type
Error Responses
Code: 400 Bad Request
Example
Request
Notes
The
orderBy
parameter is required, and must include bothfield
anddirection
.The
currentUserProfileId
parameter must be explicitly set tonull
if not provided, otherwise a validation error might occur.The default activity filter includes review, vouch, attestation, invitation-accepted, unvouch, and slash activities.
Results can be paginated using the
offsets
field in the pagination object, which allows specifying different offsets for each activity type.Activity scores use raw numbers (e.g., 1405) rather than the normalized 0-100 range mentioned in other parts of the documentation.
The response includes detailed information for each activity, including author and subject details, event information, voting counts, and timestamps.
The
data.counts
field provides a count of results by activity type.The
data.total
field indicates the total number of results matching the query across all activity types.
Get Bulk Actors
Description: Retrieves multiple actors by their userkeys.
Authentication Required: No
Parameters
Request Body
userkeys
array of strings
Yes
Array of userkeys
Responses
Success Response
Code: 200 OK
Example
Request
Get Activity Votes
Description: Retrieves votes for multiple activities.
Authentication Required: No
Parameters
Request Body
activities
array of objects
Yes
Array of activity type and ID pairs
activities[].type
string
Yes
Activity type
activities[].id
number
Yes
Activity ID
voterProfileId
number
Yes
Profile ID of the voter
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
Container for vote data by activity type
data.attestation
object
Votes for attestation activities
data.discussion
object
Votes for discussion activities
data.review
object
Votes for review activities
data.slash
object
Votes for slash activities
data.vouch
object
Votes for vouch activities
Example
Request
Notes
If there are no votes from the specified voter for the requested activities, the endpoint returns empty objects for each activity type as shown in the example response.
When votes exist for a requested activity, the response would include the activity ID as a key in the corresponding activity type object, with vote details as the value.
For example, if the user with profile ID 123 had voted on a review with ID 1, the structure would look like:
The
userVote
field contains information about the user's own vote, including the vote direction ("up" or "down").The
counts
field shows the total upvotes and downvotes for the activity.The supported activity types in the response are: attestation, discussion, review, slash, and vouch.
Get Invites Accepted By Profile
Description: Retrieves actors who have accepted invitations from the specified profile.
Authentication Required: No
Parameters
Path Parameters
profileId
number
Yes
The profile ID of the user who sent the invitations
Query Parameters
limit
number
No
Maximum number of results to return
Responses
Success Response
Code: 200 OK
Example
Request
Last updated