Skip to main content
GET
/
api
/
v1
/
projects
curl --request GET \
  --url 'http://localhost:3000/api/v1/projects?limit=20&offset=0&searchWord=AI' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "projects": [
    {
      "id": "proj_123abc",
      "name": "AI Chatbot",
      "description": "Customer service chatbot",
      "icon": "🤖",
      "color": "#3B82F6",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "cursor_xyz",
  "nextOffset": 20,
  "hasMore": true,
  "total": 45,
  "message": "Projects retrieved successfully"
}

Query Parameters

searchWord
string
Search term for filtering projects by name
limit
number
default:20
Number of results per page
cursor
string
default:""
Pagination cursor
offset
number
default:0
Pagination offset

Response

success
boolean
Indicates if the request was successful
projects
array
Array of project objects
nextCursor
string
Cursor for the next page of results
nextOffset
number
Offset for the next page of results
hasMore
boolean
Indicates if there are more results available
total
number
Total number of projects
message
string
Response message
curl --request GET \
  --url 'http://localhost:3000/api/v1/projects?limit=20&offset=0&searchWord=AI' \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "projects": [
    {
      "id": "proj_123abc",
      "name": "AI Chatbot",
      "description": "Customer service chatbot",
      "icon": "🤖",
      "color": "#3B82F6",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "cursor_xyz",
  "nextOffset": 20,
  "hasMore": true,
  "total": 45,
  "message": "Projects retrieved successfully"
}

Notes

  • Use searchWord to filter projects by name
  • Supports both cursor-based and offset-based pagination
  • Results are ordered by creation date (newest first)