Ethos Developers - API Docs
  • API Documentation
    • Introduction
    • API v2
      • Activity
      • Categories
      • Chains
      • Contributions
      • Nfts
      • Projects
      • Project Votes
      • Score
      • System
      • Users
      • Xp
    • API v1 (deprecated)
      • Activities
      • Addresses
      • Attestations
      • Categories
      • Contracts
      • Contributions
      • Curated Lists
      • ENS
      • Events
      • Exchange Rates
      • Fees
      • Invitations
      • Markets
      • Notifications
      • Profiles
      • Replies
      • Reviews
      • Scores
      • Search
      • Signatures
      • Slashes
      • Twitter
      • Users
      • Vouches
      • XP
  • Whitepaper
    • Whitepaper
Powered by GitBook
On this page
  1. API Documentation
  2. API v2

Categories

PreviousActivityNextChains

Get a specific category by ID

get
Path parameters
idintegerRequired
Responses
200
Successful response
application/json
400
Invalid input data
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/categories/{id} HTTP/1.1
Host: api.ethos.network
Accept: */*
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}

Delete a category

delete
Authorizations
Path parameters
categoryIdintegerRequired
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
delete
DELETE /api/v2/categories/{categoryId} HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}

Get users belonging to a category

get
Path parameters
categoryIdintegerRequired
Query parameters
limitnumberOptionalDefault: 50
offsetnumberOptionalDefault: 0
searchTextstringOptional
Responses
200
Successful response
application/json
400
Invalid input data
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/categories/{categoryId}/users HTTP/1.1
Host: api.ethos.network
Accept: */*
{
  "users": [
    {
      "id": 1,
      "profileId": 1,
      "displayName": "text",
      "username": "text",
      "avatarUrl": "https://example.com",
      "description": "text",
      "score": 1,
      "status": "ACTIVE",
      "userkeys": [
        "text"
      ],
      "xpTotal": 1,
      "xpStreakDays": 1,
      "stats": {
        "review": {
          "received": {
            "negative": 1,
            "neutral": 1,
            "positive": 1
          }
        },
        "vouch": {
          "given": {
            "amountWeiTotal": 1,
            "count": 1
          },
          "received": {
            "amountWeiTotal": 1,
            "count": 1
          }
        }
      },
      "addedAt": "text"
    }
  ],
  "total": 1
}

Remove users from a category

delete
Authorizations
Path parameters
categoryIdintegerRequired
Query parameters
userIdsinteger[] · min: 1Required
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
delete
DELETE /api/v2/categories/{categoryId}/users HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}
  • GETList categories
  • POSTCreate a new category
  • GETGet a specific category by ID
  • PUTUpdate an existing category
  • DELETEDelete a category
  • GETGet users belonging to a category
  • POSTAdd users to a category
  • DELETERemove users from a category
  • POSTBulk import users to a category via Twitter URLs

List categories

get
Query parameters
showOnLeaderboardbooleanOptional
showInDailyServicebooleanOptional
withUserCountbooleanOptional
limitnumberOptionalDefault: 50
offsetnumberOptionalDefault: 0
Responses
200
Successful response
application/json
400
Invalid input data
application/json
404
Not found
application/json
500
Internal server error
application/json
get
GET /api/v2/categories HTTP/1.1
Host: api.ethos.network
Accept: */*
{
  "categories": [
    {
      "id": 1,
      "slug": "text",
      "name": "text",
      "description": "text",
      "showOnLeaderboard": true,
      "showInDailyService": true,
      "bannerImageUrl": "https://example.com",
      "userCount": 1
    }
  ],
  "total": 1
}

Create a new category

post
Authorizations
Body
slugstring · min: 1 · max: 50Optional
namestringRequired
descriptionstringOptional
showOnLeaderboardbooleanRequired
showInDailyServicebooleanRequired
bannerImageUrlstring · uriOptional
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/v2/categories HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com"
}
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}

Update an existing category

put
Authorizations
Path parameters
categoryIdintegerRequired
Body
slugstring · min: 1 · max: 50Optional
namestringOptional
descriptionstringOptional
showOnLeaderboardbooleanOptional
showInDailyServicebooleanOptional
bannerImageUrlstring · uriOptional
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
put
PUT /api/v2/categories/{categoryId} HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com"
}
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}

Add users to a category

post
Authorizations
Path parameters
categoryIdintegerRequired
Body
userIdsinteger[] · min: 1Required
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/v2/categories/{categoryId}/users HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "userIds": [
    1
  ]
}
{
  "id": 1,
  "slug": "text",
  "name": "text",
  "description": "text",
  "showOnLeaderboard": true,
  "showInDailyService": true,
  "bannerImageUrl": "https://example.com",
  "userCount": 1
}

Bulk import users to a category via Twitter URLs

post
Authorizations
Path parameters
categoryIdintegerRequired
Body
twitterUrlsstring[]Required
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/v2/categories/{categoryId}/bulk-import HTTP/1.1
Host: api.ethos.network
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "twitterUrls": [
    "text"
  ]
}
{
  "total": 1,
  "added": 1,
  "alreadyInCategory": 1,
  "notFound": 1,
  "invalid": 1,
  "duplicates": 1,
  "errors": [
    {
      "url": "text",
      "reason": "text"
    }
  ]
}