Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HelenaLM32/ECHO/llms.txt

Use this file to discover all available pages before exploring further.

The follow system lets ECHO users subscribe to creators and other accounts. Follower and following counts are publicly readable without authentication, so any client can display audience size on a profile. Actions that change follow state — following or unfollowing a user — require a valid JWT token. A user cannot follow themselves; the API will reject such requests.
The base URL for all endpoints on a local development server is http://localhost:8084. Replace this with your deployed API URL in production.

Get follow stats

GET /follows/stats/{userId}
Returns the follower and following counts for the given user. This endpoint is public and does not require authentication.

Path parameters

userId
number
required
The numeric ID of the user whose follow stats to retrieve.

Example

curl -X GET http://localhost:8084/follows/stats/42

Response fields

followers
number
required
The number of users following the given user.
following
number
required
The number of users the given user is following.

Example response

{
  "followers": 128,
  "following": 34
}

Error codes

StatusMeaning
404No user found with the given ID.

Check if following

GET /follows/check/{userId}
Returns whether the currently authenticated user is following the specified user.

Path parameters

userId
number
required
The numeric ID of the user to check against.

Authentication

Requires a valid JWT Bearer token.

Example

curl -X GET http://localhost:8084/follows/check/42 \
  -H "Authorization: Bearer <token>"

Response fields

following
boolean
required
true if the authenticated user follows the specified user, false otherwise.

Example response

{
  "following": true
}

Error codes

StatusMeaning
401No valid token provided.
404No user found with the given ID.

Follow a user

POST /follows/{userId}
Creates a follow relationship from the authenticated user to the specified user.

Path parameters

userId
number
required
The numeric ID of the user to follow.

Authentication

Requires a valid JWT Bearer token.

Example

curl -X POST http://localhost:8084/follows/42 \
  -H "Authorization: Bearer <token>"

Error codes

StatusMeaning
400The authenticated user attempted to follow themselves.
401No valid token provided.
404No user found with the given ID.
409The authenticated user is already following this user.

Unfollow a user

DELETE /follows/{userId}
Removes the follow relationship from the authenticated user to the specified user.

Path parameters

userId
number
required
The numeric ID of the user to unfollow.

Authentication

Requires a valid JWT Bearer token.

Example

curl -X DELETE http://localhost:8084/follows/42 \
  -H "Authorization: Bearer <token>"

Error codes

StatusMeaning
401No valid token provided.
404No follow relationship found for the given user ID.

Build docs developers (and LLMs) love