Retrieve all suggestions from your project. This endpoint returns a paginated list of all suggestions with vote counts and status information.
ID of user who created this suggestion (CUID format, e.g., clm7x1a2b000008l7h3k1b2c3)
status
string
default:"IN_PROGRESS"
required
Status of suggestion (PENDING, PLANNED, IN_PROGRESS, COMPLETED, CLOSED) (default: IN_PROGRESS)
Number of suggestions to return (1-100, default: 20)
Number of suggestions to skip (default: 0)
Response Fields
Returns an object with suggestions array and pagination info:
| Field | Type | Required | Description |
|---|
| suggestions | array | Yes | Array of suggestion objects |
| pagination.limit | number | Yes | Number of suggestions returned |
| pagination.offset | number | Yes | Number of suggestions skipped |
| pagination.total | number | Yes | Total number of suggestions |
| pagination.hasMore | boolean | Yes | Whether there are more suggestions |
Suggestion Object Fields
| Field | Type | Required | Description |
|---|
| id | string | Yes | Unique suggestion identifier |
| title | string | Yes | Suggestion title |
| description | string | Yes | Suggestion description |
| status | string | Yes | Status (PENDING, PLANNED, IN_PROGRESS, COMPLETED, CLOSED) |
| projectId | string | Yes | Project this suggestion belongs to |
| label | object | No | Label information (id, name, color) |
| voteCount | number | Yes | Total number of votes |
| hasUserVoted | boolean | Yes | Whether the user has voted for this suggestion |
| createdAt | string | Yes | Creation timestamp (ISO 8601) |
| updatedAt | string | Yes | Last update timestamp (ISO 8601) |
Example Request
GET /api/v1/sdk/suggestions?limit=10&offset=0
Example Response
{
"suggestions": [
{
"id": "clm7x1a2b000008l7h3k1b2c3",
"title": "Add dark mode",
"description": "Please add dark mode support for better user experience",
"status": "PENDING",
"projectId": "clm7x1a2b000008l7h3k1b2c3",
"label": null,
"voteCount": 15,
"hasUserVoted": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 23,
"hasMore": true
}
}
Error Responses
| Status Code | Description | Example Response |
|---|
| 400 | Bad request - Invalid parameters | {"error": "limit must be between 1 and 100"} |
| 401 | Unauthorized - Invalid API key | {"error": "Unauthorized"} |
| 500 | Internal server error | {"error": "Failed to get suggestions"} |