> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# List alias addresses

GET https://%7BYour_Space_Name%7D.signalwire.com/api/fabric/alias_addresses

Lists the alias addresses in your SignalWire project. An alias is a named route in the `public` or `private` context that forwards calls and messages to the resource it points at. [SIP addresses](/docs/apis/rest/sip-addresses/list-sip-addresses) and [phone numbers](/docs/apis/rest/phone-numbers/list-phone-numbers) are managed through their own operations.

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Calling_, _Fax_, _Messaging_, or _Video_.

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

Reference: https://signalwire.com/docs/apis/rest/alias-addresses/list-alias-addresses

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

### Query parameters

- `page_size` (integer, optional, default: 50) — The number of results per page.
- `page_number` (integer, optional, default: 0) — The page index, used together with `page_token`.
- `page_token` (string, optional) — Opaque cursor token from a previous response's `links.next` or `links.prev`. Begins with `PA` or `PB`.

## Response

### 200

The request has succeeded.

- `links` (object, required) — Pagination links for the response.
  - `self` (string, required) — Link to the current page of results.
  - `first` (string, required) — Link to the first page of results.
  - `next` (string, optional) — Link to the next page of results.
  - `prev` (string, optional) — Link to the previous page of results.
- `items_count` (integer, required) — The number of alias addresses in this page of results.
- `data` (list of object, required) — An array of alias address objects.
  - `id` (string, required) — Unique identifier for the alias address.
  - `type` (enum, required) — The object type. Always `alias`.
    - Allowed values: `alias`
  - `resource_id` (string, required) — ID of the resource that handles calls and messages to this alias.
  - `name` (string, required) — URL-safe name for the alias. Used to build its address.
  - `display_name` (string, required) — Human-friendly label for the alias. Defaults to `name`.
  - `display_type` (enum, required) — Display type derived from the handler resource. Returned for reference only and cannot be set.
    - Allowed values: `app`, `room`, `call`, `subscriber`
  - `channels` (list of enum, required) — Channels enabled on this alias.
    - Allowed values: `audio`, `messaging`, `video`
  - `codecs` (list of enum, required) — Codecs enabled for calls to this alias. Empty when none are set.
    - Allowed values: `OPUS`, `G722`, `PCMU`, `PCMA`, `G729`, `VP8`, `H264`
  - `context` (enum, required) — Access context the alias lives in.
    - Allowed values: `public`, `private`
  - `uri` (string, required) — The resource address this alias resolves to, in the form `/<context>/<name>`.
  - `created_at` (datetime, required) — Date and time when the alias address was created.
  - `updated_at` (datetime, required) — Date and time when the alias address was last updated.

## Errors

### 401 Unauthorized Error

Access is unauthorized.

- `error` (enum, required)
  - Allowed values: `Unauthorized`

### 422 Unprocessable Entity Error

The request contains invalid parameters. See errors for details.

- `errors` (list of object, required) — List of validation errors.
  - `type` (string, required) — The category of error.
  - `code` (string, required) — A specific error code.
  - `message` (string, required) — A description of what caused the error.
  - `url` (string, required) — A link to documentation about this error.
  - `attribute` (string, optional, nullable) — The request parameter that caused the error, if applicable.

### 500 Internal Server Error

An internal server error occurred.

- `error` (enum, required)
  - Allowed values: `Internal Server Error`

## Examples

**Response**

```json
{
  "links": {
    "self": "https://example.signalwire.com/api/fabric/addresses/alias?page_number=0&page_size=50",
    "first": "https://example.signalwire.com/api/fabric/addresses/alias?page_number=0&page_size=50",
    "next": "https://example.signalwire.com/api/fabric/addresses/alias?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca",
    "prev": "https://example.signalwire.com/api/fabric/addresses/alias?page_number=0&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca"
  },
  "items_count": 1,
  "data": [
    {
      "id": "8f14e45f-ceea-467d-9c2b-7a1d3a9b2c34",
      "type": "alias",
      "resource_id": "b3877739-5c7e-4d4f-9d1a-2f0c8c2f1a11",
      "name": "support",
      "display_name": "Support Line",
      "display_type": "app",
      "channels": [
        "audio",
        "messaging",
        "video"
      ],
      "codecs": [],
      "context": "public",
      "uri": "/public/support",
      "created_at": "2024-05-06T12:20:00Z",
      "updated_at": "2024-05-06T12:20:00Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/fabric/alias_addresses"

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

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/fabric/alias_addresses';
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/fabric/alias_addresses"

	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/fabric/alias_addresses")

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/fabric/alias_addresses")
  .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/fabric/alias_addresses', [
  '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/fabric/alias_addresses");
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/fabric/alias_addresses")! 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()
```