curl --request GET \
--url https://code.deepline.com/api/v2/billing/ledger \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://code.deepline.com/api/v2/billing/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://code.deepline.com/api/v2/billing/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"org_id": "org_example",
"scope": {
"kind": "org"
},
"entries": [],
"has_more": false,
"next_cursor": null,
"next_before_at": null
}{
"error": "Unauthorized"
}{
"error": "<string>"
}{
"error": "<string>"
}List or export the credit ledger
Requires workspace admin access. Reads customer-visible credits and debits across the workspace. JSON is paginated: reuse next_cursor while has_more is true, including when a filtered page is empty. CSV streams the matching history and ignores cursor and limit. Responses are private and uncached.
curl --request GET \
--url https://code.deepline.com/api/v2/billing/ledger \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://code.deepline.com/api/v2/billing/ledger', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://code.deepline.com/api/v2/billing/ledger"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"org_id": "org_example",
"scope": {
"kind": "org"
},
"entries": [],
"has_more": false,
"next_cursor": null,
"next_before_at": null
}{
"error": "Unauthorized"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorization: Bearer <key>.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid workspace authentication. |
| 403 | The authenticated identity lacks access to this resource or operation. |
| 500 | Server failure. Retry this read; it does not start new work. |
Authorizations
Create a workspace API key in the Deepline dashboard before calling authenticated endpoints.
Query Parameters
Omit for a JSON page; csv streams a CSV download.
csv JSON page size; default 50, clamped to 5000. CSV export ignores the requested page limit.
1 <= x <= 5000Lower creation-time bound as Unix milliseconds.
x >= 0Upper creation-time bound as Unix milliseconds.
x >= 0Opaque next_cursor from the previous JSON page. Preserve all filters. Ignored for CSV.
Exact public run ID.
Exact billed operation name.