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

# Real-Time Disconnect

> Check real-time phone line status to determine if a number is connected or disconnected.

## Request

### Headers

<ParamField header="loginId" type="string" required>
  Your API Key (LoginId from your DNCScrub account)
</ParamField>

### Query Parameters

<ParamField query="phoneNumber" type="string" required>
  10-digit phone number to check
</ParamField>

## Output parameters

| Field       | Description                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------- |
| `Phone`     | Ten digit phone number that was queried. Example 5039367188                                 |
| `Status`    | See Status Table below                                                                      |
| `ErrorText` | Descriptive message of exceptional circumstance. This field is populated if Status is Error |

### Status Table

| Status              | Description                               |
| ------------------- | ----------------------------------------- |
| `connected`         | Typically connected                       |
| `connected-75`      | Connected 75% of the time                 |
| `pending`           | Not completed yet                         |
| `disconnected`      | Typically disconnected                    |
| `disconnected-70`   | Disconnected 70% of the time              |
| `busy`              | Busy                                      |
| `unreachable`       | Not reachable                             |
| `invalid phone`     | Phone not valid                           |
| `restricted`        | Can't be dialed                           |
| `invalid-format`    | Phone or zip are not in a valid format    |
| `invalid-phone`     | Phone number is not valid                 |
| `bad-zip-code`      | Zip code is not valid                     |
| `serverunavailable` | \<various messages> contact support       |
| `ERROR`             | See ErrorText parameter for error message |

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request GET \
    'https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect
      ?phoneNumber=5039365190' \
    --header 'loginId: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect?phoneNumber=5039365190',
    {
      method: 'GET',
      headers: {
        'loginId': 'YOUR_API_KEY'
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```csharp C# theme={null}
  using (var client = new HttpClient())
  {
      client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");

      var response = await client.GetAsync(
          "https://dataapi.dncscrub.com/v1.4/Data/RealTimeDisconnect?phoneNumber=5039365190"
      );

      var result = await response.Content.ReadAsStringAsync();
      Console.WriteLine(result);
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  {
    "Phone": "5039365190",
    "Status": "connected",
    "ErrorText": ""
  }
  ```
</ResponseExample>
