List every credit charge
list_workspace_credit_activity
Lists the individual credit charges and refunds of a workspace, newest first, 20 at a time.
Every chat turn, image, video and block of extra emails that spent credits is listed, and so is every refund for work that did not deliver. Credits added to the workspace, from the plan allowance, top ups or rewards, are not listed.
Each item has its type (deduction or refund), its category (building, images, videos, emails or other), the credits, the site it was for in project and when it happened in createdAt. project is null when the charge was not tied to a site, and carries deleted true when the site no longer exists. A block of emails also has quantity, the number of extra sends it unlocked.
Pass category to keep one kind of charge and projectId to keep one site. Page with the offset the previous call returned while hasMore is true. See Credits.
Request
Call it with a POST to https://api.modulify.ai/v1/list_workspace_credit_activity, sending the inputs below as a JSON object. The token needs the workspaces:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/list_workspace_credit_activity \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"WORKSPACE_ID"}'Over MCP, the same method is the list_workspace_credit_activity tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace id. |
category |
string | No | Keeps only one kind of charge: building, images, videos, emails or other. |
projectId |
string | No | Keeps only the charges for one site. |
offset |
integer | No | How many charges to skip, taken from the offset of the previous call. Defaults to 0. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.