---
agentTools:
  projectIndex: https://elai.readme.io/llms.txt
---

# Update a voice customization

Updates the `name`, the `settings`, or both. At least one of the two must be present, and `settings` is replaced wholesale rather than merged — send all four values.

```curl Request
curl -X PATCH 'https://apis.elai.io/api/v1/voice-customizations/66a1f0c2b7cd13032a9c6500' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Calmer narrator",
  "settings": {
    "stability": 0.7,
    "speed": 0.95,
    "similarity": 0.75,
    "style": 0.2
  }
}'
```

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Elai Public API",
    "version": "1.0",
    "description": "Every endpoint below is served under `https://apis.elai.io/api/v1`.\n\n## Authentication\n\nSend your workspace API token as a bearer token on every request:\n\n```\nAuthorization: Bearer <your-api-token>\n```\n\nGenerate and rotate the token in the Elai web app under **Settings → API**, or through\n`POST /generateToken`. The token is scoped to one **workspace** and authenticates as that\nworkspace's admin user — it is not tied to an individual person, and it carries admin rights\ninside that workspace.\n\nA request with a missing, unknown or revoked token gets a bare `401` with no response body.\n\n> **Organizations on the Unlimited plan cannot use the API.** Their requests are rejected with the\n> same bare `401` as an invalid token, with nothing to distinguish the two. If a valid, freshly\n> generated token returns `401` on every endpoint, check the plan first.\n\n## Errors\n\nFailures carry a JSON body of the shape `{ \"message\": \"...\" }`. Validation failures on the newer\nendpoints may add an `errors` array naming the offending fields. `401` is the exception: it has no\nbody at all.\n\nBoth render endpoints are **fire-and-forget** — they queue work and return immediately, so a\n`200` means \"accepted\", not \"rendered\". Render failures surface only through the `video_error`\nwebhook, never as an HTTP error on the call that started the render.\n\n## Scope\n\nThis reference is generated from the running code rather than maintained by hand, so it cannot\nquietly fall behind the API it describes. It documents 96 operations across the\n`/api/v1` surface.\n\nEndpoints are grouped by subject in the sidebar. If something you need is missing, or an endpoint\ndoes not behave as described here, tell us.\n\n---\n\n_Generated from `chore/web-4760/api-v1-reference-build` at `5289745d` on 2026-09-04._"
  },
  "servers": [
    {
      "url": "https://apis.elai.io/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "SECRET_KEY"
      }
    },
    "schemas": {
      "ValidationErrorBody": {
        "type": "object",
        "description": "Schema-validation failure, produced by the Zod validation middleware.",
        "properties": {
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "description": "Per-field problems, when available.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "VoiceCustomization": {
        "type": "object",
        "description": "A named bundle of TTS settings bound to one voice. Referenced from slides as `voiceVariantId`.",
        "properties": {
          "_id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 20
          },
          "provider": {
            "type": "string",
            "enum": [
              "elevenlabs",
              "azure",
              "google"
            ]
          },
          "voiceId": {
            "type": "string"
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Standard voices only; null for custom voices."
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "description": "Standard voices only; null for custom voices."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider model, resolved per slide at render time when null."
          },
          "customVoiceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when the customization targets a cloned/custom voice."
          },
          "settings": {
            "type": "object",
            "description": "All four values are optional and may be null.",
            "properties": {
              "stability": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "speed": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0.7,
                "maximum": 1.2
              },
              "similarity": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "style": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "lastModifiedByEmail": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "parameters": {
      "VoiceCustomizationId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-f0-9]{24}$"
        },
        "description": "Voice customization id (24-char hex ObjectId)."
      }
    },
    "responses": {
      "ValidationError": {
        "description": "Request body failed schema validation. The response lists the offending fields.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationErrorBody"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/voice-customizations/{id}": {
      "patch": {
        "tags": [
          "Voice customizations"
        ],
        "summary": "Update a voice customization",
        "description": "Updates the `name`, the `settings`, or both. At least one of the two must be present, and `settings` is replaced wholesale rather than merged — send all four values.",
        "parameters": [
          {
            "$ref": "#/components/parameters/VoiceCustomizationId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "name": "Calmer narrator",
                "settings": {
                  "stability": 0.7,
                  "speed": 0.95,
                  "similarity": 0.75,
                  "style": 0.2
                }
              },
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2
                      },
                      "similarity": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "style": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "stability",
                      "speed",
                      "similarity",
                      "style"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated customization.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customization": {
                      "$ref": "#/components/schemas/VoiceCustomization"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "operationId": "update-voice-customization"
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "Voice customizations",
      "description": "Named bundles of TTS settings bound to a voice, referenced from slides."
    }
  ],
  "_id": {
    "buffer": {
      "0": 106,
      "1": 154,
      "2": 229,
      "3": 101,
      "4": 201,
      "5": 178,
      "6": 243,
      "7": 252,
      "8": 223,
      "9": 58,
      "10": 69,
      "11": 151
    }
  }
}
````