# Get Phone Number Status

`GET /status/phone-number/{phoneNumber}`

Retrieve a phone number's order status and campaign attachment status.

Check if a number is active and ready to send messages.

## Authentication

Send your API key in the `PINNACLE-API-KEY` header.

## Parameters

- `phoneNumber` — path, string. Phone number in E164 format that is in review.

## Responses

### 200

Successfully retrieved.

Content type: `application/json`. Schema: `PhoneNumberStatus`.

- `errors` — `string[]`. List of errors that occured.
- `phoneNumber` — `string`. Phone number in E164 format that is in review
- `status` — `PhoneNumberStatusEnum`, values: `PENDING`, `ACTIVE`, `FAILURE`. Current status of the phone number.

`PENDING`: Not active during the one or more of the following: purchase pending, brand or campaign pending verification, and pending assignment to a campaign. To use a number, make sure to attach it to an active campaign.

`ACTIVE`: Number is ready to send messages.

`FAILURE`: Errors occurred while activating this number. See the errors field.

Example:

```json
{
  "phoneNumber": "+14151234567",
  "status": "PENDING",
  "errors": []
}
```

### 400

The request was unacceptable, often due to providing an invalid update.

Errors may originate from invalid payload or from Pinnacle's additional validation checks. For example, providing an URL that cannot be accessed, updating a campaign that is currently being reviewed, updating data that you cannot access, sending a malformed message, and so on.

For `Pinnacle Validation Error` inspect the `error` payload to determine the source of the failure. These errors are likely due to additional validation and business logic checks.

For `Request Validation Error` inspect the `description` and `errors` payload to determine the source of failure. These errors are likely due to invalid payload inside the request.

Content type: `application/json`. Schema: `Request Validation Error | Pinnacle Validation Error`.

- Variant: variant 1
- `description` — `string`. Human-readable summary of validation failures.
- `errors` — `object`. Structured dictionary of issues containing two main sections:
- `errors`: Array of global validation errors not tied to specific fields
- `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array
- Variant: variant 2
- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [],
    "properties": {
      "example_field": {
        "errors": [
          "Invalid input: expected string, received NaN"
        ]
      }
    }
  }
}
```

### 401

The request lacks valid authentication credentials or the provided credentials are invalid.

Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Invalid API key."
}
```

### 403

Your subscription does not include access to this feature.

This occurs when attempting to use functionality that requires a higher subscription tier.
Please upgrade your subscription to access this feature.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Your subscription does not include access to this feature."
}
```

### 404

The requested resource could not be found.

This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "The requested resource could not be found."
}
```

### 500

An unexpected error occurred on Pinnacle's servers while processing your request.

If this error persists, please contact support with the request details.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "An unexpected error occurred while processing your request."
}
```

### 501

The requested functionality is not implemented on the server.

This typically indicates that the feature or endpoint you attempted to access is unavailable or not yet supported.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "This feature has not been implemented yet."
}
```

## SDK examples

### TypeScript

```typescript
import { PinnacleClient } from "rcs-js";

const client = new PinnacleClient({
  apiKey: process.env.PINNACLE_API_KEY!,
});

await client.status.get.phoneNumber("+14151234567");
```

### Python

```python
import os
from rcs import Pinnacle

client = Pinnacle(
    api_key=os.environ["PINNACLE_API_KEY"],
)

client.status.get.phone_number(
    phone_number="+14151234567",
)
```

### Ruby

```ruby
require "rcs"

client = Pinnacle::Client.new(
  api_key: ENV.fetch("PINNACLE_API_KEY")
)

client.status.get.phone_number(phone_number: "+14151234567")
```

## Machine-readable schema

[OpenAPI 3.1 JSON](https://docs.pinnacle.sh/openapi.json)
