Pagination
How list endpoints return data and how to page through large result sets.
All list endpoints return a bare JSON array, sorted newest first (descending createdAt).
[
{ "id": "cl_4f9a…", "name": "Acme Corp", … },
{ "id": "cl_8b2e…", "name": "Globex", … },
…
]Query parameters
| Parameter | Default | Maximum | Description |
|---|---|---|---|
limit | 100 | 500 | Maximum number of records to return. |
Example — fetch up to 50 clients:
curl "https://usekwill.com/api/v1/clients?limit=50" \
-H "Authorization: Bearer $KWILL_API_KEY"Fetching all records
There is no cursor or page parameter. If you need every record, request with limit=500 and collect the result. For most workspaces, a single call is sufficient.
async function fetchAll(path) {
const res = await fetch(
`https://usekwill.com/api/v1${path}?limit=500`,
{ headers: { Authorization: `Bearer ${process.env.KWILL_API_KEY}` } }
);
return res.json();
}
const allClients = await fetchAll('/clients');Filtering
Some endpoints accept additional query parameters to filter results:
| Endpoint | Filter parameters |
|---|---|
GET /clients | tag |
GET /projects | client_id |