Check Account Balance
GET
/v2/balance
const url = 'https://api.contacta.mx/v2/balance?accounts=false';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.contacta.mx/v2/balance?accounts=false' \ --header 'Authorization: Basic <credentials>'Returns the current balance of your account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”accounts
boolean
Set to true to include the balance of all sub-accounts associated with your API key.
Example
falseResponses
Section titled “Responses”Balance account successfully retrieved
Media typeapplication/json
object
status
boolean
error
boolean
description
Array<object>
object
username
string
name
string
balance
number format: float
limit_credit
number format: float
Example
{ "status": true, "error": false, "description": [ { "username": "DEMO", "name": "DEMO", "balance": -1, "limit_credit": 0 } ]}Missing required parameters
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Missing params, please verify or contact to support"}Your key auth is not valid
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Your key auth is not valid, please check with your administrator to get the new key"}
