> ## Documentation Index
> Fetch the complete documentation index at: https://widgetic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# widgetic api credits

> 2 commands for the Credits operations of the REST API, generated from its OpenAPI description.

`widgetic api credits <command>` runs the Credits operations of the REST API. It has 2 commands. Every command also takes [the flags every command takes](https://widgetic.com/docs/cli/commands/index.md).

## `widgetic api credits get-user-credit-balance`

Get an account's credit balance

* Request: `GET /credits/user/{userId}/balance`
* Operation: `getUserCreditBalance` (`widgetic api call getUserCreditBalance` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account whose balance to read |

The whole description and the schemas: `widgetic schema api credits get-user-credit-balance`.

## `widgetic api credits get-user-credit-transactions`

List an account's credit ledger

* Request: `GET /credits/user/{userId}/transactions`
* Operation: `getUserCreditTransactions` (`widgetic api call getUserCreditTransactions` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account whose ledger to read |
| `--transaction-type <text>` | text | | Only entries of this type, for instance `debit` for the credits spent. The types are listed on `AccountCreditTransaction`. |
| `--limit <int>` | integer | | Maximum number of entries to return (default: 100) |
| `--offset <int>` | integer | | Number of entries to skip (default: 0) |

The whole description and the schemas: `widgetic schema api credits get-user-credit-transactions`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.