Skip to main content
curl -G https://api.chargeapi.co/v1/policies \
  -H "Authorization: Bearer ch_sk_test_..." \
  -d status=active \
  -d limit=10
{
    "data": [
        {
            "id": "pol_hbyAN9SMUkmo8AD0bk10VD27dOK0gqah",
            "object": "policy",
            "created": "2026-04-01T00:17:55.220Z",
            "mode": "enforcement",
            "name": "Example Policy",
            "rules": {
                "allowed_operators": ["example_operator"],
                "max_price_per_kwh": 25,
                // ...
            },
            "status": "active"
        }
    ],
    "next_page_url": "https://api.chargeapi.co/v1/policies?page=page_MHyulbAysB6BGMUs3AFd85UXM2nM5x1F86hzmpqo3uQ&status=active&limit=10",
    "previous_page_url": null
}
Use list endpoints by making an initial request with your filters and an optional limit, then following the page URLs returned by the API. Charge paginates top-level list endpoints with opaque page URLs. You make the first request with any supported filters and an optional limit, then continue the sequence by requesting the next_page_url or previous_page_url exactly as returned. This matters because the page token is opaque. Do not construct or mutate page tokens manually. Once a pagination sequence starts, keep following the returned URLs until you reach the end of the result set. Do not change filters after the first request in a pagination sequence.

Follow returned page URLs

When the response includes next_page_url, request that URL exactly as returned.
cURL
curl "https://api.chargeapi.co/v1/policies?page=page_MHyulbAysB6BGMUs3AFd85UXM2nM5x1F86hzmpqo3uQ&status=active&limit=10" \
  -H "Authorization: Bearer ch_sk_test_..."
If a later response includes previous_page_url, use it the same way. In both directions, the safest client behavior is to treat the returned URL as the complete instruction for the next request.

Parameters

limit
integer
Maximum number of objects to return (default 10).Allowed range: 1 to 100.
page
string
Page token from a previous list response. Use it only by following next_page_url or previous_page_url.

Attributes

data
array
required
List of objects returned for the current page.
next_page_url
string | null
required
URL for the next page of results, or null when there is no next page.
previous_page_url
string | null
required
URL for the previous page of results, or null when there is no previous page.