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
writepermission (browser session orx-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.
| Field | Type | Required | Description |
|---|---|---|---|
| repositoryId | string | Yes | Target repository ID |
| action | string | Yes | star 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.
| Field | Type | Required | Description |
|---|---|---|---|
| repositoryId | string | Yes | Target repository ID |
| action | string | Yes | request 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.
| Field | Type | Required | Description |
|---|---|---|---|
| targetType | string | Yes | repository or user |
| targetId | string | Yes | Max 128 characters. When targetType is repository, pass the repository ID; when user, pass the user slug (not the user ID) |
| action | string | Yes | follow 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"}.