# Find a contact by phone number or by your own id (/api/lookupContact)

A separate path from `GET /contacts/{id}`, not an id that happens to
read as a word. Pass `phone` or `external_id`; when both are sent,
`external_id` decides. A number must be in E.164 form; a local number
is refused rather than guessed. A number matches the WhatsApp column
first, then the SMS column.

Endpoint: GET /api/v1/contacts/lookup
Full URL: https://app.sendkuy.com/api/v1/contacts/lookup
- query parameter phone (optional): string — E.164, with the leading `+`.
- query parameter external_id (optional): string — The id you gave the contact in your own system. Matched exactly, case included.
Success status: 200

cURL:

```bash
curl -X GET "https://app.sendkuy.com/api/v1/contacts/lookup?phone=%2B6281234567890" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
```

Node.js:

```ts
import { SendKuy } from 'sendkuy';

const sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

const result = await sendkuy.contacts.lookup({
  phone: '+6281234567890',
});
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->contacts()->lookup([
    'phone' => '+6281234567890',
]);
```

Python:

```python
import requests

response = requests.request(
    "GET",
    "https://app.sendkuy.com/api/v1/contacts/lookup",
    headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
    params={
        "phone": "+6281234567890"
    },
)

data = response.json()["data"]
```