Skip to main content
PATCH

Authorizations

X-API-Key
string
header
required

API key for authentication.

Path Parameters

conversation_id
string
required

Unique conversation identifier (22-26 characters)

Required string length: 22 - 26

Body

application/json

Request to attach audio to, add metadata to, or assign an agent to an already-submitted conversation.

Exactly one of audio_url, audio, metadata or agent_id must be provided. Submitting more than one, or none, returns 400 INVALID_ARGUMENT. Each target is patched in a separate call so a rejected value can never leave another target half-applied.

Idempotency: Audio can be attached only once per conversation. A second PATCH on a conversation that already has audio returns 409 ALREADY_EXISTS. Conversations that were submitted with audio via POST /v1/conversations/uploaded:submit already have audio attached and cannot be PATCHed. Metadata follows the same rule per key: adding a new key succeeds, overwriting an existing one returns 409 ALREADY_EXISTS. An agent can be assigned once; a different agent returns 409 ALREADY_EXISTS.

agent_channel
integer | null

Channel containing the agent in the input stereo recording: 0 is left, 1 is right. With channel selection enabled for the organization, omitted or null uses the organization default. Otherwise the legacy mapping applies and explicit overrides are rejected. Requires an audio input. No effect on mono recordings or supplied transcript roles. The effective choice is captured for this audio.

Required range: 0 <= x <= 1
audio_url
string<uri>

Presigned URL to the audio recording. Same validation rules as audio_url on POST /v1/conversations/uploaded:submit (WAV or MP3, 5 s to 60 min, 200 MB max). Supports AWS S3, GCP Cloud Storage, Azure Blob Storage, or any public/presigned HTTP/HTTPS URL. Raw s3://bucket/key URLs are limited to Coval-issued uploads in the shared or organization-specific audio bucket under audio/<authenticated_organization_id>/. For other storage locations, supply a presigned HTTPS URL. HTTP/HTTPS URLs must resolve entirely to publicly routable addresses; redirects are rejected.

Example:

"https://recordings.s3.amazonaws.com/calls/2025/11/call-4k2m9p.wav?X-Amz-Algorithm=..."

audio
string

Base64-encoded audio bytes. Same format and size limits as audio_url. Prefer audio_url for anything other than very small clips.

metadata
object

Metadata keys to add to the conversation, merged into any metadata sent at submit. Values may be strings, numbers, booleans, arrays or objects.

Additive only. A key that already holds a value returns 409 ALREADY_EXISTS, and keys that identify the conversation (conversation_id, external_conversation_id, call_id, trace_id, langfuse_trace_id, observation_id, langfuse_observation_id, project_id, environment, occurred_at) return 400 INVALID_ARGUMENT.

At most 100 keys per request; key names are limited to 200 characters.

Example:
agent_id
string

Agent to assign to a conversation that was submitted without one. The agent must exist and be active in your organization for a new assignment, otherwise 404 NOT_FOUND. Supply a 22-character agent resource ID (letters, digits, or hyphens); malformed IDs return 400 INVALID_ARGUMENT.

Set-once. Repeating the conversation's current agent succeeds without change; a different agent returns 409 ALREADY_EXISTS. Does not run or re-run any metric.

Pattern: ^[A-Za-z0-9-]{22}$
Example:

"fZSUMoKq67ZarVYCbugjsd"

Response

Audio attached successfully; audio metrics queued

uploaded_conversation
object
required

Conversation resource object.