Batch update Voice line assignments
Batch update Voice line assignments: batchUpdateVoiceLineProfileAssignments in the TypeScript, Python, Rust and Go clients.
POST /v1/projects/{id}/platforms/voice/lines/profile-assignments/batch
Atomically sets additional-profile overrides or switches lines back to the project default for up to 100 Voice-capable lines. A null profileId means use the default. Every expected resource version must match or no line changes. Requires platforms:write bound to the path project.
photon.projects.platforms.batchUpdateVoiceLineProfileAssignments(input: BatchUpdateVoiceLineProfileAssignmentsInput, options?: RequestOptions): Promise<BatchUpdateVoiceLineProfileAssignmentsOutput>photon.projects.platforms.batch_update_voice_line_profile_assignments(input: BatchUpdateVoiceLineProfileAssignmentsInput, *, options: RequestOptions | None = None,) -> models.BatchUpdateVoiceLineProfileAssignmentsResponseclient.batch_update_voice_line_profile_assignments(id: String, body: &types::BatchUpdateVoiceLineProfileAssignmentsRequest).await -> Result<ResponseValue<types::BatchUpdateVoiceLineProfileAssignmentsResponse>, Error<BatchUpdateVoiceLineProfileAssignmentsError>>client.Projects.Platforms.BatchUpdateVoiceLineProfileAssignments(ctx context.Context, params *BatchUpdateVoiceLineProfileAssignmentsParams, opts ...RequestOption) (*BatchUpdateVoiceLineProfileAssignmentsResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.batchUpdateVoiceLineProfileAssignments({
path: {
id: "id",
},
body: {
updates: [
{
expectedVersion: 1,
profileId: "profileId",
resourceId: "resourceId",
},
],
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import BatchUpdateVoiceLineProfileAssignmentsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.batch_update_voice_line_profile_assignments(
BatchUpdateVoiceLineProfileAssignmentsInput.model_validate({
"path": {
"id": "id",
},
"body": {
"updates": [
{
"expectedVersion": 1,
"profileId": "profileId",
"resourceId": "resourceId",
},
],
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.batch_update_voice_line_profile_assignments(
"id".to_owned(),
&serde_json::from_value(serde_json::json!({
"updates": [
{
"expectedVersion": 1,
"profileId": "profileId",
"resourceId": "resourceId",
},
],
}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"encoding/json"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.BatchUpdateVoiceLineProfileAssignmentsRequest
if err := json.Unmarshal([]byte(`{
"updates": [
{
"expectedVersion": 1,
"profileId": "profileId",
"resourceId": "resourceId"
}
]
}`), &body); err != nil {
return err
}
result, err := client.Projects.Platforms.BatchUpdateVoiceLineProfileAssignments(ctx, &photonapi.BatchUpdateVoiceLineProfileAssignmentsParams{
ID: "id",
Body: body,
})
if err != nil {
return err
}
_ = result{
"assignments": [
{
"profileId": "string",
"profileVersion": 1,
"projectId": "string",
"resourceId": "string",
"resourceVersion": 1,
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Body
Returns
200 The updated line profile assignments. BatchUpdateVoiceLineProfileAssignmentsResponse
Headers: Photon-Version. The raw response carries these headers; see Raw responses.