Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request GET \ --url https://www.ninjachat.ai/api/api-keys/transactions \ --header 'Authorization: Bearer <token>'
import requests url = "https://www.ninjachat.ai/api/api-keys/transactions" headers = {"Authorization": "Bearer <token>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}}; fetch('https://www.ninjachat.ai/api/api-keys/transactions', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "transactions": [ { "amount": "$25.00", "amountCents": 2500, "type": "credit_purchase", "status": "completed", "timestamp": "2023-11-07T05:31:56Z" } ], "pagination": { "total": 123, "limit": 123, "offset": 123, "hasMore": true } }
{ "error": { "message": "<string>", "type": "<string>", "code": "<string>", "param": "<string>" }, "message": "<string>", "code": "<string>", "request_id": "<string>" }
List all credit purchases for the authenticated user, ordered by most recent first.
API key starting with nj_sk_
Number of records to return.
x <= 200
Pagination offset.
Transaction list.
Show child attributes