Get List API (Helper API)

Get List API (Helper API)

This API retrieves the names and IDs of all lists associated with a user, including those shared with them.

API Endpoint

GET /api/v1/users/lists


Info
## Important Notes:
- All API requests must be made to this base URL followed by the specific endpoint path
- HTTPS protocol is required for all API calls
- API version v1 is currently supported
- All responses will be returned in JSON format

Parameters

  • No Parameters Required

Headers

  • AuthorizationBearer <Access-Token> (This assumes token-based authentication. Modify as per your actual authentication/authorization method.)

Response

Upon a successful request, the API responds with a JSON object containing an array of lists:

Notes
{ "status": "success", "message": "Lists retrieved successfully.", "data": [ { "list_id": "7027", "list_name": "Work Tasks", "shared": true }, { "list_id": "7145", "list_name": "Personal Tasks", "shared": false } ] }

API Error Handling

404 Not Found

User ID does not exist

Notes
{ "status": "error", "message": "Not Found", "errors": { "user_id": "The specified user ID does not exist." } }

401 Unauthorized

Invalid token

Notes
{ "status": "error", "message": "Unauthorized", "errors": { "authorization": "Token is invalid or expired" } }