This API retrieves the names and IDs of all lists associated with a user, including those shared with them.
API URL
API Endpoint
GET /api/v1/users/lists
## 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
- Authorization:
Bearer <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:
{
"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
{
"status": "error",
"message": "Not Found",
"errors": {
"user_id": "The specified user ID does not exist."
}
}
401 Unauthorized
Invalid token
{ "status": "error", "message": "Unauthorized", "errors": { "authorization": "Token is invalid or expired" } }