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

# Create workspace voice integration

POST https://app.lumenia.net/api/v1/workspaces/{workspaceId}/integrations/voice
Content-Type: application/json

Create a voice integration for a workspace.

Reference: https://docs.lumenia.net/api-reference/workspace-voice/create-workspace-voice-integration

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <API_KEY>`, where `API_KEY` is your API key.

## Request

### Path parameters

- `workspaceId` (string, required) — Workspace to configure.

### Headers

- `X-Account-Id` (string, required) — Account that owns the workspace.

### Body (application/json)

This endpoint expects an object.

- `firstMessage` (string, optional) — The greeting the assistant speaks first.
- `prompt` (string, optional) — System prompt for the live voice conversation.
- `voice` (V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaVoice, optional) — The text-to-speech voice. Values must match the options catalog.
- `fallbackVoices` (list of V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaFallbackVoicesItems, optional) — Ordered fallback voices used if the primary voice fails. Each entry needs a provider.
- `transcriber` (V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaTranscriber, optional) — The speech-to-text transcriber. Values must match the options catalog.
- `fallbackTranscribers` (list of V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaFallbackTranscribersItems, optional) — Ordered fallback transcribers. Each entry needs a provider.

## Response

### 201

The created voice integration, including its routing number.

- `voice` (V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoice, required) — The new assistant config — see GET .../integrations/voice for the field notes.

## Errors

### 400 Bad Request Error

Invalid voice/transcriber config (does not match the options catalog)

- `any`

### 403 Forbidden Error

The API key is missing or invalid, or the X-Account-Id does not belong to the partner.

- `message` (string, optional)

### 404 Not Found Error

Workspace not found for this account

- `any`

### 409 Conflict Error

Workspace already has a voice integration, or no routing numbers are available

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaVoice

The text-to-speech voice. Values must match the options catalog.

- `provider` (string, optional) — TTS provider, e.g. vapi or 11labs.
- `voiceId` (string, optional) — Provider voice identifier — an enum value for vapi, a pasted ElevenLabs id for 11labs.
- `model` (string, optional, nullable) — TTS model. Required for 11labs; set to null or omit for vapi.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaFallbackVoicesItems

### V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaTranscriber

The speech-to-text transcriber. Values must match the options catalog.

- `provider` (string, optional) — STT provider, e.g. deepgram.
- `model` (string, optional) — STT model from the catalog.
- `language` (string, optional) — Transcription language code, from the languages of the chosen model.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostRequestBodyContentApplicationJsonSchemaFallbackTranscribersItems

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoice

The new assistant config — see GET .../integrations/voice for the field notes.

- `connected` (boolean, optional) — Always true after creation.
- `promptSource` (enum, optional) — Source of the prompt used for calls: manual or template.
  - Allowed values: `manual`, `template`
- `promptTemplate` (V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoicePromptTemplate, optional, nullable) — The pinned voice prompt template assignment, null when the manual prompt is used.
- `firstMessage` (string, optional, nullable) — The greeting the assistant speaks first.
- `prompt` (string, optional, nullable) — System prompt for the live voice conversation.
- `voice` (V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceVoice, optional, nullable) — The selected text-to-speech voice.
- `fallbackVoices` (list of V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceFallbackVoicesItems, optional) — Ordered fallback voices.
- `transcriber` (V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceTranscriber, optional, nullable) — The selected speech-to-text transcriber.
- `fallbackTranscribers` (list of V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceFallbackTranscribersItems, optional) — Ordered fallback transcribers.
- `phoneNumber` (string, optional, nullable) — Routing number in E.164 format. Forward your business line to this number.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoicePromptTemplate

The pinned voice prompt template assignment, null when the manual prompt is used.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceVoice

The selected text-to-speech voice.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceFallbackVoicesItems

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceTranscriber

The selected speech-to-text transcriber.

### V1WorkspacesWorkspaceIdIntegrationsVoicePostResponsesContentApplicationJsonSchemaVoiceFallbackTranscribersItems

## Examples

### Complete config (Vapi voice + Deepgram transcriber)

**Request**

```json
{
  "firstMessage": "Hello! How can I help you today?",
  "prompt": "You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.",
  "voice": {
    "provider": "vapi",
    "voiceId": "Clara",
    "model": null
  },
  "fallbackVoices": [],
  "transcriber": {
    "provider": "deepgram",
    "model": "flux-general-en",
    "language": "en"
  },
  "fallbackTranscribers": []
}
```

**Response**

```json
{
  "voice": {
    "connected": true,
    "promptSource": "manual",
    "promptTemplate": null,
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant. Keep responses concise and helpful.",
    "voice": {
      "model": null,
      "provider": "vapi",
      "voiceId": "Clara"
    },
    "fallbackVoices": [],
    "transcriber": {
      "language": "en",
      "model": "flux-general-en",
      "provider": "deepgram"
    },
    "fallbackTranscribers": [],
    "phoneNumber": "+14155551234"
  }
}
```

**SDK Code**

```python Complete config (Vapi voice + Deepgram transcriber)
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

payload = {
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.",
    "voice": {
        "provider": "vapi",
        "voiceId": "Clara",
        "model": None
    },
    "fallbackVoices": [],
    "transcriber": {
        "provider": "deepgram",
        "model": "flux-general-en",
        "language": "en"
    },
    "fallbackTranscribers": []
}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Complete config (Vapi voice + Deepgram transcriber)
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"firstMessage":"Hello! How can I help you today?","prompt":"You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.","voice":{"provider":"vapi","voiceId":"Clara","model":null},"fallbackVoices":[],"transcriber":{"provider":"deepgram","model":"flux-general-en","language":"en"},"fallbackTranscribers":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Complete config (Vapi voice + Deepgram transcriber)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

	payload := strings.NewReader("{\n  \"firstMessage\": \"Hello! How can I help you today?\",\n  \"prompt\": \"You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.\",\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Clara\",\n    \"model\": null\n  },\n  \"fallbackVoices\": [],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"flux-general-en\",\n    \"language\": \"en\"\n  },\n  \"fallbackTranscribers\": []\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Complete config (Vapi voice + Deepgram transcriber)
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"firstMessage\": \"Hello! How can I help you today?\",\n  \"prompt\": \"You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.\",\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Clara\",\n    \"model\": null\n  },\n  \"fallbackVoices\": [],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"flux-general-en\",\n    \"language\": \"en\"\n  },\n  \"fallbackTranscribers\": []\n}"

response = http.request(request)
puts response.read_body
```

```java Complete config (Vapi voice + Deepgram transcriber)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"firstMessage\": \"Hello! How can I help you today?\",\n  \"prompt\": \"You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.\",\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Clara\",\n    \"model\": null\n  },\n  \"fallbackVoices\": [],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"flux-general-en\",\n    \"language\": \"en\"\n  },\n  \"fallbackTranscribers\": []\n}")
  .asString();
```

```php Complete config (Vapi voice + Deepgram transcriber)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice', [
  'body' => '{
  "firstMessage": "Hello! How can I help you today?",
  "prompt": "You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.",
  "voice": {
    "provider": "vapi",
    "voiceId": "Clara",
    "model": null
  },
  "fallbackVoices": [],
  "transcriber": {
    "provider": "deepgram",
    "model": "flux-general-en",
    "language": "en"
  },
  "fallbackTranscribers": []
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp Complete config (Vapi voice + Deepgram transcriber)
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"firstMessage\": \"Hello! How can I help you today?\",\n  \"prompt\": \"You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.\",\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Clara\",\n    \"model\": null\n  },\n  \"fallbackVoices\": [],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"flux-general-en\",\n    \"language\": \"en\"\n  },\n  \"fallbackTranscribers\": []\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Complete config (Vapi voice + Deepgram transcriber)
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "firstMessage": "Hello! How can I help you today?",
  "prompt": "You are a friendly phone assistant for Acme Plumbing. Keep responses concise and helpful. Offer to book an appointment when the caller describes a problem.",
  "voice": [
    "provider": "vapi",
    "voiceId": "Clara",
    "model": 
  ],
  "fallbackVoices": [],
  "transcriber": [
    "provider": "deepgram",
    "model": "flux-general-en",
    "language": "en"
  ],
  "fallbackTranscribers": []
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Empty body — accept all defaults

**Request**

```json
{}
```

**Response**

```json
{
  "voice": {
    "connected": true,
    "promptSource": "manual",
    "promptTemplate": null,
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant. Keep responses concise and helpful.",
    "voice": {
      "model": null,
      "provider": "vapi",
      "voiceId": "Clara"
    },
    "fallbackVoices": [],
    "transcriber": {
      "language": "en",
      "model": "flux-general-en",
      "provider": "deepgram"
    },
    "fallbackTranscribers": [],
    "phoneNumber": "+14155551234"
  }
}
```

**SDK Code**

```python Empty body — accept all defaults
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

payload = {}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Empty body — accept all defaults
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Empty body — accept all defaults
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Empty body — accept all defaults
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Empty body — accept all defaults
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Empty body — accept all defaults
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp Empty body — accept all defaults
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Empty body — accept all defaults
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Override only the greeting and prompt

**Request**

```json
{
  "firstMessage": "Thanks for calling Acme. What can I do for you?",
  "prompt": "You are the Acme after-hours assistant. Take a message and promise a callback by 9am."
}
```

**Response**

```json
{
  "voice": {
    "connected": true,
    "promptSource": "manual",
    "promptTemplate": null,
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant. Keep responses concise and helpful.",
    "voice": {
      "model": null,
      "provider": "vapi",
      "voiceId": "Clara"
    },
    "fallbackVoices": [],
    "transcriber": {
      "language": "en",
      "model": "flux-general-en",
      "provider": "deepgram"
    },
    "fallbackTranscribers": [],
    "phoneNumber": "+14155551234"
  }
}
```

**SDK Code**

```python Override only the greeting and prompt
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

payload = {
    "firstMessage": "Thanks for calling Acme. What can I do for you?",
    "prompt": "You are the Acme after-hours assistant. Take a message and promise a callback by 9am."
}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Override only the greeting and prompt
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"firstMessage":"Thanks for calling Acme. What can I do for you?","prompt":"You are the Acme after-hours assistant. Take a message and promise a callback by 9am."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Override only the greeting and prompt
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

	payload := strings.NewReader("{\n  \"firstMessage\": \"Thanks for calling Acme. What can I do for you?\",\n  \"prompt\": \"You are the Acme after-hours assistant. Take a message and promise a callback by 9am.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Override only the greeting and prompt
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"firstMessage\": \"Thanks for calling Acme. What can I do for you?\",\n  \"prompt\": \"You are the Acme after-hours assistant. Take a message and promise a callback by 9am.\"\n}"

response = http.request(request)
puts response.read_body
```

```java Override only the greeting and prompt
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"firstMessage\": \"Thanks for calling Acme. What can I do for you?\",\n  \"prompt\": \"You are the Acme after-hours assistant. Take a message and promise a callback by 9am.\"\n}")
  .asString();
```

```php Override only the greeting and prompt
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice', [
  'body' => '{
  "firstMessage": "Thanks for calling Acme. What can I do for you?",
  "prompt": "You are the Acme after-hours assistant. Take a message and promise a callback by 9am."
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp Override only the greeting and prompt
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"firstMessage\": \"Thanks for calling Acme. What can I do for you?\",\n  \"prompt\": \"You are the Acme after-hours assistant. Take a message and promise a callback by 9am.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Override only the greeting and prompt
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "firstMessage": "Thanks for calling Acme. What can I do for you?",
  "prompt": "You are the Acme after-hours assistant. Take a message and promise a callback by 9am."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### ElevenLabs voice (voiceId AND model required) with a Spanish transcriber

**Request**

```json
{
  "prompt": "You are a multilingual concierge for a boutique hotel.",
  "voice": {
    "provider": "11labs",
    "voiceId": "21m00Tcm4TlvDq8ikWAM",
    "model": "eleven_multilingual_v2"
  },
  "transcriber": {
    "provider": "deepgram",
    "model": "nova-3",
    "language": "es"
  }
}
```

**Response**

```json
{
  "voice": {
    "connected": true,
    "promptSource": "manual",
    "promptTemplate": null,
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant. Keep responses concise and helpful.",
    "voice": {
      "model": null,
      "provider": "vapi",
      "voiceId": "Clara"
    },
    "fallbackVoices": [],
    "transcriber": {
      "language": "en",
      "model": "flux-general-en",
      "provider": "deepgram"
    },
    "fallbackTranscribers": [],
    "phoneNumber": "+14155551234"
  }
}
```

**SDK Code**

```python ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

payload = {
    "prompt": "You are a multilingual concierge for a boutique hotel.",
    "voice": {
        "provider": "11labs",
        "voiceId": "21m00Tcm4TlvDq8ikWAM",
        "model": "eleven_multilingual_v2"
    },
    "transcriber": {
        "provider": "deepgram",
        "model": "nova-3",
        "language": "es"
    }
}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"prompt":"You are a multilingual concierge for a boutique hotel.","voice":{"provider":"11labs","voiceId":"21m00Tcm4TlvDq8ikWAM","model":"eleven_multilingual_v2"},"transcriber":{"provider":"deepgram","model":"nova-3","language":"es"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

	payload := strings.NewReader("{\n  \"prompt\": \"You are a multilingual concierge for a boutique hotel.\",\n  \"voice\": {\n    \"provider\": \"11labs\",\n    \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\",\n    \"model\": \"eleven_multilingual_v2\"\n  },\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-3\",\n    \"language\": \"es\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"You are a multilingual concierge for a boutique hotel.\",\n  \"voice\": {\n    \"provider\": \"11labs\",\n    \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\",\n    \"model\": \"eleven_multilingual_v2\"\n  },\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-3\",\n    \"language\": \"es\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"You are a multilingual concierge for a boutique hotel.\",\n  \"voice\": {\n    \"provider\": \"11labs\",\n    \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\",\n    \"model\": \"eleven_multilingual_v2\"\n  },\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-3\",\n    \"language\": \"es\"\n  }\n}")
  .asString();
```

```php ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice', [
  'body' => '{
  "prompt": "You are a multilingual concierge for a boutique hotel.",
  "voice": {
    "provider": "11labs",
    "voiceId": "21m00Tcm4TlvDq8ikWAM",
    "model": "eleven_multilingual_v2"
  },
  "transcriber": {
    "provider": "deepgram",
    "model": "nova-3",
    "language": "es"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"You are a multilingual concierge for a boutique hotel.\",\n  \"voice\": {\n    \"provider\": \"11labs\",\n    \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\",\n    \"model\": \"eleven_multilingual_v2\"\n  },\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-3\",\n    \"language\": \"es\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ElevenLabs voice (voiceId AND model required) with a Spanish transcriber
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "You are a multilingual concierge for a boutique hotel.",
  "voice": [
    "provider": "11labs",
    "voiceId": "21m00Tcm4TlvDq8ikWAM",
    "model": "eleven_multilingual_v2"
  ],
  "transcriber": [
    "provider": "deepgram",
    "model": "nova-3",
    "language": "es"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Primary voice/transcriber plus fallbacks (each entry needs a provider)

**Request**

```json
{
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  },
  "fallbackVoices": [
    {
      "provider": "vapi",
      "voiceId": "Emma"
    },
    {
      "model": "eleven_turbo_v2_5",
      "provider": "11labs",
      "voiceId": "21m00Tcm4TlvDq8ikWAM"
    }
  ],
  "transcriber": {
    "provider": "deepgram",
    "model": "nova-2-phonecall",
    "language": "en-US"
  },
  "fallbackTranscribers": [
    {
      "language": "en",
      "model": "nova-2-general",
      "provider": "deepgram"
    }
  ]
}
```

**Response**

```json
{
  "voice": {
    "connected": true,
    "promptSource": "manual",
    "promptTemplate": null,
    "firstMessage": "Hello! How can I help you today?",
    "prompt": "You are a friendly phone assistant. Keep responses concise and helpful.",
    "voice": {
      "model": null,
      "provider": "vapi",
      "voiceId": "Clara"
    },
    "fallbackVoices": [],
    "transcriber": {
      "language": "en",
      "model": "flux-general-en",
      "provider": "deepgram"
    },
    "fallbackTranscribers": [],
    "phoneNumber": "+14155551234"
  }
}
```

**SDK Code**

```python Primary voice/transcriber plus fallbacks (each entry needs a provider)
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

payload = {
    "voice": {
        "provider": "vapi",
        "voiceId": "Elliot"
    },
    "fallbackVoices": [
        {
            "provider": "vapi",
            "voiceId": "Emma"
        },
        {
            "model": "eleven_turbo_v2_5",
            "provider": "11labs",
            "voiceId": "21m00Tcm4TlvDq8ikWAM"
        }
    ],
    "transcriber": {
        "provider": "deepgram",
        "model": "nova-2-phonecall",
        "language": "en-US"
    },
    "fallbackTranscribers": [
        {
            "language": "en",
            "model": "nova-2-general",
            "provider": "deepgram"
        }
    ]
}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Primary voice/transcriber plus fallbacks (each entry needs a provider)
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"voice":{"provider":"vapi","voiceId":"Elliot"},"fallbackVoices":[{"provider":"vapi","voiceId":"Emma"},{"model":"eleven_turbo_v2_5","provider":"11labs","voiceId":"21m00Tcm4TlvDq8ikWAM"}],"transcriber":{"provider":"deepgram","model":"nova-2-phonecall","language":"en-US"},"fallbackTranscribers":[{"language":"en","model":"nova-2-general","provider":"deepgram"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Primary voice/transcriber plus fallbacks (each entry needs a provider)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice"

	payload := strings.NewReader("{\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Elliot\"\n  },\n  \"fallbackVoices\": [\n    {\n      \"provider\": \"vapi\",\n      \"voiceId\": \"Emma\"\n    },\n    {\n      \"model\": \"eleven_turbo_v2_5\",\n      \"provider\": \"11labs\",\n      \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\"\n    }\n  ],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-2-phonecall\",\n    \"language\": \"en-US\"\n  },\n  \"fallbackTranscribers\": [\n    {\n      \"language\": \"en\",\n      \"model\": \"nova-2-general\",\n      \"provider\": \"deepgram\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Primary voice/transcriber plus fallbacks (each entry needs a provider)
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")

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

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Elliot\"\n  },\n  \"fallbackVoices\": [\n    {\n      \"provider\": \"vapi\",\n      \"voiceId\": \"Emma\"\n    },\n    {\n      \"model\": \"eleven_turbo_v2_5\",\n      \"provider\": \"11labs\",\n      \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\"\n    }\n  ],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-2-phonecall\",\n    \"language\": \"en-US\"\n  },\n  \"fallbackTranscribers\": [\n    {\n      \"language\": \"en\",\n      \"model\": \"nova-2-general\",\n      \"provider\": \"deepgram\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Primary voice/transcriber plus fallbacks (each entry needs a provider)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Elliot\"\n  },\n  \"fallbackVoices\": [\n    {\n      \"provider\": \"vapi\",\n      \"voiceId\": \"Emma\"\n    },\n    {\n      \"model\": \"eleven_turbo_v2_5\",\n      \"provider\": \"11labs\",\n      \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\"\n    }\n  ],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-2-phonecall\",\n    \"language\": \"en-US\"\n  },\n  \"fallbackTranscribers\": [\n    {\n      \"language\": \"en\",\n      \"model\": \"nova-2-general\",\n      \"provider\": \"deepgram\"\n    }\n  ]\n}")
  .asString();
```

```php Primary voice/transcriber plus fallbacks (each entry needs a provider)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice', [
  'body' => '{
  "voice": {
    "provider": "vapi",
    "voiceId": "Elliot"
  },
  "fallbackVoices": [
    {
      "provider": "vapi",
      "voiceId": "Emma"
    },
    {
      "model": "eleven_turbo_v2_5",
      "provider": "11labs",
      "voiceId": "21m00Tcm4TlvDq8ikWAM"
    }
  ],
  "transcriber": {
    "provider": "deepgram",
    "model": "nova-2-phonecall",
    "language": "en-US"
  },
  "fallbackTranscribers": [
    {
      "language": "en",
      "model": "nova-2-general",
      "provider": "deepgram"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

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

```csharp Primary voice/transcriber plus fallbacks (each entry needs a provider)
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"voice\": {\n    \"provider\": \"vapi\",\n    \"voiceId\": \"Elliot\"\n  },\n  \"fallbackVoices\": [\n    {\n      \"provider\": \"vapi\",\n      \"voiceId\": \"Emma\"\n    },\n    {\n      \"model\": \"eleven_turbo_v2_5\",\n      \"provider\": \"11labs\",\n      \"voiceId\": \"21m00Tcm4TlvDq8ikWAM\"\n    }\n  ],\n  \"transcriber\": {\n    \"provider\": \"deepgram\",\n    \"model\": \"nova-2-phonecall\",\n    \"language\": \"en-US\"\n  },\n  \"fallbackTranscribers\": [\n    {\n      \"language\": \"en\",\n      \"model\": \"nova-2-general\",\n      \"provider\": \"deepgram\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Primary voice/transcriber plus fallbacks (each entry needs a provider)
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "voice": [
    "provider": "vapi",
    "voiceId": "Elliot"
  ],
  "fallbackVoices": [
    [
      "provider": "vapi",
      "voiceId": "Emma"
    ],
    [
      "model": "eleven_turbo_v2_5",
      "provider": "11labs",
      "voiceId": "21m00Tcm4TlvDq8ikWAM"
    ]
  ],
  "transcriber": [
    "provider": "deepgram",
    "model": "nova-2-phonecall",
    "language": "en-US"
  ],
  "fallbackTranscribers": [
    [
      "language": "en",
      "model": "nova-2-general",
      "provider": "deepgram"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId/integrations/voice")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```