# Get Whitelist Status

`GET /rcs/test/agents/{agentId}/numbers`

Check the current whitelist status of a phone number for a specific test agent.

Use this endpoint to poll the status of a previously whitelisted number and determine
whether the recipient has accepted or rejected the tester invite.

## Status Values

- **`PENDING`** — The tester invite was sent but the recipient has not yet responded. Ask the recipient to check their messages and accept the invite.
- **`ACCEPTED`** — The recipient accepted the invite. Messages can be exchanged.
- **`REJECTED`** — The recipient rejected the invite or the invite could not be delivered since the carrier does not support test agents. If the user rejected the invite, they can accept it again by tapping "Make me a tester" in the same message from "RBM Tester Management".

    **Accepting the invite**

    Accepting the tester invite

    **Declining the invite**

    Declining the tester invite

## Authentication

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

## Parameters

- `agentId` — path, string. The RCS agent ID (must be prefixed with `agent_`).
- `phoneNumber` — query, string. The phone number to check whitelist status for (E.164 format).

## Responses

### 200

The current whitelist status of the phone number.

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

- `status` — `RcsWhitelistStatus`, values: `PENDING`, `ACCEPTED`, `REJECTED`. Status of a whitelisted phone number for RCS testing.

- `PENDING` — The tester invite has been sent but the recipient has not yet accepted or rejected it.
- `ACCEPTED` — The recipient accepted the tester invite and can send/receive messages with the test agent.
- `REJECTED` — The recipient rejected the tester invite or the invite could not be delivered.

Example:

```json
{
  "status": "PENDING"
}
```

### 400

Validation failed. The payload has missing required fields and/or invalid types.

See https://zod.dev/error-formatting for more information.

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

- `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

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [
      "Unrecognized key: 'extraKey'"
    ],
    "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 phone number has not been whitelisted for this test agent.

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": "Phone number not found for this test agent"
}
```

### 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."
}
```

## SDK examples

### TypeScript

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

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

await client.rcs.test.getWhitelistStatus("agent_abc123def456", {
    phoneNumber: "+12345678901"
});
```

### Python

```python
import os
from rcs import Pinnacle

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

client.rcs.test.get_whitelist_status(
    agent_id="agent_abc123def456",
    phone_number="+12345678901",
)
```

### Ruby

```ruby
require "rcs"

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

client.rcs.test.get_whitelist_status(
  agent_id: "agent_abc123def456",
  phone_number: "+12345678901"
)
```

## Machine-readable schema

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