> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getdial.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getdial.ai/_mcp/server.

# Get Self-Hosted configuration

GET https://api.getdial.ai/api/v1/self-hosted

Returns the account's Self-Hosted configuration. The signing secret is never returned here — only a masked preview (`secretMasked`). Use `GET /api/v1/self-hosted/secret` to copy the full value.

Reference: https://docs.getdial.ai/api-reference/rest-api/self-hosted/get-self-hosted

## Authentication

- `Authorization` header (bearer token, required) — Your Dial API key, sent as `Authorization: Bearer sk_live_...`

## Response

### 200

The Self-Hosted configuration.

- `enabled` (boolean, required) — Whether Self-Hosted mode is currently driving the account's calls.
- `access` (enum, required) — Whether this account may configure Self-Hosted mode. Self-Hosted lets a third-party server drive live calls, so accounts are approved before they can point calls at one. `none` — no access and no request on file; submit one with the `request_access` action. `pending` — a request is awaiting review. `granted` — you may `save` and `activate` freely. `denied` — the request was reviewed and turned down; `accessRequest.reviewNote` says why. Accounts that already had Self-Hosted before approval was introduced are `granted` — nothing changed for them.
  - Allowed values: `none`, `pending`, `granted`, `denied`
- `activeMode` (enum, required) — Which mode drives calls when `enabled`: `"llm"` (Dial runs voice; your server drives the conversation in text) or `"audio"` (Dial pipes the raw call audio to your server, full duplex).
  - Allowed values: `llm`, `audio`
- `accessRequest` (object, optional, nullable) — Your most recent access request, or `null` if you have never submitted one (including accounts that already have access without asking).
  - `useCase` (string, required) — What you told us you plan to build on Self-Hosted mode.
  - `status` (enum, required) — Where this particular request landed.
    - Allowed values: `pending`, `approved`, `denied`
  - `submittedAt` (datetime, required)
  - `companyUrl` (string, optional, nullable) — The company or project URL you supplied, if any.
  - `reviewedAt` (datetime, optional, nullable)
  - `reviewNote` (string, optional, nullable) — The reviewer's note — the reason shown when a request is denied.
- `llm` (object, optional, nullable) — The LLM-mode config, or `null` until that mode is configured.
  - `type` (enum, required)
    - Allowed values: `llm`
  - `wsUrl` (string, required) — The `wss://` URL of the server Dial connects to for each call.
  - `urlKey` (string, required) — The unguessable per-account path segment Dial uses when connecting. Stable once the URL is first set.
  - `secretMasked` (string, required) — A masked preview of the signing secret (`shs_••••••••<last4>`). Copy the full value from `GET /api/v1/self-hosted/secret?mode=llm`.
- `audio` (object, optional, nullable) — The audio-mode config, or `null` until that mode is configured.
  - `type` (enum, required)
    - Allowed values: `audio`
  - `wsUrl` (string, required) — The `wss://` URL of the server Dial connects to for each call.
  - `secretMasked` (string, required) — A masked preview of the signing secret (`shs_••••••••<last4>`). Copy the full value from `GET /api/v1/self-hosted/secret?mode=audio`.
  - `audioInboundFormat` (enum, required) — An audio-pipe format: G.711 μ-law/A-law at 8 kHz, or 16-bit little-endian linear PCM at 8/16/24 kHz. Defaults to `mulaw_8000`.
    - Allowed values: `mulaw_8000`, `alaw_8000`, `l16_8000`, `l16_16000`, `l16_24000`
  - `audioOutboundFormat` (enum, required) — An audio-pipe format: G.711 μ-law/A-law at 8 kHz, or 16-bit little-endian linear PCM at 8/16/24 kHz. Defaults to `mulaw_8000`.
    - Allowed values: `mulaw_8000`, `alaw_8000`, `l16_8000`, `l16_16000`, `l16_24000`

## Examples

**Response**

```json
{
  "enabled": true,
  "access": "none",
  "activeMode": "llm",
  "accessRequest": {
    "useCase": "string",
    "status": "pending",
    "submittedAt": "2024-01-15T09:30:00Z",
    "companyUrl": "string",
    "reviewedAt": "2024-01-15T09:30:00Z",
    "reviewNote": "string"
  },
  "llm": {
    "type": "llm",
    "wsUrl": "string",
    "urlKey": "string",
    "secretMasked": "string"
  },
  "audio": {
    "type": "audio",
    "wsUrl": "string",
    "secretMasked": "string",
    "audioInboundFormat": "mulaw_8000",
    "audioOutboundFormat": "mulaw_8000"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getdial.ai/api/v1/self-hosted"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getdial.ai/api/v1/self-hosted';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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://api.getdial.ai/api/v1/self-hosted"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <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://api.getdial.ai/api/v1/self-hosted")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <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://api.getdial.ai/api/v1/self-hosted")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getdial.ai/api/v1/self-hosted', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getdial.ai/api/v1/self-hosted");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getdial.ai/api/v1/self-hosted")! 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()
```