# List the organization's phone numbers (/docs/api-reference/sms/list-sms-numbers)

Every number of the organization, whether it can send live messages now (its carrier registration is approved) and whether its replies arrive in the API key's environment. Numbers are bought and registered in the dashboard.

`GET https://api.coss.com/v1/sms/numbers`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.sms.numbers.list();
```

HTTP:

```sh
curl -X GET "https://api.coss.com/v1/sms/numbers" \
  -H "Authorization: Bearer $COSS_API_KEY"
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.sms.numbers.list()
```

Go:

```go
import (
	"context"

	cossclient "github.com/cosscom/coss-go/client"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

client.Sms.Numbers.List(
    context.TODO(),
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.sms.numbers.list
```

PHP:

```php
<?php

use Coss\Coss;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->sms->numbers->list();
```

Java:

```java
import com.coss.Coss;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.sms().numbers().list();
```

.NET:

```csharp
using Coss;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Sms.Numbers.ListAsync();
```

## Response 200

The numbers.

- `object` ("list", required)
- `data` (object[], required)
  - `object` ("sms_number", required)
  - `id` (string, required)
  - `phone_number` (string, required): The number, in E.164.
  - `kind` ("local" | "toll_free", required): `local` (US A2P 10DLC) or `toll_free` (toll-free verification, and sends only to the US and Canada).
  - `country` (string, required): Its country (ISO 3166-1 alpha-2).
  - `status` ("pending" | "active" | "releasing", required): `pending`: not ready yet. `active`: ready, once its registration is approved. `releasing`: being given up.
  - `registration_status` ("draft" | "submitted" | "in_review" | "approved" | "rejected" | "failed" | null, required): Its carrier registration's status; live sends need `approved`.
  - `can_send` (boolean, required): Whether live sends can go from it now.
  - `receives_here` (boolean, required): Whether replies to it arrive in the environment of the key making the request.
  - `created_at` (string, required, date-time)
- `has_more` (boolean, required)

Example:

```json
{
  "object": "list",
  "data": [],
  "has_more": false
}
```

## Errors

- `400`: The `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).