> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getdial.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getdial.ai/_mcp/server.

# Look up what a number supports

GET https://api.getdial.ai/api/v1/lookup

Ask what a phone number can receive, before you send to it. Works on any
number in the world — it doesn't have to be one of your Dial numbers, and
you don't have to have messaged it before.

`supports` describes **the number you asked about**, not your own line.
Each key is a channel, and the boolean says whether that number can be
reached there. Today the only key is `imessage`; further channels arrive
as further keys, so read the ones you care about by name rather than
assuming the whole set.

**The answer is point-in-time, not a property of the number.** `true`
means the number is reachable on iMessage as of this request — someone
who changes device or turns the service off stops being reachable, and
the same number can answer differently next week. Treat it as a strong
signal for picking a channel, not as a promise that a later send lands.

**A lookup that fails is never reported as `false`.** If Dial can't
complete the check the request fails with a `502`, so `false` always
means "we asked, and the number isn't reachable there" — never "we
couldn't find out".


Reference: https://docs.getdial.ai/api-reference/rest-api/lookup/number

## Authentication

- `Authorization` header (bearer token, required) — Your Dial API key, sent as `Authorization: Bearer sk_live_...`

## Request

### Query parameters

- `number` (string, required) — The number to look up, in E.164 — `+14155550123`. Spaces, dashes and parentheses are accepted and stripped; the normalized form comes back as `number`.

## Response

### 200

What the number supports.

- `number` (string, required) — The number you asked about, normalized to E.164.
- `supports` (object, required) — One key per channel, true when the number can be reached there. Keys are added over time — read the ones you need by name.
  - `imessage` (boolean, required) — Whether the number can currently receive iMessage.

## Errors

### 400 Bad Request Error

`number` is missing, or holds no digits.

- `error` (string or map from string to any, optional) — An error message, or a validation-error object for 400 responses.

### 401 Unauthorized Error

Missing or invalid API key.

- `error` (string or map from string to any, optional) — An error message, or a validation-error object for 400 responses.

### 429 Too Many Requests Error

Too many attempts. Wait before retrying. During registration this also covers the cap on verification codes sent to a single phone number.

- `error` (string or map from string to any, optional) — An error message, or a validation-error object for 400 responses.

### 502 Bad Gateway Error

The lookup couldn't be completed. Nothing is implied about the number either way — ask again.

- `error` (string or map from string to any, optional) — An error message, or a validation-error object for 400 responses.

## Examples

**Response**

```json
{
  "number": "+14155550123",
  "supports": {
    "imessage": true
  }
}
```

**SDK Code**

```python Lookup_number_example
import requests

url = "https://api.getdial.ai/api/v1/lookup"

querystring = {"number":"number"}

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

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

print(response.json())
```

```javascript Lookup_number_example
const url = 'https://api.getdial.ai/api/v1/lookup?number=number';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Lookup_number_example
package main

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

func main() {

	url := "https://api.getdial.ai/api/v1/lookup?number=number"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Lookup_number_example
require 'uri'
require 'net/http'

url = URI("https://api.getdial.ai/api/v1/lookup?number=number")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Lookup_number_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getdial.ai/api/v1/lookup?number=number")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Lookup_number_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getdial.ai/api/v1/lookup?number=number', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Lookup_number_example
using RestSharp;

var client = new RestClient("https://api.getdial.ai/api/v1/lookup?number=number");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Lookup_number_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getdial.ai/api/v1/lookup?number=number")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```