Get Contacts

This API allows you to retrieve a list of contacts associated with a specific user domain, based on the provided API key.

Endpoint

GET https://zap.pandaidx.com/api/getContacts?api_key={{api_key}}

Authentication

You must provide an API key as a query parameter to authenticate the request. The key is used to identify and authorize the user making the request.

Query Parameters

  • api_key (required): The API key for authenticating the request. You can obtain this from the Panda IDX dashboard.

Request Examples

cURL
js
py
# Example Request using cURL
curl -X GET "https://zap.pandaidx.com/api/getContacts?api_key=your_api_key_here"

Response

The API returns a JSON array of contact objects. Each contact contains the following fields:

Response Fields

FieldTypeDescription
idStringThe unique identifier of the contact.
nameStringThe full name of the contact.
emailStringThe email address of the contact.
phonesArrayAn array of phone numbers associated with the contact.
createdAtStringThe date and time when the contact was created (ISO 8601 format).
stageStringThe current stage of the contact, indicating their status (e.g., lead, client).
sourceStringThe source of the contact (e.g., referral, signup form).
imageStringThe URL to the contact's profile image, if available.
spokenLanguagesArrayA list of languages spoken by the contact.
addressStringThe full address of the contact.
streetAddressStringThe street address of the contact.
notesStringNotes about the contact (e.g., follow-up details).
linksObjectAn object containing social media and other links related to the contact.
registrationObjectAn object containing the registration details of the contact.

Example Response

[
  {
    "id": "66955f1f93c1be2dd9deb221",
    "name": "Florencia Hernandez",
    "email": "florencia@gmail.com",
    "phones": ["342-121-1917"],
    "createdAt": "2024-07-15T17:40:47.768Z",
    "stage": "active-client",
    "source": "signup-form",
    "image": "https://example.com/images/florencia.jpg",
    "spokenLanguages": ["English", "Spanish"],
    "address": "123 Main St, Miami, FL",
    "streetAddress": "123 Main St",
    "notes": "Interested in premium plan",
    "links": {
      "facebook": "https://facebook.com/florencia.hernandez",
      "twitter": "https://twitter.com/florenciaH",
      "instagram": "https://instagram.com/florenciaH",
      "linkedin": "https://linkedin.com/in/florencia-hernandez",
      "youtube": "https://youtube.com/channel/UCflorencia",
      "website": "https://florencia.com",
      "whatsapp": "https://wa.me/13421211917",
      "tiktok": "https://tiktok.com/@florenciaH"
    },
    "registration": {
      "date": "2024-07-01"
    }
  }
]

Errors

In the case of an error, the API will return an appropriate HTTP status code and an error message.

Error Codes

HTTP CodeError TypeDescription
404NotFoundErrorNo contacts found for the given domain or API key.
500ServerErrorAn internal server error occurred.

Example Error Response

{
  "error": "NotFoundError",
  "message": "Contacts not found"
}

Notes

  • Ensure that the API key provided is valid and belongs to an authenticated user.
  • The returned contacts are filtered based on the user domain associated with the API key.