> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# Get caller ID name

GET https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/phone_numbers/{id}/cnam

Retrieves the most recent caller ID name request for a phone number in your project, including its current review status. After [Request a caller ID name](/docs/apis/rest/caller-id-name/request-caller-id-name), poll this operation until `status` is `approved`, `rejected`, or `failed`.

The response's `name` is the requested name. It can differ from the name call recipients currently see while the request is `pending` or `in_review`, or after it is `rejected` or `failed`. To retrieve the caller ID name currently applied at the carrier, read `cnam` on the phone number with [Get phone number](/docs/apis/rest/phone-numbers/retrieve-phone-number).

Returns `404` when the phone number is not in your project or has never had a caller ID name requested.

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Numbers_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

Reference: https://signalwire.com/docs/apis/rest/caller-id-name/retrieve-caller-id-name

## Authentication

- `Authorization` header (basic auth, required) — SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

## Request

### Path parameters

- `id` (string, required) — Unique ID of the phone number.

## Response

### 200

The request has succeeded.

- `type` (enum, required) — The type of object. Always `cnam`.
  - Allowed values: `cnam`
- `id` (string, required) — The unique identifier of the caller ID name request.
- `phone_number_id` (string, required) — The unique identifier of the phone number this request belongs to.
- `name` (string, required) — The requested caller ID name after normalization. SignalWire removes control characters, trims leading and trailing whitespace, collapses runs of whitespace to single spaces, and converts letters to upper case before storing the value. The stored name is at most 15 characters.
- `status` (enum, required) — The current state of the request. | Status | What it means | | --- | --- | | `pending` | The name is queued for compliance review. | | `approved` | The name passed review and is applied at the carrier. | | `in_review` | The name needs a manual decision before it can be approved or rejected. | | `rejected` | The name is not allowed. Submit a different name or follow `required_action` when provided. | | `failed` | SignalWire could not finish processing the request. Request the same name again. |
  - Allowed values: `pending`, `approved`, `in_review`, `rejected`, `failed`
- `reason` (enum, required, nullable) — A machine-readable reason the request requires review, was rejected, or failed, or `null` when no specific reason was recorded. This value is always `null` while the request is `pending` and after it is `approved`. It can also be `null` when a request was held for review or rejected before SignalWire recorded a concern about the requested name. | Code | What it means | | --- | --- | | `offensive_language` | The name contains language that can't be displayed on calls. | | `impersonation` | The name appears to impersonate another person or organization. | | `unverified_brand` | The name can't yet be confirmed as belonging to your business. | | `implied_trusted_institution` | The name could imply you represent a bank, government agency, or similar institution. | | `scam_wording` | The name uses wording commonly associated with scam calls. | | `deceptive` | The name is misleading about who is calling. | | `unsupported_personal_name` | The name is a personal name that isn't supported by your verified business details. | | `too_generic` | The name is too generic to identify you on a call. | | `invalid_format` | The name contains characters or formatting that can't be displayed. | | `unrelated_to_business` | The name doesn't appear to relate to your verified business. | | `needs_documentation` | Documentation showing you're authorized to use the name is required. | | `other_compliance_concern` | The name didn't pass compliance review, for a reason not covered by the other codes. | | `processing_failed` | Processing the request failed. Request the name again. |
  - Allowed values: `offensive_language`, `impersonation`, `unverified_brand`, `implied_trusted_institution`, `scam_wording`, `deceptive`, `unsupported_personal_name`, `too_generic`, `invalid_format`, `unrelated_to_business`, `needs_documentation`, `other_compliance_concern`, `processing_failed`
- `required_action` (string, required, nullable) — An action you can take to address the review, such as changing, verifying, or documenting the requested name. `null` when review produced no specific action.
- `created_at` (datetime, required) — The date the request was created.
- `updated_at` (datetime, required) — The date the request was last updated.

## Examples

**Response**

```json
{
  "type": "cnam",
  "id": "b6a4f0c2-3f1e-4c9a-9c1b-7f2e5a1d8c40",
  "phone_number_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "ACME PLUMBING",
  "status": "approved",
  "reason": null,
  "required_action": null,
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam"

response = requests.get(url, auth=("<project_id>", "<api_token>"))

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam';
const credentials = btoa("<project_id>:<api_token>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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

```go
package main

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

func main() {

	url := "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam"

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

	req.SetBasicAuth("<project_id>", "<api_token>")

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

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

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

}
```

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

url = URI("https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<project_id>", "<api_token>")

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

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

HttpResponse<String> response = Unirest.get("https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam")
  .basicAuth("<project_id>", "<api_token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam', [
  'headers' => [
  ],
    'auth' => ['<project_id>', '<api_token>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam");
client.Authenticator = new HttpBasicAuthenticator("<project_id>", "<api_token>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<project_id>:<api_token>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/cnam")! 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()
```