Skip to main content
GET
/
api
/
v1
/
contact-lookup
curl -X GET "https://api.mindosoftware.com/api/v1/contact-lookup/?phone=5492235961983" \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
{
  "found": true,
  "contact": {
    "id": 123,
    "fullName": "Juan Perez",
    "phone": "+5492235961983",
    "email": "juan@ejemplo.com",
    "contactListId": 5,
    "contactListName": "Lista Principal",
    "source": "organic",
    "createdAt": "2025-01-15T10:30:00Z"
  },
  "hasReplied": true,
  "lastReplyAt": "2025-03-28T14:22:00Z",
  "sessionWindowActive": true,
  "sessionExpiresAt": "2025-03-29T14:22:00Z"
}

Description

This endpoint allows you to look up contact information by phone number. It returns contact data, whether they have replied to messages, and the WhatsApp session window status. It’s useful for conditional sending and automated follow-up workflows: before sending a follow-up, you can check if the contact has already replied and if the session window is active.
The endpoint returns 200 even if the contact doesn’t exist. Use the found field to verify existence.

Authentication header

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

Query parameters

phone
string
required
Phone number to look up. The system automatically normalizes the number, so it accepts multiple formats (E.164 with or without +, with 15 for Argentina, with spaces or dashes).

Response (200 OK)

found
boolean
true if the contact exists in any company list.
contact
object
Contact information. null if not found.
hasReplied
boolean
true if the contact has sent at least one message in any chat. Useful for follow-up logic: if false, the contact is a candidate for re-sending.
lastReplyAt
string (ISO 8601)
Date/time of the last message sent by the contact. null if they never replied.
sessionWindowActive
boolean
true if there’s an active WhatsApp session window (24h since the user’s last message). If active, free-text messages can be sent; if not, only approved templates.
sessionExpiresAt
string (ISO 8601)
Expiration date/time of the active session window. null if there’s no active window.
curl -X GET "https://api.mindosoftware.com/api/v1/contact-lookup/?phone=5492235961983" \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
{
  "found": true,
  "contact": {
    "id": 123,
    "fullName": "Juan Perez",
    "phone": "+5492235961983",
    "email": "juan@ejemplo.com",
    "contactListId": 5,
    "contactListName": "Lista Principal",
    "source": "organic",
    "createdAt": "2025-01-15T10:30:00Z"
  },
  "hasReplied": true,
  "lastReplyAt": "2025-03-28T14:22:00Z",
  "sessionWindowActive": true,
  "sessionExpiresAt": "2025-03-29T14:22:00Z"
}

Accepted phone formats

The system automatically normalizes the number. All these formats are equivalent:
FormatExample
E.164 with ++5492235961983
E.164 without +5492235961983
With 15 (Argentina)+54223155961983
With 15 without +54223155961983
With spaces/dashes+54 223 15-596-1983
For numbers outside Argentina, use E.164 format with country code.

Use case: Conditional follow-up

Typical workflow for follow-up campaigns:
  1. Send initial template via /api/v1/meta-templates/send/
  2. Wait a period (e.g.: 24-48 hours)
  3. Check status via /api/v1/contact-lookup/?phone=...
  4. Decide action based on the response:
    • found: false — Contact doesn’t exist, check the number
    • hasReplied: true — Already replied, don’t send follow-up
    • hasReplied: false + sessionWindowActive: true — Send free-text follow-up message
    • hasReplied: false + sessionWindowActive: false — Send follow-up template
Python
import requests

API_KEY = "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
BASE_URL = "https://api.mindosoftware.com"

# Step 1: check contact status
lookup = requests.get(
    f"{BASE_URL}/api/v1/contact-lookup/",
    params={"phone": "5492235961983"},
    headers={"X-API-Key": API_KEY}
).json()

# Step 2: decide action
if not lookup["found"]:
    print("Contact doesn't exist in the platform")
elif lookup["hasReplied"]:
    print(f"Already replied on {lookup['lastReplyAt']}, skip follow-up")
else:
    print("Didn't reply, send follow-up")
    if lookup["sessionWindowActive"]:
        print("Window active: can send free-text message")
    else:
        print("Window expired: use template")
JavaScript
const API_KEY = "mindo_xxxxxxxxxxxxxxxxxxxxxxxx";
const BASE_URL = "https://api.mindosoftware.com";

// Step 1: check contact status
const response = await fetch(
  `${BASE_URL}/api/v1/contact-lookup/?phone=5492235961983`,
  { headers: { "X-API-Key": API_KEY } }
);
const lookup = await response.json();

// Step 2: decide action
if (!lookup.found) {
  console.log("Contact doesn't exist in the platform");
} else if (lookup.hasReplied) {
  console.log(`Already replied on ${lookup.lastReplyAt}, skip follow-up`);
} else {
  console.log("Didn't reply, send follow-up");
  if (lookup.sessionWindowActive) {
    console.log("Window active: can send free-text message");
  } else {
    console.log("Window expired: use template");
  }
}