OtherAPI ReferenceOrganization

Get the organization balance

Prepaid balance and billing setup of the organization. Poll it to alert on a balance below a threshold of your own.

GET
https://api.soniox.com/v1/organization/balance

Prepaid balance and billing setup of the organization. Poll it to alert on a balance below a threshold of your own.

Headers

AuthorizationRequiredBearer <SONIOX_API_KEY>

Response

200

OK

available_balance_usdRequiredstring

Prepaid balance left to spend.

free_balance_usdRequiredstring

Part of the available balance that was granted, not paid for.

used_balance_usdRequiredstring

Prepaid balance spent so far.

invoice_billing_enabledRequiredboolean

Usage is invoiced instead of drawn from the prepaid balance.

balance_exhaustedRequiredboolean

The prepaid balance is spent and requests are refused. Always false with invoice billing.

autopay_enabledRequiredboolean

The balance is topped up automatically below the threshold.

autopay_threshold_usdRequiredstring

Balance below which a top-up is charged. Null without a billing setup.

autopay_amount_usdRequiredstring

Amount of one top-up. Null without a billing setup.

has_payment_methodRequiredboolean

A payment method is on file.

has_payment_errorRequiredboolean

The last payment attempt failed.

Errors

OK

{
  "available_balance_usd": "string",
  "free_balance_usd": "string",
  "used_balance_usd": "string",
  "invoice_billing_enabled": true,
  "balance_exhausted": true,
  "autopay_enabled": true,
  "autopay_threshold_usd": "string",
  "autopay_amount_usd": "string",
  "has_payment_method": true,
  "has_payment_error": true
}

Unauthorized

{
  "status_code": 0,
  "error_type": "string",
  "message": "string",
  "validation_errors": [
    {
      "error_type": "string",
      "location": "string",
      "message": "string"
    }
  ],
  "request_id": "string",
  "more_info": "string"
}

Forbidden

{
  "status_code": 0,
  "error_type": "string",
  "message": "string",
  "validation_errors": [
    {
      "error_type": "string",
      "location": "string",
      "message": "string"
    }
  ],
  "request_id": "string",
  "more_info": "string"
}

Not Found

{
  "status_code": 0,
  "error_type": "string",
  "message": "string",
  "validation_errors": [
    {
      "error_type": "string",
      "location": "string",
      "message": "string"
    }
  ],
  "request_id": "string",
  "more_info": "string"
}

Too Many Requests

{
  "status_code": 0,
  "error_type": "string",
  "message": "string",
  "validation_errors": [
    {
      "error_type": "string",
      "location": "string",
      "message": "string"
    }
  ],
  "request_id": "string",
  "more_info": "string"
}

Internal Server Error

{
  "status_code": 0,
  "error_type": "string",
  "message": "string",
  "validation_errors": [
    {
      "error_type": "string",
      "location": "string",
      "message": "string"
    }
  ],
  "request_id": "string",
  "more_info": "string"
}