clientspace/get_credits_by_id
Tool: read
Get the sending-credit balance of a clientspace. The parent agency can read any of its clientspaces; a clientspace can read its own.
The response's creditMode says which pool the balance is drawn from: separate means the clientspace holds its own credit pool; shared means it draws from the parent agency's pool — the balance is then the remaining monthly allocation when auto-allocation is on, otherwise the agency's own balance. agencyBalance is populated only when the agency is the caller; it is null when a clientspace reads its own status.
Arguments
| name | type | req | notes |
|---|---|---|---|
| id | integer | ✓ | the object's clientspaceId (int32) |
Response
200 — Clientspace credit status.
| field | type | description |
|---|---|---|
| clientspaceId | integer | Identifier of the clientspace the balance belongs to. |
| creditMode | string | separate (own pool) or shared (draws from the parent agency). |
| balance | integer | Effective available sending credits — see creditMode above for what it draws from. |
| agencyBalance | integer | Current balance of the parent agency; null except on an agency read of this clientspace. |
Errors: 400, 401, 403, 404, 406, 422, 429, 500 — shared schema: schemas/errors.
Invoke
Call read with name: "clientspace/get_credits_by_id".