Skip to main content
GET
/
api
/
contacts
/
me
List Contacts
curl --request GET \
  --url https://api.automatechats.com/api/contacts/me \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.automatechats.com/api/contacts/me"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.automatechats.com/api/contacts/me', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.automatechats.com/api/contacts/me",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.automatechats.com/api/contacts/me"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.automatechats.com/api/contacts/me")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.automatechats.com/api/contacts/me")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "code": 200,
  "message": "Contacts fetched successfully",
  "data": {
    "contacts": [
      {
        "id": "65e0bc51c12e4d70834b070e",
        "firstName": "John",
        "lastName": "Doe",
        "chatName": "John Doe",
        "email": "john.doe@example.com",
        "phoneNumber": "9876543210",
        "countryCode": "+91",
        "source": "manual",
        "subscribed": true,
        "tagsId": [
          "65e0bc51c12e4d70834b070e"
        ],
        "tags": [
          {
            "tagId": "65e0bc51c12e4d70834b070e",
            "name": "VIP",
            "text_color": "#ffffff",
            "background_color": "#ef4444"
          }
        ],
        "customFields": [
          {
            "id": "65f12ab3c9e4f1a2b3c4d5e6",
            "label": "Company Name",
            "value": "Google Deepmind"
          }
        ],
        "dob": "1990-01-15",
        "anniversary": "2020-06-20",
        "workspaceId": 246,
        "createdBy": "6996aeeedf12574080a99d81",
        "createdAt": "2026-05-18T15:00:00.000Z",
        "updatedAt": "2026-05-18T15:05:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 145,
      "totalPages": 15
    }
  },
  "timestamp": "2026-05-18T15:00:00.000Z"
}
{
  "status": "error",
  "code": 401,
  "message": "Unauthorized access: Invalid or missing authentication credentials.",
  "timestamp": "2026-05-18T15:00:00.000Z"
}
Use this endpoint to retrieve a paginated list of contacts in your workspace. All query parameters are optional. By default, the API returns the first 10 contacts. You can use the q parameter for a full-text search across names, emails, and phone numbers. You can also use advanced filtering by combining tags, custom fields, segments, and date ranges.

Authorizations

X-API-Key
string
header
required

Query Parameters

page
integer
default:1

Page number for pagination

limit
integer
default:10

Number of items per page (max: 100)

q
string

Free-text search query matching first name, last name, phone number, or email.

subscribed
boolean

Filter by WhatsApp subscription status.

tagsId
string

Filter by tags using comma-separated Tag IDs (e.g. id1,id2). Use in combination with tagsMode.

segmentId
string

Filter by segment ID(s). Comma-separated list supported.

startDate
string<date-time>

Filter contacts created on or after this ISO date-time.

endDate
string<date-time>

Filter contacts created on or before this ISO date-time.

Response

Contacts retrieved successfully

status
string
Example:

"success"

code
integer
Example:

200

message
string
Example:

"Contacts fetched successfully"

data
object
timestamp
string<date-time>
Example:

"2026-05-18T15:00:00.000Z"