# Phone Finder

> Find a phone number for a person.

- **Endpoint:** `POST https://api.nyne.ai/person/phone`
- **Group:** Person APIs (https://api.nyne.ai/documentation/person.md)
- **Auth:** `X-API-Key` + `X-API-Secret` headers
- **Mode:** Asynchronous — submit returns `202 Accepted` with a `request_id`; poll `GET /person/phone?request_id=<request_id>` (same auth headers) until `status` is `completed`, or supply a `callback_url` to receive the result by webhook.
- **HTML version:** https://api.nyne.ai/documentation/person/phone

Convenience wrapper over `/person/lookup-fields` that forces `fields=["mobile"]`. Resolve a person from any identifier (`email`, `phone`, `social_media_url`, or `name`) and get back their mobile number. The request is queued and returns a `request_id`; poll the status endpoint or supply a `callback_url`.

## Authentication

All `/person/*` and `/company/*` endpoints authenticate with an API key and secret sent as HTTP headers on every request: `X-API-Key` and `X-API-Secret`. Create keys from your Nyne dashboard and keep the secret server-side. Rate limits: 100 requests/minute, 1,000 requests/hour. Full guide: https://api.nyne.ai/documentation/authentication.md

## Parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `name` | string | no | Full name. | "Jane Doe" |
| `company` | string | no | Employer context. | "Acme" |
| `email` | string | no | Email identifier. | "jane.doe@acme.com" |
| `social_media_url` | string | no | Profile URL. At least one identifier is required. | "https://linkedin.com/in/janedoe" |
| `callback_url` | string | no | If set, the completed result is POSTed here when the job finishes. Must be a valid HTTP(S) URL on an allowed host when a callback allow-list is configured. | "https://hooks.example.com/result" |

## Polling for the result

The submit returns `202 Accepted` with a `request_id`. Poll the same path until `status` is `completed` (results stay available afterwards), or pass a `callback_url` on the submit to receive the completed result by webhook instead:

```bash
curl "https://api.nyne.ai/person/phone?request_id=<request_id>" \
  -H "X-API-Key: nyne_live_a17f…3c9b" \
  -H "X-API-Secret: nyne_sec_••••••••"
```

## Credit usage

| Item | Credits | Condition |
| --- | --- | --- |
| Phone Lookup | — | credit_costs.person_phone — charged on a found number |
| No match | 0 | Empty results never burn credits |

## Responses

| Code | Meaning |
| --- | --- |
| `202` | Request queued — poll the status endpoint (or wait for the callback) with the returned request_id |
| `400` | Malformed JSON, missing required parameters, or an invalid field |
| `401` | Missing or invalid API credentials |
| `402` | insufficient_credits — no balance in the selected bucket |
| `403` | subscription_required or ip_not_allowed |
| `429` | rate_limit_exceeded |
| `503` | service_unavailable — backing store/queue unconfigured |

## Example request

### cURL

```bash
curl -X POST https://api.nyne.ai/person/phone \
  -H "X-API-Key: nyne_live_a17f…3c9b" \
  -H "X-API-Secret: nyne_sec_••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "company": "Acme",
    "email": "jane.doe@acme.com"
  }'
```

### Python

```python
import requests

resp = requests.post(
    "https://api.nyne.ai/person/phone",
    headers={
        "X-API-Key": "nyne_live_a17f…3c9b",
        "X-API-Secret": "nyne_sec_••••••••",
    },
    json={
        "name": "Jane Doe",
        "company": "Acme",
        "email": "jane.doe@acme.com",
    },
)
data = resp.json()
print(data)
```

### Node

```javascript
const resp = await fetch("https://api.nyne.ai/person/phone", {
  method: "POST",
  headers: {
    "X-API-Key": "nyne_live_a17f…3c9b",
    "X-API-Secret": "nyne_sec_••••••••",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Jane Doe",
    company: "Acme",
    email: "jane.doe@acme.com",
  }),
});
const data = await resp.json();
console.log(data);
```

### PHP

```php
<?php
$ch = curl_init("https://api.nyne.ai/person/phone");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "X-API-Key: nyne_live_a17f…3c9b",
    "X-API-Secret: nyne_sec_••••••••",
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "name" => "Jane Doe",
    "company" => "Acme",
    "email" => "jane.doe@acme.com",
  ]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
```

## Example response

```json
{
  "request_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271",
  "status": "completed",
  "completed": true,
  "result": {
    "mobile": "+1-555-123-4567"
  },
  "completed_on": "2026-01-15T10:31:00Z"
}
```

---

All documentation pages are available as Markdown by appending `.md` to their URL. Index: https://api.nyne.ai/llms.txt
