{
  "openapi": "3.1.0",
  "info": {
    "title": "DCDial API",
    "version": "2.0",
    "description": "Every operation is a POST to the base URL; the `type` field selects it. See https://apidocs.dcdial.com/"
  },
  "servers": [
    {
      "url": "https://api-qa.dcdial.com/api/",
      "description": "QA"
    },
    {
      "url": "https://api.dcdial.com/api/",
      "description": "Production"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "operationId": "call",
        "summary": "Call an operation (selected by type)",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/login_user"
                  },
                  {
                    "$ref": "#/components/schemas/play_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/pause_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/stop_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaigns"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_settings"
                  },
                  {
                    "$ref": "#/components/schemas/update_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/dial_number"
                  },
                  {
                    "$ref": "#/components/schemas/add_account"
                  },
                  {
                    "$ref": "#/components/schemas/fetch_accounts"
                  },
                  {
                    "$ref": "#/components/schemas/get_list"
                  },
                  {
                    "$ref": "#/components/schemas/get_lists"
                  },
                  {
                    "$ref": "#/components/schemas/change_status"
                  },
                  {
                    "$ref": "#/components/schemas/search_lead"
                  },
                  {
                    "$ref": "#/components/schemas/add_leads"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_lists"
                  },
                  {
                    "$ref": "#/components/schemas/upload_file"
                  },
                  {
                    "$ref": "#/components/schemas/get_results"
                  },
                  {
                    "$ref": "#/components/schemas/add_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/delete_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/get_dncs"
                  },
                  {
                    "$ref": "#/components/schemas/campaign_summary"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_graph_data"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_graphs"
                  },
                  {
                    "$ref": "#/components/schemas/get_usage"
                  },
                  {
                    "$ref": "#/components/schemas/get_dashboard_stats"
                  },
                  {
                    "$ref": "#/components/schemas/list_ivrs"
                  },
                  {
                    "$ref": "#/components/schemas/add_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/delete_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/get_queues"
                  },
                  {
                    "$ref": "#/components/schemas/add_queue"
                  },
                  {
                    "$ref": "#/components/schemas/delete_queue"
                  },
                  {
                    "$ref": "#/components/schemas/add_user"
                  },
                  {
                    "$ref": "#/components/schemas/change_password"
                  },
                  {
                    "$ref": "#/components/schemas/get_profile"
                  },
                  {
                    "$ref": "#/components/schemas/update_profile"
                  },
                  {
                    "$ref": "#/components/schemas/check_permission"
                  },
                  {
                    "$ref": "#/components/schemas/set_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/clear_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications_settings"
                  },
                  {
                    "$ref": "#/components/schemas/create_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/agreement_details"
                  },
                  {
                    "$ref": "#/components/schemas/get_schedules"
                  },
                  {
                    "$ref": "#/components/schemas/get_agreement_doc"
                  },
                  {
                    "$ref": "#/components/schemas/cancel_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/add_payment"
                  },
                  {
                    "$ref": "#/components/schemas/remove_payment"
                  },
                  {
                    "$ref": "#/components/schemas/payment_refund"
                  },
                  {
                    "$ref": "#/components/schemas/charge_customer"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_link"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_status"
                  },
                  {
                    "$ref": "#/components/schemas/send_text_message"
                  },
                  {
                    "$ref": "#/components/schemas/retrieve_sent_messages"
                  },
                  {
                    "$ref": "#/components/schemas/get_content"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "login_user": "#/components/schemas/login_user",
                    "play_campaign": "#/components/schemas/play_campaign",
                    "pause_campaign": "#/components/schemas/pause_campaign",
                    "stop_campaign": "#/components/schemas/stop_campaign",
                    "get_campaigns": "#/components/schemas/get_campaigns",
                    "get_campaign_settings": "#/components/schemas/get_campaign_settings",
                    "update_campaign": "#/components/schemas/update_campaign",
                    "dial_number": "#/components/schemas/dial_number",
                    "add_account": "#/components/schemas/add_account",
                    "fetch_accounts": "#/components/schemas/fetch_accounts",
                    "get_list": "#/components/schemas/get_list",
                    "get_lists": "#/components/schemas/get_lists",
                    "change_status": "#/components/schemas/change_status",
                    "search_lead": "#/components/schemas/search_lead",
                    "add_leads": "#/components/schemas/add_leads",
                    "get_campaign_lists": "#/components/schemas/get_campaign_lists",
                    "upload_file": "#/components/schemas/upload_file",
                    "get_results": "#/components/schemas/get_results",
                    "add_dnc": "#/components/schemas/add_dnc",
                    "delete_dnc": "#/components/schemas/delete_dnc",
                    "get_dncs": "#/components/schemas/get_dncs",
                    "campaign_summary": "#/components/schemas/campaign_summary",
                    "get_all_stats": "#/components/schemas/get_all_stats",
                    "get_graph_data": "#/components/schemas/get_graph_data",
                    "get_campaign_stats": "#/components/schemas/get_campaign_stats",
                    "get_all_graphs": "#/components/schemas/get_all_graphs",
                    "get_usage": "#/components/schemas/get_usage",
                    "get_dashboard_stats": "#/components/schemas/get_dashboard_stats",
                    "list_ivrs": "#/components/schemas/list_ivrs",
                    "add_ivr": "#/components/schemas/add_ivr",
                    "delete_ivr": "#/components/schemas/delete_ivr",
                    "get_queues": "#/components/schemas/get_queues",
                    "add_queue": "#/components/schemas/add_queue",
                    "delete_queue": "#/components/schemas/delete_queue",
                    "add_user": "#/components/schemas/add_user",
                    "change_password": "#/components/schemas/change_password",
                    "get_profile": "#/components/schemas/get_profile",
                    "update_profile": "#/components/schemas/update_profile",
                    "check_permission": "#/components/schemas/check_permission",
                    "set_notifications": "#/components/schemas/set_notifications",
                    "get_notifications": "#/components/schemas/get_notifications",
                    "clear_notifications": "#/components/schemas/clear_notifications",
                    "get_notifications_settings": "#/components/schemas/get_notifications_settings",
                    "create_payment_plan": "#/components/schemas/create_payment_plan",
                    "agreement_details": "#/components/schemas/agreement_details",
                    "get_schedules": "#/components/schemas/get_schedules",
                    "get_agreement_doc": "#/components/schemas/get_agreement_doc",
                    "cancel_payment_plan": "#/components/schemas/cancel_payment_plan",
                    "add_payment": "#/components/schemas/add_payment",
                    "remove_payment": "#/components/schemas/remove_payment",
                    "payment_refund": "#/components/schemas/payment_refund",
                    "charge_customer": "#/components/schemas/charge_customer",
                    "get_payment_link": "#/components/schemas/get_payment_link",
                    "get_payment_status": "#/components/schemas/get_payment_status",
                    "send_text_message": "#/components/schemas/send_text_message",
                    "retrieve_sent_messages": "#/components/schemas/retrieve_sent_messages",
                    "get_content": "#/components/schemas/get_content"
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/login_user"
                  },
                  {
                    "$ref": "#/components/schemas/play_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/pause_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/stop_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaigns"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_settings"
                  },
                  {
                    "$ref": "#/components/schemas/update_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/dial_number"
                  },
                  {
                    "$ref": "#/components/schemas/add_account"
                  },
                  {
                    "$ref": "#/components/schemas/fetch_accounts"
                  },
                  {
                    "$ref": "#/components/schemas/get_list"
                  },
                  {
                    "$ref": "#/components/schemas/get_lists"
                  },
                  {
                    "$ref": "#/components/schemas/change_status"
                  },
                  {
                    "$ref": "#/components/schemas/search_lead"
                  },
                  {
                    "$ref": "#/components/schemas/add_leads"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_lists"
                  },
                  {
                    "$ref": "#/components/schemas/upload_file"
                  },
                  {
                    "$ref": "#/components/schemas/get_results"
                  },
                  {
                    "$ref": "#/components/schemas/add_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/delete_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/get_dncs"
                  },
                  {
                    "$ref": "#/components/schemas/campaign_summary"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_graph_data"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_graphs"
                  },
                  {
                    "$ref": "#/components/schemas/get_usage"
                  },
                  {
                    "$ref": "#/components/schemas/get_dashboard_stats"
                  },
                  {
                    "$ref": "#/components/schemas/list_ivrs"
                  },
                  {
                    "$ref": "#/components/schemas/add_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/delete_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/get_queues"
                  },
                  {
                    "$ref": "#/components/schemas/add_queue"
                  },
                  {
                    "$ref": "#/components/schemas/delete_queue"
                  },
                  {
                    "$ref": "#/components/schemas/add_user"
                  },
                  {
                    "$ref": "#/components/schemas/change_password"
                  },
                  {
                    "$ref": "#/components/schemas/get_profile"
                  },
                  {
                    "$ref": "#/components/schemas/update_profile"
                  },
                  {
                    "$ref": "#/components/schemas/check_permission"
                  },
                  {
                    "$ref": "#/components/schemas/set_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/clear_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications_settings"
                  },
                  {
                    "$ref": "#/components/schemas/create_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/agreement_details"
                  },
                  {
                    "$ref": "#/components/schemas/get_schedules"
                  },
                  {
                    "$ref": "#/components/schemas/get_agreement_doc"
                  },
                  {
                    "$ref": "#/components/schemas/cancel_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/add_payment"
                  },
                  {
                    "$ref": "#/components/schemas/remove_payment"
                  },
                  {
                    "$ref": "#/components/schemas/payment_refund"
                  },
                  {
                    "$ref": "#/components/schemas/charge_customer"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_link"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_status"
                  },
                  {
                    "$ref": "#/components/schemas/send_text_message"
                  },
                  {
                    "$ref": "#/components/schemas/retrieve_sent_messages"
                  },
                  {
                    "$ref": "#/components/schemas/get_content"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "login_user": "#/components/schemas/login_user",
                    "play_campaign": "#/components/schemas/play_campaign",
                    "pause_campaign": "#/components/schemas/pause_campaign",
                    "stop_campaign": "#/components/schemas/stop_campaign",
                    "get_campaigns": "#/components/schemas/get_campaigns",
                    "get_campaign_settings": "#/components/schemas/get_campaign_settings",
                    "update_campaign": "#/components/schemas/update_campaign",
                    "dial_number": "#/components/schemas/dial_number",
                    "add_account": "#/components/schemas/add_account",
                    "fetch_accounts": "#/components/schemas/fetch_accounts",
                    "get_list": "#/components/schemas/get_list",
                    "get_lists": "#/components/schemas/get_lists",
                    "change_status": "#/components/schemas/change_status",
                    "search_lead": "#/components/schemas/search_lead",
                    "add_leads": "#/components/schemas/add_leads",
                    "get_campaign_lists": "#/components/schemas/get_campaign_lists",
                    "upload_file": "#/components/schemas/upload_file",
                    "get_results": "#/components/schemas/get_results",
                    "add_dnc": "#/components/schemas/add_dnc",
                    "delete_dnc": "#/components/schemas/delete_dnc",
                    "get_dncs": "#/components/schemas/get_dncs",
                    "campaign_summary": "#/components/schemas/campaign_summary",
                    "get_all_stats": "#/components/schemas/get_all_stats",
                    "get_graph_data": "#/components/schemas/get_graph_data",
                    "get_campaign_stats": "#/components/schemas/get_campaign_stats",
                    "get_all_graphs": "#/components/schemas/get_all_graphs",
                    "get_usage": "#/components/schemas/get_usage",
                    "get_dashboard_stats": "#/components/schemas/get_dashboard_stats",
                    "list_ivrs": "#/components/schemas/list_ivrs",
                    "add_ivr": "#/components/schemas/add_ivr",
                    "delete_ivr": "#/components/schemas/delete_ivr",
                    "get_queues": "#/components/schemas/get_queues",
                    "add_queue": "#/components/schemas/add_queue",
                    "delete_queue": "#/components/schemas/delete_queue",
                    "add_user": "#/components/schemas/add_user",
                    "change_password": "#/components/schemas/change_password",
                    "get_profile": "#/components/schemas/get_profile",
                    "update_profile": "#/components/schemas/update_profile",
                    "check_permission": "#/components/schemas/check_permission",
                    "set_notifications": "#/components/schemas/set_notifications",
                    "get_notifications": "#/components/schemas/get_notifications",
                    "clear_notifications": "#/components/schemas/clear_notifications",
                    "get_notifications_settings": "#/components/schemas/get_notifications_settings",
                    "create_payment_plan": "#/components/schemas/create_payment_plan",
                    "agreement_details": "#/components/schemas/agreement_details",
                    "get_schedules": "#/components/schemas/get_schedules",
                    "get_agreement_doc": "#/components/schemas/get_agreement_doc",
                    "cancel_payment_plan": "#/components/schemas/cancel_payment_plan",
                    "add_payment": "#/components/schemas/add_payment",
                    "remove_payment": "#/components/schemas/remove_payment",
                    "payment_refund": "#/components/schemas/payment_refund",
                    "charge_customer": "#/components/schemas/charge_customer",
                    "get_payment_link": "#/components/schemas/get_payment_link",
                    "get_payment_status": "#/components/schemas/get_payment_status",
                    "send_text_message": "#/components/schemas/send_text_message",
                    "retrieve_sent_messages": "#/components/schemas/retrieve_sent_messages",
                    "get_content": "#/components/schemas/get_content"
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/login_user"
                  },
                  {
                    "$ref": "#/components/schemas/play_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/pause_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/stop_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaigns"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_settings"
                  },
                  {
                    "$ref": "#/components/schemas/update_campaign"
                  },
                  {
                    "$ref": "#/components/schemas/dial_number"
                  },
                  {
                    "$ref": "#/components/schemas/add_account"
                  },
                  {
                    "$ref": "#/components/schemas/fetch_accounts"
                  },
                  {
                    "$ref": "#/components/schemas/get_list"
                  },
                  {
                    "$ref": "#/components/schemas/get_lists"
                  },
                  {
                    "$ref": "#/components/schemas/change_status"
                  },
                  {
                    "$ref": "#/components/schemas/search_lead"
                  },
                  {
                    "$ref": "#/components/schemas/add_leads"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_lists"
                  },
                  {
                    "$ref": "#/components/schemas/upload_file"
                  },
                  {
                    "$ref": "#/components/schemas/get_results"
                  },
                  {
                    "$ref": "#/components/schemas/add_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/delete_dnc"
                  },
                  {
                    "$ref": "#/components/schemas/get_dncs"
                  },
                  {
                    "$ref": "#/components/schemas/campaign_summary"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_graph_data"
                  },
                  {
                    "$ref": "#/components/schemas/get_campaign_stats"
                  },
                  {
                    "$ref": "#/components/schemas/get_all_graphs"
                  },
                  {
                    "$ref": "#/components/schemas/get_usage"
                  },
                  {
                    "$ref": "#/components/schemas/get_dashboard_stats"
                  },
                  {
                    "$ref": "#/components/schemas/list_ivrs"
                  },
                  {
                    "$ref": "#/components/schemas/add_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/delete_ivr"
                  },
                  {
                    "$ref": "#/components/schemas/get_queues"
                  },
                  {
                    "$ref": "#/components/schemas/add_queue"
                  },
                  {
                    "$ref": "#/components/schemas/delete_queue"
                  },
                  {
                    "$ref": "#/components/schemas/add_user"
                  },
                  {
                    "$ref": "#/components/schemas/change_password"
                  },
                  {
                    "$ref": "#/components/schemas/get_profile"
                  },
                  {
                    "$ref": "#/components/schemas/update_profile"
                  },
                  {
                    "$ref": "#/components/schemas/check_permission"
                  },
                  {
                    "$ref": "#/components/schemas/set_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/clear_notifications"
                  },
                  {
                    "$ref": "#/components/schemas/get_notifications_settings"
                  },
                  {
                    "$ref": "#/components/schemas/create_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/agreement_details"
                  },
                  {
                    "$ref": "#/components/schemas/get_schedules"
                  },
                  {
                    "$ref": "#/components/schemas/get_agreement_doc"
                  },
                  {
                    "$ref": "#/components/schemas/cancel_payment_plan"
                  },
                  {
                    "$ref": "#/components/schemas/add_payment"
                  },
                  {
                    "$ref": "#/components/schemas/remove_payment"
                  },
                  {
                    "$ref": "#/components/schemas/payment_refund"
                  },
                  {
                    "$ref": "#/components/schemas/charge_customer"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_link"
                  },
                  {
                    "$ref": "#/components/schemas/get_payment_status"
                  },
                  {
                    "$ref": "#/components/schemas/send_text_message"
                  },
                  {
                    "$ref": "#/components/schemas/retrieve_sent_messages"
                  },
                  {
                    "$ref": "#/components/schemas/get_content"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "login_user": "#/components/schemas/login_user",
                    "play_campaign": "#/components/schemas/play_campaign",
                    "pause_campaign": "#/components/schemas/pause_campaign",
                    "stop_campaign": "#/components/schemas/stop_campaign",
                    "get_campaigns": "#/components/schemas/get_campaigns",
                    "get_campaign_settings": "#/components/schemas/get_campaign_settings",
                    "update_campaign": "#/components/schemas/update_campaign",
                    "dial_number": "#/components/schemas/dial_number",
                    "add_account": "#/components/schemas/add_account",
                    "fetch_accounts": "#/components/schemas/fetch_accounts",
                    "get_list": "#/components/schemas/get_list",
                    "get_lists": "#/components/schemas/get_lists",
                    "change_status": "#/components/schemas/change_status",
                    "search_lead": "#/components/schemas/search_lead",
                    "add_leads": "#/components/schemas/add_leads",
                    "get_campaign_lists": "#/components/schemas/get_campaign_lists",
                    "upload_file": "#/components/schemas/upload_file",
                    "get_results": "#/components/schemas/get_results",
                    "add_dnc": "#/components/schemas/add_dnc",
                    "delete_dnc": "#/components/schemas/delete_dnc",
                    "get_dncs": "#/components/schemas/get_dncs",
                    "campaign_summary": "#/components/schemas/campaign_summary",
                    "get_all_stats": "#/components/schemas/get_all_stats",
                    "get_graph_data": "#/components/schemas/get_graph_data",
                    "get_campaign_stats": "#/components/schemas/get_campaign_stats",
                    "get_all_graphs": "#/components/schemas/get_all_graphs",
                    "get_usage": "#/components/schemas/get_usage",
                    "get_dashboard_stats": "#/components/schemas/get_dashboard_stats",
                    "list_ivrs": "#/components/schemas/list_ivrs",
                    "add_ivr": "#/components/schemas/add_ivr",
                    "delete_ivr": "#/components/schemas/delete_ivr",
                    "get_queues": "#/components/schemas/get_queues",
                    "add_queue": "#/components/schemas/add_queue",
                    "delete_queue": "#/components/schemas/delete_queue",
                    "add_user": "#/components/schemas/add_user",
                    "change_password": "#/components/schemas/change_password",
                    "get_profile": "#/components/schemas/get_profile",
                    "update_profile": "#/components/schemas/update_profile",
                    "check_permission": "#/components/schemas/check_permission",
                    "set_notifications": "#/components/schemas/set_notifications",
                    "get_notifications": "#/components/schemas/get_notifications",
                    "clear_notifications": "#/components/schemas/clear_notifications",
                    "get_notifications_settings": "#/components/schemas/get_notifications_settings",
                    "create_payment_plan": "#/components/schemas/create_payment_plan",
                    "agreement_details": "#/components/schemas/agreement_details",
                    "get_schedules": "#/components/schemas/get_schedules",
                    "get_agreement_doc": "#/components/schemas/get_agreement_doc",
                    "cancel_payment_plan": "#/components/schemas/cancel_payment_plan",
                    "add_payment": "#/components/schemas/add_payment",
                    "remove_payment": "#/components/schemas/remove_payment",
                    "payment_refund": "#/components/schemas/payment_refund",
                    "charge_customer": "#/components/schemas/charge_customer",
                    "get_payment_link": "#/components/schemas/get_payment_link",
                    "get_payment_status": "#/components/schemas/get_payment_status",
                    "send_text_message": "#/components/schemas/send_text_message",
                    "retrieve_sent_messages": "#/components/schemas/retrieve_sent_messages",
                    "get_content": "#/components/schemas/get_content"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success or failure; check response.success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        },
                        "error": {
                          "type": "string"
                        },
                        "tech_msg": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "login_user": {
        "title": "Log in",
        "description": "Exchanges a DCDial username and password for an API token. Send the token as the token field on every other request.\n\nDocs: https://apidocs.dcdial.com/reference/authentication/login/",
        "type": "object",
        "x-dcdial-group": "Authentication",
        "properties": {
          "type": {
            "type": "string",
            "const": "login_user",
            "description": "Operation selector."
          },
          "user": {
            "type": "string",
            "description": "Your DCDial username.",
            "examples": [
              "jane.doe"
            ]
          },
          "pass": {
            "type": "string",
            "description": "Your DCDial password.",
            "examples": [
              "your-password"
            ]
          },
          "hours": {
            "type": "integer",
            "description": "How long the token stays valid, in hours. Defaults to 12. Every authenticated request extends it.",
            "examples": [
              12
            ]
          }
        },
        "required": [
          "type",
          "user",
          "pass"
        ]
      },
      "play_campaign": {
        "title": "Play campaign",
        "description": "Starts outbound dialing for a campaign. It keeps dialing until you pause or stop it, or until it runs out of accounts to call.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/play-campaign/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "play_campaign",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "pause_campaign": {
        "title": "Pause campaign",
        "description": "Suspends outbound dialing for a running campaign. Calls already in progress finish normally.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/pause-campaign/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "pause_campaign",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "stop_campaign": {
        "title": "Stop campaign",
        "description": "Stops a running or paused campaign, deactivates it and clears its dialing queue.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/stop-campaign/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "stop_campaign",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "get_campaigns": {
        "title": "List campaigns",
        "description": "Lists the campaigns you can access, newest first, with their status.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/list-campaigns/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_campaigns",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "get_campaign_settings": {
        "title": "Get campaign settings",
        "description": "Returns a campaign’s settings (dial method, caller ID, calling hours, answering-machine detection, recording and more), each with its current value and the allowed options.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/get-campaign-settings/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_campaign_settings",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "update_campaign": {
        "title": "Update campaign",
        "description": "Changes one or more settings of a campaign. Send only the fields you want to change; get the allowed values from Get campaign settings.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/update-campaign/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "update_campaign",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          },
          "amd": {
            "type": "string",
            "description": "Answering-machine detection: Y (on) or N (off).",
            "enum": [
              "Y",
              "N"
            ]
          },
          "msg": {
            "type": "string",
            "description": "Play the campaign message: Y or N.",
            "enum": [
              "Y",
              "N"
            ]
          },
          "customcid": {
            "type": "string",
            "description": "Use a custom caller ID list: Y or N.",
            "enum": [
              "Y",
              "N"
            ]
          },
          "override": {
            "type": "string",
            "description": "Override existing settings: Y or N.",
            "enum": [
              "Y",
              "N"
            ]
          },
          "autodiallevel": {
            "type": "number",
            "description": "Dial level: how many lines to dial per available agent (0 to 10).",
            "examples": [
              1.5
            ]
          },
          "dial_method": {
            "type": "string",
            "description": "How the campaign dials. Shown in the app as Broadcast, Predictive, Power (RATIO), Preview (MANUAL) and SMS Broadcast (SMSB).",
            "enum": [
              "BROADCAST",
              "PREDICTIVE",
              "RATIO",
              "MANUAL",
              "SMSB"
            ]
          },
          "ext_queue_status": {
            "type": "string",
            "description": "Send answered calls to an external queue: Y or N.",
            "enum": [
              "Y",
              "N"
            ]
          },
          "AgentLevel": {
            "type": "string",
            "description": "Agent level for predictive dialing."
          },
          "script": {
            "type": "string",
            "description": "ID of the agent script to show (from Get campaign settings).",
            "examples": [
              "scr123"
            ]
          },
          "call_back_number": {
            "type": "string",
            "description": "Number account holders can call back.",
            "examples": [
              "5559876543"
            ]
          },
          "conf_exten": {
            "type": "string",
            "description": "Extension or queue to transfer answered calls to."
          },
          "custom_cid_list": {
            "type": "string",
            "description": "ID of the caller ID list to rotate through."
          },
          "campaign_cid": {
            "type": "string",
            "description": "Caller ID shown to account holders.",
            "examples": [
              "5559876543"
            ]
          },
          "number_of_lines": {
            "type": "integer",
            "description": "Maximum number of simultaneous lines.",
            "examples": [
              10
            ]
          },
          "autodiallevel2": {
            "type": "number",
            "description": "Secondary dial level used by the adaptive dial methods."
          },
          "adaptive_dropped_percentage": {
            "type": "number",
            "description": "Maximum dropped-call percentage for adaptive dialing (0 to 100).",
            "examples": [
              3
            ]
          },
          "campaign_recording": {
            "type": "string",
            "description": "Record calls: ALLCALLS (on) or NEVER (off).",
            "enum": [
              "ALLCALLS",
              "NEVER"
            ]
          },
          "local_call_time": {
            "type": "string",
            "description": "ID of the calling-hours schedule (from Get campaign settings).",
            "examples": [
              "ccsDefault"
            ]
          },
          "velocity": {
            "type": "number",
            "description": "Dialing speed for broadcast campaigns."
          },
          "dial_prefix": {
            "type": "string",
            "description": "Dial prefix: 8 (on) or 9 (off).",
            "enum": [
              "8",
              "9"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "dial_number": {
        "title": "Place a test call",
        "description": "Places a single test call with a campaign’s settings, so you can hear the message and check delivery before any account holders are called.\n\nDocs: https://apidocs.dcdial.com/reference/campaigns/test-call/",
        "type": "object",
        "x-dcdial-group": "Campaigns",
        "properties": {
          "type": {
            "type": "string",
            "const": "dial_number",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number in E.164 or 10-digit US format.",
            "examples": [
              "5551234567"
            ]
          },
          "callerid": {
            "type": "string",
            "description": "Caller ID to present on the test call.",
            "examples": [
              "5559876543"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id",
          "phone_number",
          "callerid"
        ]
      },
      "add_account": {
        "title": "Create or update an account",
        "description": "Creates an account with its phone numbers and email addresses, or updates it if an account with the same accountid already exists.\n\nDocs: https://apidocs.dcdial.com/reference/accounts/add-account/",
        "type": "object",
        "x-dcdial-group": "Accounts",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_account",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account[company_id]": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "account[accountid]": {
            "type": "string",
            "description": "Your reference for the account. If an account with this reference exists, it is updated. If you leave it out, DCDial generates one (for example 2026-04512).",
            "examples": [
              "ACC-10045"
            ]
          },
          "account[first_name]": {
            "type": "string",
            "description": "First name.",
            "examples": [
              "Jane"
            ]
          },
          "account[last_name]": {
            "type": "string",
            "description": "Last name.",
            "examples": [
              "Doe"
            ]
          },
          "account[email]": {
            "type": "string",
            "description": "Primary email address. Defaults to the first of emails.",
            "examples": [
              "jane@example.com"
            ]
          },
          "account[phone]": {
            "type": "string",
            "description": "Primary phone number. Defaults to the first of phones.",
            "examples": [
              "5550100123"
            ]
          },
          "account[address1]": {
            "type": "string",
            "description": "Address line 1.",
            "examples": [
              "100 Main St"
            ]
          },
          "account[city]": {
            "type": "string",
            "description": "City.",
            "examples": [
              "Atlanta"
            ]
          },
          "account[state]": {
            "type": "string",
            "description": "Two-letter state code.",
            "examples": [
              "GA"
            ]
          },
          "account[postal_code]": {
            "type": "string",
            "description": "ZIP or postal code.",
            "examples": [
              "30301"
            ]
          },
          "account[country]": {
            "type": "string",
            "description": "Country code.",
            "examples": [
              "US"
            ]
          },
          "account[balance]": {
            "type": "number",
            "description": "Outstanding balance.",
            "examples": [
              1250.5
            ]
          },
          "account[birthday]": {
            "type": "string",
            "description": "Date of birth (YYYY-MM-DD)."
          },
          "account[company_name]": {
            "type": "string",
            "description": "Company name, for business accounts."
          },
          "account[custom1]": {
            "type": "string",
            "description": "Custom fields custom1 to custom20, for your own data."
          },
          "accounts_leads[list_id]": {
            "type": "integer",
            "description": "List to add the account's phone numbers and emails to, so campaigns can reach them.",
            "examples": [
              2048
            ]
          },
          "phones[0][phone_number]": {
            "type": "string",
            "description": "A phone number. Repeat with phones[1], phones[2] … for more.",
            "examples": [
              "5550100123"
            ]
          },
          "phones[0][phone_type]": {
            "type": "string",
            "description": "Type of the number, for example MOBILE, HOME or WORK.",
            "examples": [
              "MOBILE"
            ]
          },
          "phones[0][time_zone]": {
            "type": "string",
            "description": "UTC offset of the number, such as -6.00. Defaults to US Eastern time.",
            "examples": [
              "-5.00"
            ]
          },
          "emails[0]": {
            "type": "string",
            "description": "An email address. Repeat with emails[1] … for more.",
            "examples": [
              "jane@example.com"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account[company_id]"
        ]
      },
      "fetch_accounts": {
        "title": "Fetch accounts",
        "description": "Lists the accounts in your company, with either every phone number and email per account or just the primary ones.\n\nDocs: https://apidocs.dcdial.com/reference/accounts/fetch-accounts/",
        "type": "object",
        "x-dcdial-group": "Accounts",
        "properties": {
          "type": {
            "type": "string",
            "const": "fetch_accounts",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "all_phones": {
            "type": "integer",
            "description": "1 to return every phone number per account, 0 for the primary only.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "all_emails": {
            "type": "integer",
            "description": "1 to return every email address per account, 0 for the primary only.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          }
        },
        "required": [
          "type",
          "token",
          "company_id"
        ]
      },
      "get_list": {
        "title": "Get list",
        "description": "Returns one list with its campaign, status, account counts and dialing progress.\n\nDocs: https://apidocs.dcdial.com/reference/lists/get-list/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_list",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "list_id": {
            "type": "integer",
            "description": "ID of the list.",
            "examples": [
              2048
            ]
          }
        },
        "required": [
          "type",
          "token",
          "list_id"
        ]
      },
      "get_lists": {
        "title": "List all lists",
        "description": "Lists your calling lists, newest first. Filter by campaign or status.\n\nDocs: https://apidocs.dcdial.com/reference/lists/list-lists/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_lists",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          },
          "status": {
            "type": "string",
            "description": "Only active (Y) or inactive (N) lists.",
            "enum": [
              "Y",
              "N"
            ],
            "examples": [
              "Y"
            ]
          },
          "filter": {
            "type": "string",
            "description": "Sort by recently added (RA) or recently dialed (RD).",
            "enum": [
              "RA",
              "RD"
            ],
            "examples": [
              "RA"
            ]
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "change_status": {
        "title": "Change list status",
        "description": "Turns a list on or off for dialing.\n\nDocs: https://apidocs.dcdial.com/reference/lists/change-list-status/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "change_status",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "list_id": {
            "type": "integer",
            "description": "ID of the list.",
            "examples": [
              2048
            ]
          },
          "status": {
            "type": "string",
            "description": "Y to make the list active for dialing, N to make it inactive.",
            "enum": [
              "Y",
              "N"
            ],
            "examples": [
              "Y"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "list_id",
          "status"
        ]
      },
      "search_lead": {
        "title": "Search accounts and call log",
        "description": "Searches accounts and the call log by phone number, account, name, date and other details.\n\nDocs: https://apidocs.dcdial.com/reference/lists/search-accounts/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "search_lead",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "query": {
            "type": "string",
            "description": "Free-text search (name, phone or account).",
            "examples": [
              "Doe"
            ]
          },
          "search_date": {
            "type": "string",
            "description": "Date to search (YYYY-MM-DD)."
          },
          "from": {
            "type": "string",
            "description": "Start of a date range (YYYY-MM-DD)."
          },
          "to": {
            "type": "string",
            "description": "End of a date range (YYYY-MM-DD)."
          },
          "days": {
            "type": "integer",
            "description": "Look back this many days."
          },
          "call_type": {
            "type": "string",
            "description": "Filter by call type (for example inbound or outbound)."
          },
          "username": {
            "type": "string",
            "description": "Filter by the agent username."
          },
          "name": {
            "type": "string",
            "description": "Filter by account holder name."
          },
          "flag": {
            "type": "string",
            "description": "Filter by flag."
          },
          "status": {
            "type": "string",
            "description": "Filter by call status."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "add_leads": {
        "title": "Add an account to a campaign",
        "description": "Adds one account, with its phone numbers and email addresses, to a campaign list so the campaign can call it. If you leave out list_id, a new list is created for the campaign.\n\nDocs: https://apidocs.dcdial.com/reference/lists/add-account-to-campaign/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_leads",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "Campaign the account is added to.",
            "examples": [
              1024
            ]
          },
          "list_id": {
            "type": "integer",
            "description": "List to add the account to. A new list is created when omitted.",
            "examples": [
              2048
            ]
          },
          "phones": {
            "type": "string",
            "description": "Comma-separated phone numbers. The time zone is looked up from each number.",
            "examples": [
              "5550100123,5550100124"
            ]
          },
          "emails": {
            "type": "string",
            "description": "Comma-separated email addresses.",
            "examples": [
              "jane@example.com"
            ]
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "first_name": {
            "type": "string",
            "description": "First name.",
            "examples": [
              "Jane"
            ]
          },
          "middle_initial": {
            "type": "string",
            "description": "Middle initial."
          },
          "last_name": {
            "type": "string",
            "description": "Last name.",
            "examples": [
              "Doe"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title, such as Mr or Ms."
          },
          "address1": {
            "type": "string",
            "description": "Address line 1.",
            "examples": [
              "100 Main St"
            ]
          },
          "address2": {
            "type": "string",
            "description": "Address line 2."
          },
          "address3": {
            "type": "string",
            "description": "Address line 3."
          },
          "city": {
            "type": "string",
            "description": "City.",
            "examples": [
              "Atlanta"
            ]
          },
          "state": {
            "type": "string",
            "description": "Two-letter state code.",
            "examples": [
              "GA"
            ]
          },
          "postal_code": {
            "type": "string",
            "description": "ZIP or postal code.",
            "examples": [
              "30301"
            ]
          },
          "postalgmt": {
            "type": "string",
            "description": "How to work out the account’s time zone: AREA (by area code, the default) or POSTAL (by postal code).",
            "examples": [
              "AREA"
            ]
          },
          "country": {
            "type": "string",
            "description": "Country code.",
            "examples": [
              "US"
            ]
          },
          "balance": {
            "type": "number",
            "description": "Outstanding balance.",
            "examples": [
              1250.5
            ]
          },
          "gender": {
            "type": "string",
            "description": "Gender."
          },
          "birthday": {
            "type": "string",
            "description": "Date of birth (YYYY-MM-DD)."
          },
          "company_name": {
            "type": "string",
            "description": "Company name, for business accounts."
          },
          "company_website": {
            "type": "string",
            "description": "Company website, for business accounts."
          },
          "source_id": {
            "type": "string",
            "description": "Your source or vendor reference."
          },
          "custom1": {
            "type": "string",
            "description": "Custom fields custom1 to custom20. They are stored on the account and can be used in scripts and templates."
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id",
          "phones"
        ]
      },
      "get_campaign_lists": {
        "title": "List a campaign’s lists",
        "description": "Returns the lists attached to a campaign, newest first.\n\nDocs: https://apidocs.dcdial.com/reference/lists/list-campaign-lists/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_campaign_lists",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "upload_file": {
        "title": "Upload an account file",
        "description": "Imports accounts from a CSV file into a campaign, using one of your saved import formats to map the columns.\n\nDocs: https://apidocs.dcdial.com/reference/lists/upload-file/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "upload_file",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          },
          "format": {
            "type": "string",
            "description": "ID of the import format (column mapping) to apply.",
            "examples": [
              "12"
            ]
          },
          "file_type": {
            "type": "string",
            "description": "File type. Defaults to csv.",
            "enum": [
              "csv"
            ]
          },
          "data": {
            "type": "string",
            "format": "binary",
            "description": "The CSV file to upload."
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id",
          "format",
          "data"
        ]
      },
      "get_results": {
        "title": "Get call results",
        "description": "Returns the dialer’s call results for a phone number.\n\nDocs: https://apidocs.dcdial.com/reference/lists/get-results/",
        "type": "object",
        "x-dcdial-group": "Lists",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_results",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number in E.164 or 10-digit US format.",
            "examples": [
              "5551234567"
            ]
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of rows to return.",
            "examples": [
              50
            ]
          }
        },
        "required": [
          "type",
          "token",
          "phone_number"
        ]
      },
      "add_dnc": {
        "title": "Add a number to Do-Not-Call",
        "description": "Adds a phone number to your Do-Not-Call list, so campaigns stop dialing it. Pass campaign_id to block it for one campaign only.\n\nDocs: https://apidocs.dcdial.com/reference/dnc/add-number/",
        "type": "object",
        "x-dcdial-group": "Do-Not-Call",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_dnc",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number to block.",
            "examples": [
              "5550100123"
            ]
          },
          "campaign_id": {
            "type": "integer",
            "description": "Block the number for this campaign only. Leave it out to block the number for all campaigns.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "phone_number"
        ]
      },
      "delete_dnc": {
        "title": "Remove a number from Do-Not-Call",
        "description": "Removes a phone number from your Do-Not-Call list. Pass the same campaign_id you used when adding it.\n\nDocs: https://apidocs.dcdial.com/reference/dnc/remove-number/",
        "type": "object",
        "x-dcdial-group": "Do-Not-Call",
        "properties": {
          "type": {
            "type": "string",
            "const": "delete_dnc",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number to unblock.",
            "examples": [
              "5550100123"
            ]
          },
          "campaign_id": {
            "type": "integer",
            "description": "Remove the block for this campaign only.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "phone_number"
        ]
      },
      "get_dncs": {
        "title": "List Do-Not-Call numbers",
        "description": "Lists the numbers on your Do-Not-Call lists, company-wide and per campaign.\n\nDocs: https://apidocs.dcdial.com/reference/dnc/list-numbers/",
        "type": "object",
        "x-dcdial-group": "Do-Not-Call",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_dncs",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "campaign_summary": {
        "title": "Campaign summary",
        "description": "Returns live statistics for one running campaign.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/campaign-summary/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "campaign_summary",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "get_all_stats": {
        "title": "All campaign statistics",
        "description": "Returns live statistics for all your campaigns.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/all-campaign-stats/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_all_stats",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          },
          "display_status": {
            "type": "string",
            "description": "Only campaigns with this status.",
            "enum": [
              "PLAY",
              "STOP",
              "PAUSE"
            ],
            "examples": [
              "PLAY"
            ]
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "get_graph_data": {
        "title": "Graph data",
        "description": "Returns a campaign’s statistics as chart-ready series.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/graph-data/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_graph_data",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "get_campaign_stats": {
        "title": "Campaign statistics",
        "description": "Returns overall statistics for one campaign.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/campaign-stats/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_campaign_stats",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "get_all_graphs": {
        "title": "All graphs",
        "description": "Returns chart data for a campaign across statistics (total time, total calls, call percentages, average time).\n\nDocs: https://apidocs.dcdial.com/reference/statistics/all-graphs/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_all_graphs",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "get_usage": {
        "title": "Dialer usage",
        "description": "Returns your dialer balance and current usage.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/dialer-usage/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_usage",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "get_dashboard_stats": {
        "title": "Dashboard statistics",
        "description": "Returns the dashboard figures that summarize campaign performance.\n\nDocs: https://apidocs.dcdial.com/reference/statistics/dashboard-stats/",
        "type": "object",
        "x-dcdial-group": "Statistics",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_dashboard_stats",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "campaign_id": {
            "type": "integer",
            "description": "ID of the campaign.",
            "examples": [
              1024
            ]
          }
        },
        "required": [
          "type",
          "token",
          "campaign_id"
        ]
      },
      "list_ivrs": {
        "title": "List IVRs",
        "description": "Lists your IVR menus, newest first.\n\nDocs: https://apidocs.dcdial.com/reference/ivrs/list-ivrs/",
        "type": "object",
        "x-dcdial-group": "IVRs",
        "properties": {
          "type": {
            "type": "string",
            "const": "list_ivrs",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "add_ivr": {
        "title": "Add IVR",
        "description": "Creates an IVR menu that callers navigate with their keypad, using recorded or text-to-speech prompts.\n\nDocs: https://apidocs.dcdial.com/reference/ivrs/add-ivr/",
        "type": "object",
        "x-dcdial-group": "IVRs",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_ivr",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "ivr_id": {
            "type": "integer",
            "description": "ID of the IVR.",
            "examples": [
              3
            ]
          },
          "ivr_name": {
            "type": "string",
            "description": "Name of the IVR.",
            "examples": [
              "Main menu"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "ivr_id",
          "ivr_name"
        ]
      },
      "delete_ivr": {
        "title": "Delete IVR",
        "description": "Permanently deletes an IVR menu.\n\nDocs: https://apidocs.dcdial.com/reference/ivrs/delete-ivr/",
        "type": "object",
        "x-dcdial-group": "IVRs",
        "properties": {
          "type": {
            "type": "string",
            "const": "delete_ivr",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "ivr_id": {
            "type": "integer",
            "description": "ID of the IVR.",
            "examples": [
              3
            ]
          }
        },
        "required": [
          "type",
          "token",
          "ivr_id"
        ]
      },
      "get_queues": {
        "title": "List queues",
        "description": "Lists your call queues, newest first.\n\nDocs: https://apidocs.dcdial.com/reference/queues/list-queues/",
        "type": "object",
        "x-dcdial-group": "Queues",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_queues",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "add_queue": {
        "title": "Add queue",
        "description": "Creates a call queue for inbound or outbound calls.\n\nDocs: https://apidocs.dcdial.com/reference/queues/add-queue/",
        "type": "object",
        "x-dcdial-group": "Queues",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_queue",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "group_id": {
            "type": "string",
            "description": "ID of the queue (inbound group).",
            "examples": [
              "billing"
            ]
          },
          "group_name": {
            "type": "string",
            "description": "Name of the queue.",
            "examples": [
              "Billing"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "group_id",
          "group_name"
        ]
      },
      "delete_queue": {
        "title": "Delete queue",
        "description": "Permanently deletes a call queue.\n\nDocs: https://apidocs.dcdial.com/reference/queues/delete-queue/",
        "type": "object",
        "x-dcdial-group": "Queues",
        "properties": {
          "type": {
            "type": "string",
            "const": "delete_queue",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "group_id": {
            "type": "string",
            "description": "ID of the queue (inbound group).",
            "examples": [
              "billing"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "group_id"
        ]
      },
      "add_user": {
        "title": "Add user",
        "description": "Creates a user in your company with a role (admin, user or agent).\n\nDocs: https://apidocs.dcdial.com/reference/users/add-user/",
        "type": "object",
        "x-dcdial-group": "Users",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_user",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "first_name": {
            "type": "string",
            "description": "First name.",
            "examples": [
              "Jane"
            ]
          },
          "last_name": {
            "type": "string",
            "description": "Last name.",
            "examples": [
              "Doe"
            ]
          },
          "user": {
            "type": "string",
            "description": "DCDial username.",
            "examples": [
              "jane.doe"
            ]
          },
          "pass": {
            "type": "string",
            "description": "Password.",
            "examples": [
              "••••••••"
            ]
          },
          "user_level": {
            "type": "string",
            "description": "Role of the new user.",
            "enum": [
              "admin",
              "user",
              "agent"
            ],
            "examples": [
              "admin"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "mobile_number": {
            "type": "string",
            "description": "Mobile number.",
            "examples": [
              "5551234567"
            ]
          },
          "extension": {
            "type": "string",
            "description": "Phone extension for the user.",
            "examples": [
              "1001"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "first_name",
          "last_name",
          "user",
          "pass",
          "user_level",
          "company_id",
          "mobile_number",
          "extension"
        ]
      },
      "change_password": {
        "title": "Change password",
        "description": "Changes the password of the user who owns the token.\n\nDocs: https://apidocs.dcdial.com/reference/users/change-password/",
        "type": "object",
        "x-dcdial-group": "Users",
        "properties": {
          "type": {
            "type": "string",
            "const": "change_password",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "oldpass": {
            "type": "string",
            "description": "Current password.",
            "examples": [
              "••••••••"
            ]
          },
          "newpass": {
            "type": "string",
            "description": "New password.",
            "examples": [
              "••••••••"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "oldpass",
          "newpass"
        ]
      },
      "get_profile": {
        "title": "Get profile",
        "description": "Returns the user’s profile: contact details, email settings and permissions.\n\nDocs: https://apidocs.dcdial.com/reference/users/get-profile/",
        "type": "object",
        "x-dcdial-group": "Users",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_profile",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "update_profile": {
        "title": "Update profile",
        "description": "Updates the user’s name, email or mobile number. Fields you leave out stay unchanged.\n\nDocs: https://apidocs.dcdial.com/reference/users/update-profile/",
        "type": "object",
        "x-dcdial-group": "Users",
        "properties": {
          "type": {
            "type": "string",
            "const": "update_profile",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "full_name": {
            "type": "string",
            "description": "Full name.",
            "examples": [
              "Jane Doe"
            ]
          },
          "email": {
            "type": "string",
            "description": "Email address.",
            "examples": [
              "jane@example.com"
            ]
          },
          "mobile_number": {
            "type": "string",
            "description": "Mobile number.",
            "examples": [
              "5551234567"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "full_name",
          "email",
          "mobile_number"
        ]
      },
      "check_permission": {
        "title": "Check permission",
        "description": "Checks whether the user has a permission on a module. Agents can only hold agent-interface permissions.\n\nDocs: https://apidocs.dcdial.com/reference/users/check-permission/",
        "type": "object",
        "x-dcdial-group": "Users",
        "properties": {
          "type": {
            "type": "string",
            "const": "check_permission",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "perm_type": {
            "type": "string",
            "description": "Permission to check, for example create, modify or delete.",
            "examples": [
              "modify"
            ]
          },
          "module": {
            "type": "string",
            "description": "Module to check, for example `campaign`, `lists` or `leads`.",
            "examples": [
              "campaign"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "perm_type",
          "module"
        ]
      },
      "set_notifications": {
        "title": "Set notification settings",
        "description": "Chooses which in-app alerts the user receives and how they are delivered.\n\nDocs: https://apidocs.dcdial.com/reference/notifications/set-notifications/",
        "type": "object",
        "x-dcdial-group": "Notifications",
        "properties": {
          "type": {
            "type": "string",
            "const": "set_notifications",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "enable_notification": {
            "type": "string",
            "description": "Y to turn notifications on for this user, N to turn them off.",
            "enum": [
              "Y",
              "N"
            ]
          },
          "campaign_started": {
            "type": "integer",
            "description": "1 to be alerted when a campaign starts.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "campaign_stopped": {
            "type": "integer",
            "description": "1 to be alerted when a campaign stops.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "campaign_paused": {
            "type": "integer",
            "description": "1 to be alerted when a campaign pauses.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "campaign_noActiveLeads": {
            "type": "integer",
            "description": "1 to be alerted when a campaign runs out of accounts to call.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "campaign_completed": {
            "type": "integer",
            "description": "1 to be alerted when a campaign completes.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "list_add": {
            "type": "integer",
            "description": "1 to be alerted when a list is added.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "list_scrubReport": {
            "type": "integer",
            "description": "1 to be alerted when a list scrub report is ready.",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "scheduler_capaignStarted": {
            "type": "integer",
            "description": "1 to be alerted when a scheduled campaign starts. (The field name is spelled this way.)",
            "enum": [
              0,
              1
            ],
            "examples": [
              0
            ]
          },
          "balance_below": {
            "type": "integer",
            "description": "Alert when the dialer balance drops below this amount.",
            "enum": [
              50,
              100,
              200,
              300,
              500,
              1000,
              2000,
              3000
            ]
          },
          "alert_frequency": {
            "type": "integer",
            "description": "Minutes between repeated alerts (0 = once).",
            "enum": [
              0,
              15,
              30,
              45,
              60
            ],
            "examples": [
              0
            ]
          },
          "alert_method": {
            "type": "string",
            "description": "How to deliver alerts.",
            "enum": [
              "popup",
              "email",
              "sms"
            ]
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "get_notifications": {
        "title": "Get notifications",
        "description": "Returns the user’s unread notifications.\n\nDocs: https://apidocs.dcdial.com/reference/notifications/get-notifications/",
        "type": "object",
        "x-dcdial-group": "Notifications",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_notifications",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "clear_notifications": {
        "title": "Clear notifications",
        "description": "Marks all of the user’s notifications as read. They stay in the notification center.\n\nDocs: https://apidocs.dcdial.com/reference/notifications/clear-notifications/",
        "type": "object",
        "x-dcdial-group": "Notifications",
        "properties": {
          "type": {
            "type": "string",
            "const": "clear_notifications",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "get_notifications_settings": {
        "title": "Get notification settings",
        "description": "Returns which alerts the user has turned on.\n\nDocs: https://apidocs.dcdial.com/reference/notifications/get-notification-settings/",
        "type": "object",
        "x-dcdial-group": "Notifications",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_notifications_settings",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          }
        },
        "required": [
          "type",
          "token"
        ]
      },
      "create_payment_plan": {
        "title": "Create payment agreement",
        "description": "Creates a payment agreement (a schedule of payments) for an account and sends it to the account holder by SMS, email or both to sign.\n\nDocs: https://apidocs.dcdial.com/reference/payments/create-agreement/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "create_payment_plan",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "billing_start_date": {
            "type": "string",
            "description": "Date of the first payment (YYYY-MM-DD).",
            "examples": [
              "2026-11-01"
            ]
          },
          "total_payments": {
            "type": "integer",
            "description": "Number of payments in the plan.",
            "examples": [
              6
            ]
          },
          "amount": {
            "type": "number",
            "description": "Amount in the account currency.",
            "examples": [
              150
            ]
          },
          "payment_schedule": {
            "type": "string",
            "description": "How often payments are taken.",
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "bimonthly",
              "quarterly",
              "annually",
              "biannually"
            ],
            "examples": [
              "daily"
            ]
          },
          "communication_method": {
            "type": "string",
            "description": "How the agreement is sent to the account holder to sign.",
            "enum": [
              "sms",
              "email",
              "both"
            ],
            "examples": [
              "sms"
            ]
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number in E.164 or 10-digit US format.",
            "examples": [
              "5551234567"
            ]
          },
          "email": {
            "type": "string",
            "description": "Email address.",
            "examples": [
              "jane@example.com"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "billing_dates": {
            "type": "string",
            "description": "Explicit payment dates instead of a schedule, as a JSON array.",
            "examples": [
              "[\"2026-11-01\",\"2026-12-01\",\"2027-01-01\"]"
            ]
          },
          "billing_amounts": {
            "type": "string",
            "description": "Amounts for each date in billing_dates, as a JSON array.",
            "examples": [
              "[\"50.00\",\"50.00\",\"50.00\"]"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "billing_start_date",
          "total_payments",
          "amount",
          "payment_schedule",
          "communication_method",
          "phone_number",
          "email",
          "company_id"
        ]
      },
      "agreement_details": {
        "title": "Get agreement details",
        "description": "Returns a payment agreement with its schedule and payment history.\n\nDocs: https://apidocs.dcdial.com/reference/payments/agreement-details/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "agreement_details",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "agreement_id": {
            "type": "integer",
            "description": "ID of the payment agreement.",
            "examples": [
              5521
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "company_id"
        ]
      },
      "get_schedules": {
        "title": "Get payment schedule",
        "description": "Returns every scheduled payment of a payment agreement or recurring plan, with dates, amounts, the balance after each payment and its status.\n\nDocs: https://apidocs.dcdial.com/reference/payments/payment-schedule/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_schedules",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "schedule_id": {
            "type": "integer",
            "description": "ID of the recurring plan, or of the agreement when plan=Y.",
            "examples": [
              77120
            ]
          },
          "plan": {
            "type": "string",
            "description": "Y when schedule_id is a payment agreement ID (from Create payment agreement).",
            "enum": [
              "Y"
            ]
          },
          "user_timezone": {
            "type": "string",
            "description": "Time zone to show dates in, for example America/New_York.",
            "examples": [
              "America/New_York"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "schedule_id"
        ]
      },
      "get_agreement_doc": {
        "title": "Get agreement document",
        "description": "Returns the signed agreement document: account holder details, payment schedule, terms and authorization.\n\nDocs: https://apidocs.dcdial.com/reference/payments/agreement-document/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_agreement_doc",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "agreement_id": {
            "type": "integer",
            "description": "ID of the payment agreement.",
            "examples": [
              5521
            ]
          }
        },
        "required": [
          "type",
          "token",
          "company_id",
          "agreement_id"
        ]
      },
      "cancel_payment_plan": {
        "title": "Cancel agreement",
        "description": "Cancels a payment agreement and all its future payments. The account holder is notified.\n\nDocs: https://apidocs.dcdial.com/reference/payments/cancel-agreement/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "cancel_payment_plan",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "agreement_id": {
            "type": "integer",
            "description": "ID of the payment agreement.",
            "examples": [
              5521
            ]
          }
        },
        "required": [
          "type",
          "token",
          "company_id",
          "agreement_id"
        ]
      },
      "add_payment": {
        "title": "Record a manual payment",
        "description": "Records a payment received outside DCDial (cash, check, wire…) and applies it to the account balance. No money is moved.\n\nDocs: https://apidocs.dcdial.com/reference/payments/add-manual-payment/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "add_payment",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "payment_date": {
            "type": "string",
            "description": "Date of the payment (YYYY-MM-DD).",
            "examples": [
              "2026-10-15"
            ]
          },
          "payment_method": {
            "type": "string",
            "description": "How it was paid: wire transfer (WT), cash, check, card (CC), ACH or PayPal (PP).",
            "enum": [
              "WT",
              "CASH",
              "CHECK",
              "CC",
              "ACH",
              "PP"
            ],
            "examples": [
              "WT"
            ]
          },
          "amount": {
            "type": "number",
            "description": "Amount in the account currency.",
            "examples": [
              150
            ]
          },
          "payment_note": {
            "type": "string",
            "description": "Free-text note."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "payment_date",
          "payment_method",
          "amount",
          "company_id"
        ]
      },
      "remove_payment": {
        "title": "Void a payment",
        "description": "Voids a recorded payment, for example after a refund, NSF or chargeback, and reverses it on the account balance.\n\nDocs: https://apidocs.dcdial.com/reference/payments/void-payment/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "remove_payment",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Why the payment is voided.",
            "enum": [
              "refunded",
              "NFS",
              "charged back",
              "other"
            ]
          },
          "payment_id": {
            "type": "string",
            "description": "ID of the payment to void.",
            "examples": [
              "90311"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "reason",
          "payment_id",
          "company_id"
        ]
      },
      "payment_refund": {
        "title": "Refund a payment",
        "description": "Refunds all or part of a card or ACH payment to the original payment method.\n\nDocs: https://apidocs.dcdial.com/reference/payments/refund-payment/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "payment_refund",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "amount": {
            "type": "number",
            "description": "Amount to refund. Less than the original amount for a partial refund.",
            "examples": [
              150
            ]
          },
          "transaction_id": {
            "type": "string",
            "description": "Gateway transaction ID.",
            "examples": [
              "ch_3Q8x2e"
            ]
          },
          "order_id": {
            "type": "string",
            "description": "DCDial order ID.",
            "examples": [
              "77412"
            ]
          },
          "refund_fee": {
            "type": "string",
            "description": "Y to also refund the convenience fee.",
            "enum": [
              "Y",
              "N"
            ],
            "examples": [
              "Y"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "amount",
          "transaction_id",
          "order_id",
          "company_id"
        ]
      },
      "charge_customer": {
        "title": "Process a payment",
        "description": "Charges a card or bank account now, once or on a recurring schedule.\n\nDocs: https://apidocs.dcdial.com/reference/payments/process-payment/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "charge_customer",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "amount": {
            "type": "number",
            "description": "Amount in the account currency.",
            "examples": [
              150
            ]
          },
          "payment_method": {
            "type": "string",
            "description": "Card (CC) or bank account (ACH).",
            "enum": [
              "CC",
              "ACH"
            ],
            "examples": [
              "CC"
            ]
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number in E.164 or 10-digit US format.",
            "examples": [
              "5551234567"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "agent": {
            "type": "string",
            "description": "Username of the agent taking the payment.",
            "examples": [
              "jane.agent"
            ]
          },
          "description": {
            "type": "string",
            "description": "Description shown on the receipt."
          },
          "currency_code": {
            "type": "string",
            "description": "Currency of the payment.",
            "enum": [
              "USD",
              "GBP"
            ],
            "examples": [
              "USD"
            ]
          },
          "cc_number": {
            "type": "string",
            "description": "Card number. Required when payment_method=CC.",
            "examples": [
              "4242424242424242"
            ]
          },
          "cc_expiry_date": {
            "type": "string",
            "description": "Card expiry date (MMYY). Required when payment_method=CC.",
            "examples": [
              "1229"
            ]
          },
          "cc_cvv": {
            "type": "string",
            "description": "Card security code. Required when payment_method=CC.",
            "examples": [
              "123"
            ]
          },
          "card_holder_name": {
            "type": "string",
            "description": "Name on the card. Required when payment_method=CC.",
            "examples": [
              "Jane Doe"
            ]
          },
          "routing_number": {
            "type": "string",
            "description": "Bank routing number. Required when payment_method=ACH.",
            "examples": [
              "110000000"
            ]
          },
          "bank_account_number": {
            "type": "string",
            "description": "Bank account number. Required when payment_method=ACH.",
            "examples": [
              "000123456789"
            ]
          },
          "bank_name": {
            "type": "string",
            "description": "Bank name. Required when payment_method=ACH.",
            "examples": [
              "Example Bank"
            ]
          },
          "account_holder_name": {
            "type": "string",
            "description": "Name on the bank account. Required when payment_method=ACH.",
            "examples": [
              "Jane Doe"
            ]
          },
          "first_name": {
            "type": "string",
            "description": "First name.",
            "examples": [
              "Jane"
            ]
          },
          "last_name": {
            "type": "string",
            "description": "Last name.",
            "examples": [
              "Doe"
            ]
          },
          "address": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City."
          },
          "zipcode": {
            "type": "string",
            "description": "ZIP code."
          },
          "isrecurring": {
            "type": "string",
            "description": "Y to set up recurring payments with start_date and total_payments.",
            "enum": [
              "Y",
              "N"
            ],
            "examples": [
              "Y"
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Date of the first recurring payment (YYYY-MM-DD). Required when isrecurring=Y.",
            "examples": [
              "2026-10-01"
            ]
          },
          "total_payments": {
            "type": "integer",
            "description": "Number of recurring payments. Required when isrecurring=Y.",
            "examples": [
              6
            ]
          },
          "billing_address1": {
            "type": "string",
            "description": "Billing address line 1."
          },
          "billing_address2": {
            "type": "string",
            "description": "Billing address line 2."
          },
          "billing_city": {
            "type": "string",
            "description": "Billing city."
          },
          "billing_zipcode": {
            "type": "string",
            "description": "Billing ZIP code."
          },
          "billing_state": {
            "type": "string",
            "description": "Billing state."
          },
          "billing_country": {
            "type": "string",
            "description": "Billing country."
          },
          "email_address": {
            "type": "string",
            "description": "Email for the receipt."
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "amount",
          "payment_method",
          "phone_number",
          "company_id",
          "agent",
          "currency_code",
          "first_name",
          "last_name"
        ]
      },
      "get_payment_link": {
        "title": "Create a payment link",
        "description": "Creates a secure payment link for an account. Send it yourself, or have DCDial text it to the account holder.\n\nDocs: https://apidocs.dcdial.com/reference/payments/payment-link/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_payment_link",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "account_id": {
            "type": "string",
            "description": "Your reference for the account (its accountid).",
            "examples": [
              "ACC-10045"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "amount": {
            "type": "number",
            "description": "Amount to request. When set, the account holder cannot change it unless editable=Y.",
            "examples": [
              150
            ]
          },
          "editable": {
            "type": "string",
            "description": "Y to let the account holder change the amount, N to lock it. Defaults to N.",
            "enum": [
              "Y",
              "N"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "account_id",
          "company_id"
        ]
      },
      "get_payment_status": {
        "title": "Get payment status",
        "description": "Returns the status of a payment by invoice or transaction ID.\n\nDocs: https://apidocs.dcdial.com/reference/payments/payment-status/",
        "type": "object",
        "x-dcdial-group": "Payments",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_payment_status",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "invoice_id": {
            "type": "string",
            "description": "DCDial invoice ID.",
            "examples": [
              "INV-88812"
            ]
          },
          "transaction_id": {
            "type": "string",
            "description": "Gateway transaction ID.",
            "examples": [
              "ch_3Q8x2e"
            ]
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          }
        },
        "required": [
          "type",
          "token",
          "invoice_id",
          "transaction_id",
          "company_id"
        ]
      },
      "send_text_message": {
        "title": "Send a text message",
        "description": "Sends a text message from one of your numbers to a phone number, with your own text or a saved template.\n\nDocs: https://apidocs.dcdial.com/reference/sms/send-message/",
        "type": "object",
        "x-dcdial-group": "SMS",
        "properties": {
          "type": {
            "type": "string",
            "const": "send_text_message",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "phone_number": {
            "type": "string",
            "description": "Phone number in E.164 or 10-digit US format.",
            "examples": [
              "5551234567"
            ]
          },
          "caller_id": {
            "type": "string",
            "description": "Caller ID (a number assigned to your company).",
            "examples": [
              "5559876543"
            ]
          },
          "use_template": {
            "type": "string",
            "description": "Y to send a saved SMS template instead of sms_text.",
            "enum": [
              "Y",
              "N"
            ],
            "examples": [
              "Y"
            ]
          },
          "sms_text": {
            "type": "string",
            "description": "Message body.",
            "examples": [
              "Your payment of $150.00 was received. Thank you!"
            ]
          }
        },
        "required": [
          "type",
          "token",
          "company_id",
          "phone_number",
          "caller_id",
          "use_template",
          "sms_text"
        ]
      },
      "retrieve_sent_messages": {
        "title": "Retrieve sent messages",
        "description": "Lists the text messages you sent between two dates.\n\nDocs: https://apidocs.dcdial.com/reference/sms/sent-messages/",
        "type": "object",
        "x-dcdial-group": "SMS",
        "properties": {
          "type": {
            "type": "string",
            "const": "retrieve_sent_messages",
            "description": "Operation selector."
          },
          "token": {
            "type": "string",
            "description": "API token from login_user."
          },
          "company_id": {
            "type": "integer",
            "description": "Your DCDial company ID.",
            "examples": [
              101
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Start date (YYYY-MM-DD).",
            "examples": [
              "2026-10-01"
            ]
          },
          "end_date": {
            "type": "string",
            "description": "End date (YYYY-MM-DD).",
            "examples": [
              "2026-10-15"
            ]
          },
          "orderby": {
            "type": "string",
            "description": "Sort by send time: oldest first (ASC) or newest first (DESC).",
            "enum": [
              "ASC",
              "DESC"
            ],
            "examples": [
              "ASC"
            ]
          },
          "offset": {
            "type": "integer",
            "description": "Number of rows to skip.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of rows to return.",
            "examples": [
              50
            ]
          }
        },
        "required": [
          "type",
          "token",
          "company_id",
          "start_date",
          "end_date"
        ]
      },
      "get_content": {
        "title": "Get content",
        "description": "Returns public content used by DCDial client applications. No token needed.\n\nDocs: https://apidocs.dcdial.com/reference/content/get-content/",
        "type": "object",
        "x-dcdial-group": "Content",
        "properties": {
          "type": {
            "type": "string",
            "const": "get_content",
            "description": "Operation selector."
          }
        },
        "required": [
          "type"
        ]
      }
    }
  }
}