Addresses

View as MarkdownOpen in Claude

Read-only access to fabric addresses. Addresses represent the endpoints (phone numbers, SIP URIs, domains) that route traffic to fabric resources.

Access via client.fabric.addresses on a RestClient instance.

list

List all fabric addresses.

Response

datalist of objectsRequired
An array of objects containing a list of Resource Addresses

Response Example

Response
{
"data": [
{
"id": "691af061-cd86-4893-a605-173f47afc4c2",
"name": "justice-league",
"display_name": "Justice League",
"cover_url": "https://coverurl.com",
"preview_url": "https://previewurl.com",
"locked": true,
"channels": {
"audio": "/external/resource_name?channel=audio"
},
"created_at": "2024-05-06T12:20:00Z",
"type": "app"
}
],
"links": {
"self": "https://example.signalwire.com/api/fabric/addresses?page_number=0&page_size=50",
"first": "https://example.signalwire.com/api/fabric/addresses?page_number=0&page_size=50",
"next": "https://example.signalwire.com/api/fabric/addresses?page_number=1&page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca",
"prev": "https://example.signalwire.com/api/fabric/addresses?page_number=0&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca"
}
}

get

Retrieve a single fabric address.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of a FabricAddress.

Response

idstringRequiredformat: "uuid"
Unique ID of the Fabric Address.
namestringRequired
Name of the Fabric Address.
display_namestringRequired
Display name of the Fabric Address.
cover_urlstringRequired
Cover url of the Fabric Address.
preview_urlstringRequired
Preview url of the Fabric Address.
lockedbooleanRequired
Locks the Fabric Address. This is used to prevent the Fabric Address from accepting calls.
channelsobjectRequired
Channels of the Fabric Address.
created_atdatetimeRequired
Fabric Address Creation Date.
typeenumRequired
DisplayTypes

Response Example

Response
{
"id": "691af061-cd86-4893-a605-173f47afc4c2",
"name": "justice-league",
"display_name": "Justice League",
"cover_url": "https://coverurl.com",
"preview_url": "https://previewurl.com",
"locked": true,
"channels": {
"audio": "/external/resource_name?channel=audio"
},
"created_at": "2024-05-06T12:20:00Z",
"type": "app"
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
// List all addresses
const addresses = await client.fabric.addresses.list();
for (const addr of addresses.data ?? []) {
console.log(`${addr['display_name']}: ${addr['type']}`);
}
// Get a specific address
const address = await client.fabric.addresses.get("address-id");
console.log(`Address: ${address['display_name']}`);