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

# Contacts Lookup by Phone Number

> Use the Sinjapp Business contacts lookup endpoint to check whether a phone number can receive messages before sending from a tenant sender.

Use contact lookup before sending when you want to confirm that the recipient exists and can receive messages.

Requires `contacts.lookup` scope.

## Lookup By Phone

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://{tenant}.sinjapp.org/api/v1/contacts/lookup?phone={recipient_phone}&sender_phone={sender_phone}" \
    -H "X-Api-Key: {tenant_api_key}" \
    -H "Accept: application/json"
  ```

  ```js JavaScript theme={null}
  const params = new URLSearchParams({
    phone: recipientPhone,
    sender_phone: senderPhone,
  })

  const response = await fetch(`https://{tenant}.sinjapp.org/api/v1/contacts/lookup?${params}`, {
    headers: {
      'X-Api-Key': tenantApiKey,
      'Accept': 'application/json',
    },
  })

  const lookup = await response.json()
  ```

  ```php PHP theme={null}
  <?php

  $query = http_build_query([
      'phone' => $recipientPhone,
      'sender_phone' => $senderPhone,
  ]);

  $response = file_get_contents('https://{tenant}.sinjapp.org/api/v1/contacts/lookup?' . $query, false, stream_context_create([
      'http' => [
          'method' => 'GET',
          'header' => [
              'X-Api-Key: ' . $tenantApiKey,
              'Accept: application/json',
          ],
          'timeout' => 30,
      ],
  ]));

  $lookup = json_decode($response, true);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://{tenant}.sinjapp.org/api/v1/contacts/lookup",
      headers={
          "X-Api-Key": tenant_api_key,
          "Accept": "application/json",
      },
      params={
          "phone": recipient_phone,
          "sender_phone": sender_phone,
      },
      timeout=30,
  )

  lookup = response.json()
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "exists": true,
  "can_receive": true,
  "reason_code": "ok",
  "recipient_id": 123,
  "is_verified": true,
  "phone_verified_at": "2026-04-28T10:00:00Z"
}
```

If `can_receive` is `false`, do not send the message. Show the reason to your operator or retry after the recipient fixes their Sinjapp account state.
