List credit logs
curl --request GET \
--url https://api.markifact.com/v1/credits/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.markifact.com/v1/credits/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.markifact.com/v1/credits/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.markifact.com/v1/credits/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.markifact.com/v1/credits/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.markifact.com/v1/credits/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markifact.com/v1/credits/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"credits_used": 123,
"credits_remaining": 123,
"service": {
"type": "workflow",
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"email": "<string>"
},
"created_at": 1784874205
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Credits
List credit logs
Read your Markifact team’s credit ledger: every charge, what caused it, and who ran it.
GET
/
v1
/
credits
/
logs
List credit logs
curl --request GET \
--url https://api.markifact.com/v1/credits/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.markifact.com/v1/credits/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.markifact.com/v1/credits/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.markifact.com/v1/credits/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.markifact.com/v1/credits/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.markifact.com/v1/credits/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markifact.com/v1/credits/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"credits_used": 123,
"credits_remaining": 123,
"service": {
"type": "workflow",
"id": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"email": "<string>"
},
"created_at": 1784874205
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Returns one entry per credit charge, newest first. Every workflow run, agent turn, copilot request, and MCP tool call that consumed credits appears here.
Unlike operation logs, the credit ledger is not truncated by your plan. Your full history is available so you can reconcile against invoices.
Page through with
Endpoint
GET /v1/credits/logs
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_type | string | No | Filter by what was charged: workflow, agent, copilot, or mcp. |
service_id | string | No | Charges from one workflow, conversation, or MCP server. Use this for per-client cost allocation. |
user_id | string | No | Charges triggered by one team member. |
created_after | integer | No | Only charges at or after this Unix second. |
created_before | integer | No | Only charges at or before this Unix second. |
limit | integer | No | Entries per page, 1 to 1000. Defaults to 25. Ledger entries carry no payloads, so the ceiling here is higher than on other resources. |
cursor | string | No | The next_cursor from the previous page. |
Example Request
curl "https://api.markifact.com/v1/credits/logs?service_type=workflow&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"data": [
{
"id": 7934,
"credits_used": 4,
"credits_remaining": 6389,
"service": {
"type": "workflow",
"id": "bcd0e853-dd0c-4347-bd35-b86148cf2c96",
"name": "Meta Ads Upload"
},
"user": {
"id": "Q8Wvn9gL8GUQ11SsJAnMfiyyGOA2",
"email": "member@example.com"
},
"created_at": 1784874205
}
],
"has_more": true,
"next_cursor": "eyJzIjoxNzg0ODc0MjA1LCJpIjo3OTM0fQ"
}
Credit Log Object
| Field | Type | Description |
|---|---|---|
id | integer | Ledger entry ID. |
credits_used | integer | Credits this charge consumed. |
credits_remaining | integer | Balance immediately after the charge. See the caveat below. |
service | object | What was charged. See below. |
user | object | The team member who triggered it, with id and email. Both can be null for system-triggered runs. |
created_at | integer | Charge time in Unix seconds. |
Service Object
| Field | Type | Description |
|---|---|---|
type | string | workflow, agent, copilot, or mcp. |
id | string | The workflow, conversation, or MCP server charged. Matches source.id in operation logs. |
name | string | The name at the time of the charge, not the current name. A renamed workflow keeps its old name on historical entries, which is what you want when reconciling a past invoice. |
credits_remaining is a point-in-time snapshot, not a running total you can reproduce by summing credits_used.The ledger records consumption only. When a billing period renews, your balance resets without writing an entry, so two consecutive entries can show the balance jumping upward. Use Get credit balance for the current figure rather than deriving it from the ledger.Pagination
Identical to operation logs: readnext_cursor and pass it back as cursor. Keep every other parameter unchanged while paging, and treat the cursor as opaque.
Cost Allocation Example
To total what one workflow cost over a period, filter by itsservice_id and sum:
curl "https://api.markifact.com/v1/credits/logs?service_id=bcd0e853-dd0c-4347-bd35-b86148cf2c96&created_after=1782000000&limit=1000" \
-H "Authorization: Bearer YOUR_API_KEY" \
| jq '[.data[].credits_used] | add'
next_cursor until has_more is false to cover the whole range. Use limit=1000 when exporting: a full page is only around 265 KB, so a year of history is a handful of requests rather than hundreds.
Credit charges do not map one-to-one onto operation logs. A single workflow run produces one operation log per node but a single credit entry, and agent and copilot usage is charged at the conversation level. Treat this ledger as the authoritative record of what you were charged.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by what was charged.
Available options:
workflow, agent, copilot, mcp Charges from one workflow, conversation, or MCP server.
Charges triggered by one team member.
Only charges at or after this Unix second.
Required range:
x >= 0Only charges at or before this Unix second.
Required range:
x >= 0Entries per page. The ceiling is higher than on other resources because ledger entries carry no payloads.
Required range:
1 <= x <= 1000The next_cursor from the previous page. Keep every other filter unchanged while paging.

