{
    "swagger":  "2.0",
    "info":  {
                 "description":  "ResponseIQ APIs Documentation",
                 "version":  "1.0.0",
                 "title":  "ResponseIQ APIs"
             },
    "basePath":  "",
    "tags":  [
                 {
                     "name":  "Campaigns",
                     "description":  "Call Campaigns \u0026 SMS Campaigns"
                 },
                 {
                     "name":  "Calls",
                     "description":  "Call Report, Call to Agent"
                 }
             ],
    "paths":  {
                  "/campaigns/":  {
                                      "post":  {
                                                   "tags":  [
                                                                "Campaigns"
                                                            ],
                                                   "summary":  "Create a Call campaign",
                                                   "description":  "Create a Call campaign",
                                                   "operationId":  "createCallCampaign",
                                                   "consumes":  [
                                                                    "application/json"
                                                                ],
                                                   "produces":  [
                                                                    "application/json"
                                                                ],
                                                   "parameters":  [
                                                                      {
                                                                          "name":  "Widget-Api-Key",
                                                                          "in":  "header",
                                                                          "description":  "Widget API Key",
                                                                          "required":  true,
                                                                          "type":  "string"
                                                                      },
                                                                      {
                                                                          "name":  "Authorization-Token",
                                                                          "in":  "header",
                                                                          "description":  "Authorization Token",
                                                                          "required":  true,
                                                                          "type":  "string"
                                                                      },
                                                                      {
                                                                          "in":  "body",
                                                                          "name":  "body",
                                                                          "description":  "\u003cstrong\u003eInput values as below:\u003c/strong\u003e\u003cp\u003e\u003ci\u003ecampaign_name=Test Campaign\u003c/i\u003e `// Field is required`\u003c/p\u003e\u003cp\u003e\u003ci\u003eschedule_type=scheduled\u003c/i\u003e `// scheduled or immediately`\u003c/p\u003e\u003cp\u003e\u003ci\u003estart_date=\u00272023-01-01\u0027\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003estart_time=14:30\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in HH:MM format`\u003c/p\u003e\u003cp\u003e\u003ci\u003eend_time=15:30\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in HH:MM format`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecampaign_interval=5\u003c/i\u003e `// Field is required. Value should be more than 1`\u003c/p\u003e\u003cp\u003e\u003ci\u003eduplicate_lead_check=true\u003c/i\u003e `// true or false. Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003eduplicate_lead_check_days=3\u003c/i\u003e `// Required only if \u0027duplicate_lead_check\u0027 parameter is set to true. Value should be more than 0`\u003c/p\u003e\u003cp\u003e\u003ci\u003efuture_schedule_calls_check=true\u003c/i\u003e `// true or false. Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003efuture_schedule_calls_check_days=4\u003c/i\u003e `// Required only if \u0027future_schedule_calls_check\u0027 parameter is set to true. Value should be more than 0`\u003c/p\u003e",
                                                                          "required":  true,
                                                                          "schema":  {
                                                                                         "$ref":  "#/definitions/CallCampaign"
                                                                                     }
                                                                      }
                                                                  ],
                                                   "responses":  {
                                                                     "200":  {
                                                                                 "description":  "Successful Operation"
                                                                             },
                                                                     "401":  {
                                                                                 "description":  "Authentication Error"
                                                                             },
                                                                     "500":  {
                                                                                 "description":  "Internal Error"
                                                                             }
                                                                 }
                                               }
                                  },
                  "/campaigns/sms":  {
                                         "post":  {
                                                      "tags":  [
                                                                   "Campaigns"
                                                               ],
                                                      "summary":  "Create a SMS campaign",
                                                      "description":  "Create a SMS campaign",
                                                      "operationId":  "createSmsCampaign",
                                                      "consumes":  [
                                                                       "application/json"
                                                                   ],
                                                      "produces":  [
                                                                       "application/json"
                                                                   ],
                                                      "parameters":  [
                                                                         {
                                                                             "name":  "Widget-Api-Key",
                                                                             "in":  "header",
                                                                             "description":  "Widget API Key",
                                                                             "required":  true,
                                                                             "type":  "string"
                                                                         },
                                                                         {
                                                                             "name":  "Authorization-Token",
                                                                             "in":  "header",
                                                                             "description":  "Authorization Token",
                                                                             "required":  true,
                                                                             "type":  "string"
                                                                         },
                                                                         {
                                                                             "in":  "body",
                                                                             "name":  "body",
                                                                             "description":  "\u003cstrong\u003eInput values as below:\u003c/strong\u003e\u003cp\u003e\u003ci\u003ecampaign_name=Test Campaign\u003c/i\u003e `// Field is required`\u003c/p\u003e\u003cp\u003e\u003ci\u003eschedule_type=scheduled\u003c/i\u003e `// scheduled or immediately`\u003c/p\u003e\u003cp\u003e\u003ci\u003estart_date=\u00272023-01-01\u0027\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003estart_time=14:30\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in HH:MM format`\u003c/p\u003e\u003cp\u003e\u003ci\u003eend_time=15:30\u003c/i\u003e `// Required only if \u0027schedule_type\u0027 parameter is set to \u0027scheduled\u0027. Value should be in HH:MM format`\u003c/p\u003e\u003cp\u003e\u003ci\u003etemplate_id=101\u003c/i\u003e `// Field is required. Value should be more than 1`\u003c/p\u003e\u003cp\u003e\u003ci\u003eduplicate_lead_check=true\u003c/i\u003e `// true or false. Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003eduplicate_lead_check_days=3\u003c/i\u003e `// Required only if \u0027duplicate_lead_check\u0027 parameter is set to true. Value should be more than 0`\u003c/p\u003e\u003cp\u003e\u003ci\u003eoverride_working_hours=true\u003c/i\u003e `// true or false. Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003esend_all_immediately=true\u003c/i\u003e `// true or false. Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003esms_per_minute=10\u003c/i\u003e `// Required only if \u0027send_all_immediately\u0027 parameter is set to false. Value should be one from [10, 15, 20, 25, 30]`\u003c/p\u003e\u003cp\u003e\u003ci\u003ereply_email = user@example.com\u003c/i\u003e `// Field is required. Value should be a valid email address`\u003c/p\u003e",
                                                                             "required":  true,
                                                                             "schema":  {
                                                                                            "$ref":  "#/definitions/SMSCampaign"
                                                                                        }
                                                                         }
                                                                     ],
                                                      "responses":  {
                                                                        "200":  {
                                                                                    "description":  "Successful Operation"
                                                                                },
                                                                        "401":  {
                                                                                    "description":  "Authentication Error"
                                                                                },
                                                                        "500":  {
                                                                                    "description":  "Internal Error"
                                                                                }
                                                                    }
                                                  }
                                     },
                  "/campaigns/{limit}/{offset}":  {
                                                      "get":  {
                                                                  "tags":  [
                                                                               "Campaigns"
                                                                           ],
                                                                  "summary":  "List campaigns",
                                                                  "description":  "List all campaigns(order by most recent campaigns)",
                                                                  "operationId":  "getCampaigns",
                                                                  "produces":  [
                                                                                   "application/json"
                                                                               ],
                                                                  "parameters":  [
                                                                                     {
                                                                                         "name":  "Widget-Api-Key",
                                                                                         "in":  "header",
                                                                                         "description":  "Widget API Key",
                                                                                         "required":  true,
                                                                                         "type":  "string"
                                                                                     },
                                                                                     {
                                                                                         "name":  "Authorization-Token",
                                                                                         "in":  "header",
                                                                                         "description":  "Authorization Token",
                                                                                         "required":  true,
                                                                                         "type":  "string"
                                                                                     },
                                                                                     {
                                                                                         "name":  "offset",
                                                                                         "in":  "path",
                                                                                         "description":  "Set offset position for records",
                                                                                         "required":  true,
                                                                                         "type":  "integer",
                                                                                         "minimum":  0,
                                                                                         "format":  "int64",
                                                                                         "default":  0
                                                                                     },
                                                                                     {
                                                                                         "name":  "limit",
                                                                                         "in":  "path",
                                                                                         "description":  "Set limit to fetch number of records",
                                                                                         "required":  true,
                                                                                         "type":  "integer",
                                                                                         "minimum":  1,
                                                                                         "format":  "int64",
                                                                                         "default":  100
                                                                                     }
                                                                                 ],
                                                                  "responses":  {
                                                                                    "200":  {
                                                                                                "description":  "Successful Operation"
                                                                                            },
                                                                                    "401":  {
                                                                                                "description":  "Authentication Error"
                                                                                            },
                                                                                    "500":  {
                                                                                                "description":  "Internal Error"
                                                                                            }
                                                                                }
                                                              }
                                                  },
                  "/campaigns/{campaign_id}/leads":  {
                                                         "post":  {
                                                                      "tags":  [
                                                                                   "Campaigns"
                                                                               ],
                                                                      "summary":  "Add leads to call campaign",
                                                                      "description":  "Add a lead to an existing Call Campaign",
                                                                      "operationId":  "addCallCampaignLead",
                                                                      "consumes":  [
                                                                                       "application/json"
                                                                                   ],
                                                                      "produces":  [
                                                                                       "application/json"
                                                                                   ],
                                                                      "parameters":  [
                                                                                         {
                                                                                             "name":  "Widget-Api-Key",
                                                                                             "in":  "header",
                                                                                             "description":  "Widget API Key",
                                                                                             "required":  true,
                                                                                             "type":  "string"
                                                                                         },
                                                                                         {
                                                                                             "name":  "Authorization-Token",
                                                                                             "in":  "header",
                                                                                             "description":  "Authorization Token",
                                                                                             "required":  true,
                                                                                             "type":  "string"
                                                                                         },
                                                                                         {
                                                                                             "name":  "campaign_id",
                                                                                             "in":  "path",
                                                                                             "description":  "An Existing Campaign Id",
                                                                                             "required":  true,
                                                                                             "type":  "integer",
                                                                                             "format":  "int64"
                                                                                         },
                                                                                         {
                                                                                             "in":  "body",
                                                                                             "name":  "body",
                                                                                             "description":  "\u003cstrong\u003eInput values as below:\u003c/strong\u003e\u003cp\u003e\u003ci\u003ename=John Doe\u003c/i\u003e `// Field is required`\u003c/p\u003e\u003cp\u003e\u003ci\u003ephone=+441234567890\u003c/i\u003e `// Field is required. Value should be a valid phone number with country code optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003eemail = user@example.com\u003c/i\u003e `// Field is required. Value should be a valid email address`\u003c/p\u003e\u003cp\u003e\u003ci\u003eexpirydate=\u00272023-01-01\u0027\u003c/i\u003e `// Field is optional. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003epreferreddate=\u00272023-01-01\u0027\u003c/i\u003e `// Field is optional. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom1=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom2=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom3=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e",
                                                                                             "required":  true,
                                                                                             "schema":  {
                                                                                                            "$ref":  "#/definitions/CampaignLead"
                                                                                                        }
                                                                                         }
                                                                                     ],
                                                                      "responses":  {
                                                                                        "200":  {
                                                                                                    "description":  "Successful Operation"
                                                                                                },
                                                                                        "401":  {
                                                                                                    "description":  "Authentication Error"
                                                                                                },
                                                                                        "500":  {
                                                                                                    "description":  "Internal Error"
                                                                                                }
                                                                                    }
                                                                  }
                                                     },
                  "/campaigns/{campaign_id}/smsleads":  {
                                                            "post":  {
                                                                         "tags":  [
                                                                                      "Campaigns"
                                                                                  ],
                                                                         "summary":  "Add leads to sms campaign",
                                                                         "description":  "Add a lead to an existing SMS Campaign",
                                                                         "operationId":  "addSmsCampaignLead",
                                                                         "consumes":  [
                                                                                          "application/json"
                                                                                      ],
                                                                         "produces":  [
                                                                                          "application/json"
                                                                                      ],
                                                                         "parameters":  [
                                                                                            {
                                                                                                "name":  "Widget-Api-Key",
                                                                                                "in":  "header",
                                                                                                "description":  "Widget API Key",
                                                                                                "required":  true,
                                                                                                "type":  "string"
                                                                                            },
                                                                                            {
                                                                                                "name":  "Authorization-Token",
                                                                                                "in":  "header",
                                                                                                "description":  "Authorization Token",
                                                                                                "required":  true,
                                                                                                "type":  "string"
                                                                                            },
                                                                                            {
                                                                                                "name":  "campaign_id",
                                                                                                "in":  "path",
                                                                                                "description":  "An Existing Campaign Id",
                                                                                                "required":  true,
                                                                                                "type":  "integer",
                                                                                                "format":  "int64"
                                                                                            },
                                                                                            {
                                                                                                "in":  "body",
                                                                                                "name":  "body",
                                                                                                "description":  "\u003cstrong\u003eInput values as below:\u003c/strong\u003e\u003cp\u003e\u003ci\u003ename=John Doe\u003c/i\u003e `// Field is required`\u003c/p\u003e\u003cp\u003e\u003ci\u003ephone=+441234567890\u003c/i\u003e `// Field is required. Value should be a valid phone number with country code optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003eemail = user@example.com\u003c/i\u003e `// Field is required. Value should be a valid email address`\u003c/p\u003e\u003cp\u003e\u003ci\u003eexpirydate=\u00272023-01-01\u0027\u003c/i\u003e `// Field is optional. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003epreferreddate=\u00272023-01-01\u0027\u003c/i\u003e `// Field is optional. Value should be in YYYY-MM-DD format`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom1=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom2=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003ecustom3=\u0027 \u0027\u003c/i\u003e `// Field is optional`\u003c/p\u003e",
                                                                                                "required":  true,
                                                                                                "schema":  {
                                                                                                               "$ref":  "#/definitions/CampaignLead"
                                                                                                           }
                                                                                            }
                                                                                        ],
                                                                         "responses":  {
                                                                                           "200":  {
                                                                                                       "description":  "Successful Operation"
                                                                                                   },
                                                                                           "401":  {
                                                                                                       "description":  "Authentication Error"
                                                                                                   },
                                                                                           "500":  {
                                                                                                       "description":  "Internal Error"
                                                                                                   }
                                                                                       }
                                                                     }
                                                        },
                  "/campaigns/{campaign_id}/calls":  {
                                                         "post":  {
                                                                      "tags":  [
                                                                                   "Campaigns"
                                                                               ],
                                                                      "summary":  "List campaign calls",
                                                                      "description":  "List all calls of a specific campaign(order by most recent calls)",
                                                                      "operationId":  "getCampaignCalls",
                                                                      "consumes":  [
                                                                                       "application/json"
                                                                                   ],
                                                                      "produces":  [
                                                                                       "application/json"
                                                                                   ],
                                                                      "parameters":  [
                                                                                         {
                                                                                             "name":  "Widget-Api-Key",
                                                                                             "in":  "header",
                                                                                             "description":  "Widget API Key",
                                                                                             "required":  true,
                                                                                             "type":  "string"
                                                                                         },
                                                                                         {
                                                                                             "name":  "Authorization-Token",
                                                                                             "in":  "header",
                                                                                             "description":  "Authorization Token",
                                                                                             "required":  true,
                                                                                             "type":  "string"
                                                                                         },
                                                                                         {
                                                                                             "name":  "campaign_id",
                                                                                             "in":  "path",
                                                                                             "description":  "An Existing Campaign Id",
                                                                                             "required":  true,
                                                                                             "type":  "integer",
                                                                                             "format":  "int64"
                                                                                         },
                                                                                         {
                                                                                             "in":  "body",
                                                                                             "name":  "body",
                                                                                             "description":  "\u003cstrong\u003eInput values as below:\u003c/strong\u003e\u003cp\u003e\u003ci\u003eoffset=0\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003elimit=10\u003c/i\u003e `// Field is optional`\u003c/p\u003e\u003cp\u003e\u003ci\u003efrom_datetime = \u00272023-01-01 00:00:00\u0027\u003c/i\u003e `// Field is optional. Value should be in date-time format(YYYY-MM-DD HH:mm:ss)`\u003c/p\u003e\u003cp\u003e\u003ci\u003efrom_datetime = \u00272023-01-31 23:59:59\u0027\u003c/i\u003e `// Field is optional. Value should be in date-time format(YYYY-MM-DD HH:mm:ss)`\u003c/p\u003e",
                                                                                             "required":  true,
                                                                                             "schema":  {
                                                                                                            "$ref":  "#/definitions/CampaignCalls"
                                                                                                        }
                                                                                         }
                                                                                     ],
                                                                      "responses":  {
                                                                                        "200":  {
                                                                                                    "description":  "Successful Operation"
                                                                                                },
                                                                                        "401":  {
                                                                                                    "description":  "Authentication Error"
                                                                                                },
                                                                                        "500":  {
                                                                                                    "description":  "Internal Error"
                                                                                                }
                                                                                    }
                                                                  }
                                                     },
                  "/apis/reports":  {
                                        "post":  {
                                                     "tags":  [
                                                                  "Calls"
                                                              ],
                                                     "summary":  "Fetch Call Report",
                                                     "description":  "Fetch call report",
                                                     "operationId":  "fetchCallReport",
                                                     "consumes":  [
                                                                      "application/x-www-form-urlencoded"
                                                                  ],
                                                     "produces":  [
                                                                      "application/json"
                                                                  ],
                                                     "parameters":  [
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "token",
                                                                            "type":  "string",
                                                                            "description":  "The `token` parameter is the `Authorization Token` (32 characters long alphanumeric string value)",
                                                                            "required":  true
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "widget_id",
                                                                            "type":  "string",
                                                                            "description":  "The `widget_id` parameter is the `Widget API Key`. If you have multiple widgets, you can pass multiple `Widget API Keys` in comma separated format.",
                                                                            "required":  true
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "offset",
                                                                            "type":  "integer",
                                                                            "format":  "int32",
                                                                            "description":  "The `offset` parameter defines the starting page number of the result set, where the page size is given by `limit` parameter",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "limit",
                                                                            "type":  "integer",
                                                                            "format":  "int32",
                                                                            "description":  "The `limit` parameter specifies the page size (number or items) of the result set. Use the `offset` parameter to specify the starting page number of the result set.\u003cp\u003e`// The maximum limit value is 1000. Specifying a larger number will make the request fail. If you do not specify a limit, the default page size is 100.`\u003c/p\u003e",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "from_date",
                                                                            "type":  "string",
                                                                            "x-example":  "2023-01-31",
                                                                            "description":  "The `from_date` parameter specifies to only include calls that were made after the specified date. Can be combined with `to_date` parameter to specify a date range.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "to_date",
                                                                            "type":  "string",
                                                                            "x-example":  "2023-02-28",
                                                                            "description":  "The `to_date` parameter specifies to only include calls that were made before the specified date. Can be combined with `from_date` parameter to specify a date range.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "lead_type",
                                                                            "type":  "string",
                                                                            "enum":  [
                                                                                         "Live",
                                                                                         "Scheduled"
                                                                                     ],
                                                                            "description":  "The `lead_type` parameter is the type of lead. for example: Live or Schedule",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "lead_phone",
                                                                            "type":  "string",
                                                                            "description":  "The `lead_phone` parameter specifies to only include calls that were made to the specified phone number. Example: 441234567890",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "calllog_id",
                                                                            "type":  "integer",
                                                                            "format":  "int32",
                                                                            "description":  "The `calllog_id` parameter specifies to only include calls that have the specified call ID.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "agent_id",
                                                                            "type":  "integer",
                                                                            "format":  "int32",
                                                                            "description":  "The `agent_id` parameter specifies to only include calls that were made by the specified agent ID.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "call_status",
                                                                            "type":  "string",
                                                                            "enum":  [
                                                                                         "connected",
                                                                                         "scheduled",
                                                                                         "missed_by_agent_completed",
                                                                                         "missed_by_agent_no_answer",
                                                                                         "missed_by_agent_answered",
                                                                                         "missed_by_customer",
                                                                                         "missed_by_customer_agent_hangup",
                                                                                         "missed_by_customer_failed",
                                                                                         "missed_by_customer_busy",
                                                                                         "missed_by_customer_voicemail",
                                                                                         "missed_by_customer_lead_hangup",
                                                                                         "call_in_progress",
                                                                                         "customer_phone_ringing",
                                                                                         "cancelled_by_sms",
                                                                                         "cancelled_by_agent",
                                                                                         "cancelled_by_lead_connect",
                                                                                         "temporary_override"
                                                                                     ],
                                                                            "description":  "The `call_status` parameter specifies to only include calls that have the specified call status.",
                                                                            "required":  false
                                                                        }
                                                                    ],
                                                     "responses":  {
                                                                       "200":  {
                                                                                   "description":  "Successful Operation"
                                                                               },
                                                                       "401":  {
                                                                                   "description":  "Authentication Error"
                                                                               },
                                                                       "500":  {
                                                                                   "description":  "Internal Error"
                                                                               }
                                                                   }
                                                 }
                                    },
                  "/apis/callnow":  {
                                        "post":  {
                                                     "tags":  [
                                                                  "Calls"
                                                              ],
                                                     "summary":  "Call an Agent",
                                                     "description":  "Call an agent immediately, or schedule a callback.\n\n### Global holidays\nWhen global holidays are enabled and an active holiday applies to this widget, the holiday's scheduling permission controls whether the lead is accepted. Plain API leads use **Allow leads to schedule calls during the holiday period** (`call_schedule`). Requests with `riq_lc_id` use **Allow Lead connect leads to schedule calls during the holiday period** (`lead_connect_call_schedule`).\n\nIf the relevant permission is enabled, the lead is scheduled in the next available working slot after the holiday, including any consecutive holidays or closed days. No call is placed during the holiday. A valid requested callback after the holiday is kept; a requested callback on a holiday is moved to the next available working slot. If no slot is available, the API returns `-11`. The **Call Reschedule** interval-setting option is not required for holiday scheduling.\n\nIf the relevant permission is disabled, the API returns `-8` / `Sorry Closed`. The lead is not created or queued; the sender must retain it and retry after reopening. Deactivated holidays do not apply.\n\n### Overnight scheduling\nFor plain API requests without `riq_lc_id` or `schedule_call_on`, enable **Overnight Scheduling** for the widget (`IlrAutomationScheduleCalls.status`). Requests outside the widget's company hours (call scenario 2), or its active mapped agents' hours (other scenarios), are then accepted and queued for the next available working slot in the company's timezone. This includes later today before opening, after closing, closed days, and intervening active global holidays. Slot selection uses the existing scheduler's configured overnight interval, opening delay and capacity. The retry switch is independent and is not required to enable overnight scheduling.\n\nDuring opening hours the API keeps its immediate-call behavior. A valid explicit callback is preserved. Holiday permissions still take priority on a holiday: enabling overnight scheduling does not override a disabled holiday scheduling permission. If overnight scheduling is disabled, an out-of-hours request returns `-4`; if enabled but no callback slot is available, it returns `-11`. Neither rejection queues a lead. Lead Connect requests retain their separate scheduling path.\n\n### Rejection tracing\nSend your own non-sensitive `lead_reference_number` with each submission. Rejected API responses emit a structured `api.callnow.rejected` server-log event containing UTC time, authenticated company/widget IDs, application status and this reference (up to 256 bytes). Invalid API keys have no resolved company/widget. API keys, phone numbers and full request payloads are not included in this event. Retain your original submission and response for reconciliation; logs do not recreate a rejected lead or queue a retry.\n\n### Application return values\nThese values are in the JSON `status` field, not the HTTP status code.\n\n| Status | Meaning |\n| --- | --- |\n| `0` | Successful API call (immediate or scheduled). |\n| `-1` | Invalid API key. |\n| `-2` | No phone number supplied. |\n| `-3` | Invalid phone number. |\n| `-4` | No agents available right now: including out of hours with overnight scheduling disabled. No lead or callback is queued. |\n| `-6` | No agents/caller route available after availability checks. |\n| `-5` | Duplicate number. |\n| `-7` | Credits limit exceeded. |\n| `-8` | Sorry Closed: an active global holiday applies and the relevant holiday scheduling permission is disabled. No lead or callback is created. |\n| `-11` | No available callback slot; choose a different time. |\n\nExample holiday rejection: `[{\"status\":\"-8\",\"msg\":\"Sorry Closed\"}]`.",
                                                     "operationId":  "callAgent",
                                                     "consumes":  [
                                                                      "application/x-www-form-urlencoded"
                                                                  ],
                                                     "produces":  [
                                                                      "application/json"
                                                                  ],
                                                     "parameters":  [
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "apikey",
                                                                            "type":  "string",
                                                                            "description":  "The `apikey` parameter is the `Widget API Key`",
                                                                            "required":  true
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "number",
                                                                            "type":  "string",
                                                                            "description":  "The `number` parameter specifies the phone number of the lead to call. The number is not allowed to contain spaces, dashes or parentheses. Include country code in the number (US Example: 12025248725 UK Example: 447481340516)",
                                                                            "required":  true
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "riq_lc_id",
                                                                            "type":  "integer",
                                                                            "format":  "int32",
                                                                            "description":  "The `riq_lc_id` parameter specifies the unique ID of the Lead Connect source. If specified the generated call will be associated with the Lead Connect source in the call reports.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "lead_reference_number",
                                                                            "type":  "string",
                                                                            "description":  "Your non-sensitive lead reference, used to reconcile rejected submissions in server logs (first 256 bytes). Keep the original request and API response for retries.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "firstname",
                                                                            "type":  "string",
                                                                            "description":  "The `firstname` parameter is the first name of the lead.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "lastname",
                                                                            "type":  "string",
                                                                            "description":  "The `lastname` parameter is the last name of the lead.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "email",
                                                                            "type":  "string",
                                                                            "description":  "The `email` parameter is the email of the lead.",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "gacliendid",
                                                                            "type":  "string",
                                                                            "description":  "The `gacliendid` parameter is the Google Analytic Client ID",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "schedule_call_on",
                                                                            "type":  "string",
                                                                            "description":  "The date and time the call should be scheduled on. The preferred format is ISO 8601. We do support other typical time formats as well, and will return an error if the format is not recognized.If the provided string does not includ timezone information we default to the widgetâ€™s timezone as configured in the widget settings.(Example values: \u00272022-09-27T10:30:00+01:00\u0027, \u00272022-09-27 10:30:00.000\u0027)",
                                                                            "required":  false
                                                                        },
                                                                        {
                                                                            "in":  "formData",
                                                                            "name":  "next_available_slot",
                                                                            "type":  "integer",
                                                                            "description":  "When requesting to schedule a call and thereâ€™s a call scheduled at the same time already, the `next_available_slot` parameter controls the behaviour in this case. If set to `1` (enabled) the call will be scheduled at the next available slot. If set to `0` (disabled) the request will return an error and not schedule the call.",
                                                                            "required":  false
                                                                        }
                                                                    ],
                                                     "responses":  {
                                                                       "200":  {
                                                                                   "description":  "Successful Operation"
                                                                               },
                                                                       "401":  {
                                                                                   "description":  "Authentication Error"
                                                                               },
                                                                       "500":  {
                                                                                   "description":  "Internal Error"
                                                                               }
                                                                   }
                                                 }
                                    },
                  "/apis/get-caller-id":  {
                                              "post":  {
                                                           "operationId":  "getCallerId",
                                                           "responses":  {
                                                                             "401":  {
                                                                                         "description":  "Authentication Error - Invalid token"
                                                                                     },
                                                                             "500":  {
                                                                                         "description":  "Internal Error"
                                                                                     },
                                                                             "400":  {
                                                                                         "description":  "Bad Request - Missing required parameters"
                                                                                     },
                                                                             "200":  {
                                                                                         "description":  "Successful Operation - Returns caller ID information for the specified widgets",
                                                                                         "schema":  {
                                                                                                        "$ref":  "#/definitions/CallerIdResponse"
                                                                                                    }
                                                                                     }
                                                                         },
                                                           "description":  "Retrieve caller ID information for widgets based on authentication token and widget API keys",
                                                           "summary":  "Get Caller ID Information",
                                                           "produces":  [
                                                                            "application/json"
                                                                        ],
                                                           "tags":  [
                                                                        "Calls"
                                                                    ],
                                                           "parameters":  [
                                                                              {
                                                                                  "description":  "The `token` parameter is the `Authorization Token` (32 characters long alphanumeric string value)",
                                                                                  "name":  "token",
                                                                                  "in":  "formData",
                                                                                  "type":  "string",
                                                                                  "required":  true
                                                                              },
                                                                              {
                                                                                  "description":  "The `widget_id` parameter is the `Widget API Key`. If you have multiple widgets, you can pass multiple `Widget API Keys` in comma separated format.",
                                                                                  "name":  "widget_id",
                                                                                  "in":  "formData",
                                                                                  "type":  "string",
                                                                                  "required":  true
                                                                              }
                                                                          ],
                                                           "consumes":  [
                                                                            "application/x-www-form-urlencoded"
                                                                        ]
                                                       }
                                          }
              },
    "definitions":  {
                        "CallCampaign":  {
                                             "type":  "object",
                                             "properties":  {
                                                                "campaign_name":  {
                                                                                      "type":  "string"
                                                                                  },
                                                                "schedule_type":  {
                                                                                      "type":  "string",
                                                                                      "description":  "Campaign schedule type",
                                                                                      "enum":  [
                                                                                                   "scheduled",
                                                                                                   "immediately"
                                                                                               ]
                                                                                  },
                                                                "start_date":  {
                                                                                   "type":  "string",
                                                                                   "format":  "date"
                                                                               },
                                                                "start_time":  {
                                                                                   "type":  "string",
                                                                                   "pattern":  "^(?:\\d|[01]\\d|2[0-3]):[0-5]\\d$"
                                                                               },
                                                                "end_time":  {
                                                                                 "type":  "string",
                                                                                 "pattern":  "^(?:\\d|[01]\\d|2[0-3]):[0-5]\\d$"
                                                                             },
                                                                "campaign_interval":  {
                                                                                          "type":  "integer",
                                                                                          "format":  "int32",
                                                                                          "minimum":  2
                                                                                      },
                                                                "duplicate_lead_check":  {
                                                                                             "type":  "boolean"
                                                                                         },
                                                                "duplicate_lead_check_days":  {
                                                                                                  "type":  "integer",
                                                                                                  "format":  "int32"
                                                                                              },
                                                                "future_schedule_calls_check":  {
                                                                                                    "type":  "boolean"
                                                                                                },
                                                                "future_schedule_calls_check_days":  {
                                                                                                         "type":  "integer",
                                                                                                         "format":  "int32"
                                                                                                     }
                                                            },
                                             "xml":  {
                                                         "name":  "CallCampaign"
                                                     }
                                         },
                        "SMSCampaign":  {
                                            "type":  "object",
                                            "properties":  {
                                                               "campaign_name":  {
                                                                                     "type":  "string"
                                                                                 },
                                                               "schedule_type":  {
                                                                                     "type":  "string",
                                                                                     "description":  "Campaign schedule type",
                                                                                     "enum":  [
                                                                                                  "scheduled",
                                                                                                  "immediately"
                                                                                              ]
                                                                                 },
                                                               "start_date":  {
                                                                                  "type":  "string",
                                                                                  "format":  "date"
                                                                              },
                                                               "start_time":  {
                                                                                  "type":  "string",
                                                                                  "pattern":  "^([0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"
                                                                              },
                                                               "end_time":  {
                                                                                "type":  "string",
                                                                                "pattern":  "^([0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"
                                                                            },
                                                               "template_id":  {
                                                                                   "type":  "integer",
                                                                                   "format":  "int32"
                                                                               },
                                                               "duplicate_lead_check":  {
                                                                                            "type":  "boolean"
                                                                                        },
                                                               "duplicate_lead_check_days":  {
                                                                                                 "type":  "integer",
                                                                                                 "format":  "int32"
                                                                                             },
                                                               "override_working_hours":  {
                                                                                              "type":  "boolean"
                                                                                          },
                                                               "send_all_immediately":  {
                                                                                            "type":  "boolean"
                                                                                        },
                                                               "sms_per_minute":  {
                                                                                      "type":  "integer",
                                                                                      "description":  "Per minute SMS",
                                                                                      "enum":  [
                                                                                                   10,
                                                                                                   15,
                                                                                                   20,
                                                                                                   25,
                                                                                                   30
                                                                                               ]
                                                                                  },
                                                               "reply_email":  {
                                                                                   "type":  "string",
                                                                                   "format":  "email"
                                                                               }
                                                           },
                                            "xml":  {
                                                        "name":  "SMSCampaign"
                                                    }
                                        },
                        "CampaignLead":  {
                                             "type":  "object",
                                             "properties":  {
                                                                "name":  {
                                                                             "type":  "string"
                                                                         },
                                                                "phone":  {
                                                                              "type":  "string",
                                                                              "minLength":  6,
                                                                              "maxLength":  15
                                                                          },
                                                                "email":  {
                                                                              "type":  "string"
                                                                          },
                                                                "expirydate":  {
                                                                                   "type":  "string",
                                                                                   "format":  "date"
                                                                               },
                                                                "preferreddate":  {
                                                                                      "type":  "string",
                                                                                      "format":  "date"
                                                                                  },
                                                                "custom1":  {
                                                                                "type":  "string"
                                                                            },
                                                                "custom2":  {
                                                                                "type":  "string"
                                                                            },
                                                                "custom3":  {
                                                                                "type":  "string"
                                                                            }
                                                            },
                                             "xml":  {
                                                         "name":  "CampaignLead"
                                                     }
                                         },
                        "CampaignCalls":  {
                                              "type":  "object",
                                              "properties":  {
                                                                 "offset":  {
                                                                                "type":  "integer",
                                                                                "format":  "int32",
                                                                                "example":  0
                                                                            },
                                                                 "limit":  {
                                                                               "type":  "integer",
                                                                               "format":  "int32",
                                                                               "example":  100
                                                                           },
                                                                 "from_datetime":  {
                                                                                       "type":  "string",
                                                                                       "format":  "date-time",
                                                                                       "example":  "2023-01-01 00:00:00"
                                                                                   },
                                                                 "to_datetime":  {
                                                                                     "type":  "string",
                                                                                     "format":  "date-time",
                                                                                     "example":  "2023-01-31 23:59:59"
                                                                                 }
                                                             },
                                              "xml":  {
                                                          "name":  "CampaignCalls"
                                                      }
                                          },
                        "CallReportResponse":  {
                                                   "type":  "object",
                                                   "description":  "Response structure for the call reports API. Fields marked as \u0027Optional\u0027 may be null or empty based on data availability.",
                                                   "properties":  {
                                                                      "recordsTotal":  {
                                                                                           "type":  "integer",
                                                                                           "description":  "Total number of call records returned"
                                                                                       },
                                                                      "data":  {
                                                                                   "type":  "array",
                                                                                   "items":  {
                                                                                                 "$ref":  "#/definitions/CallReportRecord"
                                                                                             }
                                                                               }
                                                                  },
                                                   "required":  [
                                                                    "recordsTotal",
                                                                    "data"
                                                                ]
                                               },
                        "CallReportRecord":  {
                                                 "type":  "object",
                                                 "description":  "Individual call record in the report. Optional fields may contain null values when underlying data is not available.",
                                                 "properties":  {
                                                                    "call_id":  {
                                                                                    "type":  "integer",
                                                                                    "description":  "Unique call identifier (Always present)"
                                                                                },
                                                                    "calllog_id":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "Call log identifier (Always present)"
                                                                                   },
                                                                    "visitor_id":  {
                                                                                       "type":  "integer",
                                                                                       "description":  "Visitor identifier (Always present)"
                                                                                   },
                                                                    "lead_id":  {
                                                                                    "type":  "integer",
                                                                                    "description":  "Lead identifier (Always present)"
                                                                                },
                                                                    "credits":  {
                                                                                    "type":  "number",
                                                                                    "description":  "Call credits consumed (Always present)"
                                                                                },
                                                                    "call_sid":  {
                                                                                     "type":  "string",
                                                                                     "description":  "Twilio call SID (Always present)"
                                                                                 },
                                                                    "created_on":  {
                                                                                       "type":  "string",
                                                                                       "format":  "date-time",
                                                                                       "description":  "Call creation timestamp (Always present)"
                                                                                   },
                                                                    "created_on_iso":  {
                                                                                           "type":  "string",
                                                                                           "format":  "date-time",
                                                                                           "description":  "Call creation timestamp in ISO format (Always present)"
                                                                                       },
                                                                    "referrer_id":  {
                                                                                        "type":  "integer",
                                                                                        "description":  "Referrer identifier (Always present)"
                                                                                    },
                                                                    "called_status":  {
                                                                                          "type":  "string",
                                                                                          "description":  "Current call status (Always present)"
                                                                                      },
                                                                    "call_start_time":  {
                                                                                            "type":  "string",
                                                                                            "format":  "date-time",
                                                                                            "description":  "Call start time (Always present)"
                                                                                        },
                                                                    "call_duration":  {
                                                                                          "type":  "integer",
                                                                                          "description":  "Call duration in seconds (Always present)"
                                                                                      },
                                                                    "scheduled_call":  {
                                                                                           "type":  "string",
                                                                                           "description":  "Scheduled callback date and time when one exists; otherwise null (Always present)",
                                                                                           "x-nullable":  true
                                                                                       },
                                                                    "conversion":  {
                                                                                       "type":  "boolean",
                                                                                       "description":  "Whether call was converted (Always present)"
                                                                                   },
                                                                    "country_name":  {
                                                                                         "type":  "string",
                                                                                         "description":  "Visitor country name (Optional - may be null)"
                                                                                     },
                                                                    "call_source":  {
                                                                                        "type":  "string",
                                                                                        "description":  "Source of the call (Widget/API/Campaign/etc)"
                                                                                    },
                                                                    "device":  {
                                                                                   "type":  "string",
                                                                                   "description":  "Visitor device type (Optional - may be null)"
                                                                               },
                                                                    "browser":  {
                                                                                    "type":  "string",
                                                                                    "description":  "Visitor browser (Optional - may be null)"
                                                                                },
                                                                    "city":  {
                                                                                 "type":  "string",
                                                                                 "description":  "Visitor city (Optional - may be null)"
                                                                             },
                                                                    "recording_download_link":  {
                                                                                                    "type":  "string",
                                                                                                    "description":  "Call recording URL (Optional - may be null)"
                                                                                                },
                                                                    "crm_contact_url":  {
                                                                                            "type":  "string",
                                                                                            "description":  "CRM contact URL (Optional - may be null)"
                                                                                        },
                                                                    "referrer_url":  {
                                                                                         "type":  "string",
                                                                                         "description":  "Referrer URL or \u0027Direct\u0027 (Optional)"
                                                                                     },
                                                                    "visitor_url":  {
                                                                                        "type":  "string",
                                                                                        "description":  "Visitor page URL (Optional - may be null)"
                                                                                    },
                                                                    "utm_source":  {
                                                                                       "type":  "string",
                                                                                       "description":  "UTM source parameter (Optional - may be null)"
                                                                                   },
                                                                    "utm_medium":  {
                                                                                       "type":  "string",
                                                                                       "description":  "UTM medium parameter (Optional - may be null)"
                                                                                   },
                                                                    "utm_campaign":  {
                                                                                         "type":  "string",
                                                                                         "description":  "UTM campaign parameter (Optional - may be null)"
                                                                                     },
                                                                    "utm_keyword":  {
                                                                                        "type":  "string",
                                                                                        "description":  "UTM keyword parameter (Optional - may be null)"
                                                                                    },
                                                                    "utm_content":  {
                                                                                        "type":  "string",
                                                                                        "description":  "UTM content parameter (Optional - may be null)"
                                                                                    },
                                                                    "clid":  {
                                                                                 "type":  "string",
                                                                                 "description":  "Click ID (gclid/fbclid/msclkid) (Optional - may be null)"
                                                                             },
                                                                    "attribution":  {
                                                                                        "type":  "string",
                                                                                        "description":  "Attribution data json string (Optional - may be empty)"
                                                                                    },
                                                                    "attribution_encoded":  {
                                                                                                "type":  "object",
                                                                                                "description":  "Attribution data object containing first and last click information (Optional - may be empty)",
                                                                                                "properties":  {
                                                                                                                   "first_click":  {
                                                                                                                                       "type":  "object",
                                                                                                                                       "description":  "First click attribution data (Optional)",
                                                                                                                                       "properties":  {
                                                                                                                                                          "source":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Traffic source (Optional - e.g., google)"
                                                                                                                                                                     },
                                                                                                                                                          "medium":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Traffic medium (Optional - e.g., cpc)"
                                                                                                                                                                     },
                                                                                                                                                          "channel":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Marketing channel (Optional - e.g., Paid Search)"
                                                                                                                                                                      },
                                                                                                                                                          "campaign":  {
                                                                                                                                                                           "type":  "string",
                                                                                                                                                                           "description":  "Campaign identifier (Optional)"
                                                                                                                                                                       },
                                                                                                                                                          "referrer":  {
                                                                                                                                                                           "type":  "string",
                                                                                                                                                                           "description":  "Referrer URL (Optional)"
                                                                                                                                                                       },
                                                                                                                                                          "keyword":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Search keyword or term (Optional)"
                                                                                                                                                                      },
                                                                                                                                                          "content":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Ad content identifier (Optional)"
                                                                                                                                                                      },
                                                                                                                                                          "url":  {
                                                                                                                                                                      "type":  "string",
                                                                                                                                                                      "description":  "Landing page URL (Optional)"
                                                                                                                                                                  },
                                                                                                                                                          "gclid":  {
                                                                                                                                                                        "type":  "string",
                                                                                                                                                                        "description":  "Google Click ID (Optional)"
                                                                                                                                                                    },
                                                                                                                                                          "msclkid":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Microsoft Click ID (Optional)"
                                                                                                                                                                      }
                                                                                                                                                      }
                                                                                                                                   },
                                                                                                                   "last_click":  {
                                                                                                                                      "type":  "object",
                                                                                                                                      "description":  "Last click attribution data (Optional)",
                                                                                                                                      "properties":  {
                                                                                                                                                         "source":  {
                                                                                                                                                                        "type":  "string",
                                                                                                                                                                        "description":  "Traffic source (Optional - e.g., google)"
                                                                                                                                                                    },
                                                                                                                                                         "medium":  {
                                                                                                                                                                        "type":  "string",
                                                                                                                                                                        "description":  "Traffic medium (Optional - e.g., cpc)"
                                                                                                                                                                    },
                                                                                                                                                         "channel":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Marketing channel (Optional - e.g., Paid Search)"
                                                                                                                                                                     },
                                                                                                                                                         "campaign":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Campaign identifier (Optional)"
                                                                                                                                                                      },
                                                                                                                                                         "referrer":  {
                                                                                                                                                                          "type":  "string",
                                                                                                                                                                          "description":  "Referrer URL (Optional)"
                                                                                                                                                                      },
                                                                                                                                                         "keyword":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Search keyword or term (Optional)"
                                                                                                                                                                     },
                                                                                                                                                         "content":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Ad content identifier (Optional)"
                                                                                                                                                                     },
                                                                                                                                                         "url":  {
                                                                                                                                                                     "type":  "string",
                                                                                                                                                                     "description":  "Landing page URL (Optional)"
                                                                                                                                                                 },
                                                                                                                                                         "gclid":  {
                                                                                                                                                                       "type":  "string",
                                                                                                                                                                       "description":  "Google Click ID (Optional)"
                                                                                                                                                                   },
                                                                                                                                                         "msclkid":  {
                                                                                                                                                                         "type":  "string",
                                                                                                                                                                         "description":  "Microsoft Click ID (Optional)"
                                                                                                                                                                     }
                                                                                                                                                     }
                                                                                                                                  }
                                                                                                               }
                                                                                            },
                                                                    "outcome":  {
                                                                                    "type":  "string",
                                                                                    "description":  "Call outcome (Optional - may be empty)"
                                                                                },
                                                                    "context":  {
                                                                                    "type":  "object",
                                                                                    "description":  "Call context data (Optional)"
                                                                                },
                                                                    "webhook":  {
                                                                                    "type":  "object",
                                                                                    "description":  "Webhook data structure",
                                                                                    "properties":  {
                                                                                                       "widget_information":  {
                                                                                                                                  "type":  "object",
                                                                                                                                  "properties":  {
                                                                                                                                                     "widget_url":  {
                                                                                                                                                                        "type":  "string"
                                                                                                                                                                    },
                                                                                                                                                     "widget_title":  {
                                                                                                                                                                          "type":  "string"
                                                                                                                                                                      },
                                                                                                                                                     "widget_id":  {
                                                                                                                                                                       "type":  "string"
                                                                                                                                                                   }
                                                                                                                                                 }
                                                                                                                              },
                                                                                                       "call_information":  {
                                                                                                                                "type":  "object",
                                                                                                                                "properties":  {
                                                                                                                                                   "dialcallstatus":  {
                                                                                                                                                                          "type":  "string"
                                                                                                                                                                      },
                                                                                                                                                   "agent_id":  {
                                                                                                                                                                    "type":  "integer"
                                                                                                                                                                },
                                                                                                                                                   "agent_name":  {
                                                                                                                                                                      "type":  "string"
                                                                                                                                                                  }
                                                                                                                                               }
                                                                                                                            },
                                                                                                       "other_information":  {
                                                                                                                                 "type":  "object",
                                                                                                                                 "properties":  {
                                                                                                                                                    "lead_phone":  {
                                                                                                                                                                       "type":  "string"
                                                                                                                                                                   },
                                                                                                                                                    "lead_name":  {
                                                                                                                                                                      "type":  "string",
                                                                                                                                                                      "description":  "Optional - only if available"
                                                                                                                                                                  },
                                                                                                                                                    "lead_email":  {
                                                                                                                                                                       "type":  "string",
                                                                                                                                                                       "description":  "Optional - only if available"
                                                                                                                                                                   },
                                                                                                                                                    "querystring":  {
                                                                                                                                                                        "type":  "string"
                                                                                                                                                                    },
                                                                                                                                                    "retry_response_time":  {
                                                                                                                                                                                "type":  "string"
                                                                                                                                                                            },
                                                                                                                                                    "leadbody":  {
                                                                                                                                                                     "type":  "string"
                                                                                                                                                                 },
                                                                                                                                                    "lead_type":  {
                                                                                                                                                                      "type":  "string"
                                                                                                                                                                  },
                                                                                                                                                    "note":  {
                                                                                                                                                                 "type":  "string"
                                                                                                                                                             },
                                                                                                                                                    "parentcallsid":  {
                                                                                                                                                                          "type":  "string"
                                                                                                                                                                      },
                                                                                                                                                    "submitted_in_hours":  {
                                                                                                                                                                                   "type":  "string",
                                                                                                                                                                                   "enum":  [
                                                                                                                                                                                                "Y",
                                                                                                                                                                                                "N",
                                                                                                                                                                                                ""
                                                                                                                                                                                            ],
                                                                                                                                                                                   "description":  "Whether the enquiry was submitted during an open schedule window. Blank when the persisted source data cannot answer reliably."
                                                                                                                                                                      }
                                                                                                                                                }
                                                                                                                             }
                                                                                                   }
                                                                                }
                                                                },
                                                 "required":  [
                                                                  "call_id",
                                                                  "calllog_id",
                                                                  "visitor_id",
                                                                  "lead_id",
                                                                  "credits",
                                                                  "call_sid",
                                                                  "created_on",
                                                                  "created_on_iso",
                                                                  "referrer_id",
                                                                  "called_status",
                                                                  "call_start_time",
                                                                  "call_duration",
                                                                  "scheduled_call",
                                                                  "conversion",
                                                                  "webhook"
                                                              ]
                                             },
                        "CallerIdResponse":  {
                                                 "properties":  {
                                                                    "data":  {
                                                                                 "description":  "Array of widget caller ID information",
                                                                                 "items":  {
                                                                                               "$ref":  "#/definitions/WidgetCallerIdInfo"
                                                                                           },
                                                                                 "type":  "array"
                                                                             },
                                                                    "message":  {
                                                                                    "type":  "string",
                                                                                    "description":  "Human-readable response message"
                                                                                },
                                                                    "company_id":  {
                                                                                       "format":  "int32",
                                                                                       "description":  "ID of the authenticated company",
                                                                                       "type":  "integer"
                                                                                   },
                                                                    "total_widgets":  {
                                                                                          "format":  "int32",
                                                                                          "description":  "Number of widgets processed",
                                                                                          "type":  "integer"
                                                                                      },
                                                                    "company_name":  {
                                                                                         "type":  "string",
                                                                                         "description":  "Name of the authenticated company"
                                                                                     },
                                                                    "status":  {
                                                                                   "enum":  [
                                                                                                "success",
                                                                                                "error"
                                                                                            ],
                                                                                   "description":  "Response status: success or error",
                                                                                   "type":  "string"
                                                                               }
                                                                },
                                                 "xml":  {
                                                             "name":  "CallerIdResponse"
                                                         },
                                                 "type":  "object"
                                             },
                        "WidgetCallerIdInfo":  {
                                                   "properties":  {
                                                                      "widget_id":  {
                                                                                        "format":  "int32",
                                                                                        "description":  "Internal widget ID",
                                                                                        "type":  "integer"
                                                                                    },
                                                                      "widget_api_key":  {
                                                                                             "type":  "string",
                                                                                             "description":  "The widget API key that was requested"
                                                                                         },
                                                                      "caller_id":  {
                                                                                        "description":  "Phone number for primary caller ID",
                                                                                        "type":  "string",
                                                                                        "x-nullable":  true
                                                                                    },
                                                                      "widget_token":  {
                                                                                           "type":  "string",
                                                                                           "description":  "Widget token for internal use"
                                                                                       },
                                                                      "widget_title":  {
                                                                                           "type":  "string",
                                                                                           "description":  "Widget title/name"
                                                                                       },
                                                                      "status":  {
                                                                                     "enum":  [
                                                                                                  "success",
                                                                                                  "error"
                                                                                              ],
                                                                                     "description":  "Widget processing status: success or error",
                                                                                     "type":  "string"
                                                                                 },
                                                                      "lead_caller_id":  {
                                                                                             "description":  "Phone number for lead caller ID",
                                                                                             "type":  "string",
                                                                                             "x-nullable":  true
                                                                                         },
                                                                      "message":  {
                                                                                      "type":  "string",
                                                                                      "description":  "Widget-specific message"
                                                                                  }
                                                                  },
                                                   "xml":  {
                                                               "name":  "WidgetCallerIdInfo"
                                                           },
                                                   "type":  "object"
                                               }
                    }
}
