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

# Actualizar Asistente

PATCH https://nebrijaai.com/api/v1/assistants/{id}
Content-Type: application/json

Actualiza un asistente existente. Solo se actualizarán los campos proporcionados.

Reference: https://docs.nebrijaai.com/api-reference/assistants/actualizar-asistente

## Authentication

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

## Request

### Path parameters

- `id` (string, required)

### Body (application/json)

This endpoint expects an AssistantUpdate.

- `name` (string, optional)
- `firstMessage` (string, optional)
- `model` (LLMConfig, optional)
- `voice` (VoiceConfig, optional)
- `transcriber` (TranscriberConfig, optional)
- `startSpeakingPlan` (StartSpeakingPlan, optional)
- `stopSpeakingPlan` (StopSpeakingPlan, optional)
- `voicemailDetection` (VoicemailDetection, optional)
- `structuredData` (list of StructuredDataConfig, optional)

## Response

### 200

Assistant updated.

- `id` (string, optional)
- `name` (string, optional)
- `config` (AssistantConfig, optional)
- `isLocked` (boolean, optional)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)

## Types

### LLMConfig

- `provider` (enum, required)
  - Allowed values: `openai`, `google`, `anthropic`, `mistral`, `scaleway`, `xai`, `together`, `groq`, `cerebras`, `azure-foundry`
- `model` (string, required) — Modelos de ejemplo: gpt-4o, gpt-4o-mini, gemini-2.5-flash, mistral-small-latest, qwen3.5-397b-a17b, qwen3.6-35b-a3b, gemma-4-26b-a4b-it, llama-3.3-70b-versatile, qwen/qwen3.6-27b, gemma-4-31b. Los modelos disponibles dependen del proveedor.
- `temperature` (double, optional)
- `maxTokens` (integer, optional)
- `messages` (list of LlmConfigMessagesItems, optional)
- `toolIds` (list of string, optional)
- `thinkingBudget` (double, optional) — Presupuesto para tokens de razonamiento (ej. para modelos O1 o DeepSeek)
- `thinkingLevel` (string, optional) — Nivel de razonamiento cuando el proveedor/modelo lo soporta. Para Cerebras gemma-4-31b usa 'none' para desactivar razonamiento o 'low'/'medium'/'high' para activarlo. Para Groq qwen/qwen3.6-27b usa 'none' para desactivar razonamiento o 'default' para activarlo.
- `togetherReasoningMode` (enum, optional)
  - Allowed values: `off`, `on`
- `chatHistoryLimit` (integer, optional)
- `performance` (LlmConfigPerformance, optional)

### VoiceConfig

- `provider` (enum, required)
  - Allowed values: `cartesia`, `elevenlabs`, `deepgram`, `openai`, `inworld`, `together`, `deepinfra`, `nebrija`, `xai`
- `voiceId` (string, required) — El ID de la voz específica a utilizar.
- `model` (string, optional) — Requerido para algunos proveedores, como 'aura-2' para Deepgram o 'sonic-3' / 'sonic-3.5' for Cartesia.
- `inputMinCharacters` (integer, optional)
- `speed` (double, optional)
- `cartesiaPronunciationDictId` (string, optional) — Cartesia pronunciation dict ID. The dict must belong to the effective Cartesia API key used for synthesis (BYOK user key when provided, otherwise platform managed/env key).
- `xaiRegion` (enum, optional, default: eu-west-1) — xAI TTS endpoint region.
  - Allowed values: `eu-west-1`, `global`, `us-east-1`
- `backgroundSound` (string, optional)

### TranscriberConfig

- `provider` (enum, required)
  - Allowed values: `deepgram`, `assemblyai`, `google`, `speechmatics`
- `model` (string, optional) — Modelos de ejemplo: flux-general-multi, nova-3 (Deepgram), universal-3-5-pro o u3-rt-pro (AssemblyAI).
- `language` (string, optional)
- `region` (string, optional)
- `smartFormat` (boolean, optional)
- `preEmptiveGeneration` (boolean, optional)
- `formatTurns` (boolean, optional)
- `vadAssistedEndpointing` (boolean, optional)
- `vadThreshold` (double, optional)
- `inputGain` (double, optional)
- `keytermsPrompt` (TranscriberConfigKeytermsPrompt, optional)
- `confidenceThreshold` (double, optional)
- `endOfTurnConfidence` (double, optional)
- `minSilence` (double, optional)
- `maxTurnSilence` (double, optional)
- `preEmptiveOnPartial` (boolean, optional)
- `preEmptiveTriggerMode` (enum, optional)
  - Allowed values: `partial`, `speech_end`, `flux_eager_eot`, `assemblyai_partial`
- `assemblyaiMode` (enum, optional)
  - Allowed values: `min_latency`, `balanced`, `max_accuracy`
- `languageCode` (string, optional)
- `agentContext` (string, optional)
- `voiceFocus` (enum, optional)
  - Allowed values: `off`, `near-field`, `far-field`
- `voiceFocusThreshold` (double, optional)

### StartSpeakingPlan

- `waitSeconds` (double, optional)
- `onPunctuationSeconds` (double, optional)
- `onNoPunctuationSeconds` (double, optional)
- `onNumberSeconds` (double, optional)
- `vadSilenceSeconds` (double, optional)
- `activationThreshold` (double, optional)
- `turnDetectionMode` (string, optional)
- `echoGuardEnabled` (boolean, optional, nullable)
- `echoKillCorrThreshold` (double, optional)
- `echoRefActiveWindowSec` (double, optional)
- `echoInputRmsMin` (double, optional)
- `echoDelayMinMs` (double, optional)
- `echoDelayMaxMs` (double, optional)
- `echoDelayStepMs` (double, optional)
- `silenceTimeout` (double, optional)
- `maxDuration` (double, optional)
- `smartEndpointingPlan` (StartSpeakingPlanSmartEndpointingPlan, optional)

### StopSpeakingPlan

- `numWords` (double, optional)
- `voiceSeconds` (double, optional)
- `backoffSeconds` (double, optional)

### VoicemailDetection

- `enabled` (boolean, optional)
- `provider` (string, optional) — Ejemplo: nebrija
- `voicemailMessage` (string, optional)

### StructuredDataConfig

- `id` (string, optional)
- `name` (string, optional)
- `description` (string, optional)
- `schemaType` (enum, optional)
  - Allowed values: `Free`, `Summary`, `SuccessEvaluation`

### AssistantConfig

### LlmConfigMessagesItems

### LlmConfigPerformance

- `semanticCaching` (boolean, optional)
- `predictiveGeneration` (boolean, optional)

### TranscriberConfigKeytermsPrompt

- string
- list of string

### StartSpeakingPlanSmartEndpointingPlan

- `provider` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Asistente de Ventas",
  "config": {},
  "isLocked": false,
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-04-20T11:45:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://nebrijaai.com/api/v1/assistants/id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://nebrijaai.com/api/v1/assistants/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', '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
package main

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

func main() {

	url := "https://nebrijaai.com/api/v1/assistants/id"

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

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

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://nebrijaai.com/api/v1/assistants/id")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.patch("https://nebrijaai.com/api/v1/assistants/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://nebrijaai.com/api/v1/assistants/id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://nebrijaai.com/api/v1/assistants/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://nebrijaai.com/api/v1/assistants/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```