{
	"info": {
		"_postman_id": "email-api-collection",
		"name": "MultiChannel API - Email",
		"description": "Complete Email API collection for domain management, template creation, and sending emails with attachments and personalization.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "multichannel-email-api"
	},
	"item": [
		{
			"name": "Domain Management",
			"item": [
				{
					"name": "Create Domain",
					"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  \"domain\": \"example.com\",\n  \"envelopeName\": \"noreply\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/domain",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "domain"]
						},
						"description": "Creates a new email domain. After creation, you'll need to configure DNS records (SPF, DKIM, etc.) to verify the domain.\n\n**Required Fields:**\n- `domain`: The domain name (e.g., example.com)\n- `envelopeName`: The envelope sender name (e.g., noreply, support)\n\n**Note:** Domain must be unique and will be verified through DNS configuration."
					},
					"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  \"domain\": \"example.com\",\n  \"envelopeName\": \"noreply\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/domain",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "domain"]
								}
							},
							"status": "Created",
							"code": 201,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"status\": \"success\",\n  \"message\": \"Domain added successfully.\",\n  \"data\": {\n    \"id\": 1,\n    \"domain_id\": \"12345\",\n    \"domain\": \"example.com\",\n    \"envelope_name\": \"noreply\",\n    \"status\": \"success\"\n  }\n}"
						},
						{
							"name": "Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"domain\": \"\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/domain",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "domain"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"message\": \"The domain field is required.\",\n  \"errors\": {\n    \"domain\": [\"The domain field is required.\"],\n    \"envelopeName\": [\"The envelope name field is required.\"]\n  }\n}"
						}
					]
				},
				{
					"name": "Get Domain DNS",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/domain/dns/:id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "domain", "dns", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "1",
									"description": "Domain ID"
								}
							]
						},
						"description": "Retrieves DNS configuration details for a domain. Use this to get the DNS records (SPF, DKIM, etc.) that need to be added to your domain's DNS settings for verification."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/domain/dns/1",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "domain", "dns", "1"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"data\": {\n    \"domain_id\": 1,\n    \"dns_records\": [\n      {\n        \"signature\": \"dkim\",\n        \"type\": \"TXT\",\n        \"host\": \"default._domainkey.example.com\",\n        \"value\": \"v=DKIM1; k=rsa; p=...\",\n        \"validation\": 1\n      }\n    ]\n  }\n}"
						}
					]
				},
				{
					"name": "Get Domain Status",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/domain/status/:id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "domain", "status", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "1",
									"description": "Domain ID"
								}
							]
						},
						"description": "Retrieves the verification status of a domain. Check if DNS records are properly configured and domain is verified."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/domain/status/1",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "domain", "status", "1"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"data\": {\n    \"domain_id\": 1,\n    \"domain\": \"example.com\",\n    \"status\": \"verified\",\n    \"dkim\": true,\n    \"spf\": true\n  }\n}"
						}
					]
				},
				{
					"name": "Delete Domain",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/domain/delete/:id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "domain", "delete", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "example.com",
									"description": "Domain name or ID"
								}
							]
						},
						"description": "Deletes a domain from your account. This will remove the domain from both the local database and the email service provider."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "DELETE",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/domain/delete/example.com",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "domain", "delete", "example.com"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Domain deleted successfully.\",\n  \"domain\": \"example.com\"\n}"
						}
					]
				}
			],
			"description": "Email domain management endpoints for creating, verifying, and managing email domains."
		},
		{
			"name": "Template Management",
			"item": [
				{
					"name": "Create Email 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 Email\",\n  \"type\": \"html\",\n  \"code_content\": \"<h1>Welcome [%NAME%]!</h1><p>Your verification code is: [%CODE%]</p>\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/template",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "template"]
						},
						"description": "Creates a reusable email template. Templates can be HTML or text format and support placeholders for personalization.\n\n**Required Fields:**\n- `template_name`: Name of the template (max 30 characters)\n- `type`: Content type - \"html\" or \"text\"\n- `code_content`: HTML content (when type is \"html\")\n- OR `editor_content`: Text content (when type is \"text\")\n\n**Placeholders:**\n- Use `[%NAME%]`, `[%CODE%]`, etc. for dynamic content\n- Placeholders will be replaced when sending emails"
					},
					"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 Email\",\n  \"type\": \"html\",\n  \"code_content\": \"<h1>Welcome [%NAME%]!</h1>\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/template",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "template"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Template saved successfully\",\n  \"id\": 185,\n  \"type\": \"html\"\n}"
						},
						{
							"name": "Validation Error",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_name\": \"\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/template",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "template"]
								}
							},
							"status": "Unprocessable Entity",
							"code": 422,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"message\": \"The template name field is required.\",\n  \"errors\": {\n    \"template_name\": [\"The template name field is required.\"],\n    \"type\": [\"The type field is required.\"],\n    \"code_content\": [\"The code content field is required when type is html.\"]\n  }\n}"
						}
					]
				},
				{
					"name": "Get All Templates",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/listTemplates",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "listTemplates"]
						},
						"description": "Retrieves all email templates for the authenticated user. Returns a list of templates with their content, status, and metadata."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/listTemplates",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "listTemplates"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"count\": 3,\n  \"templates\": [\n    {\n      \"id\": 185,\n      \"template_name\": \"Welcome Email\",\n      \"content\": \"<h1>Welcome [%NAME%]!</h1><p>Your code is: [%CODE%]</p>\",\n      \"status\": 1,\n      \"type\": 3,\n      \"created_at\": \"2025-09-15T12:25:02.000000Z\",\n      \"updated_at\": \"2025-09-15T12:25:02.000000Z\"\n    },\n    {\n      \"id\": 184,\n      \"template_name\": \"Password Reset\",\n      \"content\": \"Your password reset link is <a href='[%LINK%]'>here</a>.\",\n      \"status\": 1,\n      \"type\": 3,\n      \"created_at\": \"2025-09-14T10:15:00.000000Z\",\n      \"updated_at\": \"2025-09-14T10:15:00.000000Z\"\n    }\n  ]\n}"
						}
					]
				},
				{
					"name": "Get Single Template",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/listTemplates/:id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "listTemplates", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "185",
									"description": "Template ID"
								}
							]
						},
						"description": "Retrieves a specific email template by ID. Returns detailed information including the full HTML/text content."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "GET",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/listTemplates/185",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "listTemplates", "185"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"count\": 1,\n  \"templates\": [\n    {\n      \"id\": 185,\n      \"template_name\": \"Welcome Email\",\n      \"content\": \"<h1>Welcome [%NAME%]!</h1><p>Your code is: [%CODE%]</p>\",\n      \"status\": 1,\n      \"type\": 3,\n      \"created_at\": \"2025-09-15T12:25:02.000000Z\",\n      \"updated_at\": \"2025-09-15T12:25:02.000000Z\"\n    }\n  ]\n}"
						},
						{
							"name": "Not Found",
							"originalRequest": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{base_url}}/api/v1/email/listTemplates/999",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "listTemplates", "999"]
								}
							},
							"status": "Not Found",
							"code": 404,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Template not found\"\n}"
						}
					]
				},
				{
					"name": "Delete Template",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{api_token}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/api/v1/email/template/delete/:id",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "template", "delete", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "185",
									"description": "Template ID to delete"
								}
							]
						},
						"description": "Deletes an email template by ID. Only templates owned by the authenticated user can be deleted."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "DELETE",
								"header": [
									{
										"key": "Authorization",
										"value": "Bearer {{api_token}}"
									}
								],
								"url": {
									"raw": "{{base_url}}/api/v1/email/template/delete/185",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "template", "delete", "185"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Template deleted successfully\"\n}"
						}
					]
				}
			],
			"description": "Email template management endpoints for creating, listing, and deleting email templates."
		},
		{
			"name": "Send Email",
			"item": [
				{
					"name": "Send with 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_id\": 185,\n  \"from\": {\n    \"email\": \"noreply@example.com\",\n    \"name\": \"Example Company\"\n  },\n  \"personalizations\": [\n    {\n      \"to\": [\n        {\"email\": \"recipient1@example.com\"},\n        {\"email\": \"recipient2@example.com\"}\n      ],\n      \"attributes\": {\n        \"NAME\": \"John Doe\",\n        \"CODE\": \"123456\"\n      }\n    }\n  ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/sendEmail",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "sendEmail"]
						},
						"description": "Sends an email using a pre-created template. Template placeholders (e.g., [%NAME%], [%CODE%]) will be replaced with values from the `attributes` object.\n\n**Required Fields:**\n- `template_id`: ID of an existing email template\n- `from`: Sender email and name\n- `personalizations`: Array of recipient objects with `to`, `cc`, `bcc` and `attributes`\n\n**Optional Fields:**\n- `reply_to`: Reply-to email address\n- `subject`: Email subject (if not provided, template name is used)\n- `attachments`: Array of attachment objects\n- `tags`: Array of tags for tracking"
					},
					"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_id\": 185,\n  \"from\": {\n    \"email\": \"noreply@example.com\",\n    \"name\": \"Example Company\"\n  },\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\"}],\n      \"attributes\": {\n        \"NAME\": \"John\",\n        \"CODE\": \"123456\"\n      }\n    }\n  ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/sendEmail",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "sendEmail"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Email sent successfully\",\n  \"data\": {\n    \"message_id\": \"msg_123456789\",\n    \"local_ref_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n  }\n}"
						},
						{
							"name": "Insufficient Credit",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_id\": 185,\n  \"from\": {\"email\": \"noreply@example.com\"},\n  \"personalizations\": [{\"to\": [{\"email\": \"test@example.com\"}]}]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/sendEmail",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "sendEmail"]
								}
							},
							"status": "Bad Request",
							"code": 400,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": false,\n  \"message\": \"Insufficient credit. Required: ₹0.50, Available: ₹0.10\"\n}"
						}
					]
				},
				{
					"name": "Send with Direct Content",
					"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  \"subject\": \"Welcome to Our Service\",\n  \"from\": {\n    \"email\": \"noreply@example.com\",\n    \"name\": \"Example Company\"\n  },\n  \"content\": [\n    {\n      \"type\": \"html\",\n      \"value\": \"<h1>Welcome!</h1><p>Thank you for joining us.</p>\"\n    }\n  ],\n  \"personalizations\": [\n    {\n      \"to\": [\n        {\"email\": \"recipient1@example.com\"},\n        {\"email\": \"recipient2@example.com\"}\n      ]\n    }\n  ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/sendEmail",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "sendEmail"]
						},
						"description": "Sends an email with direct HTML/text content without using a template.\n\n**Required Fields:**\n- `subject`: Email subject line\n- `from`: Sender email and name\n- `content`: Array of content objects with `type` (html/text) and `value`\n- `personalizations`: Array of recipient objects\n\n**Alternative Simple Mode:**\n- `to`: Comma-separated string or array of email addresses\n- `content_string`: Direct HTML/text content string\n- `from_email` and `from_name`: Simple sender fields"
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"subject\": \"Welcome!\",\n  \"from\": {\"email\": \"noreply@example.com\", \"name\": \"Company\"},\n  \"content\": [{\"type\": \"html\", \"value\": \"<h1>Welcome!</h1>\"}],\n  \"personalizations\": [{\"to\": [{\"email\": \"test@example.com\"}]}]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/sendEmail",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "sendEmail"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Email sent successfully\",\n  \"data\": {\n    \"message_id\": \"msg_123456789\",\n    \"local_ref_id\": \"550e8400-e29b-41d4-a716-446655440001\"\n  }\n}"
						}
					]
				},
				{
					"name": "Send with Attachments",
					"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_id\": 185,\n  \"subject\": \"Invoice Attached\",\n  \"from\": {\n    \"email\": \"noreply@example.com\",\n    \"name\": \"Billing Department\"\n  },\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"customer@example.com\"}],\n      \"attributes\": {\n        \"NAME\": \"John Doe\"\n      }\n    }\n  ],\n  \"attachments\": [\n    {\n      \"name\": \"invoice.pdf\",\n      \"content\": \"base64_encoded_content_here\",\n      \"type\": \"application/pdf\"\n    }\n  ]\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/sendEmail",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "sendEmail"]
						},
						"description": "Sends an email with file attachments. Attachments must be base64-encoded.\n\n**Attachment Format:**\n- `name`: File name\n- `content`: Base64-encoded file content\n- `type`: MIME type (e.g., application/pdf, image/png)"
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"template_id\": 185,\n  \"from\": {\"email\": \"noreply@example.com\"},\n  \"personalizations\": [{\"to\": [{\"email\": \"test@example.com\"}]}],\n  \"attachments\": [{\"name\": \"file.pdf\", \"content\": \"base64...\", \"type\": \"application/pdf\"}]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/sendEmail",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "sendEmail"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Email sent successfully\",\n  \"data\": {\n    \"message_id\": \"msg_123456789\",\n    \"local_ref_id\": \"550e8400-e29b-41d4-a716-446655440002\"\n  }\n}"
						}
					]
				},
				{
					"name": "Simple Mode (To/Cc/Bcc)",
					"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  \"subject\": \"Simple Email\",\n  \"from_email\": \"noreply@example.com\",\n  \"from_name\": \"Example Company\",\n  \"to\": \"recipient1@example.com, recipient2@example.com\",\n  \"cc\": \"cc@example.com\",\n  \"content_string\": \"<h1>Hello!</h1><p>This is a simple email.</p>\"\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/api/v1/email/sendEmail",
							"host": ["{{base_url}}"],
							"path": ["api", "v1", "email", "sendEmail"]
						},
						"description": "Simplified email sending mode. Use this for quick emails without complex personalization.\n\n**Simple Fields:**\n- `to`: Comma-separated email addresses or array\n- `cc`: Optional CC recipients\n- `bcc`: Optional BCC recipients\n- `from_email`: Sender email\n- `from_name`: Sender name\n- `subject`: Email subject\n- `content_string`: HTML or text content\n\n**Note:** Recipients can be provided as comma-separated strings or arrays. The system will automatically normalize them."
					},
					"response": [
						{
							"name": "Success Response",
							"originalRequest": {
								"method": "POST",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"subject\": \"Test\",\n  \"from_email\": \"noreply@example.com\",\n  \"to\": \"test@example.com\",\n  \"content_string\": \"<p>Hello!</p>\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/api/v1/email/sendEmail",
									"host": ["{{base_url}}"],
									"path": ["api", "v1", "email", "sendEmail"]
								}
							},
							"status": "OK",
							"code": 200,
							"_postman_previewlanguage": "json",
							"body": "{\n  \"success\": true,\n  \"message\": \"Email sent successfully\",\n  \"data\": {\n    \"message_id\": \"msg_123456789\",\n    \"local_ref_id\": \"550e8400-e29b-41d4-a716-446655440003\"\n  }\n}"
						}
					]
				}
			],
			"description": "Email sending endpoints with support for templates, direct content, attachments, and personalization."
		}
	],
	"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"
			}
		]
	}
}

