{
          "openapi": "3.0.3",
          "info": {
            "contact": {},
            "description": "Communications Platform As a Service - CPAAS is a unified platform which provides Email, Voice calls, SMS and WhatsApp messages in a single service. Initiate voice calls, send SMS messages, send WhatsApp messages, retrieve logs based on multiple parameters, retrieve details of a single call/ SMS/ WhatsApp message.",
            "title": "Zoho CPaaS Messaging API (v1.1)",
            "version": "1.1.0"
          },
          "servers": [
            {
              "description": "CPaaS API Endpoint",
              "url": "https://cpaas.zoho.com/v1.1"
            },
            {
              "description": "Zoho Accounts Server",
              "url": "https://accounts.zoho.com"
            }
          ],
          "tags": [
            {
              "name": "email-management",
              "description": "CPaaS email sending APIs for sending single, batch, and template-based transactional emails.",
              "x-zenesis-module-title": "Email Management"
            },
            {
              "name": "email-logs",
              "description": "APIs to retrieve outgoing email information from your CPaaS account. CPaaS retains email logs for 60 days.",
              "x-zenesis-module-title": "Email Logs"
            },
            {
              "name": "domains",
              "description": "APIs to manage sending domains in your CPaaS account. You can add, verify, edit, and delete domains.",
              "x-zenesis-module-title": "Domains"
            },
            {
              "name": "agents",
              "description": "APIs to manage Mail Agents, API keys (Send Mail tokens), and SMTP short passwords in your CPaaS account. You can create up to 50 agents per account.",
              "x-zenesis-module-title": "Agents"
            },
            {
              "name": "suppression",
              "description": "APIs to manage suppression (DND) entries in your CPaaS account. Entries added to the suppression list will not receive further emails.",
              "x-zenesis-module-title": "Suppression"
            },
            {
              "name": "email-templates",
              "description": "APIs to create, read, update, and delete email templates in your CPaaS account.",
              "x-zenesis-module-title": "Email Templates"
            },
            {
              "name": "oauth",
              "description": "CPaaS uses OAuth 2.0 for authenticating Template, Agent, Suppression, Email Logs, and Domain APIs. Use these endpoints to obtain and refresh OAuth access tokens.",
              "x-zenesis-module-title": "OAuth"
            },
            {
              "name": "voice",
              "description": "Place outbound voice calls with predefined templates, retreive voice message logs, and get details of a specific voice call"
            },
            {
              "name": "sms",
              "description": "Send SMS message, retrieve SMS mesaaging logs and detailed timeline of a single SMS message."
            },
            {
              "name": "whatsapp",
              "description": "Send WhatsApp message, retrieve WhatsApp mesaaging logs and detailed timeline of a single WhatsApp message."
            }
          ],
          "paths": {
            "/email/batch": {
              "post": {
                "summary": "Send Batch Emails",
                "security": [
                  {
                    "SendMailToken": []
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "from",
                          "to",
                          "subject"
                        ],
                        "properties": {
                          "cc": {
                            "$ref": "#/components/schemas/cc_recipients"
                          },
                          "htmlbody": {
                            "$ref": "#/components/schemas/email_management_htmlbody"
                          },
                          "client_reference": {
                            "$ref": "#/components/schemas/client_reference"
                          },
                          "bcc": {
                            "$ref": "#/components/schemas/bcc_recipients"
                          },
                          "attachments": {
                            "$ref": "#/components/schemas/attachments"
                          },
                          "reply_to": {
                            "$ref": "#/components/schemas/reply_to"
                          },
                          "subject": {
                            "$ref": "#/components/schemas/email_management_subject"
                          },
                          "from": {
                            "$ref": "#/components/schemas/from_address"
                          },
                          "track_opens": {
                            "$ref": "#/components/schemas/track_opens"
                          },
                          "to": {
                            "$ref": "#/components/schemas/to_recipients"
                          },
                          "textbody": {
                            "$ref": "#/components/schemas/textbody"
                          },
                          "track_clicks": {
                            "$ref": "#/components/schemas/track_clicks"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Send a batch of transactional emails to multiple recipients at once.",
                "responses": {
                  "200": {
                    "description": "Batch email sent successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "EM_104"
                                  },
                                  "message": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "OK"
                                  }
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "OK"
                            },
                            "request_id": {
                              "readOnly": true,
                              "type": "string",
                              "example": "req-xxxx"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_management_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "email-management"
                ]
              }
            },
            "/email/template/batch": {
              "post": {
                "summary": "Send Batch Emails Using Template",
                "security": [
                  {
                    "SendMailToken": []
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "from",
                          "to"
                        ],
                        "properties": {
                          "cc": {
                            "$ref": "#/components/schemas/cc_recipients"
                          },
                          "template_key": {
                            "$ref": "#/components/schemas/template_key"
                          },
                          "bcc": {
                            "$ref": "#/components/schemas/bcc_recipients"
                          },
                          "attachments": {
                            "$ref": "#/components/schemas/attachments"
                          },
                          "reply_to": {
                            "$ref": "#/components/schemas/reply_to"
                          },
                          "from": {
                            "$ref": "#/components/schemas/from_address"
                          },
                          "track_opens": {
                            "$ref": "#/components/schemas/track_opens"
                          },
                          "template_alias": {
                            "$ref": "#/components/schemas/email_management_template_alias"
                          },
                          "to": {
                            "description": "List of recipients. Each recipient can have individual merge info.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "email_address": {
                                  "type": "object",
                                  "properties": {
                                    "address": {
                                      "type": "string",
                                      "example": "accounts@info.zylker.com"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "accounts"
                                    }
                                  }
                                },
                                "merge_info": {
                                  "description": "Merge variables specific to this recipient.",
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              }
                            }
                          },
                          "track_clicks": {
                            "$ref": "#/components/schemas/track_clicks"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Send a batch of transactional emails to multiple recipients using a pre-created CPaaS template.",
                "responses": {
                  "200": {
                    "description": "Batch emails sent using template successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "EM_104"
                                  },
                                  "message": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "OK"
                                  }
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "OK"
                            },
                            "request_id": {
                              "readOnly": true,
                              "type": "string",
                              "example": "req-xxxx"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_management_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "email-management"
                ]
              }
            },
            "/email/template": {
              "post": {
                "summary": "Send Email Using Template",
                "security": [
                  {
                    "SendMailToken": []
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "from",
                          "to"
                        ],
                        "properties": {
                          "cc": {
                            "$ref": "#/components/schemas/cc_recipients"
                          },
                          "template_key": {
                            "$ref": "#/components/schemas/template_key"
                          },
                          "client_reference": {
                            "$ref": "#/components/schemas/client_reference"
                          },
                          "bcc": {
                            "$ref": "#/components/schemas/bcc_recipients"
                          },
                          "attachments": {
                            "$ref": "#/components/schemas/attachments"
                          },
                          "reply_to": {
                            "$ref": "#/components/schemas/reply_to"
                          },
                          "merge_info": {
                            "$ref": "#/components/schemas/merge_info"
                          },
                          "from": {
                            "$ref": "#/components/schemas/from_address"
                          },
                          "track_opens": {
                            "$ref": "#/components/schemas/track_opens"
                          },
                          "template_alias": {
                            "$ref": "#/components/schemas/email_management_template_alias"
                          },
                          "to": {
                            "$ref": "#/components/schemas/to_recipients"
                          },
                          "track_clicks": {
                            "$ref": "#/components/schemas/track_clicks"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Send a transactional email using a pre-created CPaaS template.",
                "responses": {
                  "200": {
                    "description": "Email sent using template successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "EM_104"
                                  },
                                  "message": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "OK"
                                  }
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "OK"
                            },
                            "request_id": {
                              "readOnly": true,
                              "type": "string",
                              "example": "req-xxxx"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_management_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "email-management"
                ]
              }
            },
            "/files": {
              "post": {
                "summary": "Upload File Cache",
                "security": [
                  {
                    "SendMailToken": []
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "multipart/form-data": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "file": {
                            "format": "binary",
                            "description": "The file to upload.",
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Upload a file to CPaaS's File Cache. The uploaded file can be referenced in emails using the returned cache key, avoiding the need to re-upload the same file for every email.",
                "responses": {
                  "200": {
                    "description": "File uploaded to cache successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "file_cache_key": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "fc-xxxx-xxxx"
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "OK"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_management_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "invoice.pdf"
                    },
                    "in": "query",
                    "name": "name",
                    "description": "Name of the file you are uploading to File Cache.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-management"
                ]
              }
            },
            "/email": {
              "post": {
                "summary": "Send Email",
                "security": [
                  {
                    "SendMailToken": []
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "from",
                          "to",
                          "subject"
                        ],
                        "properties": {
                          "cc": {
                            "$ref": "#/components/schemas/cc_recipients"
                          },
                          "htmlbody": {
                            "$ref": "#/components/schemas/email_management_htmlbody"
                          },
                          "client_reference": {
                            "$ref": "#/components/schemas/client_reference"
                          },
                          "bcc": {
                            "$ref": "#/components/schemas/bcc_recipients"
                          },
                          "attachments": {
                            "$ref": "#/components/schemas/attachments"
                          },
                          "subject": {
                            "$ref": "#/components/schemas/email_management_subject"
                          },
                          "inline_images": {
                            "$ref": "#/components/schemas/inline_images"
                          },
                          "track_opens": {
                            "$ref": "#/components/schemas/track_opens"
                          },
                          "reply_to": {
                            "$ref": "#/components/schemas/reply_to"
                          },
                          "mime_headers": {
                            "$ref": "#/components/schemas/mime_headers"
                          },
                          "from": {
                            "$ref": "#/components/schemas/from_address"
                          },
                          "to": {
                            "$ref": "#/components/schemas/to_recipients"
                          },
                          "textbody": {
                            "$ref": "#/components/schemas/textbody"
                          },
                          "track_clicks": {
                            "$ref": "#/components/schemas/track_clicks"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Send a transactional email to one or more recipients.",
                "responses": {
                  "200": {
                    "description": "Email sent successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "EM_104"
                                  },
                                  "additional_info": {
                                    "readOnly": true,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "to": {
                                          "type": "object",
                                          "properties": {
                                            "email_address": {
                                              "type": "object",
                                              "properties": {
                                                "address": {
                                                  "type": "string",
                                                  "example": "rudra.d@zylker.com"
                                                },
                                                "name": {
                                                  "type": "string",
                                                  "example": "Rudra"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "message": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "OK"
                                  }
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "OK"
                            },
                            "request_id": {
                              "readOnly": true,
                              "type": "string",
                              "example": "req-xxxx"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_management_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "email-management"
                ]
              },
              "get": {
                "summary": "Get All Email Logs",
                "security": [
                  {
                    "email_logs_ZohoOAuth": [
                      "Zeptomail.email.READ"
                    ]
                  },
                  {
                    "email_logs_ZohoOAuth": [
                      "Zeptomail.email.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve a list of outgoing email logs from your CPaaS account. Supports filtering by date range, recipient, subject, and more. Logs are retained for 60 days.",
                "responses": {
                  "200": {
                    "description": "List of email logs.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/email_log"
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_logs_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "query",
                    "name": "mailagent_key",
                    "description": "Filter logs by Mail Agent key.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "req-xxxx"
                    },
                    "in": "query",
                    "name": "request_id",
                    "description": "Filter by a specific request ID.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "01/06/2025, 12:00 AM"
                    },
                    "in": "query",
                    "name": "date_from",
                    "description": "Filter logs from this date and time (format: dd/MM/yyyy, hh:mm a).",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "30/06/2025, 11:59 PM"
                    },
                    "in": "query",
                    "name": "date_to",
                    "description": "Filter logs up to this date and time (format: dd/MM/yyyy, hh:mm a).",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "accounts@info.zylker.com"
                    },
                    "in": "query",
                    "name": "from",
                    "description": "Filter by sender email address.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "rudra.d@zylker.com"
                    },
                    "in": "query",
                    "name": "to",
                    "description": "Filter by recipient email address.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "manager@zylker.com"
                    },
                    "in": "query",
                    "name": "cc",
                    "description": "Filter by CC email address.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "archive@zylker.com"
                    },
                    "in": "query",
                    "name": "bcc",
                    "description": "Filter by BCC email address.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "user@example.com"
                    },
                    "in": "query",
                    "name": "recipient",
                    "description": "Filter by any recipient (To, CC, or BCC).",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 0
                    },
                    "in": "query",
                    "name": "offset",
                    "description": "Starting position for pagination.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 25
                    },
                    "in": "query",
                    "name": "limit",
                    "description": "Number of logs to return per request.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "Account Confirmation"
                    },
                    "in": "query",
                    "name": "subject",
                    "description": "Filter by email subject.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "order-12345"
                    },
                    "in": "query",
                    "name": "client_reference",
                    "description": "Filter by custom client reference.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "boolean"
                    },
                    "in": "query",
                    "name": "is_hb",
                    "description": "Filter for hard bounced emails.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "boolean"
                    },
                    "in": "query",
                    "name": "is_sb",
                    "description": "Filter for soft bounced emails.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "boolean"
                    },
                    "in": "query",
                    "name": "is_mailfailure",
                    "description": "Filter for failed emails.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "boolean"
                    },
                    "in": "query",
                    "name": "is_delivered",
                    "description": "Filter for delivered emails.",
                    "required": false
                  }
                ],
                "tags": [
                  "email-logs"
                ]
              }
            },
            "/email/email-reference/{email-reference}": {
              "get": {
                "summary": "Get Specific Email Details",
                "security": [
                  {
                    "email_logs_ZohoOAuth": [
                      "Zeptomail.email.READ"
                    ]
                  },
                  {
                    "email_logs_ZohoOAuth": [
                      "Zeptomail.email.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve detailed information about a specific outgoing email using its email reference ID.",
                "responses": {
                  "200": {
                    "description": "Detailed information about the specific email.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/email_log_detail"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "404": {
                    "description": "Email log not found",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_logs_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "ref-xxxx-xxxx"
                    },
                    "in": "path",
                    "name": "email-reference",
                    "description": "Unique reference ID of the email.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-logs"
                ]
              }
            },
            "/domains/{domain_key}/verify": {
              "put": {
                "summary": "Verify Domain",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.UPDATE"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Trigger domain verification for an existing domain. Ensure the required DNS records (SPF, DKIM) are configured before verifying.",
                "responses": {
                  "200": {
                    "description": "Domain verification initiated/completed successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "domain_name": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "zylker.com"
                                },
                                "is_verified": {
                                  "readOnly": true,
                                  "type": "boolean",
                                  "example": true
                                }
                              }
                            },
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Domain verified successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request — DNS records not found or misconfigured.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "domain-xxxx"
                    },
                    "in": "path",
                    "name": "domain_key",
                    "description": "Unique key of the domain to verify.",
                    "required": true
                  }
                ],
                "tags": [
                  "domains"
                ]
              }
            },
            "/domains/{domain_key}": {
              "get": {
                "summary": "Get Specific Domain Details",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.READ"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve detailed information about a specific domain using its domain key.",
                "responses": {
                  "200": {
                    "description": "Domain details.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/domain"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "404": {
                    "description": "Domain not found",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "domain-xxxx"
                    },
                    "in": "path",
                    "name": "domain_key",
                    "description": "Unique key of the domain.",
                    "required": true
                  }
                ],
                "tags": [
                  "domains"
                ]
              },
              "delete": {
                "summary": "Delete Domain",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.DELETE"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Delete a domain from your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Domain deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Domain deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "domain-xxxx"
                    },
                    "in": "path",
                    "name": "domain_key",
                    "description": "Unique key of the domain.",
                    "required": true
                  }
                ],
                "tags": [
                  "domains"
                ]
              },
              "put": {
                "summary": "Edit Domain",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.UPDATE"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "new_sub_domain_prefix": {
                            "description": "Updated subdomain prefix.",
                            "type": "string",
                            "example": "demo"
                          },
                          "associate_mailagents": {
                            "description": "Array of Mail Agent keys to associate with this domain.",
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": []
                          },
                          "unassociate_mailagents": {
                            "description": "Array of Mail Agent keys to unassociate from this domain.",
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": []
                          },
                          "new_domain": {
                            "description": "Updated domain name.",
                            "type": "string",
                            "example": "newdomain.com"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Update the details of an existing domain, including its name, subdomain prefix, and Mail Agent associations.",
                "responses": {
                  "200": {
                    "description": "Domain updated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/domain"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "domain-xxxx"
                    },
                    "in": "path",
                    "name": "domain_key",
                    "description": "Unique key of the domain.",
                    "required": true
                  }
                ],
                "tags": [
                  "domains"
                ]
              }
            },
            "/domains": {
              "post": {
                "summary": "Add Domain",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.CREATE"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "domain_name"
                        ],
                        "properties": {
                          "domain_name": {
                            "$ref": "#/components/schemas/domain_name"
                          },
                          "sub_domain_prefix": {
                            "$ref": "#/components/schemas/sub_domain_prefix"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Add a new sending domain to your CPaaS account. After adding, you must verify the domain by adding the required DNS records.",
                "responses": {
                  "200": {
                    "description": "Domain added successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/domain"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "domains"
                ]
              },
              "get": {
                "summary": "Get All Domains",
                "security": [
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.READ"
                    ]
                  },
                  {
                    "domains_ZohoOAuth": [
                      "Zeptomail.Domains.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve a list of all domains added to your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "List of domains.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/domain"
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/domains_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "domains"
                ]
              }
            },
            "/mailagents/{mailagentkey}/apikeys": {
              "post": {
                "summary": "Generate API keys",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.CREATE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Generate a new Send Mail token (API key) for a specific Mail Agent.",
                "responses": {
                  "200": {
                    "description": "New API key (Send Mail token) generated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "created_time": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "2025-06-12T11:50:00Z"
                                },
                                "id": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "apikey-002"
                                },
                                "token": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "Zoho-enczapikey yyyy"
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              },
              "get": {
                "summary": "List API keys",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.READ"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "List all Send Mail tokens (API keys) for a specific Mail Agent.",
                "responses": {
                  "200": {
                    "description": "List of API keys (Send Mail tokens).",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "created_time": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "2025-06-04T08:19:00Z"
                                  },
                                  "id": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "apikey-001"
                                  },
                                  "token": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "Zoho-enczapikey xxxx"
                                  }
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              }
            },
            "/mailagents/{mailagentkey}/short-passwords": {
              "post": {
                "summary": "Generate SMTP short passwords",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.CREATE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Generate a new SMTP short password for a specific Mail Agent.",
                "responses": {
                  "200": {
                    "description": "SMTP short password generated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "created_time": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "2025-06-12T11:50:00Z"
                                },
                                "password": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "yyyy"
                                },
                                "id": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "smtp-002"
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              },
              "get": {
                "summary": "List SMTP Short Passwords",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.READ"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "List all SMTP short passwords for a specific Mail Agent.",
                "responses": {
                  "200": {
                    "description": "List of SMTP short passwords.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "created_time": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "2025-06-04T08:19:00Z"
                                  },
                                  "password": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "xxxx"
                                  },
                                  "id": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "smtp-001"
                                  }
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              }
            },
            "/mailagents/{mailagentkey}/apikeys/{id}": {
              "delete": {
                "summary": "Delete API keys",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.DELETE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Delete a specific Send Mail token (API key) for a Mail Agent.",
                "responses": {
                  "200": {
                    "description": "API key deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "API key deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "apikey-001"
                    },
                    "in": "path",
                    "name": "id",
                    "description": "Unique ID of the API key to delete.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              }
            },
            "/mailagents/{mailagentkey}/short-passwords/{id}": {
              "delete": {
                "summary": "Delete SMTP short passwords",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.DELETE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Delete a specific SMTP short password for a Mail Agent.",
                "responses": {
                  "200": {
                    "description": "SMTP password deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "SMTP password deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "smtp-001"
                    },
                    "in": "path",
                    "name": "id",
                    "description": "Unique ID of the SMTP password to delete.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              }
            },
            "/mailagents/{mailagentkey}": {
              "delete": {
                "summary": "Delete MailAgent",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "ZeptoMail.MailAgents.DELETE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Delete a Mail Agent from your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Mail Agent deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Mail Agent deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              },
              "put": {
                "summary": "Edit MailAgent",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.UPDATE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "mailagent_name": {
                            "$ref": "#/components/schemas/mailagent_name"
                          },
                          "description": {
                            "$ref": "#/components/schemas/agents_description"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Update the name or description of an existing Mail Agent.",
                "responses": {
                  "200": {
                    "description": "Mail Agent updated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/mailagent"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "path",
                    "name": "mailagentkey",
                    "description": "Unique key of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "agents"
                ]
              }
            },
            "/mailagents": {
              "post": {
                "summary": "Add MailAgent",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.CREATE"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "mailagent_name"
                        ],
                        "properties": {
                          "mailagent_name": {
                            "$ref": "#/components/schemas/mailagent_name"
                          },
                          "description": {
                            "$ref": "#/components/schemas/agents_description"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Create a new Mail Agent in your CPaaS account. You can create up to 50 agents per account.",
                "responses": {
                  "200": {
                    "description": "Mail Agent created successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "$ref": "#/components/schemas/mailagent"
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request — e.g. name already exists or max agent limit reached.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "agents"
                ]
              },
              "get": {
                "summary": "List all MailAgents",
                "security": [
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.READ"
                    ]
                  },
                  {
                    "agents_ZohoOAuth": [
                      "Zeptomail.MailAgents.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve a list of all Mail Agents in your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "List of Mail Agents.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/mailagent"
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/agents_error_response"
                        }
                      }
                    }
                  }
                },
                "tags": [
                  "agents"
                ]
              }
            },
            "/suppressions/{dnd_type}": {
              "post": {
                "summary": "Create DND",
                "security": [
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.CREATE"
                    ]
                  },
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "action",
                          "values"
                        ],
                        "properties": {
                          "values": {
                            "$ref": "#/components/schemas/values"
                          },
                          "action": {
                            "$ref": "#/components/schemas/action"
                          },
                          "mailagent_keys": {
                            "$ref": "#/components/schemas/mailagent_keys"
                          },
                          "description": {
                            "$ref": "#/components/schemas/suppression_description"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Add a new suppression (DND) entry. The suppression entry can be an email address or a domain. Once added, emails will not be delivered to the suppressed address or domain.",
                "responses": {
                  "200": {
                    "description": "Suppression entry created successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Suppression entry added successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/suppression_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "enum": [
                        "email",
                        "domain"
                      ],
                      "example": "email"
                    },
                    "in": "path",
                    "name": "dnd_type",
                    "description": "Type of suppression entry. Use `email` for email address suppression or `domain` for domain suppression.",
                    "required": true
                  }
                ],
                "tags": [
                  "suppression"
                ]
              },
              "get": {
                "summary": "Get DND List",
                "security": [
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.READ"
                    ]
                  },
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve a list of suppression (DND) entries. The suppression entry can be an email address or a domain. Supports filtering by date, mail agent, and search value.",
                "responses": {
                  "200": {
                    "description": "List of suppression entries.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/suppression_entry"
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/suppression_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "enum": [
                        "email",
                        "domain"
                      ],
                      "example": "email"
                    },
                    "in": "path",
                    "name": "dnd_type",
                    "description": "Type of suppression entry. Use `email` for email address suppression or `domain` for domain suppression.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "01/06/2025"
                    },
                    "in": "query",
                    "name": "date_from",
                    "description": "Filter entries added from this date (format: dd/MM/yyyy).",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "30/06/2025"
                    },
                    "in": "query",
                    "name": "date_to",
                    "description": "Filter entries added up to this date (format: dd/MM/yyyy).",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 25
                    },
                    "in": "query",
                    "name": "limit",
                    "description": "Number of entries to return per request.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "123456abcd78"
                    },
                    "in": "query",
                    "name": "mailagent_key",
                    "description": "Filter entries by specific Mail Agent key.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 0
                    },
                    "in": "query",
                    "name": "offset",
                    "description": "Starting position for pagination.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "user@example.com"
                    },
                    "in": "query",
                    "name": "search_value",
                    "description": "Search for a specific email address or domain in the suppression list.",
                    "required": false
                  }
                ],
                "tags": [
                  "suppression"
                ]
              },
              "delete": {
                "summary": "Delete DND",
                "security": [
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.DELETE"
                    ]
                  },
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "values"
                        ],
                        "properties": {
                          "values": {
                            "$ref": "#/components/schemas/values"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Remove a suppression (DND) entry from your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Suppression entry deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Suppression entry deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/suppression_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "enum": [
                        "email",
                        "domain"
                      ],
                      "example": "email"
                    },
                    "in": "path",
                    "name": "dnd_type",
                    "description": "Type of suppression entry. Use `email` for email address suppression or `domain` for domain suppression.",
                    "required": true
                  }
                ],
                "tags": [
                  "suppression"
                ]
              },
              "put": {
                "summary": "Edit DND",
                "security": [
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.UPDATE"
                    ]
                  },
                  {
                    "suppression_ZohoOAuth": [
                      "Zeptomail.Suppressions.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "action",
                          "values"
                        ],
                        "properties": {
                          "values": {
                            "$ref": "#/components/schemas/values"
                          },
                          "action": {
                            "$ref": "#/components/schemas/action"
                          },
                          "mailagent_keys": {
                            "$ref": "#/components/schemas/mailagent_keys"
                          },
                          "description": {
                            "$ref": "#/components/schemas/suppression_description"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Update an existing suppression (DND) entry in your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Suppression entry updated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Suppression entry updated successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/suppression_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "enum": [
                        "email",
                        "domain"
                      ],
                      "example": "email"
                    },
                    "in": "path",
                    "name": "dnd_type",
                    "description": "Type of suppression entry. Use `email` for email address suppression or `domain` for domain suppression.",
                    "required": true
                  }
                ],
                "tags": [
                  "suppression"
                ]
              }
            },
            "/mailagents/{mailagent-alias}/templates/{template-key}": {
              "get": {
                "summary": "Get Email Template",
                "security": [
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.READ"
                    ]
                  },
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Fetch details of a specific email template using its template key or alias.",
                "responses": {
                  "200": {
                    "description": "Email template details.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "htmlbody": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "html5-dom-document-internal-entity1-lt-endh1html5-dom-document-internal-entity1-gt-end Hi User html5-dom-document-internal-entity1-lt-end/h1html5-dom-document-internal-entity1-gt-end, Welcome aboard"
                                },
                                "template_key": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "1234567890"
                                },
                                "template_name": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "E-invite"
                                },
                                "subject": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "Invitation to the event"
                                },
                                "template_alias": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "invitemail"
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "404": {
                    "description": "Template not found",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_templates_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "your-mailagent-alias"
                    },
                    "in": "path",
                    "name": "mailagent-alias",
                    "description": "Unique alias of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "1234567890"
                    },
                    "in": "path",
                    "name": "template-key",
                    "description": "Unique key of the email template.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-templates"
                ]
              },
              "delete": {
                "summary": "Delete Email Template",
                "security": [
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.DELETE"
                    ]
                  },
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Delete an existing email template using its template key.",
                "responses": {
                  "200": {
                    "description": "Template deleted successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Template deleted successfully."
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "404": {
                    "description": "Template not found",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_templates_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "your-mailagent-alias"
                    },
                    "in": "path",
                    "name": "mailagent-alias",
                    "description": "Unique alias of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "1234567890"
                    },
                    "in": "path",
                    "name": "template-key",
                    "description": "Unique key of the email template.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-templates"
                ]
              },
              "put": {
                "summary": "Update Email Template",
                "security": [
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.UPDATE"
                    ]
                  },
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "htmlbody": {
                            "$ref": "#/components/schemas/email_templates_htmlbody"
                          },
                          "template_name": {
                            "$ref": "#/components/schemas/template_name"
                          },
                          "subject": {
                            "$ref": "#/components/schemas/email_templates_subject"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Update an existing email template in your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Template updated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "template_key": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "1234567890"
                                },
                                "template_name": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "E-invite (new)"
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_templates_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "your-mailagent-alias"
                    },
                    "in": "path",
                    "name": "mailagent-alias",
                    "description": "Unique alias of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "1234567890"
                    },
                    "in": "path",
                    "name": "template-key",
                    "description": "Unique key of the email template.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-templates"
                ]
              }
            },
            "/mailagents/{mailagent-alias}/templates": {
              "post": {
                "summary": "Add Email Template",
                "security": [
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.CREATE"
                    ]
                  },
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.ALL"
                    ]
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "required": [
                          "template_name",
                          "subject",
                          "htmlbody"
                        ],
                        "properties": {
                          "htmlbody": {
                            "$ref": "#/components/schemas/email_templates_htmlbody"
                          },
                          "template_name": {
                            "$ref": "#/components/schemas/template_name"
                          },
                          "subject": {
                            "$ref": "#/components/schemas/email_templates_subject"
                          },
                          "template_alias": {
                            "$ref": "#/components/schemas/email_templates_template_alias"
                          }
                        }
                      }
                    }
                  }
                },
                "deprecated": false,
                "description": "Create a new email template in your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "Template created successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "properties": {
                                "template_key": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "1234567890"
                                },
                                "template_name": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "E-invite"
                                },
                                "subject": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "Invitation to the event"
                                },
                                "template_alias": {
                                  "readOnly": true,
                                  "type": "string",
                                  "example": "invitemail"
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_templates_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "your-mailagent-alias"
                    },
                    "in": "path",
                    "name": "mailagent-alias",
                    "description": "Unique alias of the Mail Agent.",
                    "required": true
                  }
                ],
                "tags": [
                  "email-templates"
                ]
              },
              "get": {
                "summary": "Get All Email Templates",
                "security": [
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.READ"
                    ]
                  },
                  {
                    "email_templates_ZohoOAuth": [
                      "Zeptomail.MailTemplates.ALL"
                    ]
                  }
                ],
                "deprecated": false,
                "description": "Retrieve a paginated list of email templates in your CPaaS account.",
                "responses": {
                  "200": {
                    "description": "List of email templates.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "created_time": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "2025-06-04T08:19:00Z"
                                  },
                                  "template_key": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "1234567890"
                                  },
                                  "template_name": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "E-invite"
                                  },
                                  "subject": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "Invitation to the event"
                                  },
                                  "template_alias": {
                                    "readOnly": true,
                                    "type": "string",
                                    "example": "invitemail"
                                  }
                                }
                              }
                            },
                            "status": {
                              "readOnly": true,
                              "type": "string",
                              "example": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Bad Request",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/email_templates_error_response"
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "your-mailagent-alias"
                    },
                    "in": "path",
                    "name": "mailagent-alias",
                    "description": "Unique alias of the Mail Agent.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 0
                    },
                    "in": "query",
                    "name": "offset",
                    "description": "Starting position for pagination. For example, to fetch the 9th template, set offset to 8.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "integer",
                      "example": 25
                    },
                    "in": "query",
                    "name": "limit",
                    "description": "Number of templates to return per request.",
                    "required": false
                  }
                ],
                "tags": [
                  "email-templates"
                ]
              }
            },
            "/oauth/v2/token": {
              "post": {
                "summary": "Get Access Token and Refresh Token",
                "deprecated": false,
                "description": "Use this endpoint to obtain an access token and a refresh token using an authorization code,\nor to refresh an expired access token using a refresh token.\n\n**To get an access token (first time):**\nSet `grant_type=authorization_code` and provide the `code` parameter.\n\n**To refresh an access token:**\nSet `grant_type=refresh_token` and provide the `refresh_token` parameter.\n\nAccess tokens are valid for **1 hour**.\n",
                "responses": {
                  "200": {
                    "description": "Token generated successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "access_token": {
                              "readOnly": true,
                              "type": "string",
                              "example": "1000.xxxx.xxxx"
                            },
                            "refresh_token": {
                              "readOnly": true,
                              "type": "string",
                              "example": "1000.yyyy.yyyy"
                            },
                            "api_domain": {
                              "readOnly": true,
                              "type": "string",
                              "example": "https://www.zohoapis.com"
                            },
                            "token_type": {
                              "readOnly": true,
                              "type": "string",
                              "example": "Bearer"
                            },
                            "expires_in": {
                              "readOnly": true,
                              "type": "integer",
                              "example": 3600
                            }
                          }
                        }
                      }
                    }
                  },
                  "400": {
                    "description": "Invalid request or authorization code.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "type": "object",
                          "properties": {
                            "error": {
                              "readOnly": true,
                              "type": "string",
                              "example": "invalid_code"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "parameters": [
                  {
                    "schema": {
                      "type": "string",
                      "example": "1000.XXXXXXXXXXXX"
                    },
                    "in": "query",
                    "name": "client_id",
                    "description": "The Client ID generated from the Zoho API Console.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                    },
                    "in": "query",
                    "name": "client_secret",
                    "description": "The Client Secret generated from the Zoho API Console.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "enum": [
                        "authorization_code",
                        "refresh_token"
                      ],
                      "example": "authorization_code"
                    },
                    "in": "query",
                    "name": "grant_type",
                    "description": "The grant type. Use `authorization_code` for first-time token generation or `refresh_token` to refresh an expired token.",
                    "required": true
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "1000.abc123xyz..."
                    },
                    "in": "query",
                    "name": "code",
                    "description": "The authorization code generated from the Zoho API Console Self Client. Required when grant_type is authorization_code.",
                    "required": false
                  },
                  {
                    "schema": {
                      "type": "string",
                      "example": "1000.refresh.abc123xyz..."
                    },
                    "in": "query",
                    "name": "refresh_token",
                    "description": "The refresh token received during first-time token generation. Required when grant_type is refresh_token.",
                    "required": false
                  }
                ],
                "tags": [
                  "oauth"
                ]
              }
            },
            "/voice": {
              "post": {
                "summary": "Place a voice call",
                "description": "Places an outbound voice call to a single recipient. Accepts a single content source - either a pre-created voice template (`template_key` or `template_alias`), which may define a multi-step IVR flow with keypad input and call transfer, or an ad-hoc text-to-speech message (`message_content` with optional `language` and `voice_gender`). Exactly one content source is required.\n\n`from` must be an approved voice number of the agent and `to` is the recipient; both must include the country code. If the template defines merge tags, all of them must be supplied in `merge_info` - a request with missing tags is rejected with the missing tag names listed. Phone numbers should be provided as merge values (for example the agent number of a call-transfer step) and also include country code. ",
                "operationId": "send_voice_call",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/VoiceSendVoiceRequest"
                      },
                      "examples": {
                        "template": {
                          "summary": "Template call with merge values",
                          "value": {
                            "from": "14155550142",
                            "to": "919876543210",
                            "template_key": "794dc9c1-b268-11f1-bed6-b6d94062a427",
                            "merge_info": {
                              "customer_name": "Paula",
                              "company_name": "Example Inc",
                              "order_id": "ORD-1001",
                              "currency": "INR",
                              "amount": "2499"
                            },
                            "client_reference": "order-confirm-1001"
                          }
                        },
                        "call_transfer": {
                          "summary": "Template call that transfers to an agent",
                          "value": {
                            "from": "14155550142",
                            "to": "919876543210",
                            "template_key": "17af8320-b59c-11f1-8210-8688516064a9",
                            "merge_info": {
                              "number": "919845012345"
                            },
                            "client_reference": "support-callback-2213"
                          }
                        },
                        "text_to_speech": {
                          "summary": "Ad-hoc text-to-speech call",
                          "value": {
                            "from": "14155550142",
                            "to": "919876543210",
                            "message_content": "Hello. Your appointment is confirmed for tomorrow at 10 A M. Goodbye.",
                            "language": "en",
                            "voice_gender": "female",
                            "client_reference": "appt-5501"
                          }
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "$ref": "#/components/responses/VoiceCallAccepted"
                  },
                  "400": {
                    "$ref": "#/components/responses/VoiceBadRequest"
                  },
                  "401": {
                    "$ref": "#/components/responses/VoiceUnauthorized"
                  },
                  "403": {
                    "$ref": "#/components/responses/VoiceFromNotOnAgent"
                  },
                  "422": {
                    "$ref": "#/components/responses/VoiceUnprocessableVoiceRequest"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "voice"
                ]
              }
            },
            "/voice/logs": {
              "get": {
                "summary": "Get voice call logs",
                "description": "Returns the agent's voice call logs, newest first, with pagination and filtering by call attributes (status, from/to number), request attributes (client reference, template, request id) and date range. Rate limited to 40 requests per minute.",
                "operationId": "get_voice_logs",
                "parameters": [
                  {
                    "name": "offset",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 0
                    },
                    "description": "Zero-based offset for pagination."
                  },
                  {
                    "name": "limit",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 10
                    },
                    "description": "Maximum number of log entries to return."
                  },
                  {
                    "name": "message_id",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Returns the call logs associated with the specific message id."
                  },
                  {
                    "name": "status",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "enum": [
                        "INITIATED",
                        "ANSWERED",
                        "CALL_REJECTED",
                        "CALL_UNANSWERED",
                        "CALL_FAILED",
                        "PROCESS_FAILED",
                        "UNKNOWN"
                      ]
                    },
                    "description": "Returns the call logs based on the provided call status (case-insensitive)."
                  },
                  {
                    "name": "from",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 20
                    },
                    "description": "Returns the call logs based on the provided from voice number (with country code)."
                  },
                  {
                    "name": "to",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 20
                    },
                    "description": "Returns the call logs based on the provided recipient number (with country code)."
                  },
                  {
                    "name": "client_reference",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "description": "Returns the call logs based on the provided client reference supplied during the call initiation."
                  },
                  {
                    "name": "template_key",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Returns the call logs based on the provided voice template key. "
                  },
                  {
                    "name": "template_alias",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Returns the call logs based on the provided voice template alias."
                  },
                  {
                    "name": "request_id",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": "Returns the call logs based on the provided by the request id returned while calling the Place a call API."
                  },
                  {
                    "name": "date_from",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "Start of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T00:00:00+05:30"
                  },
                  {
                    "name": "date_to",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "End of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T23:59:59+05:30"
                  }
                ],
                "responses": {
                  "200": {
                    "description": "Voice call logs retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/VoiceLogsResponse"
                        },
                        "example": {
                          "metadata": {
                            "offset": 0,
                            "count": 1
                          },
                          "data": [
                            {
                              "message_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
                              "request_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
                              "client_reference": "order-confirm-1001",
                              "template_key": "794dc9c1-b268-11f1-bed6-b6d94062a427",
                              "agent_id": "3cca5d24c08773",
                              "from": "4155550142",
                              "from_country_code": "+1",
                              "to": "9876543210",
                              "to_country_code": "+91",
                              "status": "CALL_UNANSWERED",
                              "process_state": "processed",
                              "language": "en",
                              "voice_gender": "FEMALE",
                              "is_batch_request": false,
                              "is_call_recording_available": false,
                              "request_time": "2026-09-22T15:59:30+05:30",
                              "start_time": "2026-09-22T15:59:30+05:30",
                              "end_time": "2026-09-22T15:59:44+05:30",
                              "time_taken": 13
                            }
                          ],
                          "status": "success"
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/VoiceUnauthorized"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "voice"
                ]
              }
            },
            "/voice/logs/{message_id}": {
              "get": {
                "summary": "Get voice call details",
                "description": "Returns the complete details of a single voice call, including the timeline, the rendered IVR flow (nodes, prompts, keypad edges) and, when applicable, the template used for a specific message id. ",
                "operationId": "get_voice_call_details",
                "responses": {
                  "200": {
                    "description": "Voice call details retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/VoiceCallDetailResponse"
                        },
                        "examples": {
                          "template_call": {
                            "summary": "Successful template call with IVR flow",
                            "value": {
                              "data": {
                                "message_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
                                "request_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
                                "client_reference": "order-confirm-1001",
                                "template_key": "794dc9c1-b268-11f1-bed6-b6d94062a427",
                                "template_name": "Order Confirmation",
                                "agent_id": "3cca5d24c08773",
                                "from": "4155550142",
                                "from_country_code": "+1",
                                "to": "9876543210",
                                "to_country_code": "+91",
                                "status": "INITIATED",
                                "process_state": "processed",
                                "language": "en",
                                "voice_gender": "FEMALE",
                                "is_batch_request": false,
                                "is_call_recording_available": false,
                                "request_time": "2026-09-22T15:59:30+05:30",
                                "time_taken": 147,
                                "call_timeline": [
                                  {
                                    "time": "2026-09-22T15:59:30+05:30",
                                    "event": "request_received"
                                  }
                                ],
                                "flow": {
                                  "max_duration_in_sec": 120,
                                  "start_node": "confirm_prompt",
                                  "default_language": "en",
                                  "nodes": {
                                    "confirm_prompt": {
                                      "name": "Confirm Prompt",
                                      "terminal": false,
                                      "gather": {
                                        "loops": 2,
                                        "num_digits": 1,
                                        "timeout": 5
                                      },
                                      "prompts": [
                                        {
                                          "type": "SPEAK",
                                          "text": "Hello {{customer_name}}. Press 1 to confirm your order. Press 2 to cancel."
                                        }
                                      ]
                                    },
                                    "confirm_order": {
                                      "name": "Confirm Order",
                                      "terminal": true,
                                      "prompts": [
                                        {
                                          "type": "SPEAK",
                                          "text": "Your order is confirmed. Goodbye."
                                        }
                                      ]
                                    }
                                  },
                                  "edges": [
                                    {
                                      "from": "confirm_prompt",
                                      "to": "confirm_order",
                                      "on": "1"
                                    }
                                  ]
                                }
                              },
                              "status": "success"
                            }
                          },
                          "process_failed": {
                            "summary": "Call that failed initiation - flat error_message {code, message}, timeline stops at request_received",
                            "value": {
                              "data": {
                                "message_id": "9c05e8c0-b1a1-11f1-92cb-2a30dd3b833c",
                                "request_id": "9c05e8c0-b1a1-11f1-92cb-2a30dd3b833c",
                                "template_key": "794dc9c1-b268-11f1-bed6-b6d94062a427",
                                "template_name": "Order Confirmation",
                                "agent_id": "3cca5d24c08773",
                                "from": "4155550142",
                                "from_country_code": "+1",
                                "to": "9876543210",
                                "to_country_code": "+91",
                                "status": "PROCESS_FAILED",
                                "process_state": "processed",
                                "language": "en",
                                "voice_gender": "FEMALE",
                                "is_batch_request": false,
                                "is_call_recording_available": false,
                                "remote_ip": "10.61.232.19",
                                "error_message": {
                                  "code": "VOI_502",
                                  "message": "Call initiation failed"
                                },
                                "error_msg": "{\"code\":\"VOI_502\",\"message\":\"Call initiation failed\"}",
                                "request_time": "2026-09-22T15:59:30+05:30",
                                "time_taken": 790,
                                "call_timeline": [
                                  {
                                    "time": "2026-09-22T15:59:30+05:30",
                                    "event": "request_received"
                                  }
                                ]
                              },
                              "status": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/VoiceUnauthorized"
                  },
                  "403": {
                    "$ref": "#/components/responses/VoiceCallNotFound"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "voice"
                ]
              }
            },
            "/sms": {
              "post": {
                "summary": "Sends an SMS",
                "description": "Sends SMS to a single recipient number. The sender and the template must be pre-configured for the sending agent. \n\nThe base message template is a pre-approved SMS template of the sender, addressed by `template_key` or `template_alias`. The `merge_info` is used to  resolve the final content by merging the template with values. Params left unresolved are sent literally. `sender_key` identifies the sender of the SMS. ‘to’ is exactly single recipient, whose `mobile_no` must include the country code. ",
                "operationId": "send_sms",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/SmsSendSmsRequest"
                      },
                      "examples": {
                        "template_send": {
                          "summary": "Template SMS with merge values",
                          "value": {
                            "sender_key": "2d6f4a1b9c35",
                            "to": [
                              {
                                "mobile_no": "919876543210"
                              }
                            ],
                            "template_key": "6200ca60-921a-11f1-92c4-2a30dd3b833c",
                            "merge_info": {
                              "otp": "482913"
                            },
                            "client_reference": "otp-482913"
                          }
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "$ref": "#/components/responses/SmsQueued"
                  },
                  "400": {
                    "$ref": "#/components/responses/SmsBadRequest"
                  },
                  "401": {
                    "$ref": "#/components/responses/SmsSendUnauthorized"
                  },
                  "422": {
                    "$ref": "#/components/responses/SmsInvalidRecipient"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "sms"
                ]
              }
            },
            "/sms/logs": {
              "get": {
                "summary": "Get SMS logs",
                "description": "Returns the agent's SMS logs, newest first, with pagination and filtering by delivery attributes (status, recipient, sender name) and request attributes (client reference, template, request id, date range). ",
                "operationId": "get_sms_logs",
                "parameters": [
                  {
                    "name": "offset",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 0
                    },
                    "description": "Zero-based offset for pagination."
                  },
                  {
                    "name": "limit",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 10
                    },
                    "description": "Maximum number of log entries to return."
                  },
                  {
                    "name": "status",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string"
                    },
                    "description": "Filter by message status. Common values: `delivered`, `sent`, `not-sent`, `undelivered`, `failed`, `processed`, `process_failed`, `spam`. Detailed telecom/DLT failure codes (e.g. `dnd-number`, `inv-number`, `tl-nt-found`) are also accepted.",
                    "example": "delivered"
                  },
                  {
                    "name": "recipient",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 30
                    },
                    "description": "Filter by recipient mobile number (with country code)."
                  },
                  {
                    "name": "sender_name",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 30
                    },
                    "description": "Filter by sender name."
                  },
                  {
                    "name": "client_reference",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "description": "Filter by the client reference supplied at send time."
                  },
                  {
                    "name": "template_key",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Filter by SMS template key."
                  },
                  {
                    "name": "request_id",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": "Filter by the request id returned by the send API."
                  },
                  {
                    "name": "date_from",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "Start of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T00:00:00+05:30"
                  },
                  {
                    "name": "date_to",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "End of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T23:59:59+05:30"
                  }
                ],
                "responses": {
                  "200": {
                    "description": "SMS logs retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/SmsLogsResponse"
                        },
                        "example": {
                          "metadata": {
                            "offset": 0,
                            "count": 1
                          },
                          "data": [
                            {
                              "message_id": "7fff7400-b676-11f1-b0ad-b6d94062a427",
                              "request_id": "2d6f.14350939.i1.7fff7400-b676-11f1-b0ad-b6d94062a427.1a0c8d26ce9",
                              "client_reference": "otp-482913",
                              "template_key": "6200ca60-921a-11f1-92c4-2a30dd3b833c",
                              "sender_key": "2d6f4a1b9c35",
                              "sender_name": "EXAMPL",
                              "agent_id": "11b40318ea8775",
                              "to": "919876543210",
                              "status": "delivered",
                              "process_state": "processed",
                              "chunks": "1",
                              "is_batch_request": false,
                              "request_time": "2026-09-22T16:42:29+05:30",
                              "time_taken": 1822
                            }
                          ],
                          "status": "success"
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/SmsUnauthorized"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "sms"
                ]
              }
            },
            "/sms/logs/{message_id}": {
              "get": {
                "summary": "Get SMS message details",
                "description": "Returns the complete details of a single SMS message, including the rendered message text and the delivery event timeline. ",
                "operationId": "get_sms_message_details",
                "responses": {
                  "200": {
                    "description": "SMS message details retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/SmsMessageDetailResponse"
                        },
                        "examples": {
                          "delivered": {
                            "summary": "Delivered message with event timeline",
                            "value": {
                              "data": {
                                "message_id": "7fff7400-b676-11f1-b0ad-b6d94062a427",
                                "request_id": "2d6f.14350939.i1.7fff7400-b676-11f1-b0ad-b6d94062a427.1a0c8d26ce9",
                                "client_reference": "otp-482913",
                                "template_key": "6200ca60-921a-11f1-92c4-2a30dd3b833c",
                                "template_name": "otp-template",
                                "sender_key": "2d6f4a1b9c35",
                                "sender_name": "EXAMPL",
                                "agent_id": "11b40318ea8775",
                                "to": "919876543210",
                                "status": "delivered",
                                "process_state": "processed",
                                "chunks": "1",
                                "is_batch_request": false,
                                "content": {
                                  "body_text": "Your one-time password is 482913. It is valid for 10 minutes."
                                },
                                "events": [
                                  {
                                    "event_name": "processed",
                                    "event_time": "2026-09-22T16:42:29+05:30"
                                  },
                                  {
                                    "event_name": "delivered",
                                    "event_data": "SMS successfully delivered.",
                                    "event_time": "2026-09-22T16:42:35+05:30"
                                  }
                                ],
                                "request_time": "2026-09-22T16:42:29+05:30",
                                "time_taken": 1822
                              },
                              "status": "success"
                            }
                          },
                          "process_failed": {
                            "summary": "Message that failed processing - flat error_message {code, message}, no events",
                            "value": {
                              "data": {
                                "message_id": "ce7b89b0-b5a5-11f1-8210-8688516064a9",
                                "request_id": "2d6f.14350939.i1.ce7b89b0-b5a5-11f1-8210-8688516064a9.1a0c8d26ce9",
                                "template_key": "6200ca60-921a-11f1-92c4-2a30dd3b833c",
                                "template_name": "otp-template",
                                "sender_key": "2d6f4a1b9c35",
                                "sender_name": "EXAMPL",
                                "agent_id": "11b40318ea8775",
                                "to": "919876543210",
                                "status": "process_failed",
                                "process_state": "in-queue",
                                "chunks": "2",
                                "is_batch_request": false,
                                "remote_ip": "10.61.232.23",
                                "content": {
                                  "body_text": "Your one-time password is 482913. It is valid for 10 minutes."
                                },
                                "error_message": {
                                  "code": "SMS_108",
                                  "message": "sms.api.sms.server.error.throw"
                                },
                                "error_msg": "{\"code\":\"SMS_108\",\"message\":\"sms.api.sms.server.error.throw\"}",
                                "request_time": "2026-09-21T15:48:36+05:30",
                                "time_taken": 1747
                              },
                              "status": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/SmsUnauthorized"
                  },
                  "403": {
                    "$ref": "#/components/responses/SmsMessageNotFound"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "sms"
                ]
              }
            },
            "/whatsapp": {
              "post": {
                "summary": "Sends a WhatsApp message",
                "description": "Sends a single WhatsApp message to a single recipient. The message content comes from a pre-approved WhatsApp template, addressed by `template_key` or `template_alias`; The message content is based on the `merge_info` which provides the values for the template placeholders. `from` must be a  valid WhatsApp sender number configured for the sending agent. Both `from` and `to` must include the country code.\n\nThe message is queued on acceptance; template-variable and delivery failures surface asynchronously in the message logs (for example, a send with missing template variables is accepted but ends in the `process_failed` status). ",
                "operationId": "send_whatsapp_message",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WhatsAppSendWhatsAppRequest"
                      },
                      "examples": {
                        "template_send": {
                          "summary": "Template message with merge values",
                          "value": {
                            "from": "+14155550142",
                            "to": "+919876543210",
                            "template_key": "d0109d00-b191-11f1-95b1-aaa8828ce996",
                            "merge_info": {
                              "code": "234234"
                            },
                            "client_reference": "otp-234234"
                          }
                        }
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "$ref": "#/components/responses/WhatsAppQueued"
                  },
                  "400": {
                    "$ref": "#/components/responses/WhatsAppBadRequest"
                  },
                  "401": {
                    "$ref": "#/components/responses/WhatsAppSendUnauthorized"
                  },
                  "403": {
                    "$ref": "#/components/responses/WhatsAppSenderNotOnAgent"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "whatsapp"
                ]
              }
            },
            "/whatsapp/logs": {
              "get": {
                "summary": "Get WhatsApp logs",
                "description": "Returns the agent's WhatsApp message logs, newest first, with pagination and filtering by delivery attributes (status, recipient, sender number) and request attributes (client reference, template, request id, date range). \nRequires an API token with the WhatsApp scope. Rate limited to 40 requests per minute.",
                "operationId": "get_whatsapp_logs",
                "parameters": [
                  {
                    "name": "offset",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 0
                    },
                    "description": "Zero-based offset for pagination."
                  },
                  {
                    "name": "limit",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "integer",
                      "default": 10
                    },
                    "description": "Maximum number of log entries to return."
                  },
                  {
                    "name": "status",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string"
                    },
                    "description": "Returns the WhatsApp message logs based on the provided message status. Common values: `delivered`, `read`, `sent`, `undelivered`, `failed`, `processed`, `process_failed`.",
                    "example": "delivered"
                  },
                  {
                    "name": "recipient",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 30
                    },
                    "description": "Returns the WhatsApp message logs based on the provided recipient phone number (with country code)."
                  },
                  {
                    "name": "from",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "minLength": 8,
                      "maxLength": 20
                    },
                    "description": "Returns the WhatsApp message logs based on the provided sender phone number (with country code)."
                  },
                  {
                    "name": "client_reference",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 100
                    },
                    "description": "Returns the WhatsApp message logs based on the provided client reference supplied at send time."
                  },
                  {
                    "name": "template_key",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "description": "Returns the WhatsApp message logs based on the provided WhatsApp template key."
                  },
                  {
                    "name": "request_id",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": "Returns the WhatsApp message logs based on the provided request id returned by the send WhatsApp message API."
                  },
                  {
                    "name": "date_from",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "Start of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T00:00:00+05:30"
                  },
                  {
                    "name": "date_to",
                    "in": "query",
                    "required": false,
                    "schema": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": "End of the date range - an ISO 8601 date-time with UTC offset.",
                    "example": "2026-09-22T23:59:59+05:30"
                  }
                ],
                "responses": {
                  "200": {
                    "description": "WhatsApp logs retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/WhatsAppLogsResponse"
                        },
                        "example": {
                          "metadata": {
                            "offset": 0,
                            "count": 1
                          },
                          "data": [
                            {
                              "message_id": "37aa68e0-b680-11f1-91b5-d2a30e0412c2",
                              "request_id": "37aa68e0-b680-11f1-91b5-d2a30e0412c2",
                              "template_key": "d0109d00-b191-11f1-95b1-aaa8828ce996",
                              "agent_id": "28bc4428feb773",
                              "channel_id": "21144000000003001",
                              "channel_name": "Example WhatsApp Channel",
                              "waba_id": "1102793358413684",
                              "from": "+14155550142",
                              "to": "+919876543210",
                              "status": "delivered",
                              "process_state": "processed",
                              "is_batch_request": false,
                              "request_time": "2026-09-22T17:52:03+05:30",
                              "time_taken": 817
                            }
                          ],
                          "status": "success"
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/WhatsAppUnauthorized"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "whatsapp"
                ]
              }
            },
            "/whatsapp/logs/{message_id}": {
              "get": {
                "summary": "Get WhatsApp message details",
                "description": "Returns the complete details of a single WhatsApp message, including the rendered message content and the delivery event timeline. Requires an API token with the WhatsApp scope. ",
                "operationId": "get_whatsapp_message_details",
                "responses": {
                  "200": {
                    "description": "WhatsApp message details retrieved successfully.",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/WhatsAppMessageDetailResponse"
                        },
                        "examples": {
                          "delivered": {
                            "summary": "Delivered message with event timeline",
                            "value": {
                              "data": {
                                "message_id": "1ba7d8d0-b680-11f1-91b5-d2a30e0412c2",
                                "request_id": "1ba7d8d0-b680-11f1-91b5-d2a30e0412c2",
                                "template_key": "d0109d00-b191-11f1-95b1-aaa8828ce996",
                                "template_name": "OTP Verification",
                                "agent_id": "28bc4428feb773",
                                "channel_id": "21144000000003001",
                                "channel_name": "Example WhatsApp Channel",
                                "waba_id": "1102793358413684",
                                "from": "+14155550142",
                                "to": "+919876543210",
                                "status": "delivered",
                                "process_state": "processed",
                                "is_batch_request": false,
                                "content": {
                                  "body_text": "234234 is your verification code. For your security, do not share this code.",
                                  "footer_text": "This code expires in 1 minutes."
                                },
                                "events": [
                                  {
                                    "event_name": "processed",
                                    "event_time": "2026-09-22T17:51:16+05:30"
                                  },
                                  {
                                    "event_name": "sent to meta",
                                    "event_time": "2026-09-22T17:51:18+05:30"
                                  },
                                  {
                                    "event_name": "delivered",
                                    "event_time": "2026-09-22T17:51:31+05:30"
                                  }
                                ],
                                "request_time": "2026-09-22T17:51:16+05:30",
                                "time_taken": 1112
                              },
                              "status": "success"
                            }
                          },
                          "process_failed": {
                            "summary": "Message that failed processing (missing template variable) - error_message is the full error envelope, no events",
                            "value": {
                              "data": {
                                "message_id": "380d2251-b680-11f1-b0ad-b6d94062a427",
                                "request_id": "380d2251-b680-11f1-b0ad-b6d94062a427",
                                "template_key": "d0109d00-b191-11f1-95b1-aaa8828ce996",
                                "template_name": "OTP Verification",
                                "agent_id": "28bc4428feb773",
                                "channel_id": "21144000000003001",
                                "channel_name": "Example WhatsApp Channel",
                                "waba_id": "1102793358413684",
                                "from": "+14155550142",
                                "to": "+919876543210",
                                "status": "process_failed",
                                "process_state": "processed",
                                "is_batch_request": false,
                                "remote_ip": "10.61.232.23",
                                "content": {
                                  "body_text": " is your verification code. For your security, do not share this code.",
                                  "footer_text": "This code expires in 1 minutes."
                                },
                                "error_message": {
                                  "error": {
                                    "code": "TM_3201",
                                    "details": [
                                      {
                                        "code": "GE_102",
                                        "message": "Mandatory field found empty",
                                        "target": "code"
                                      }
                                    ],
                                    "message": "Mandatory Field missing",
                                    "request_id": "2d6f.14350939.wa1.380d2251-b680-11f1-b0ad-b6d94062a427.1a0c910e8f5"
                                  }
                                },
                                "error_msg": "{\"error\": {\"code\": \"TM_3201\", \"details\": [{\"code\": \"GE_102\", \"message\": \"Mandatory field found empty\", \"target\": \"code\"}], \"message\": \"Mandatory Field missing\", \"request_id\": \"2d6f.14350939.wa1.380d2251-b680-11f1-b0ad-b6d94062a427.1a0c910e8f5\"}}",
                                "request_time": "2026-09-22T17:52:03+05:30",
                                "time_taken": 456
                              },
                              "status": "success"
                            }
                          }
                        }
                      }
                    }
                  },
                  "401": {
                    "$ref": "#/components/responses/WhatsAppUnauthorized"
                  },
                  "403": {
                    "$ref": "#/components/responses/WhatsAppMessageNotFound"
                  }
                },
                "security": [
                  {
                    "ApiKeyAuth": []
                  }
                ],
                "tags": [
                  "whatsapp"
                ]
              }
            }
          },
          "components": {
            "schemas": {
              "template_key": {
                "description": "Unique key of the email template. Use either template_key or template_alias.",
                "type": "string",
                "example": "1234567890"
              },
              "client_reference": {
                "description": "A custom reference string to identify the email in your system.",
                "type": "string",
                "example": "order-12345"
              },
              "attachments": {
                "description": "Array of file attachments.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "file_cache_key": {
                      "type": "string",
                      "example": "fc-xxxx-xxxx"
                    },
                    "mime_type": {
                      "type": "string",
                      "example": "application/pdf"
                    },
                    "name": {
                      "type": "string",
                      "example": "invoice.pdf"
                    },
                    "content": {
                      "description": "Base64-encoded file content.",
                      "type": "string"
                    }
                  }
                }
              },
              "bcc_recipients": {
                "description": "Array of BCC recipient email addresses.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "email_address": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "example": "archive@zylker.com"
                        },
                        "name": {
                          "type": "string",
                          "example": "Archive"
                        }
                      }
                    }
                  }
                }
              },
              "merge_info": {
                "description": "Key-value pairs to replace template variables.",
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object",
                "example": {
                  "account_id": "98765",
                  "user_name": "Rudra"
                }
              },
              "inline_images": {
                "description": "Array of inline images embedded in the email body.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "mime_type": {
                      "type": "string",
                      "example": "image/png"
                    },
                    "name": {
                      "type": "string",
                      "example": "logo.png"
                    },
                    "content": {
                      "description": "Base64-encoded image content.",
                      "type": "string"
                    },
                    "cid": {
                      "type": "string",
                      "example": "logo"
                    }
                  }
                }
              },
              "email_management_htmlbody": {
                "description": "HTML content of the email body.",
                "type": "string",
                "example": "html5-dom-document-internal-entity1-lt-enddivhtml5-dom-document-internal-entity1-gt-endhtml5-dom-document-internal-entity1-lt-endbhtml5-dom-document-internal-entity1-gt-endKindly click on Verify Account to confirm your account.html5-dom-document-internal-entity1-lt-end/bhtml5-dom-document-internal-entity1-gt-endhtml5-dom-document-internal-entity1-lt-end/divhtml5-dom-document-internal-entity1-gt-end"
              },
              "track_opens": {
                "description": "Enable or disable open tracking.",
                "type": "boolean",
                "example": true
              },
              "to_recipients": {
                "description": "Array of recipient email addresses.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "email_address": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "example": "rudra.d@zylker.com"
                        },
                        "name": {
                          "type": "string",
                          "example": "Rudra"
                        }
                      }
                    }
                  }
                }
              },
              "email_management_template_alias": {
                "description": "Alias of the email template. Use either template_alias or template_key.",
                "type": "string",
                "example": "account-confirmation"
              },
              "cc_recipients": {
                "description": "Array of CC recipient email addresses.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "email_address": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "example": "manager@zylker.com"
                        },
                        "name": {
                          "type": "string",
                          "example": "Manager"
                        }
                      }
                    }
                  }
                }
              },
              "reply_to": {
                "description": "Reply-to email address.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string",
                      "example": "support@zylker.com"
                    },
                    "name": {
                      "type": "string",
                      "example": "Support"
                    }
                  }
                }
              },
              "email_management_subject": {
                "description": "Subject line of the email.",
                "type": "string",
                "example": "Account Confirmation"
              },
              "mime_headers": {
                "description": "Custom MIME headers to add to the email.",
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "email_management_error_response": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "error_code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "TM_3004"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Invalid request"
                      }
                    }
                  },
                  "message": {
                    "readOnly": true,
                    "type": "string",
                    "example": "error"
                  }
                }
              },
              "textbody": {
                "description": "Plain text content of the email body.",
                "type": "string",
                "example": "Kindly click on Verify Account to confirm your account."
              },
              "from_address": {
                "description": "The sender's email address and optional display name.",
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "address": {
                    "type": "string",
                    "example": "accounts@info.zylker.com"
                  },
                  "name": {
                    "type": "string",
                    "example": "Paula"
                  }
                }
              },
              "track_clicks": {
                "description": "Enable or disable click tracking.",
                "type": "boolean",
                "example": true
              },
              "email_log_detail": {
                "type": "object",
                "properties": {
                  "email_reference": {
                    "readOnly": true,
                    "type": "string",
                    "example": "ref-xxxx-xxxx"
                  },
                  "sent_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-04T08:19:00Z"
                  },
                  "client_reference": {
                    "readOnly": true,
                    "type": "string",
                    "example": "order-12345"
                  },
                  "opened_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-04T08:25:00Z"
                  },
                  "subject": {
                    "readOnly": true,
                    "type": "string",
                    "example": "Account Confirmation"
                  },
                  "clicked_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-04T08:26:00Z"
                  },
                  "from": {
                    "readOnly": true,
                    "type": "string",
                    "example": "accounts@info.zylker.com"
                  },
                  "to": {
                    "readOnly": true,
                    "type": "string",
                    "example": "rudra.d@zylker.com"
                  },
                  "request_id": {
                    "readOnly": true,
                    "type": "string",
                    "example": "req-xxxx"
                  },
                  "mailagent_key": {
                    "readOnly": true,
                    "type": "string",
                    "example": "123456abcd78"
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "delivered"
                  }
                }
              },
              "email_log": {
                "type": "object",
                "properties": {
                  "email_reference": {
                    "readOnly": true,
                    "type": "string",
                    "example": "ref-xxxx-xxxx"
                  },
                  "sent_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-04T08:19:00Z"
                  },
                  "subject": {
                    "readOnly": true,
                    "type": "string",
                    "example": "Account Confirmation"
                  },
                  "from": {
                    "readOnly": true,
                    "type": "string",
                    "example": "accounts@info.zylker.com"
                  },
                  "to": {
                    "readOnly": true,
                    "type": "string",
                    "example": "rudra.d@zylker.com"
                  },
                  "request_id": {
                    "readOnly": true,
                    "type": "string",
                    "example": "req-xxxx"
                  },
                  "mailagent_key": {
                    "readOnly": true,
                    "type": "string",
                    "example": "123456abcd78"
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "delivered"
                  }
                }
              },
              "email_logs_error_response": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "EL_404"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Email log not found"
                      }
                    }
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "failure"
                  }
                }
              },
              "domain_name": {
                "description": "The domain name to add (e.g., zylker.com).",
                "type": "string",
                "example": "zylker.com"
              },
              "domains_error_response": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "DM_400"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Invalid domain"
                      }
                    }
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "failure"
                  }
                }
              },
              "domain": {
                "type": "object",
                "properties": {
                  "dkim_status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "verified"
                  },
                  "created_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-04T08:19:00Z"
                  },
                  "domain_name": {
                    "readOnly": true,
                    "type": "string",
                    "example": "zylker.com"
                  },
                  "domain_key": {
                    "readOnly": true,
                    "type": "string",
                    "example": "domain-xxxx"
                  },
                  "sub_domain_prefix": {
                    "readOnly": true,
                    "type": "string",
                    "example": "mail"
                  },
                  "spf_status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "verified"
                  },
                  "is_verified": {
                    "readOnly": true,
                    "type": "boolean",
                    "example": true
                  }
                }
              },
              "sub_domain_prefix": {
                "description": "Optional subdomain prefix for bounce tracking. For example, \"mail\" results in \"mail.zylker.com\".",
                "type": "string",
                "example": "mail"
              },
              "mailagent_name": {
                "description": "Name for the Mail Agent. Must be unique within the account.",
                "type": "string",
                "example": "Mail_agent_name"
              },
              "mailagent": {
                "type": "object",
                "properties": {
                  "mailagent_name": {
                    "readOnly": true,
                    "type": "string",
                    "example": "mailagent_1"
                  },
                  "created_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "04 Jun 2025 08:19 PM"
                  },
                  "description": {
                    "readOnly": true,
                    "type": "string",
                    "example": "Production mail agent"
                  },
                  "mailagent_key": {
                    "readOnly": true,
                    "type": "string",
                    "example": "123456abcd78"
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "active"
                  }
                }
              },
              "agents_description": {
                "description": "Description or purpose of the Mail Agent.",
                "type": "string",
                "example": "Production mail agent for transactional emails"
              },
              "agents_error_response": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "MA_107"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Mail agent name already exists"
                      }
                    }
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "failure"
                  }
                }
              },
              "values": {
                "description": "Array of email addresses or domains to suppress.",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "user@example.com"
                ]
              },
              "action": {
                "description": "Suppression action. Allowed values: `reject`, `suppress`, `suppress_tracking`.",
                "type": "string",
                "enum": [
                  "reject",
                  "suppress",
                  "suppress_tracking"
                ],
                "example": "reject"
              },
              "mailagent_keys": {
                "description": "Array of Mail Agent keys the suppression applies to.",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "123456abcd78"
                ]
              },
              "suppression_error_response": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "SP_400"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Invalid request"
                      }
                    }
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "failure"
                  }
                }
              },
              "suppression_description": {
                "description": "Description or reason for adding the suppression entry.",
                "type": "string",
                "example": "Customer opted out of all marketing emails"
              },
              "suppression_entry": {
                "type": "object",
                "properties": {
                  "created_time": {
                    "readOnly": true,
                    "type": "string",
                    "example": "2025-06-01T10:00:00Z"
                  },
                  "action": {
                    "readOnly": true,
                    "type": "string",
                    "example": "reject"
                  },
                  "description": {
                    "readOnly": true,
                    "type": "string",
                    "example": "Customer opted out"
                  },
                  "value": {
                    "readOnly": true,
                    "type": "string",
                    "example": "user@example.com"
                  }
                }
              },
              "template_name": {
                "description": "Display name of the email template.",
                "type": "string",
                "example": "E-invite"
              },
              "email_templates_htmlbody": {
                "description": "HTML content of the email template.",
                "type": "string",
                "example": "html5-dom-document-internal-entity1-lt-endh1html5-dom-document-internal-entity1-gt-end Hi User html5-dom-document-internal-entity1-lt-end/h1html5-dom-document-internal-entity1-gt-end, Welcome aboard"
              },
              "email_templates_template_alias": {
                "description": "Custom alias for the template. Used as an alternative to template_key.",
                "type": "string",
                "example": "invitemail"
              },
              "email_templates_subject": {
                "description": "Subject line of the email template.",
                "type": "string",
                "example": "Invitation to the event"
              },
              "email_templates_error_response": {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "readOnly": true,
                        "type": "string",
                        "example": "TM_404"
                      },
                      "message": {
                        "readOnly": true,
                        "type": "string",
                        "example": "Template not found"
                      }
                    }
                  },
                  "status": {
                    "readOnly": true,
                    "type": "string",
                    "example": "failure"
                  }
                }
              },
              "VoiceSendVoiceRequest": {
                "description": "Request body for sending a voice call. Exactly one content source is required: `template_key`/`template_alias` (a pre-created voice template) or `message_content` (ad-hoc text-to-speech).",
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "description": "Caller id - an approved voice number of the agent, including the country code.",
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 20,
                    "example": "14155550142"
                  },
                  "to": {
                    "description": "Recipient phone number, including the country code.",
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 20,
                    "example": "919876543210"
                  },
                  "template_key": {
                    "description": "Key of a pre-created voice template. Provide this or `template_alias` (or `message_content` instead).",
                    "type": "string",
                    "format": "uuid",
                    "maxLength": 500,
                    "example": "794dc9c1-b268-11f1-bed6-b6d94062a427"
                  },
                  "template_alias": {
                    "description": "Alias of a pre-created voice template. Provide this or `template_key` (or `message_content` instead).",
                    "type": "string",
                    "maxLength": 100
                  },
                  "merge_info": {
                    "description": "Key-value map that resolves the template's `{{merge_tags}}`. All tags defined by the template are mandatory; if any are missing, the request is rejected and the missing tag names are listed in the error. Phone numbers passed as merge values (for example the agent number of a call-transfer step) must include the country code.",
                    "type": "object",
                    "additionalProperties": true,
                    "example": {
                      "customer_name": "Paula",
                      "order_id": "ORD-1001"
                    }
                  },
                  "message_content": {
                    "description": "Text-to-speech message spoken to the recipient. Letters, digits, spaces and common punctuation are allowed. Use instead of a template.",
                    "type": "string",
                    "maxLength": 5000,
                    "example": "Hello. Your appointment is confirmed for tomorrow at 10 A M. Goodbye."
                  },
                  "language": {
                    "description": "Language code used for text-to-speech (e.g. `en`, `hi`, `fr`).",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10,
                    "default": "en"
                  },
                  "voice_gender": {
                    "description": "Voice used for text-to-speech.",
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ],
                    "default": "female"
                  },
                  "agent_key": {
                    "description": "Key of the sending agent. Optional - defaults to the agent bound to the API token.",
                    "type": "string",
                    "maxLength": 300
                  },
                  "client_reference": {
                    "description": "Client-supplied reference identifier, echoed in call logs.",
                    "type": "string",
                    "maxLength": 100,
                    "example": "order-confirm-1001"
                  }
                }
              },
              "VoiceSendVoiceResponse": {
                "description": "Success response returned when the voice call is accepted and initiated.",
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "description": "Acceptance code.",
                        "type": "string",
                        "example": "MSG_102"
                      },
                      "message_id": {
                        "description": "Unique identifier of the call. Use it with the call-details API.",
                        "type": "string",
                        "format": "uuid",
                        "example": "7ed0c6c0-b670-11f1-8810-3ed350183096"
                      },
                      "message": {
                        "type": "string",
                        "example": "Message sent successfully"
                      },
                      "request_id": {
                        "description": "Unique identifier assigned to the send request.",
                        "type": "string",
                        "example": "2d6f.14350939.v1.7ed0c6c0-b670-11f1-8810-3ed350183096.1a0c8a9dd2c"
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "VoiceLogEntry": {
                "description": "A voice call log entry.",
                "type": "object",
                "properties": {
                  "message_id": {
                    "description": "Unique identifier of the call.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "request_id": {
                    "description": "Identifier of the send request.",
                    "type": "string"
                  },
                  "client_reference": {
                    "description": "Client reference supplied at send time, if any.",
                    "type": "string"
                  },
                  "template_key": {
                    "description": "Key of the voice template used, for template calls.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "agent_id": {
                    "description": "Identifier of the voice agent.",
                    "type": "string"
                  },
                  "from": {
                    "description": "Caller number, without the country code.",
                    "type": "string"
                  },
                  "from_country_code": {
                    "description": "Country calling code of the caller number.",
                    "type": "string",
                    "example": "+1"
                  },
                  "to": {
                    "description": "Recipient number, without the country code.",
                    "type": "string"
                  },
                  "to_country_code": {
                    "description": "Country calling code of the recipient number.",
                    "type": "string",
                    "example": "+91"
                  },
                  "status": {
                    "description": "Call status.",
                    "type": "string",
                    "enum": [
                      "INITIATED",
                      "ANSWERED",
                      "CALL_REJECTED",
                      "CALL_UNANSWERED",
                      "CALL_FAILED",
                      "PROCESS_FAILED",
                      "UNKNOWN"
                    ]
                  },
                  "process_state": {
                    "description": "Processing state of the request.",
                    "type": "string",
                    "example": "processed"
                  },
                  "remote_ip": {
                    "description": "IP address the send request was made from.",
                    "type": "string",
                    "example": "10.61.232.23"
                  },
                  "language": {
                    "description": "Text-to-speech language of the call.",
                    "type": "string",
                    "example": "en"
                  },
                  "voice_gender": {
                    "description": "Text-to-speech voice of the call.",
                    "type": "string",
                    "example": "FEMALE"
                  },
                  "is_batch_request": {
                    "type": "boolean"
                  },
                  "is_call_recording_available": {
                    "description": "Whether a recording of the call is available.",
                    "type": "boolean"
                  },
                  "request_time": {
                    "description": "When the send request was received (ISO 8601).",
                    "type": "string"
                  },
                  "start_time": {
                    "description": "When the call started (ISO 8601).",
                    "type": "string"
                  },
                  "answered_time": {
                    "description": "When the call was answered (ISO 8601). Present only for answered calls.",
                    "type": "string"
                  },
                  "end_time": {
                    "description": "When the call ended (ISO 8601).",
                    "type": "string"
                  },
                  "time_taken": {
                    "description": "Duration in seconds.",
                    "type": "integer"
                  }
                }
              },
              "VoiceLogsResponse": {
                "description": "Response containing a page of voice call logs.",
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "offset": {
                        "type": "integer",
                        "example": 0
                      },
                      "count": {
                        "description": "Number of entries in this page.",
                        "type": "integer",
                        "example": 10
                      }
                    }
                  },
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/VoiceLogEntry"
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "VoiceCallDetail": {
                "description": "Full details of a voice call: the log fields plus the template name, the call event timeline and the rendered IVR flow.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoiceLogEntry"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "template_name": {
                        "description": "Name of the voice template used, for template calls.",
                        "type": "string",
                        "example": "Order Confirmation"
                      },
                      "call_timeline": {
                        "description": "Chronological call events. For calls that failed initiation (status `PROCESS_FAILED`) only `request_received` is present.",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "time": {
                              "type": "string",
                              "example": "2026-09-22T15:59:30+05:30"
                            },
                            "event": {
                              "type": "string",
                              "example": "request_received"
                            }
                          }
                        }
                      },
                      "flow": {
                        "$ref": "#/components/schemas/VoiceCallFlow"
                      },
                      "error_message": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/AsyncFailureInfo"
                          }
                        ],
                        "description": "Why the call failed. Present only when the call could not be initiated (status `PROCESS_FAILED`); carrier-level failures (`CALL_FAILED`) carry no error object - the status alone reports them."
                      },
                      "error_msg": {
                        "description": "The same failure information serialized as a JSON string.",
                        "type": "string",
                        "example": "{\"code\":\"VOI_502\",\"message\":\"Call initiation failed\"}"
                      }
                    }
                  }
                ]
              },
              "VoiceCallFlow": {
                "description": "The IVR flow executed for the call: named nodes with spoken/paused prompts (and optional keypad `gather` settings), edges that map keypad input to the next node, the start node and the overall duration limit.",
                "type": "object",
                "properties": {
                  "max_duration_in_sec": {
                    "description": "Maximum call duration in seconds.",
                    "type": "integer",
                    "example": 120
                  },
                  "start_node": {
                    "description": "Name of the node the call starts at.",
                    "type": "string"
                  },
                  "default_language": {
                    "description": "Default text-to-speech language of the flow.",
                    "type": "string",
                    "example": "en"
                  },
                  "nodes": {
                    "description": "Flow nodes keyed by node name. Each node has display `name`, `terminal` flag, `prompts` (SPEAK text / PAUSE duration) and optional `gather` settings (`num_digits`, `timeout`, `loops`) for keypad input.",
                    "type": "object",
                    "additionalProperties": {
                      "type": "object"
                    }
                  },
                  "edges": {
                    "description": "Transitions between nodes: `from` node, `to` node and the keypad input (or `timeout`/`*`) that triggers the transition.",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        },
                        "on": {
                          "type": "string",
                          "example": "1"
                        }
                      }
                    }
                  }
                }
              },
              "VoiceCallDetailResponse": {
                "description": "Response containing the details of a single voice call.",
                "type": "object",
                "properties": {
                  "data": {
                    "$ref": "#/components/schemas/VoiceCallDetail"
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "VoiceErrorDetail": {
                "description": "A single validation or denial detail inside the error envelope.",
                "type": "object",
                "properties": {
                  "code": {
                    "description": "Detail-level error code, e.g. `VOI_102` (invalid phone number), `VOI_104` (caller id required), `VOI_105` (template or message content required), `VOI_106` (required merge tags missing), `MTR_107` (template not found), `VOI_207` (from number not associated with the sending agent), `SERR_110` (required parameter missing), `SERR_157` (invalid API token).",
                    "type": "string",
                    "example": "VOI_106"
                  },
                  "message": {
                    "type": "string",
                    "example": "Required merge tag(s) missing in the request"
                  },
                  "target": {
                    "description": "The field the detail refers to, when applicable (e.g. `from`, `to`, `merge_info`).",
                    "type": "string",
                    "example": "merge_info"
                  },
                  "target_value": {
                    "description": "The offending value, or for `VOI_106` the comma-separated list of missing merge tag names."
                  }
                }
              },
              "VoiceErrorResponse": {
                "description": "Error response wrapper. The top-level code identifies the error class: `TM_3301` bad syntax (400), `TM_4001` access denied (401), `TM_3601` request denied (403), `TM_3501` unprocessable entity (422).",
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "TM_3501"
                      },
                      "message": {
                        "type": "string",
                        "example": "Unprocessable Entity"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/VoiceErrorDetail"
                        }
                      },
                      "request_id": {
                        "description": "Identifier of the failed request, when available.",
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "SmsRecipient": {
                "description": "A single-send recipient.",
                "type": "object",
                "required": [
                  "mobile_no"
                ],
                "properties": {
                  "mobile_no": {
                    "description": "Recipient mobile number, including the country code.",
                    "type": "string",
                    "example": "919876543210"
                  }
                }
              },
              "SmsMergeInfo": {
                "description": "Key-value map that resolves the template's `{{merge_tags}}`. Tags left unresolved are sent literally in the message text.",
                "type": "object",
                "additionalProperties": true,
                "example": {
                  "otp": "482913"
                }
              },
              "SmsSendSmsRequest": {
                "description": "Request body for sending a single SMS. Provide exactly one of `template_key` / `template_alias`; the template supplies the message text.",
                "type": "object",
                "required": [
                  "sender_key",
                  "to"
                ],
                "properties": {
                  "sender_key": {
                    "description": "Key of the SMS sender the message goes out as. The sender must be configured for the sending agent.",
                    "type": "string",
                    "maxLength": 200,
                    "example": "2d6f4a1b9c35"
                  },
                  "to": {
                    "description": "Exactly one recipient.",
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "$ref": "#/components/schemas/SmsRecipient"
                    }
                  },
                  "template_key": {
                    "description": "Key of a pre-approved SMS template of the sender. Provide this or `template_alias`.",
                    "type": "string",
                    "format": "uuid",
                    "maxLength": 500,
                    "example": "6200ca60-921a-11f1-92c4-2a30dd3b833c"
                  },
                  "template_alias": {
                    "description": "Alias of a pre-approved SMS template. Provide this or `template_key`.",
                    "type": "string",
                    "maxLength": 100
                  },
                  "merge_info": {
                    "$ref": "#/components/schemas/SmsMergeInfo"
                  },
                  "client_reference": {
                    "description": "Client-supplied reference identifier, echoed in the SMS logs.",
                    "type": "string",
                    "maxLength": 100,
                    "example": "otp-482913"
                  }
                }
              },
              "SmsSendSmsResponse": {
                "description": "Success response returned when the SMS is queued for delivery.",
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "description": "Acceptance code.",
                        "type": "string",
                        "example": "MSG_101"
                      },
                      "message_id": {
                        "description": "Unique identifier of the message. Use it with the message-details API.",
                        "type": "string",
                        "format": "uuid",
                        "example": "7fff7400-b676-11f1-b0ad-b6d94062a427"
                      },
                      "message": {
                        "type": "string",
                        "example": "Message queued"
                      },
                      "request_id": {
                        "description": "Unique identifier assigned to the send request.",
                        "type": "string",
                        "example": "2d6f.14350939.i1.7fff7400-b676-11f1-b0ad-b6d94062a427.1a0c8d13740"
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "SmsLogEntry": {
                "description": "An SMS log entry.",
                "type": "object",
                "properties": {
                  "message_id": {
                    "description": "Unique identifier of the message.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "request_id": {
                    "description": "Identifier of the send request.",
                    "type": "string"
                  },
                  "client_reference": {
                    "description": "Client reference supplied at send time, if any.",
                    "type": "string"
                  },
                  "template_key": {
                    "description": "Key of the SMS template used.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "sender_key": {
                    "description": "Key of the sender the message went out as.",
                    "type": "string"
                  },
                  "sender_name": {
                    "description": "Name of the sender.",
                    "type": "string"
                  },
                  "agent_id": {
                    "description": "Identifier of the sending agent.",
                    "type": "string"
                  },
                  "to": {
                    "description": "Recipient mobile number.",
                    "type": "string"
                  },
                  "status": {
                    "description": "Message status (e.g. `delivered`, `sent`, `undelivered`, `failed`, `process_failed`, or a detailed telecom/DLT failure code).",
                    "type": "string",
                    "example": "delivered"
                  },
                  "process_state": {
                    "description": "Processing state of the request.",
                    "type": "string",
                    "example": "processed"
                  },
                  "remote_ip": {
                    "description": "IP address the send request was made from.",
                    "type": "string",
                    "example": "10.61.232.23"
                  },
                  "chunks": {
                    "description": "Number of SMS parts the message was split into.",
                    "type": "string",
                    "example": "1"
                  },
                  "is_batch_request": {
                    "description": "Whether the message was part of a batch send.",
                    "type": "boolean"
                  },
                  "request_time": {
                    "description": "When the send request was received (ISO 8601).",
                    "type": "string"
                  },
                  "time_taken": {
                    "description": "Processing time in milliseconds.",
                    "type": "integer"
                  }
                }
              },
              "SmsLogsResponse": {
                "description": "Response containing a page of SMS logs.",
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "offset": {
                        "type": "integer",
                        "example": 0
                      },
                      "count": {
                        "description": "Number of entries in this page.",
                        "type": "integer",
                        "example": 10
                      }
                    }
                  },
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SmsLogEntry"
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "SmsMessageDetail": {
                "description": "Full details of an SMS message: the log fields plus the template name, the rendered message text and the delivery event timeline.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SmsLogEntry"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "template_name": {
                        "description": "Name of the SMS template used.",
                        "type": "string",
                        "example": "otp-template"
                      },
                      "content": {
                        "description": "The message content that was sent.",
                        "type": "object",
                        "properties": {
                          "body_text": {
                            "description": "Rendered message text, with merge tags resolved.",
                            "type": "string",
                            "example": "Your one-time password is 482913. It is valid for 10 minutes."
                          }
                        }
                      },
                      "events": {
                        "description": "Chronological delivery events. Present once the message has entered delivery; absent for messages that failed processing (status `process_failed`). For undelivered messages the failure reason appears in `event_data`.",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "event_name": {
                              "type": "string",
                              "example": "delivered"
                            },
                            "event_data": {
                              "type": "string",
                              "example": "SMS successfully delivered."
                            },
                            "event_time": {
                              "type": "string",
                              "example": "2026-09-22T16:42:35+05:30"
                            }
                          }
                        }
                      },
                      "error_message": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/AsyncFailureInfo"
                          }
                        ],
                        "description": "Why the message failed. Present only for messages that failed processing (status `process_failed`). Delivery-side failures (e.g. `undelivered`) are reported through `events[].event_data` instead."
                      },
                      "error_msg": {
                        "description": "The same failure information serialized as a JSON string.",
                        "type": "string",
                        "example": "{\"code\":\"SMS_108\",\"message\":\"sms.api.sms.server.error.throw\"}"
                      }
                    }
                  }
                ]
              },
              "SmsMessageDetailResponse": {
                "description": "Response containing the details of a single SMS message.",
                "type": "object",
                "properties": {
                  "data": {
                    "$ref": "#/components/schemas/SmsMessageDetail"
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "SmsErrorDetail": {
                "description": "A single validation or denial detail inside the error envelope.",
                "type": "object",
                "properties": {
                  "code": {
                    "description": "Detail-level error code, e.g. `SERR_110` (required parameter missing), `SERR_102` (parameter syntax error), `GE_102` (mandatory field missing), `GE_122` (invalid value), `SMS_107` (template not associated with the sending agent), `SERR_157` (invalid API token).",
                    "type": "string",
                    "example": "SERR_110"
                  },
                  "message": {
                    "type": "string",
                    "example": "Parameter less than min occurrance"
                  },
                  "target": {
                    "description": "The field the detail refers to, when applicable (e.g. `sender_key`, `to`, `mobile_no`, `template_key | template_alias`).",
                    "type": "string",
                    "example": "sender_key"
                  },
                  "target_value": {
                    "description": "The offending value, when applicable."
                  }
                }
              },
              "SmsErrorResponse": {
                "description": "Error response wrapper. The top-level code identifies the error class: `TM_3201` mandatory field missing (400), `TM_3301` bad syntax (400), `TM_4001` access denied (401), `TM_3601` request denied (403), `TM_3501` unprocessable entity (422).",
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "TM_3301"
                      },
                      "message": {
                        "type": "string",
                        "example": "Bad Syntax"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/SmsErrorDetail"
                        }
                      },
                      "request_id": {
                        "description": "Identifier of the failed request, when available.",
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "WhatsAppSendWhatsAppRequest": {
                "description": "Request body for sending a WhatsApp message. Provide exactly one of `template_key` / `template_alias`; the template supplies the message content.",
                "type": "object",
                "required": [
                  "from",
                  "to"
                ],
                "properties": {
                  "from": {
                    "description": "WhatsApp sender number of the agent, including the country code.",
                    "type": "string",
                    "maxLength": 20,
                    "example": "+14155550142"
                  },
                  "to": {
                    "description": "Recipient phone number, including the country code.",
                    "type": "string",
                    "maxLength": 20,
                    "example": "+919876543210"
                  },
                  "template_key": {
                    "description": "Key of a pre-approved WhatsApp template. Provide this or `template_alias`.",
                    "type": "string",
                    "format": "uuid",
                    "maxLength": 500,
                    "example": "d0109d00-b191-11f1-95b1-aaa8828ce996"
                  },
                  "template_alias": {
                    "description": "Alias of a pre-approved WhatsApp template. Provide this or `template_key`.",
                    "type": "string",
                    "maxLength": 100
                  },
                  "merge_info": {
                    "description": "Key-value map that supplies the template's variables. A message with missing variable values is accepted but fails asynchronously with the `process_failed` status.",
                    "type": "object",
                    "additionalProperties": true,
                    "example": {
                      "code": "234234"
                    }
                  },
                  "agent_id": {
                    "description": "Identifier of the sending agent. Optional - defaults to the agent bound to the API token.",
                    "type": "string"
                  },
                  "client_reference": {
                    "description": "Client-supplied reference identifier, echoed in the message logs.",
                    "type": "string",
                    "maxLength": 100,
                    "example": "otp-234234"
                  }
                }
              },
              "WhatsAppSendWhatsAppResponse": {
                "description": "Success response returned when the WhatsApp message is queued for delivery.",
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "description": "Acceptance code.",
                        "type": "string",
                        "example": "MSG_101"
                      },
                      "message_id": {
                        "description": "Unique identifier of the message. Use it with the message-details API.",
                        "type": "string",
                        "format": "uuid",
                        "example": "1ba7d8d0-b680-11f1-91b5-d2a30e0412c2"
                      },
                      "message": {
                        "type": "string",
                        "example": "Message queued"
                      },
                      "request_id": {
                        "description": "Unique identifier assigned to the send request.",
                        "type": "string",
                        "example": "2d6f.14350939.wa1.1ba7d8d0-b680-11f1-91b5-d2a30e0412c2.1a0c9102edd"
                      }
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "WhatsAppLogEntry": {
                "description": "A WhatsApp message log entry.",
                "type": "object",
                "properties": {
                  "message_id": {
                    "description": "Unique identifier of the message.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "request_id": {
                    "description": "Identifier of the send request.",
                    "type": "string"
                  },
                  "client_reference": {
                    "description": "Client reference supplied at send time, if any.",
                    "type": "string"
                  },
                  "template_key": {
                    "description": "Key of the WhatsApp template used.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "agent_id": {
                    "description": "Identifier of the sending agent.",
                    "type": "string"
                  },
                  "channel_id": {
                    "description": "Identifier of the WhatsApp channel the message was sent through.",
                    "type": "string"
                  },
                  "channel_name": {
                    "description": "Name of the WhatsApp channel.",
                    "type": "string"
                  },
                  "waba_id": {
                    "description": "WhatsApp Business Account id of the channel.",
                    "type": "string"
                  },
                  "from": {
                    "description": "Sender phone number, with country code.",
                    "type": "string",
                    "example": "+14155550142"
                  },
                  "to": {
                    "description": "Recipient phone number, with country code.",
                    "type": "string",
                    "example": "+919876543210"
                  },
                  "status": {
                    "description": "Message status (e.g. `delivered`, `read`, `sent`, `undelivered`, `failed`, `process_failed`).",
                    "type": "string",
                    "example": "delivered"
                  },
                  "process_state": {
                    "description": "Processing state of the request.",
                    "type": "string",
                    "example": "processed"
                  },
                  "remote_ip": {
                    "description": "IP address the send request was made from.",
                    "type": "string",
                    "example": "10.61.232.23"
                  },
                  "is_batch_request": {
                    "type": "boolean"
                  },
                  "request_time": {
                    "description": "When the send request was received (ISO 8601).",
                    "type": "string"
                  },
                  "time_taken": {
                    "description": "Processing time in milliseconds.",
                    "type": "integer"
                  }
                }
              },
              "WhatsAppLogsResponse": {
                "description": "Response containing a page of WhatsApp message logs.",
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "offset": {
                        "type": "integer",
                        "example": 0
                      },
                      "count": {
                        "description": "Number of entries in this page.",
                        "type": "integer",
                        "example": 10
                      }
                    }
                  },
                  "data": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/WhatsAppLogEntry"
                    }
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "WhatsAppMessageDetail": {
                "description": "Full details of a WhatsApp message: the log fields plus the template name, the rendered message content and the delivery event timeline.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/WhatsAppLogEntry"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "template_name": {
                        "description": "Name of the WhatsApp template used.",
                        "type": "string",
                        "example": "OTP Verification"
                      },
                      "content": {
                        "description": "The message content that was sent, with template variables resolved.",
                        "type": "object",
                        "properties": {
                          "body_text": {
                            "description": "Rendered body text.",
                            "type": "string",
                            "example": "234234 is your verification code. For your security, do not share this code."
                          },
                          "footer_text": {
                            "description": "Rendered footer text, when the template defines one.",
                            "type": "string",
                            "example": "This code expires in 1 minutes."
                          },
                          "header_type": {
                            "description": "Type of the template's media header (e.g. `IMAGE`), when the template defines one.",
                            "type": "string",
                            "example": "IMAGE"
                          },
                          "attachments": {
                            "description": "Media attachments of the message header, when the template defines a media header.",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "file_key": {
                                  "description": "Identifier of the stored file.",
                                  "type": "string",
                                  "format": "uuid",
                                  "example": "3d01bbf0-b6ac-11f1-8d56-b6d94062a427"
                                },
                                "file_name": {
                                  "description": "Original file name.",
                                  "type": "string",
                                  "example": "pngFile.png"
                                },
                                "file_type": {
                                  "description": "MIME type of the file.",
                                  "type": "string",
                                  "example": "image/png"
                                },
                                "file_size": {
                                  "description": "File size in bytes.",
                                  "type": "integer",
                                  "example": 9471
                                }
                              }
                            }
                          }
                        }
                      },
                      "events": {
                        "description": "Chronological delivery events (e.g. `processed`, `sent to meta`, `delivered`, `read`). Present once the message has entered delivery; absent for messages that failed processing (status `process_failed`).",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "event_name": {
                              "type": "string",
                              "example": "delivered"
                            },
                            "event_time": {
                              "type": "string",
                              "example": "2026-09-22T17:51:31+05:30"
                            }
                          }
                        }
                      },
                      "error_message": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/WhatsAppErrorResponse"
                          }
                        ],
                        "description": "Why the message failed, as a structured error envelope (same shape as the synchronous error responses). Present only for messages that failed asynchronously (status `process_failed`)."
                      },
                      "error_msg": {
                        "description": "The same failure information serialized as a JSON string.",
                        "type": "string",
                        "example": "{\"error\":{\"code\":\"TM_3201\",\"details\":[{\"code\":\"GE_102\",\"message\":\"Mandatory field found empty\",\"target\":\"code\"}],\"message\":\"Mandatory Field missing\",\"request_id\":\"2d6f.14350939.wa1.380d2251-b680-11f1-b0ad-b6d94062a427.1a0c910e8f5\"}}"
                      }
                    }
                  }
                ]
              },
              "WhatsAppMessageDetailResponse": {
                "description": "Response containing the details of a single WhatsApp message.",
                "type": "object",
                "properties": {
                  "data": {
                    "$ref": "#/components/schemas/WhatsAppMessageDetail"
                  },
                  "status": {
                    "type": "string",
                    "example": "success"
                  }
                }
              },
              "WhatsAppErrorDetail": {
                "description": "A single validation or denial detail inside the error envelope.",
                "type": "object",
                "properties": {
                  "code": {
                    "description": "Detail-level error code, e.g. `SERR_110` (required parameter missing), `GE_102` (mandatory field missing), `WA_103` (invalid template), `WSE_107` (sender number belongs to a different agent), `SERR_157` (invalid API token).",
                    "type": "string",
                    "example": "SERR_110"
                  },
                  "message": {
                    "type": "string",
                    "example": "Parameter less than min occurrance"
                  },
                  "target": {
                    "description": "The field the detail refers to, when applicable (e.g. `from`, `to`, `template_key | template_alias`).",
                    "type": "string",
                    "example": "to"
                  },
                  "target_value": {
                    "description": "The offending value, when applicable."
                  }
                }
              },
              "WhatsAppErrorResponse": {
                "description": "Error response wrapper. The top-level code identifies the error class: `TM_3201` mandatory field missing (400), `TM_3301` bad syntax (400), `TM_4001` access denied (401), `TM_3601` request denied (403).",
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "TM_3301"
                      },
                      "message": {
                        "type": "string",
                        "example": "Bad Syntax"
                      },
                      "details": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/WhatsAppErrorDetail"
                        }
                      },
                      "request_id": {
                        "description": "Identifier of the failed request, when available.",
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "AsyncFailureInfo": {
                "description": "Why an accepted message failed asynchronously. Present only on failed messages (voice status `PROCESS_FAILED`, sms status `process_failed`).",
                "type": "object",
                "properties": {
                  "code": {
                    "description": "Failure code (e.g. voice `VOI_502`, sms `SMS_108`).",
                    "type": "string",
                    "example": "VOI_502"
                  },
                  "message": {
                    "description": "Failure message.",
                    "type": "string",
                    "example": "Call initiation failed"
                  }
                }
              }
            },
            "securitySchemes": {
              "SendMailToken": {
                "in": "header",
                "name": "Authorization",
                "description": "Send Mail Token. Pass it with the prefix: Zoho-enczapikey",
                "type": "apiKey"
              },
              "email_logs_ZohoOAuth": {
                "flows": {
                  "authorizationCode": {
                    "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
                    "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
                    "scopes": {
                      "Zeptomail.email.READ": "Read email logs",
                      "Zeptomail.email.All": "Full access to email logs"
                    }
                  }
                },
                "type": "oauth2"
              },
              "domains_ZohoOAuth": {
                "flows": {
                  "authorizationCode": {
                    "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
                    "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
                    "scopes": {
                      "Zeptomail.Domains.All": "Full access to domains",
                      "Zeptomail.Domains.READ": "Read domains",
                      "Zeptomail.Domains.CREATE": "Create domains",
                      "Zeptomail.Domains.UPDATE": "Update and verify domains",
                      "Zeptomail.Domains.DELETE": "Delete domains"
                    }
                  }
                },
                "type": "oauth2"
              },
              "agents_ZohoOAuth": {
                "flows": {
                  "authorizationCode": {
                    "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
                    "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
                    "scopes": {
                      "Zeptomail.MailAgents.READ": "Read mail agents",
                      "Zeptomail.MailAgents.DELETE": "Delete mail agents",
                      "Zeptomail.MailAgents.CREATE": "Create mail agents",
                      "Zeptomail.MailAgents.UPDATE": "Update mail agents",
                      "Zeptomail.MailAgents.All": "Full access to mail agents"
                    }
                  }
                },
                "type": "oauth2"
              },
              "suppression_ZohoOAuth": {
                "flows": {
                  "authorizationCode": {
                    "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
                    "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
                    "scopes": {
                      "Zeptomail.Suppressions.DELETE": "Delete suppression entries",
                      "Zeptomail.Suppressions.CREATE": "Create suppression entries",
                      "Zeptomail.Suppressions.READ": "Read suppression entries",
                      "Zeptomail.Suppressions.All": "Full access to suppression entries",
                      "Zeptomail.Suppressions.UPDATE": "Update suppression entries"
                    }
                  }
                },
                "type": "oauth2"
              },
              "email_templates_ZohoOAuth": {
                "flows": {
                  "authorizationCode": {
                    "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
                    "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
                    "scopes": {
                      "Zeptomail.MailTemplates.UPDATE": "Update email templates",
                      "Zeptomail.MailTemplates.All": "Full access to email templates",
                      "Zeptomail.MailTemplates.CREATE": "Create email templates",
                      "Zeptomail.MailTemplates.DELETE": "Delete email templates",
                      "Zeptomail.MailTemplates.READ": "Read email templates"
                    }
                  }
                },
                "type": "oauth2"
              },
              "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "Authorization",
                "description": "Send Mail API token of an agent. Send the header as `Authorization: Zoho-enczapikey {token}`. The agent and account are derived from the token; no cookies or CSRF tokens are required."
              }
            },
            "responses": {
              "VoiceCallAccepted": {
                "description": "Voice call accepted and initiated.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceSendVoiceResponse"
                    },
                    "example": {
                      "data": {
                        "code": "MSG_102",
                        "message_id": "7ed0c6c0-b670-11f1-8810-3ed350183096",
                        "message": "Message sent successfully",
                        "request_id": "2d6f.14350939.v1.7ed0c6c0-b670-11f1-8810-3ed350183096.1a0c8a9dd2c"
                      },
                      "status": "success"
                    }
                  }
                }
              },
              "VoiceBadRequest": {
                "description": "Bad Request (`TM_3301`) - a required parameter is missing or the payload is malformed.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3301",
                        "details": [
                          {
                            "code": "SERR_110",
                            "message": "Parameter less than min occurrance",
                            "target": "to"
                          }
                        ],
                        "message": "Bad Syntax"
                      }
                    }
                  }
                }
              },
              "VoiceUnauthorized": {
                "description": "Access Denied (`TM_4001`) - missing or invalid API token.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_4001",
                        "details": [
                          {
                            "code": "SERR_157",
                            "message": "Invalid API Token found"
                          }
                        ],
                        "message": "Access Denied"
                      }
                    }
                  }
                }
              },
              "VoiceCallNotFound": {
                "description": "Request Denied (`TM_3601`) - no call exists with the given message id.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3601",
                        "details": [
                          {
                            "code": "SERR_120",
                            "message": "This URL does not exist"
                          }
                        ],
                        "message": "Request Denied"
                      }
                    }
                  }
                }
              },
              "VoiceUnprocessableVoiceRequest": {
                "description": "Unprocessable Entity (`TM_3501`) - the request is well-formed but cannot be processed: missing caller id, missing content, unknown template, missing merge tags, or a phone number that is not valid for the account.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceErrorResponse"
                    },
                    "examples": {
                      "missing_merge_tags": {
                        "summary": "Template merge tags missing (missing tag names are listed in target_value)",
                        "value": {
                          "error": {
                            "code": "TM_3501",
                            "details": [
                              {
                                "code": "VOI_106",
                                "target_value": "customer_name, company_name, order_id, currency, amount",
                                "message": "Required merge tag(s) missing in the request",
                                "target": "merge_info"
                              }
                            ],
                            "message": "Unprocessable Entity"
                          }
                        }
                      },
                      "missing_caller_id": {
                        "summary": "Caller id (from) missing",
                        "value": {
                          "error": {
                            "code": "TM_3501",
                            "details": [
                              {
                                "code": "VOI_104",
                                "message": "Caller ID (from) is required",
                                "target": "from"
                              }
                            ],
                            "message": "Unprocessable Entity"
                          }
                        }
                      },
                      "missing_content": {
                        "summary": "Neither template nor message content provided",
                        "value": {
                          "error": {
                            "code": "TM_3501",
                            "details": [
                              {
                                "code": "VOI_105",
                                "message": "Either template key/alias or message content is required"
                              }
                            ],
                            "message": "Unprocessable Entity"
                          }
                        }
                      },
                      "template_not_found": {
                        "summary": "Unknown template",
                        "value": {
                          "error": {
                            "code": "TM_3501",
                            "details": [
                              {
                                "code": "MTR_107",
                                "message": "Template not found"
                              }
                            ],
                            "message": "Unprocessable Entity"
                          }
                        }
                      },
                      "invalid_from_number": {
                        "summary": "Caller id is not an approved voice number of the agent",
                        "value": {
                          "error": {
                            "code": "TM_3501",
                            "details": [
                              {
                                "code": "VOI_102",
                                "target_value": "919876500000",
                                "message": "Invalid phone number",
                                "target": "from"
                              }
                            ],
                            "message": "Unprocessable Entity"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "SmsQueued": {
                "description": "SMS queued for delivery.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsSendSmsResponse"
                    },
                    "example": {
                      "data": {
                        "code": "MSG_101",
                        "message_id": "7fff7400-b676-11f1-b0ad-b6d94062a427",
                        "message": "Message queued",
                        "request_id": "2d6f.14350939.i1.7fff7400-b676-11f1-b0ad-b6d94062a427.1a0c8d13740"
                      },
                      "status": "success"
                    }
                  }
                }
              },
              "SmsBadRequest": {
                "description": "Bad Request - a required field is missing (`TM_3301`/`SERR_110`, `TM_3201`/`GE_102`) or a value is malformed (`TM_3301`/`SERR_102`). Please check the parameters and the syntax. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsErrorResponse"
                    },
                    "examples": {
                      "missing_sender_key": {
                        "summary": "sender_key missing",
                        "value": {
                          "error": {
                            "code": "TM_3301",
                            "details": [
                              {
                                "code": "SERR_110",
                                "message": "Parameter less than min occurrance",
                                "target": "sender_key"
                              }
                            ],
                            "message": "Bad Syntax"
                          }
                        }
                      },
                      "missing_template": {
                        "summary": "Neither template_key nor template_alias provided",
                        "value": {
                          "error": {
                            "code": "TM_3201",
                            "details": [
                              {
                                "code": "GE_102",
                                "message": "Mandatory field found empty",
                                "target": "template_key | template_alias"
                              }
                            ],
                            "message": "Mandatory Field missing"
                          }
                        }
                      },
                      "invalid_mobile_no": {
                        "summary": "Malformed mobile number",
                        "value": {
                          "error": {
                            "code": "TM_3301",
                            "details": [
                              {
                                "code": "SERR_102",
                                "message": "Syntax error found",
                                "target": "mobile_no"
                              }
                            ],
                            "message": "Bad Syntax"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "SmsUnauthorized": {
                "description": "Access Denied (`TM_4001`) - missing or invalid API token. Please check the authorization details and try again. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_4001",
                        "details": [
                          {
                            "code": "SERR_157",
                            "message": "Invalid API Token found"
                          }
                        ],
                        "message": "Access Denied"
                      }
                    }
                  }
                }
              },
              "SmsSendUnauthorized": {
                "description": "Access Denied (`TM_4001`) - missing or invalid API token, or a template that is not associated with the sending agent. Please check the authorization details and try again. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsErrorResponse"
                    },
                    "examples": {
                      "invalid_token": {
                        "summary": "Invalid API token",
                        "value": {
                          "error": {
                            "code": "TM_4001",
                            "details": [
                              {
                                "code": "SERR_157",
                                "message": "Invalid API Token found"
                              }
                            ],
                            "message": "Access Denied"
                          }
                        }
                      },
                      "template_not_associated": {
                        "summary": "Template not associated with the sending agent",
                        "value": {
                          "error": {
                            "code": "TM_4001",
                            "details": [
                              {
                                "code": "SMS_107",
                                "message": "sms.api.invalid.associated.sender"
                              }
                            ],
                            "message": "Access Denied"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "SmsInvalidRecipient": {
                "description": "Unprocessable Entity (`TM_3501`) - a recipient entry is invalid, such as an empty mobile number. Please check if all parameters are valid.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3501",
                        "details": [
                          {
                            "code": "GE_122",
                            "message": "Invalid value found",
                            "target": "to"
                          }
                        ],
                        "message": "Unprocessable Entity"
                      }
                    }
                  }
                }
              },
              "SmsMessageNotFound": {
                "description": "Request Denied (`TM_3601`) - no message exists with the given message id.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SmsErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3601",
                        "details": [
                          {
                            "code": "SERR_120",
                            "message": "This URL does not exist"
                          }
                        ],
                        "message": "Request Denied"
                      }
                    }
                  }
                }
              },
              "WhatsAppQueued": {
                "description": "WhatsApp message queued for delivery.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppSendWhatsAppResponse"
                    },
                    "example": {
                      "data": {
                        "code": "MSG_101",
                        "message_id": "1ba7d8d0-b680-11f1-91b5-d2a30e0412c2",
                        "message": "Message queued",
                        "request_id": "2d6f.14350939.wa1.1ba7d8d0-b680-11f1-91b5-d2a30e0412c2.1a0c9102edd"
                      },
                      "status": "success"
                    }
                  }
                }
              },
              "WhatsAppBadRequest": {
                "description": "Bad Request - a required field is missing (`TM_3301`/`SERR_110`, `TM_3201`/`GE_102`) or a value is malformed. Please check the parameters and the syntax. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppErrorResponse"
                    },
                    "examples": {
                      "missing_to": {
                        "summary": "to missing",
                        "value": {
                          "error": {
                            "code": "TM_3301",
                            "details": [
                              {
                                "code": "SERR_110",
                                "message": "Parameter less than min occurrance",
                                "target": "to"
                              }
                            ],
                            "message": "Bad Syntax"
                          }
                        }
                      },
                      "missing_template": {
                        "summary": "Neither template_key nor template_alias provided",
                        "value": {
                          "error": {
                            "code": "TM_3201",
                            "details": [
                              {
                                "code": "GE_102",
                                "message": "Mandatory field found empty",
                                "target": "template_key | template_alias"
                              }
                            ],
                            "message": "Mandatory Field missing"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "WhatsAppUnauthorized": {
                "description": "Access Denied (`TM_4001`) - missing or invalid API token. Please check the authorization details and try again. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_4001",
                        "details": [
                          {
                            "code": "SERR_157",
                            "message": "Invalid API Token found"
                          }
                        ],
                        "message": "Access Denied"
                      }
                    }
                  }
                }
              },
              "WhatsAppSendUnauthorized": {
                "description": "Access Denied (`TM_4001`) - missing or invalid API token, or a template that is not valid for the sending agent. Please check the authorization details and try again. ",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppErrorResponse"
                    },
                    "examples": {
                      "invalid_token": {
                        "summary": "Invalid API token",
                        "value": {
                          "error": {
                            "code": "TM_4001",
                            "details": [
                              {
                                "code": "SERR_157",
                                "message": "Invalid API Token found"
                              }
                            ],
                            "message": "Access Denied"
                          }
                        }
                      },
                      "invalid_template": {
                        "summary": "Template not valid for the sending agent",
                        "value": {
                          "error": {
                            "code": "TM_4001",
                            "details": [
                              {
                                "code": "WA_103",
                                "message": "whatsapp.api.template.not.valid"
                              }
                            ],
                            "message": "Access Denied"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "WhatsAppSenderNotOnAgent": {
                "description": "Request Denied (`TM_3601`) - the `from` number is a WhatsApp sender added to a different agent (`WSE_107`).",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3601",
                        "details": [
                          {
                            "code": "WSE_107",
                            "target_value": "+14155550142",
                            "message": "whatsapp.sender.sender.added.different.agent",
                            "target": "from"
                          }
                        ],
                        "message": "Request Denied"
                      }
                    }
                  }
                }
              },
              "WhatsAppMessageNotFound": {
                "description": "Request Denied (`TM_3601`) - no message exists with the given message id.",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/WhatsAppErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3601",
                        "details": [
                          {
                            "code": "SERR_120",
                            "message": "This URL does not exist"
                          }
                        ],
                        "message": "Request Denied"
                      }
                    }
                  }
                }
              },
              "VoiceFromNotOnAgent": {
                "description": "Request Denied (`TM_3601`) - the `from` number is a voice number not associated with the sending agent (`VOI_207`).",
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/VoiceErrorResponse"
                    },
                    "example": {
                      "error": {
                        "code": "TM_3601",
                        "details": [
                          {
                            "code": "VOI_207",
                            "target_value": "14155550142",
                            "message": "The from number is not associated with this mail agent",
                            "target": "from"
                          }
                        ],
                        "message": "Request Denied"
                      }
                    }
                  }
                }
              }
            }
          }
        }