# list_workspace_credit_activity

Source: https://modulify.ai/docs/api/workspaces/list-workspace-credit-activity

Lists the individual credit charges and refunds of a workspace, newest first, 20 at a time.

- Title: List every credit charge
- Scope: `workspaces:read`
- Access: Read only
- Endpoint: `POST /v1/list_workspace_credit_activity`

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](https://modulify.ai/docs/plans/credits#see-where-your-credits-went).

## 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.

```bash
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](https://modulify.ai/docs/mcp/workspaces/list-workspace-credit-activity).

## 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](https://modulify.ai/docs/api/requests-and-responses#the-response) 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](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) 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](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.