API Reference

Social endpoints

Stars, reproduction-request votes, and follows: POST /api/stars, /api/requests, /api/follows.

This page covers three interaction endpoints for repositories and users. Common conventions:

  • Authentication: requires write permission (browser session or x-api-key).
  • Body: JSON.
  • Rate limit: 60 requests per hour per account per endpoint; exceeding it returns 429.
  • When the target is a repository, you must have read permission on it, otherwise 403.
  • Errors always take the form {"error": "message"}.

Star POST /api/stars

Star or unstar a repository.

FieldTypeRequiredDescription
repositoryIdstringYesTarget repository ID
actionstringYesstar or unstar
curl -X POST https://citeark.com/api/stars \
  -H "x-api-key: $CITEARK_API_KEY" \
  -H "content-type: application/json" \
  -d '{"repositoryId": "…", "action": "star"}'

On success returns 200:

{ "starCount": 12 }

Request reproduction POST /api/requests

Cast a "want this reproduced" vote on a repository, or withdraw it. requestCount is the community's "want this reproduced" signal, displayed on the repository page.

FieldTypeRequiredDescription
repositoryIdstringYesTarget repository ID
actionstringYesrequest or withdraw
curl -X POST https://citeark.com/api/requests \
  -H "x-api-key: $CITEARK_API_KEY" \
  -H "content-type: application/json" \
  -d '{"repositoryId": "…", "action": "request"}'

On success returns 200:

{ "requestCount": 5 }

Follow POST /api/follows

Follow or unfollow a repository or a user.

FieldTypeRequiredDescription
targetTypestringYesrepository or user
targetIdstringYesMax 128 characters. When targetType is repository, pass the repository ID; when user, pass the user slug (not the user ID)
actionstringYesfollow or unfollow
curl -X POST https://citeark.com/api/follows \
  -H "x-api-key: $CITEARK_API_KEY" \
  -H "content-type: application/json" \
  -d '{"targetType": "repository", "targetId": "…", "action": "follow"}'

On success returns 200:

{ "followerCount": 8 }

Errors specific to following users: following yourself returns 400 {"error": "cannot follow yourself"}; a nonexistent user returns 404 {"error": "user not found"}.