> 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 domain applications GET https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/domain_applications Lists the SIP Domain Applications in your SignalWire project. A Domain Application gives inbound SIP traffic a project-specific domain and routes its calls to a configured handler. Use [Assign domain application handler](/docs/apis/rest/domain-applications/assign-resource-domain-application) when that handler is an existing Fabric resource. Results are sorted by creation date, most recent first. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, or _Fax_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space). Reference: https://signalwire.com/docs/apis/rest/domain-applications/list-domain-applications ## 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 - `filter_domain` (string, optional) — String representing the domain portion of the domain application. Will return all domain applications containing this value as a substring. - `filter_name` (string, optional) — String representing the name portion of the domain application. Will return all domain applications containing this value as a substring. - `page_number` (integer, optional, default: 0) — The page number to retrieve (0-indexed). - `page_size` (integer, optional, default: 50) — The number of items per page (1-1000). - `page_token` (string, optional) — Token for cursor-based pagination. Required when page_number > 0. ## Response ### 200 The request has succeeded. - `links` (PaginationLinks, required) — Pagination links. - `data` (list of DomainApplication, required) — List of domain applications. ## Errors ### 401 Unauthorized Error Access is unauthorized. - `error` (enum, required) - Allowed values: `Unauthorized` ### 422 Unprocessable Entity Error The request failed validation. See errors for details. - `errors` (list of Types.StatusCodes.SpaceApiErrorItem, required) — List of validation errors. ### 500 Internal Server Error An internal server error occurred. - `error` (enum, required) - Allowed values: `Internal Server Error` ## Types ### PaginationLinks Pagination links for list responses. - `self` (string, required) — Link to the current page. - `first` (string, required) — Link to the first page. - `next` (string, optional) — Link to the next page. Only present when there are more results. - `prev` (string, optional) — Link to the previous page. Only present when not on the first page. ### DomainApplication Domain application model. - `id` (string, required) — The unique identifier of the domain application on SignalWire. - `type` (string, required) — A string representation of the type of object this record is. - `domain` (string, required) — The unique domain for this application, combining your space subdomain and identifier. - `name` (string, required, nullable) — A string representing the friendly name for this domain application. - `identifier` (string, required) — A string representing the identifier portion of the domain application. - `user` (string, required) — A string representing the user portion of the domain application. - `ip_auth_enabled` (boolean, required) — Whether the domain application will enforce IP authentication for incoming requests. - `ip_auth` (list of string, required) — A list containing whitelisted IP addresses and IP blocks used if ip_auth_enabled is true. - `call_handler` (enum, required, nullable) — Specify how the domain application will handle calls. - Allowed values: `relay_topic`, `relay_application`, `laml_webhooks`, `laml_application`, `video_room`, `relay_script`, `dialogflow`, `ai_agent`, `call_flow`, `relay_context`, `relay_connector`, `fabric_subscriber`, `sip_gateway`, `call_queue` - `calling_handler_resource_id` (string, required, nullable) — The unique identifier of the calling handler resource. - `call_relay_topic` (string, required, nullable) — A string representing the Relay topic to forward incoming calls to. - `call_relay_topic_status_callback_url` (string, required, nullable) — A string representing a URL to send status change messages to. - `call_request_url` (string, required, nullable) — A string representing the LaML URL to access when a call is received. - `call_request_method` (enum, required, nullable) — A string representing the HTTP method to use with call_request_url. - Allowed values: `GET`, `POST` - `call_fallback_url` (string, required, nullable) — A string representing the LaML URL to access when the call to call_request_url fails. - `call_fallback_method` (enum, required, nullable) — A string representing the HTTP method to use with call_fallback_url. - Allowed values: `GET`, `POST` - `call_status_callback_url` (string, required, nullable) — A string representing a URL to send status change messages to. - `call_status_callback_method` (enum, required, nullable) — A string representing the HTTP method to use with call_status_callback_url. - Allowed values: `GET`, `POST` - `call_laml_application_id` (string, required, nullable) — A string representing the ID of the LaML application to forward incoming calls to. - `call_video_room_id` (string, required, nullable) — A string representing the ID of the Video Room to forward incoming calls to. - `call_relay_script_url` (string, required, nullable) — A string representing the URL of the Relay script to execute when a call is received. - `encryption` (enum, required) — A string representing whether connections to this domain application require encryption or if encryption is optional. Valid values are optional, required, and forbidden. - Allowed values: `optional`, `required`, `forbidden` - `codecs` (list of string, required) — A list of codecs this domain application will support. Currently supported values are: OPUS, G722, PCMU, PCMA, G729, VP8, and H264. - `ciphers` (list of string, required) — A list of encryption ciphers this domain application will support. Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, and AES_CM_128_HMAC_SHA1_32. - `call_relay_context` (string, required, nullable, deprecated) — Deprecated. Use call_relay_application instead. - `call_relay_context_status_callback_url` (string, required, nullable, deprecated) — Deprecated. Use call_relay_topic_status_callback_url instead. ### Types.StatusCodes.SpaceApiErrorItem Details about a specific validation error. - `detail` (string, required) — A description of what caused the error. - `status` (string, required) — The HTTP status code. - `title` (string, required) — A short summary of the error type. - `code` (string, required) — The error code. ## Examples **Response** ```json { "links": { "self": "string", "first": "string", "next": "string", "prev": "string" }, "data": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "domain_application", "domain": "your-space-test_id", "name": "Test App", "identifier": "string", "user": "helpdesk", "ip_auth_enabled": true, "ip_auth": [ "string" ], "call_handler": "relay_topic", "calling_handler_resource_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6", "call_relay_topic": "office", "call_relay_topic_status_callback_url": "https://myapplication/handle_relay_callbacks", "call_request_url": "https://example.com/laml", "call_request_method": "GET", "call_fallback_url": "https://example.com/fallback", "call_fallback_method": "GET", "call_status_callback_url": "https://example.com/status", "call_status_callback_method": "GET", "call_laml_application_id": "app-123456", "call_video_room_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6", "call_relay_script_url": "https://example.com/relay-script", "encryption": "required", "codecs": [ "string" ], "ciphers": [ "string" ], "call_relay_context": "office", "call_relay_context_status_callback_url": "string" } ] } ``` **SDK Code** ```python import requests url = "https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications'; const credentials = btoa(":"); 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/relay/rest/domain_applications" req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth("", "") 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/relay/rest/domain_applications") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications") .basicAuth("", "") .asString(); ``` ```php request('GET', 'https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/domain_applications")! 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() ```