Wallet

Get Wallet Balance

Returns the workspace's prepaid wallet balance. X actions are paid from it. When it is too low, they return INSUFFICIENT_WALLET.

GET
/v1/wallet

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Response Body

Wallet

application/json
  1. response
balance*string

The balance in US dollars, with three decimal places.

currency*"usd"

Always usd.

Value in"usd"
Example Request
import { Configuration, WalletApi } from "@onepostly/sdk";const walletApi = new WalletApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await walletApi.getWalletBalance();console.log(response);
Example Response
{  "balance": "12.345",  "currency": "usd"}