{
  "openapi": "3.0.4",
  "info": {
    "title": "SMSHub API",
    "description": "Brightree SMSHub for ResMed SMS Gateway Service",
    "version": "v1"
  },
  "paths": {
    "/api/admin/programs/{siteKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramResponse"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramResponse"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramResponse"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/programoverrides/{siteKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteProgramOverride"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteProgramOverride"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteProgramOverride"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/siteconfiguration/{siteKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteConfiguration"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/programoverride/{siteProgramXrefKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteProgramXrefKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramOverride"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramOverride"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramOverride"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/programs/search": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "programType",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/program/{programNumber}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "programNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgram"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgram"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgram"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/program/{siteKey}": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programTypeKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "phoneNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteNickname",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mcUserKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/xref/{siteKey}": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programTypeKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "mcUserKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/assignphone/{siteKey}": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programTypeKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "mcUserKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/searchphonenumbers": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberSearchFilter"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberSearchFilter"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberSearchFilter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/addphonenumber": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LongTelephoneNumber"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LongTelephoneNumber"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LongTelephoneNumber"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/phonenumbers/unassigned": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/programmessage/{programNumber}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "programNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgramMessage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgramMessage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsHubProgramMessage"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/programmessage": {
      "put": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubProgramMessage"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubProgramMessage"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubProgramMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/bypassoptin": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BypassOptInRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BypassOptInRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BypassOptInRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/requireoptin": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequireOptInRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequireOptInRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequireOptInRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/optmessages/{siteKey}/{programTypeKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programTypeKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/optmessages": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramMessage"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramMessage"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SiteProgramMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProgramMessage"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/activate/{siteProgramXrefKey}": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteProgramXrefKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "mcUserKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/blacklist/{siteKey}/{phoneNumber}/{programTypeKey}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "siteKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "programTypeKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistEntryDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistEntryDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistEntryDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/externalentitysupport": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              },
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              },
              "text/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubAppSettingUpdate"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubAppSettingUpdate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SmsHubAppSettingUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ConsentManagement/optstatus/{phonenumber}/{entitytypekey}/{entitykey}": {
      "get": {
        "tags": [
          "ConsentManagement"
        ],
        "summary": "Gets the opt status for a phone number.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "description": "The phone number.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityTypeKey",
            "in": "path",
            "description": "The entity type key.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "entityKey",
            "in": "path",
            "description": "The entity key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the opt status response.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementResponse"
                }
              }
            }
          },
          "400": {
            "description": "If the input is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "If there is an internal server error."
          }
        }
      }
    },
    "/api/ConsentManagement/optstatuslist": {
      "post": {
        "tags": [
          "ConsentManagement"
        ],
        "summary": "Gets the opt status for a list of phone numbers.",
        "requestBody": {
          "description": "The request containing the list of phone numbers.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusCheckList"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusCheckList"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusCheckList"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the list of opt status responses.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsentManagementResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsentManagementResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsentManagementResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "If the input is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "If there is an internal server error."
          }
        }
      }
    },
    "/api/ConsentManagement/optstatus": {
      "post": {
        "tags": [
          "ConsentManagement"
        ],
        "summary": "Updates the opt status for a phone number.",
        "requestBody": {
          "description": "The request containing the phone number and opt status details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentManagementOptStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the update response.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementUpdateResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementUpdateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentManagementUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "If the input is invalid.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "If there is an internal server error."
          }
        }
      }
    },
    "/api/sms/external/optstatus/{phonenumber}": {
      "get": {
        "tags": [
          "External"
        ],
        "summary": "Retrieves the opt-in status for a given phone number and associated entity details.",
        "description": "This method is an HTTP GET endpoint that checks the opt-in status for a specific\r\n            phone number in the context of a given entity and program number. Ensure that all required parameters are\r\n            provided and valid before calling this method.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "description": "The phone number for which the opt-in status is being queried. Cannot be null or empty.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityTypeKey",
            "in": "query",
            "description": "The key representing the type of entity associated with the request. Must be a valid entity type identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "entityKey",
            "in": "query",
            "description": "The unique identifier for the specific entity associated with the request. Cannot be null or empty.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "programNumber",
            "in": "query",
            "description": "The program number associated with the request. Must be a valid program identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/external/messagestatus/{messageKey}": {
      "get": {
        "tags": [
          "External"
        ],
        "summary": "Retrieves the status of a message based on the provided message key.",
        "description": "This method returns an HTTP 200 OK response with the message status if the message is\r\n            found, or an HTTP 404 Not Found response if the message cannot be located.",
        "parameters": [
          {
            "name": "messageKey",
            "in": "path",
            "description": "The unique identifier of the message whose status is being requested. This parameter is required.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalMessageStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalMessageStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalMessageStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/external/sendmessage": {
      "post": {
        "tags": [
          "External"
        ],
        "summary": "Sends an SMS message for external entities.",
        "description": "This method processes an external message request and sends an SMS message. The payload must include\r\n            all required fields with proper validation. The phone number length must be greater than 0, body text length must be\r\n            greater than 0, program number must be greater than 0, entity type key must be greater than 0, entity key must be\r\n            greater than 0, source length must be greater than 0, message classification key must be greater than 0, and patient ID length\r\n            must be greater than 0.",
        "requestBody": {
          "description": "The external message payload containing all required information for sending the SMS.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalMessage"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalMessage"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalSendMessageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalSendMessageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalSendMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/external/optstatus": {
      "post": {
        "tags": [
          "External"
        ],
        "summary": "Updates the opt status for a phone number associated with an external entity.",
        "description": "This method allows external entities to update the opt-in/opt-out status for a specific phone number\r\n            within their program context. The request must include all required fields with proper validation.",
        "requestBody": {
          "description": "The request containing the phone number, entity details, program number, source, and new opt status.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOptStatusUpdateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOptStatusUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOptStatusUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusUpdateResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusUpdateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExternalOptStatusUpdateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/ping": {
      "get": {
        "tags": [
          "Ping"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/sms": {
      "post": {
        "tags": [
          "Sms"
        ],
        "summary": "Sends an SMS message. \r\n            The system uses the supplied PtKey to record messages sent to patients. \r\n            PtId can be supplied on its own and the system will fetch the corresponding PtKey. \r\n            If both are supplied the PtKey value will be used.",
        "requestBody": {
          "description": "The SMS message",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/reply": {
      "post": {
        "tags": [
          "Sms"
        ],
        "summary": "Reply Callback for SMS messaging.",
        "description": "The callback URL is specified during the Program creation.",
        "requestBody": {
          "description": "The SMS reply request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyMessage"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyMessage"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyMessage"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/optstatus/{phonenumber}": {
      "get": {
        "tags": [
          "Sms"
        ],
        "summary": "Checks if a phone number has globally opted out from SMS.\r\n             Accepts optional sitekey to check opt in status of number for a site",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "description": "Required pt phone number to check",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteKey",
            "in": "query",
            "description": "Optional Site Key to check",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programNumber",
            "in": "query",
            "description": "Optional Program Number to check",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Phone number or site key (if included) not found. Check error message"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/cmoptstatus/{phonenumber}": {
      "get": {
        "tags": [
          "Sms"
        ],
        "summary": "Checks if a phone number has globally opted out from SMS.\r\n             Additionally checks if the number has opted out via Consent Management.\r\n             SiteKey is required for Consent Management checks.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "description": "Required pt phone number to check",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteKey",
            "in": "query",
            "description": "Optional Site Key to check",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "programNumber",
            "in": "query",
            "description": "Optional Program Number to check",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Phone number or site key (if included) not found. Check error message"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/optstatus": {
      "post": {
        "tags": [
          "Sms"
        ],
        "summary": "Updates the opt status of a phone number for the given program type and site",
        "requestBody": {
          "description": "The PatientOptInStatusRequest object",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientOptInStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientOptInStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PatientOptInStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "response ok"
          },
          "404": {
            "description": "Phone number or site key (if included) not found. Check error message"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    },
    "/api/sms/optstatus/{phoneNumber}/all": {
      "get": {
        "tags": [
          "Sms"
        ],
        "summary": "Gets the opt status for all program types for the given phone number and site",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ptKey",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response ok",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PatientOptStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientOptStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientOptStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Phone number or site key or patient key not found. Check error message"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [
              "SMS.Hub.Api"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BlacklistEntryDetails": {
        "required": [
          "createdDate",
          "lastModifiedDate",
          "phoneNumber",
          "programName"
        ],
        "type": "object",
        "properties": {
          "programName": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastModifiedDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "BypassOptInRequest": {
        "type": "object",
        "properties": {
          "siteProgramXrefKey": {
            "type": "integer",
            "format": "int32"
          },
          "bypassOptIn": {
            "type": "boolean"
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ConsentManagementOptStatusCheckList": {
        "type": "object",
        "properties": {
          "entityTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "phoneNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConsentManagementOptStatusRequest": {
        "type": "object",
        "properties": {
          "entityTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "type": "string",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "contactType": {
            "type": "string",
            "nullable": true
          },
          "globalOptOut": {
            "type": "boolean",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "categoryOptOut": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConsentManagementResponse": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "globalOptOut": {
            "type": "boolean"
          },
          "generalOptOut": {
            "type": "boolean"
          },
          "resupplyOptOut": {
            "type": "boolean"
          },
          "paymentOptOut": {
            "type": "boolean"
          },
          "lastModifiedDateTimeUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConsentManagementUpdateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalMessage": {
        "required": [
          "bodyText",
          "entityKey",
          "patientId",
          "phoneNumber",
          "source"
        ],
        "type": "object",
        "properties": {
          "programNumber": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "phoneNumber": {
            "maxLength": 15,
            "minLength": 1,
            "type": "string"
          },
          "bodyText": {
            "maxLength": 1500,
            "minLength": 1,
            "type": "string"
          },
          "entityTypeKey": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "source": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "patientId": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "messageClassificationKey": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "expirationMinutes": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalMessageStatusResponse": {
        "type": "object",
        "properties": {
          "messageKey": {
            "type": "string",
            "format": "uuid"
          },
          "messageStatusKey": {
            "type": "integer",
            "format": "int32"
          },
          "messageStatusDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalOptStatusResponse": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "globalOptOut": {
            "type": "boolean"
          },
          "blockedByConsentManagement": {
            "type": "boolean"
          },
          "globalOptOutModifiedDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "optStatusKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "optStatusName": {
            "type": "string",
            "nullable": true
          },
          "modifiedDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalOptStatusUpdateRequest": {
        "required": [
          "entityKey",
          "phoneNumber",
          "source"
        ],
        "type": "object",
        "properties": {
          "phoneNumber": {
            "maxLength": 15,
            "minLength": 1,
            "type": "string"
          },
          "entityTypeKey": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "entityKey": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "programNumber": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "source": {
            "maxLength": 50,
            "minLength": 1,
            "type": "string"
          },
          "optStatusKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ExternalOptStatusUpdateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExternalSendMessageResponse": {
        "type": "object",
        "properties": {
          "messageGuid": {
            "type": "string",
            "nullable": true
          },
          "messageStatusKey": {
            "type": "integer",
            "format": "int32"
          },
          "messageStatusDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LongTelephoneNumber": {
        "type": "object",
        "properties": {
          "longTelephoneNumberKey": {
            "type": "integer",
            "format": "int32"
          },
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "mcLoginKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Message": {
        "type": "object",
        "properties": {
          "programNumber": {
            "type": "integer",
            "format": "int32"
          },
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "siteName": {
            "type": "string",
            "nullable": true
          },
          "ptKey": {
            "type": "integer",
            "format": "int32"
          },
          "ptId": {
            "type": "integer",
            "format": "int32"
          },
          "ptPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "bodyText": {
            "type": "string",
            "nullable": true
          },
          "combineOptIn": {
            "type": "boolean"
          },
          "expiryDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "prependBranchCoName": {
            "type": "boolean",
            "nullable": true
          },
          "branchKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isDXCampaignMessage": {
            "type": "boolean",
            "nullable": true
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "messageClassificationKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "messageTemplateName": {
            "type": "string",
            "nullable": true
          },
          "dxMessageTemplateKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dxMobileFirstLinkKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OptStatusResponse": {
        "type": "object",
        "properties": {
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "globalOptOut": {
            "type": "boolean"
          },
          "blockedByConsentManagement": {
            "type": "boolean"
          },
          "globalOptOutModifiedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "siteOptStatus": {
            "$ref": "#/components/schemas/SiteOptStatusResponse"
          }
        },
        "additionalProperties": false
      },
      "PatientOptInStatus": {
        "type": "object",
        "properties": {
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "programType": {
            "type": "string",
            "nullable": true
          },
          "programNumber": {
            "type": "integer",
            "format": "int32"
          },
          "programPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "programPhoneStatusKey": {
            "type": "integer",
            "format": "int32"
          },
          "modifiedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "modifiedBy": {
            "type": "string",
            "nullable": true
          },
          "globalOptOut": {
            "type": "boolean"
          },
          "globalModifiedBy": {
            "type": "string",
            "nullable": true
          },
          "globalModifiedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "blockedByConsentManagement": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PatientOptInStatusRequest": {
        "type": "object",
        "properties": {
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "programNumber": {
            "type": "integer",
            "format": "int32"
          },
          "ptKey": {
            "type": "integer",
            "format": "int32"
          },
          "phoneNumber": {
            "type": "string",
            "nullable": true
          },
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32"
          },
          "programPhoneStatusKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PatientOptStatusResponse": {
        "type": "object",
        "properties": {
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "ptKey": {
            "type": "integer",
            "format": "int32"
          },
          "patientPhone": {
            "type": "string",
            "nullable": true
          },
          "success": {
            "type": "boolean"
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32"
          },
          "demoModeEnabled": {
            "type": "boolean"
          },
          "patientOptInStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatientOptInStatus"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PhoneNumberSearchFilter": {
        "type": "object",
        "properties": {
          "searchString": {
            "type": "string",
            "nullable": true
          },
          "currentPage": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "sorts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SortDescriptor"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProgramPhoneStatus": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "ReplyMessage": {
        "type": "object",
        "properties": {
          "programName": {
            "type": "string",
            "nullable": true
          },
          "from": {
            "type": "string",
            "nullable": true
          },
          "sender": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RequireOptInRequest": {
        "type": "object",
        "properties": {
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "requireOptIn": {
            "type": "boolean"
          },
          "siteProgramXrefKey": {
            "type": "integer",
            "format": "int32"
          },
          "bypassOptIn": {
            "type": "boolean"
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SiteConfiguration": {
        "type": "object",
        "properties": {
          "siteConfigurationKey": {
            "type": "integer",
            "format": "int32"
          },
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "requireOptInGeneralProgram": {
            "type": "boolean"
          },
          "requireOptInResupplyProgram": {
            "type": "boolean"
          },
          "requireOptInPaymentProgram": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SiteOptStatusResponse": {
        "type": "object",
        "properties": {
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "optStatusKey": {
            "$ref": "#/components/schemas/ProgramPhoneStatus"
          },
          "optStatusName": {
            "type": "string",
            "nullable": true
          },
          "modifiedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SiteProgramMessage": {
        "type": "object",
        "properties": {
          "siteProgramMessageKey": {
            "type": "integer",
            "format": "int32"
          },
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "enableCustomOptMessages": {
            "type": "boolean"
          },
          "optInRequestMessage": {
            "type": "string",
            "nullable": true
          },
          "manualOptInMessage": {
            "type": "string",
            "nullable": true
          },
          "defaultOptOutMessage": {
            "type": "string",
            "nullable": true
          },
          "defaultOptOutEnabled": {
            "type": "boolean"
          },
          "secUserKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SiteProgramOverride": {
        "type": "object",
        "properties": {
          "siteProgramXrefKey": {
            "type": "integer",
            "format": "int32"
          },
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "bypassOptIn": {
            "type": "boolean"
          },
          "programNumber": {
            "type": "integer",
            "format": "int32"
          },
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SiteProgramResponse": {
        "type": "object",
        "properties": {
          "siteKey": {
            "type": "integer",
            "format": "int32"
          },
          "smsHubPrograms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmsHubProgram"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmsHubAppSettingUpdate": {
        "type": "object",
        "properties": {
          "settingKey": {
            "type": "string",
            "nullable": true
          },
          "settingValue": {
            "type": "string",
            "nullable": true
          },
          "modifiedBy": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SmsHubProgram": {
        "type": "object",
        "properties": {
          "programNumber": {
            "type": "integer",
            "format": "int32"
          },
          "programName": {
            "type": "string",
            "nullable": true
          },
          "programTypeKey": {
            "type": "integer",
            "format": "int32"
          },
          "programType": {
            "type": "string",
            "nullable": true
          },
          "longPhoneNumber": {
            "type": "string",
            "nullable": true
          },
          "isOverridePhone": {
            "type": "boolean"
          },
          "isFeatureActive": {
            "type": "boolean"
          },
          "siteNickname": {
            "type": "string",
            "nullable": true
          },
          "includeDefaultOptOut": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "siteProgramXrefKey": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmsHubProgramMessage": {
        "type": "object",
        "properties": {
          "programMessageKey": {
            "type": "integer",
            "format": "int32"
          },
          "optInRequestMessage": {
            "type": "string",
            "nullable": true
          },
          "autoResponseInMessage": {
            "type": "string",
            "nullable": true
          },
          "autoResponseOutMessage": {
            "type": "string",
            "nullable": true
          },
          "autoResponseReplyMessage": {
            "type": "string",
            "nullable": true
          },
          "manualOptInMessage": {
            "type": "string",
            "nullable": true
          },
          "defaultOptOutMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SortDescriptor": {
        "type": "object",
        "properties": {
          "member": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "$ref": "#/components/schemas/SortDirection"
          }
        },
        "additionalProperties": false
      },
      "SortDirection": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "format": "int32"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.brightree.net/connect/token",
            "scopes": { }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Admin"
    },
    {
      "name": "ConsentManagement"
    },
    {
      "name": "External"
    },
    {
      "name": "Ping"
    },
    {
      "name": "Sms"
    }
  ]
}