Skip to main content
GET
/
api
/
v1
/
business-accounts
curl -X GET https://api.mindosoftware.com/api/v1/business-accounts/ \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
{
  "companyName": "Mi Empresa SRL",
  "apiKeyName": "Production API Key",
  "businessAccounts": [
    {
      "businessAccountId": 1,
      "businessName": "Mi Empresa WhatsApp Business",
      "phoneNumbers": [
        {
          "id": 123,
          "phoneNumberId": "813497231850626",
          "displayPhoneNumber": "+54 9 223 675-0780",
          "verifiedName": "Mi Empresa",
          "isPrimary": true,
          "messagingLimitTier": "TIER_1000",
          "quota": {
            "dailyLimit": 1000,
            "uniqueNumbersSent24h": 45,
            "remaining": 955,
            "usagePercentage": 4.5,
            "canSend": true
          }
        }
      ],
      "templates": [
        {
          "name": "welcome_message",
          "language": "es",
          "category": "MARKETING",
          "variables": [
            {
              "name": "customer_name",
              "type": "TEXT",
              "position": 1,
              "isRequired": true,
              "component": "BODY"
            }
          ]
        },
        {
          "name": "order_confirmation",
          "language": "es",
          "category": "TRANSACTIONAL",
          "variables": [
            {
              "name": "order_id",
              "type": "TEXT",
              "position": 1,
              "isRequired": true,
              "component": "BODY"
            },
            {
              "name": "total_amount",
              "type": "CURRENCY",
              "position": 2,
              "isRequired": true,
              "component": "BODY"
            },
            {
              "name": "delivery_date",
              "type": "DATE_TIME",
              "position": 3,
              "isRequired": true,
              "component": "BODY"
            }
          ]
        }
      ]
    }
  ]
}

Description

This endpoint returns all information associated with your API Key: company data, WhatsApp Business accounts, phone numbers with their messaging quota, and approved templates with their variables.

Authentication header

X-API-Key
string
required
Your Mindo API Key. Format: mindo_xxxxxxxxxxxxxxxxxxxxxxxx

Response

companyName
string
Your company name.
apiKeyName
string
Name of the API Key used in the request.
businessAccounts
array
List of associated WhatsApp Business accounts.
curl -X GET https://api.mindosoftware.com/api/v1/business-accounts/ \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
{
  "companyName": "Mi Empresa SRL",
  "apiKeyName": "Production API Key",
  "businessAccounts": [
    {
      "businessAccountId": 1,
      "businessName": "Mi Empresa WhatsApp Business",
      "phoneNumbers": [
        {
          "id": 123,
          "phoneNumberId": "813497231850626",
          "displayPhoneNumber": "+54 9 223 675-0780",
          "verifiedName": "Mi Empresa",
          "isPrimary": true,
          "messagingLimitTier": "TIER_1000",
          "quota": {
            "dailyLimit": 1000,
            "uniqueNumbersSent24h": 45,
            "remaining": 955,
            "usagePercentage": 4.5,
            "canSend": true
          }
        }
      ],
      "templates": [
        {
          "name": "welcome_message",
          "language": "es",
          "category": "MARKETING",
          "variables": [
            {
              "name": "customer_name",
              "type": "TEXT",
              "position": 1,
              "isRequired": true,
              "component": "BODY"
            }
          ]
        },
        {
          "name": "order_confirmation",
          "language": "es",
          "category": "TRANSACTIONAL",
          "variables": [
            {
              "name": "order_id",
              "type": "TEXT",
              "position": 1,
              "isRequired": true,
              "component": "BODY"
            },
            {
              "name": "total_amount",
              "type": "CURRENCY",
              "position": 2,
              "isRequired": true,
              "component": "BODY"
            },
            {
              "name": "delivery_date",
              "type": "DATE_TIME",
              "position": 3,
              "isRequired": true,
              "component": "BODY"
            }
          ]
        }
      ]
    }
  ]
}

Messaging limit tiers

Messaging tiers are assigned by Meta and determine how many unique conversations you can initiate per day.
TierDaily limitRecommended speedEstimated time (1000 msgs)
TIER_5050 conversations1.2s between messages20 minutes
TIER_250250 conversations0.24s between messages4 minutes
TIER_10001,000 conversations0.06s between messages1 minute
TIER_1000010,000 conversations0.006s between messages6 seconds
TIER_100000100,000 conversations0.0006s between messages< 1 second
TIER_UNLIMITEDNo limitNo delayInstant
The tier increases automatically based on usage and number quality.

Variable types

Template variables can be of the following types:
TypeDescriptionExample
TEXTPlain text"Juan Perez"
CURRENCYAmount with currency"$1,250.00"
DATE_TIMEDate and/or time"November 25", "18:30"
IMAGEImage URL"https://..."
VIDEOVideo URL"https://..."
DOCUMENTDocument URL"https://..."

Use cases

The phoneNumberId field is the Meta ID you need to send messages through the API.
const data = await getBusinessAccounts();

// Get the first WhatsApp number
const firstPhone = data.businessAccounts[0].phoneNumbers[0];
const phoneNumberId = firstPhone.phoneNumberId;

console.log('Phone Number ID:', phoneNumberId);
// Output: "813497231850626"

// Use this ID to send messages
await sendTemplate({
  phone_number_id: phoneNumberId,
  template_name: 'welcome_message',
  recipient_phone: '+5491112345678',
  variables: { customer_name: 'Juan' }
});
Before sending messages, verify that the number has available quota.
const data = await getBusinessAccounts();
const phone = data.businessAccounts[0].phoneNumbers[0];

if (!phone.quota.canSend) {
  console.error('Cannot send: limit reached');
  console.log(`Used: ${phone.quota.uniqueNumbersSent24h}/${phone.quota.dailyLimit}`);
  return;
}

if (phone.quota.usagePercentage > 80) {
  console.warn('Alert: Usage at ' + phone.quota.usagePercentage + '%');
}

console.log('Available quota:', phone.quota.remaining);
Get the list of available templates and their variables to build sends.
const data = await getBusinessAccounts();
const templates = data.businessAccounts[0].templates;

console.log('Available templates:');
templates.forEach(template => {
  console.log(`\n${template.name} (${template.language})`);
  console.log(`  Category: ${template.category}`);
  console.log(`  Variables:`);

  template.variables.forEach(variable => {
    const required = variable.isRequired ? '(required)' : '(optional)';
    console.log(`  - ${variable.name} [${variable.type}] ${required}`);
  });
});
Use variable information to build the send payload automatically.
const data = await getBusinessAccounts();
const template = data.businessAccounts[0].templates
  .find(t => t.name === 'order_confirmation');

// Build variables automatically
const variables = {};
template.variables.forEach(variable => {
  switch (variable.type) {
    case 'TEXT':
      variables[variable.name] = 'Text value';
      break;
    case 'CURRENCY':
      variables[variable.name] = '$1,250.00';
      break;
    case 'DATE_TIME':
      variables[variable.name] = new Date().toLocaleDateString('en-US');
      break;
  }
});

console.log('Built variables:', variables);
// Output: { order_id: 'Text value', total_amount: '$1,250.00', delivery_date: '11/16/2025' }
If you have multiple numbers, automatically select the one with the most available quota.
const data = await getBusinessAccounts();
const phones = data.businessAccounts[0].phoneNumbers;

// Sort by remaining quota (highest first)
const sortedPhones = phones.sort((a, b) => b.quota.remaining - a.quota.remaining);

// Select the one with the most available quota
const bestPhone = sortedPhones.find(phone => phone.quota.canSend);

if (!bestPhone) {
  console.error('No numbers have available quota');
  return;
}

console.log(`Using number: ${bestPhone.displayPhoneNumber}`);
console.log(`  Remaining quota: ${bestPhone.quota.remaining}`);
console.log(`  Phone Number ID: ${bestPhone.phoneNumberId}`);