{
	"info": {
		"_postman_id": "voice-api-collection",
		"name": "MultiChannel API - Voice",
		"description": "Complete Voice API collection for creating templates, sending voice calls, and managing campaigns.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "multichannel-voice-api"
	},
	"item": [
		{
			"name": "Create Voice Template",
			"item": [
				{
					"name": "Simple Broadcast Template",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"template_name\": \"welcome_call\",\n  \"audio_url\": \"https://example.com/audio/welcome.mp3\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/voice/storeTemplate",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "storeTemplate"]
						},
						"description": "Creates a simple voice broadcast template. The template will be created with a clip ID (campaign ID) from the voice gateway. Audio duration is automatically calculated from the provided audio URL or file.\n\n**Parameters:**\n- `template_name`: Name of the voice template (max 255 characters)\n- `audio_url`: HTTP URL to the audio file (MP3 or WAV). Required if `audio_file` is not provided.\n- `audio_file`: Audio file upload (MP3 or WAV, multipart/form-data). Required if `audio_url` is not provided.\n\n**Note:** Either `audio_url` or `audio_file` must be provided. The `clip_id` returned is the campaign ID from the voice gateway. Use this `clip_id` when sending voice messages."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"welcome_call\",\n  \"audio_url\": \"https://example.com/audio/welcome.mp3\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplate",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplate"]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Template created successfully and is pending approval.\",\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\"\n}"
						},
						{
							"name": "Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"welcome_call\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplate",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplate"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"audio_url\": [\"The audio url field is required when audio file is not present.\"]\n  }\n}"
						},
						{
							"name": "Audio Duration Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"welcome_call\",\n  \"audio_url\": \"https://invalid-url.com/audio.mp3\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplate",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplate"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Failed to get audio duration. Please ensure the audio URL/file is accessible and valid.\"\n}"
						}
					]
				}
			]
		},
		{
			"name": "Create Voice DTMF Template",
			"item": [
				{
					"name": "DTMF Template with Retry",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"template_name\": \"survey_call\",\n  \"audio_url\": \"https://example.com/audio/survey.mp3\",\n  \"dtmflength\": \"1\",\n  \"dtmftimeout\": \"10\",\n  \"retry\": \"2\",\n  \"retrykey\": \"0\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/voice/storeTemplateWithDtmf",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "storeTemplateWithDtmf"]
						},
						"description": "Creates a voice template with DTMF (Dual-Tone Multi-Frequency) capture capabilities. This enables interactive voice calls where recipients can press keys on their phone to provide input.\n\n**Parameters:**\n- `template_name`: Name of the voice template (max 255 characters)\n- `audio_url`: HTTP URL to the audio file (MP3 or WAV). Required if `audio_file` is not provided.\n- `audio_file`: Audio file upload (MP3 or WAV). Required if `audio_url` is not provided.\n- `dtmflength`: Expected length of DTMF input (e.g., \"1\" for single digit, \"4\" for 4 digits) - Required\n- `dtmftimeout`: Timeout in seconds for DTMF input (e.g., \"10\") - Required\n- `retry`: Number of retry attempts if DTMF input is not received - Optional\n- `retrykey`: Key to press for retry (e.g., \"0\") - Optional"
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"survey_call\",\n  \"audio_url\": \"https://example.com/audio/survey.mp3\",\n  \"dtmflength\": \"1\",\n  \"dtmftimeout\": \"10\",\n  \"retry\": \"2\",\n  \"retrykey\": \"0\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplateWithDtmf",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplateWithDtmf"]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Template created successfully and is pending approval.\",\n  \"clip_id\": \"2ee85047700c22fedea71dd58b449ff7\"\n}"
						},
						{
							"name": "DTMF Template Without Retry",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"survey_call_simple\",\n  \"audio_url\": \"https://example.com/audio/survey.mp3\",\n  \"dtmflength\": \"1\",\n  \"dtmftimeout\": \"10\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplateWithDtmf",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplateWithDtmf"]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Template created successfully and is pending approval.\",\n  \"clip_id\": \"2ee85047700c22fedea71dd58b449ff7\"\n}"
						},
						{
							"name": "Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"survey_call\",\n  \"audio_url\": \"https://example.com/audio/survey.mp3\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/storeTemplateWithDtmf",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "storeTemplateWithDtmf"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"dtmflength\": [\"The dtmflength field is required.\"],\n    \"dtmftimeout\": [\"The dtmftimeout field is required.\"]\n  }\n}"
						}
					]
				}
			]
		},
		{
			"name": "Get Voice Templates",
			"item": [
				{
					"name": "Get All Templates",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/voice/templates",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "templates"]
						},
						"description": "Retrieves all voice templates for the authenticated user. Returns templates with their type, status, clip_id, and full details."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/voice/templates",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "templates"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"templates\": [\n    {\n      \"id\": 1,\n      \"template_name\": \"welcome_call\",\n      \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n      \"audio_file\": \"https://example.com/audio/welcome.mp3\",\n      \"duration\": \"30\",\n      \"type\": \"1\",\n      \"status\": \"1\",\n      \"created_at\": \"2025-01-15T10:30:00.000000Z\"\n    },\n    {\n      \"id\": 2,\n      \"template_name\": \"survey_call\",\n      \"clip_id\": \"2ee85047700c22fedea71dd58b449ff7\",\n      \"audio_file\": \"https://example.com/audio/survey.mp3\",\n      \"duration\": \"45\",\n      \"type\": \"2\",\n      \"status\": \"1\",\n      \"created_at\": \"2025-01-15T11:00:00.000000Z\"\n    }\n  ],\n  \"count\": 2\n}"
						}
					]
				},
				{
					"name": "Get Single Template",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/voice/templates/:clip_id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "templates", ":clip_id"],
							"variable": [
								{
									"key": "clip_id",
									"value": "1dd74936699b11edadb60cc47a338ee6",
									"description": "Clip ID (campaign ID) for the voice template"
								}
							]
						},
						"description": "Retrieves a specific voice template by clip_id (campaign ID) with complete details including type, status, duration, and audio file URL.\n\n**Note:** The clip_id is the campaign ID returned when creating the template, not the database ID."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/voice/templates/1dd74936699b11edadb60cc47a338ee6",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "templates", "1dd74936699b11edadb60cc47a338ee6"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"template\": {\n    \"id\": 1,\n    \"template_name\": \"welcome_call\",\n    \"audio_file\": \"https://example.com/audio/welcome.mp3\",\n    \"duration\": \"30\",\n    \"type\": \"Simple Broadcast\",\n    \"status\": \"approved\",\n    \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n    \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n    \"updated_at\": \"2025-01-15T10:30:00.000000Z\"\n  }\n}"
						},
						{
							"name": "Template Not Found",
							"originalRequest": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{base_url}}/api/v1/voice/templates/invalid_clip_id",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "templates", "invalid_clip_id"]
								}
							},
							"status": "Not Found",
							"code": 404,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Template not found.\"\n}"
						}
					]
				}
			]
		},
		{
			"name": "Send Voice Message",
			"item": [
				{
					"name": "Send Without Retry",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\", \"9988776655\"]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/voice/sendMessage",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "sendMessage"]
						},
						"description": "Sends voice calls to multiple recipients using an approved template. The message is processed asynchronously via Kafka, and you'll receive a reference ID immediately.\n\n**Parameters:**\n- `clip_id`: The clip ID (campaign ID) returned when creating the template - Required\n- `numbers`: Array of recipient phone numbers (10-digit format, e.g., \"9876543210\"). Maximum 500 numbers per request - Required\n- `retry`: Number of retry attempts if the caller doesn't pick up (0-3, default: 0) - Optional\n- `retrytime`: Time in seconds between retry attempts (e.g., 900 for 15 minutes, 600 for 10 minutes, default: 0) - Optional\n\n**Note:** Template must be approved (status=1) before use. If both `retry` and `retrytime` are 0 or not provided, no retries will be attempted."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Accepted",
							"code": 202,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"status\": \"accepted\",\n  \"referenceId\": \"c6b9d8e4-12f3-4b9c-9f8a-abcdef123456\"\n}"
						},
						{
							"name": "Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"numbers\": [\"9876543210\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"clip_id\": [\"The clip id field is required.\"]\n  }\n}"
						},
						{
							"name": "Template Not Approved",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"pending_template_id\",\n  \"numbers\": [\"9876543210\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Template is not approved. Please wait for approval before sending messages.\"\n}"
						},
						{
							"name": "Insufficient Balance",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Insufficient balance. Please recharge your account.\"\n}"
						}
					]
				},
				{
					"name": "Send With Retry",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\"],\n  \"retry\": 2,\n  \"retrytime\": 900\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/voice/sendMessage",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "sendMessage"]
						},
						"description": "Sends voice calls with retry configuration. If the caller doesn't pick up, the system will retry the call based on the retry settings.\n\n**Retry Configuration:**\n- `retry`: Number of retry attempts (0-3). Set to 2 for 2 retries.\n- `retrytime`: Time in seconds between retry attempts. Set to 900 for 15 minutes between retries.\n\n**Note:** Both `retry` and `retrytime` must be greater than 0 for retries to work. If either is 0, no retries will be attempted."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\"],\n  \"retry\": 2,\n  \"retrytime\": 900\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Accepted",
							"code": 202,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"status\": \"accepted\",\n  \"referenceId\": \"c6b9d8e4-12f3-4b9c-9f8a-abcdef123457\"\n}"
						}
					]
				},
				{
					"name": "Send Maximum Numbers (500)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							},
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\n    \"9876543210\", \"9123456780\", \"9988776655\", \"9876543211\", \"9123456781\",\n    \"9988776656\", \"9876543212\", \"9123456782\", \"9988776657\", \"9876543213\"\n  ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/voice/sendMessage",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "sendMessage"]
						},
						"description": "Sends voice calls to the maximum allowed number of recipients (500) in a single request.\n\n**Note:** Maximum 500 phone numbers allowed per request. All numbers must be in 10-digit format."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									},
									{
										"key": "Content-Type",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Accepted",
							"code": 202,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"status\": \"accepted\",\n  \"referenceId\": \"c6b9d8e4-12f3-4b9c-9f8a-abcdef123458\"\n}"
						},
						{
							"name": "Too Many Numbers",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n  \"numbers\": [\"9876543210\", \"9123456780\", \"9988776655\"]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/voice/sendMessage",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "sendMessage"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"numbers\": [\"The numbers may not have more than 500 items.\"]\n  }\n}"
						}
					]
				}
			]
		},
		{
			"name": "Get Voice Report",
			"item": [
				{
					"name": "Get Report by Batch ID",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/voice/reports/:batch_id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "voice", "reports", ":batch_id"],
							"variable": [
								{
									"key": "batch_id",
									"value": "1",
									"description": "The unique batch ID for the voice call batch (returned from send message response)"
								}
							]
						},
						"description": "Retrieves the delivery report of a previously sent voice batch. You must provide the `batch_id` (returned from the send message response or from the batch record) to fetch the associated logs for each recipient.\n\n**Response includes:**\n- Batch information: ID, template_id, clip_id, gateway_ref_id, total_numbers, status, cost, duration\n- Logs array: Individual call logs for each recipient with status, reference_id, duration, DTMF input (if applicable), error codes, and timestamps\n\n**Status values:**\n- `submitted`: Call has been submitted to gateway\n- `completed`: Call completed successfully\n- `failed`: Call failed\n- `pending`: Call is pending"
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/voice/reports/1",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "reports", "1"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"batch\": {\n    \"id\": 1,\n    \"user_id\": 7,\n    \"template_id\": 1,\n    \"clip_id\": \"1dd74936699b11edadb60cc47a338ee6\",\n    \"gateway_ref_id\": \"ACK123456\",\n    \"total_numbers\": 2,\n    \"status\": \"submitted\",\n    \"cost\": 0.50,\n    \"duration\": \"30\",\n    \"created_at\": \"2025-01-15T12:34:56.000000Z\"\n  },\n  \"logs\": [\n    {\n      \"id\": 1,\n      \"voice_batch_id\": 1,\n      \"recipient_number\": \"9876543210\",\n      \"status\": \"submitted\",\n      \"reference_id\": \"ACK123456\",\n      \"duration\": null,\n      \"dtmf\": null,\n      \"error_code\": null,\n      \"error_message\": null,\n      \"created_at\": \"2025-01-15T12:34:56.000000Z\"\n    },\n    {\n      \"id\": 2,\n      \"voice_batch_id\": 1,\n      \"recipient_number\": \"9123456780\",\n      \"status\": \"completed\",\n      \"reference_id\": \"ACK123457\",\n      \"duration\": \"30\",\n      \"dtmf\": \"1\",\n      \"error_code\": null,\n      \"error_message\": null,\n      \"created_at\": \"2025-01-15T12:34:57.000000Z\"\n    }\n  ]\n}"
						},
						{
							"name": "Batch Not Found",
							"originalRequest": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{base_url}}/api/v1/voice/reports/99999",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "voice", "reports", "99999"]
								}
							},
							"status": "Not Found",
							"code": 404,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Batch not found.\"\n}"
						}
					]
				}
			]
		}
	],
	"variable": [
		{
			"key": "base_url",
			"value": "https://example.com",
			"type": "string",
			"description": "Base URL for the API. Update this with your actual domain."
		},
		{
			"key": "api_token",
			"value": "YOUR_API_TOKEN_HERE",
			"type": "string",
			"description": "Your API authentication token. Get this from the developer dashboard after generating an API key."
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{api_token}}",
				"type": "string"
			}
		]
	}
}

