Get Suggestions
curl --request GET \
--url https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodySuggestions
Get Suggestions
Retrieve all suggestions from your project
GET
/
api
/
v1
/
sdk
/
suggestions
Get Suggestions
curl --request GET \
--url https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions \
--header 'Authorization: Bearer <token>'import requests
url = "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://2d89d8691199.ngrok-free.app/api/v1/sdk/suggestions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyRetrieve all suggestions from your project. This endpoint returns a paginated list of all suggestions with vote counts and status information.
string
required
ID of user who created this suggestion (CUID format, e.g., clm7x1a2b000008l7h3k1b2c3)
string
default:"IN_PROGRESS"
required
Status of suggestion (PENDING, PLANNED, IN_PROGRESS, COMPLETED, CLOSED) (default: IN_PROGRESS)
number
Number of suggestions to return (1-100, default: 20)
number
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"} |
Was this page helpful?
⌘I