---
title: "Get a contact"
description: "Looks up one contact by phone number or email. Send the phone number\nwith its country code and without the leading `+`.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://zacx.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Zacx Public API › Contacts

`GET /contact`

Looks up one contact by phone number or email. Send the phone number
with its country code and without the leading `+`.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Query parameters

- `getContact.query.phoneNumber` (string, optional) — The contact's phone number with country code, without `+`.
- `getContact.query.email` (string, optional) — The contact's email address.
  - format `email`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://api.zacx.io/v1/contact \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.zacx.io/v1/contact';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.zacx.io/v1/contact"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 200

The contact.

#### Example

```json
{
  "data": {
    "name": "Testing Contact",
    "email": "testingcontact@example.com",
    "phone": "919999999999",
    "customFields": [
      {
        "name": "test field",
        "value": "custom field value"
      }
    ],
    "tags": [
      "test-tag"
    ],
    "assignedUsers": [
      {
        "name": "Meta Inc",
        "phoneNumber": "+918989898989",
        "email": "support@zacx.io"
      }
    ]
  }
}
```

- `getContact.response.200.data` (object, required)
  - `getContact.response.200.data.name` (string, optional)
  - `getContact.response.200.data.email` (string, optional)
    - format `email`
  - `getContact.response.200.data.phone` (string, optional) — Phone number with country code.
    - example `"919999999999"`
  - `getContact.response.200.data.customFields` (array<object>, optional)
    - `getContact.response.200.data.customFields.name` (string, optional)
      - example `"test field"`
    - `getContact.response.200.data.customFields.value` (string, optional)
      - example `"custom field value"`
  - `getContact.response.200.data.tags` (array<string>, optional)
  - `getContact.response.200.data.assignedUsers` (array<object>, optional)
    - `getContact.response.200.data.assignedUsers.name` (string, optional)
      - example `"Meta Inc"`
    - `getContact.response.200.data.assignedUsers.phoneNumber` (string, optional)
      - example `"+918989898989"`
    - `getContact.response.200.data.assignedUsers.email` (string, optional)
      - format `email`; example `"support@zacx.io"`

### 400

The phone number is not in a valid format.

#### Example

```json
{
  "status": "error",
  "code": "VALIDATION_FAILED",
  "message": "Invalid phone number format"
}
```

- `getContact.response.400.status` (string, required)
- `getContact.response.400.code` (string, required) — Stable machine-readable error code.
- `getContact.response.400.message` (string, required) — Human-readable explanation.

### 404

No contact matches the given identifier.

#### Example

```json
{
  "status": "error",
  "code": "CONTACT_NOT_FOUND",
  "message": "Contact not found"
}
```

- `getContact.response.404.status` (string, required)
- `getContact.response.404.code` (string, required) — Stable machine-readable error code.
- `getContact.response.404.message` (string, required) — Human-readable explanation.


Source: https://zacx.io/api/contact/get/index.md
