Skip to main content

Stop Recording

Overview​

The stop_recording action stops an active recording. Use it to record only the relevant part of a call, such as consent plus agent conversation but not payment entry. Place it in the actions array returned by your answer_url. MiniVoice executes actions in order, so put stop_recording before the action that depends on its result and after any prompt or setup the caller should experience first.

Business Use Case​

Use stop_recording when the recorded portion of a call is complete. For example, stop recording before a caller is transferred to a payment flow.

JSON Example​

{
"actions": [
{
"stop_recording": {}
}
]
}

Parameters​

FieldTypeRequiredDescription
typestringYesMust be stop_recording when using typed action format.

Execution Flow​

  1. MiniVoice reaches stop_recording.
  2. The active recording is stopped.
  3. Recording metadata is finalized.
  4. Completed recordings can be used for transcription and AI analysis.

Webhook Behaviour​

MiniVoice sends recording.completed when the recording is available. If completion fails, MiniVoice sends recording.failed.

Success Example​

A successful answer_url response includes the action in a valid actions array:

{
"actions": [
{
"stop_recording": {}
}
]
}

Your application should store the MiniVoice call ID from webhooks or API responses so you can correlate the action with the call.

Failure Behaviour​

If no recording is active, stop_recording cannot complete. Design flows so start_recording happens before stop_recording.

Expected Result​

MiniVoice stops the active recording. Your application can later read recording metadata for the call if a recording was created.

Testing​

Start recording, speak a known phrase, stop recording, and confirm recording metadata includes duration_seconds and size_bytes. During testing, log every webhook payload and compare the call ID, action timing, and final call status with the behavior you expected.

Copy/Paste Examples​

Real Request​

Return this from your answer_url:

{
"actions": [
{
"stop_recording": {}
}
]
}

Real Response​

A valid answer_url response is the JSON action payload itself. MiniVoice accepts the response when it contains an actions array:

{
"actions": [
{
"stop_recording": {}
}
]
}

Real Webhook Example​

{
"event": "recording.completed",
"created_at": "2026-05-29T12:02:12Z",
"call": {
"id": "call_123",
"status": "in_progress",
"direction": "inbound"
},
"variables": {},
"data": {
"recording_id": "rec_call_123",
"status": "completed",
"duration_seconds": 120,
"size_bytes": 204800
}
}

Common Use Case​

Use stop_recording when the recorded portion of a call is complete. For example, stop recording before a caller is transferred to a payment flow.

Common Failure Case​

{
"error": {
"code": "answer_url_error",
"message": "invalid action payload"
}
}

Invalid fields or malformed JSON cause MiniVoice to reject the answer_url payload. Log the exact response your server returned while testing.