{
  "openapi" : "3.0.0",
  "info" : {
    "title" : "jambonz REST API",
    "description" : "jambonz REST API",
    "contact" : {
      "email" : "daveh@drachtio.org"
    },
    "license" : {
      "name" : "MIT",
      "url" : "https://opensource.org/licenses/MIT"
    },
    "version" : "1.0.0"
  },
  "servers" : [ {
    "url" : "/v1",
    "description" : "development server"
  } ],
  "security" : [ {
    "bearerAuth" : [ ]
  } ],
  "paths" : {
    "/Sbcs" : {
      "get" : {
        "summary" : "retrieve public IP addresses of the jambonz Sbcs",
        "operationId" : "listSbcs",
        "parameters" : [ {
          "name" : "service_provider_sid",
          "in" : "query",
          "required" : false,
          "style" : "form",
          "explode" : true,
          "schema" : {
            "type" : "string",
            "description" : "return only the SBCs operated for the sole use of this service provider"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "list of SBC addresses",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/inline_response_200"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "add an SBC address",
        "operationId" : "createSbc",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "sbc address successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Sbcs/{SbcSid}" : {
      "delete" : {
        "summary" : "delete sbc address",
        "operationId" : "deleteSbcAddress",
        "parameters" : [ {
          "name" : "SbcSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "sbc address deleted"
          },
          "404" : {
            "description" : "sbc address not found"
          }
        }
      }
    },
    "/ApiKeys" : {
      "post" : {
        "summary" : "create an api key",
        "operationId" : "createApikey",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_1"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "api key successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulApiKeyAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Apikeys/{ApiKeySid}" : {
      "delete" : {
        "summary" : "delete api key",
        "operationId" : "deleteApiKey",
        "parameters" : [ {
          "name" : "ApiKeySid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "api key deleted"
          },
          "404" : {
            "description" : "api key or account not found"
          }
        }
      }
    },
    "/login" : {
      "post" : {
        "summary" : "login a user and receive an api token",
        "operationId" : "loginUser",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_2"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "login succeeded",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Login"
                }
              }
            }
          },
          "403" : {
            "description" : "login failed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Users/{UserSid}" : {
      "put" : {
        "summary" : "update a user password",
        "operationId" : "updateUser",
        "parameters" : [ {
          "name" : "UserSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_3"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "password successfully changed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Login"
                }
              }
            }
          },
          "403" : {
            "description" : "password change failed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/VoipCarriers" : {
      "get" : {
        "summary" : "list voip carriers",
        "operationId" : "listVoipCarriers",
        "responses" : {
          "200" : {
            "description" : "list of voip carriers",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/VoipCarrier"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create voip carrier",
        "operationId" : "createVoipCarrier",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_4"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "voip carrier successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/VoipCarriers/{VoipCarrierSid}" : {
      "get" : {
        "summary" : "retrieve voip carrier",
        "operationId" : "getVoipCarrier",
        "parameters" : [ {
          "name" : "VoipCarrierSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "voip carrier found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VoipCarrier"
                }
              }
            }
          },
          "404" : {
            "description" : "voip carrier not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update voip carrier",
        "operationId" : "updateVoipCarrier",
        "parameters" : [ {
          "name" : "VoipCarrierSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/VoipCarrier"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "voip carrier updated",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VoipCarrier"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "404" : {
            "description" : "voip carrier not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete a voip carrier",
        "operationId" : "deleteVoipCarrier",
        "parameters" : [ {
          "name" : "VoipCarrierSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "voip carrier successfully deleted"
          },
          "404" : {
            "description" : "voip carrier not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/SipGateways" : {
      "get" : {
        "summary" : "list sip gateways",
        "operationId" : "listSipGateways",
        "responses" : {
          "200" : {
            "description" : "list of sip gateways",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/SipGateway"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create sip gateway",
        "operationId" : "createSipGateway",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_5"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "sip gateway successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/SipGateways/{SipGatewaySid}" : {
      "get" : {
        "summary" : "retrieve sip gateway",
        "operationId" : "getSipGateway",
        "parameters" : [ {
          "name" : "SipGatewaySid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "sip gateway found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VoipCarrier"
                }
              }
            }
          },
          "404" : {
            "description" : "sip gateway not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update sip gateway",
        "operationId" : "updateSipGateway",
        "parameters" : [ {
          "name" : "SipGatewaySid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SipGateway"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "sip gateway updated"
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "404" : {
            "description" : "sip gateway not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete a sip gateway",
        "operationId" : "deleteSipGateway",
        "parameters" : [ {
          "name" : "SipGatewaySid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "sip gateway successfully deleted"
          },
          "404" : {
            "description" : "sip gateway not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/PhoneNumbers" : {
      "get" : {
        "summary" : "list phone numbers",
        "operationId" : "listProvisionedPhoneNumbers",
        "responses" : {
          "200" : {
            "description" : "list of phone numbers",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PhoneNumber"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "provision a phone number into inventory from a Voip Carrier",
        "operationId" : "provisionPhoneNumber",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_6"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "phone number successfully provisioned",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                },
                "example" : {
                  "msg" : "invalid telephone number format"
                }
              }
            }
          },
          "404" : {
            "description" : "voip carrier not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/PhoneNumbers/{PhoneNumberSid}" : {
      "get" : {
        "summary" : "retrieve phone number",
        "operationId" : "getPhoneNumber",
        "parameters" : [ {
          "name" : "PhoneNumberSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "phone number found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PhoneNumber"
                }
              }
            }
          },
          "404" : {
            "description" : "phone number not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update phone number",
        "operationId" : "updatePhoneNumber",
        "parameters" : [ {
          "name" : "PhoneNumberSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PhoneNumber"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "phone number updated",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VoipCarrier"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "404" : {
            "description" : "phone number not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete a phone number",
        "operationId" : "deletePhoneNumber",
        "parameters" : [ {
          "name" : "PhoneNumberSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "phone number successfully deleted"
          },
          "404" : {
            "description" : "phone number not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/ServiceProviders" : {
      "get" : {
        "summary" : "list service providers",
        "operationId" : "listServiceProviders",
        "responses" : {
          "200" : {
            "description" : "list of service providers",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ServiceProvider"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create service provider",
        "operationId" : "createServiceProvider",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_7"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "service provider successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/ServiceProviders/{ServiceProviderSid}" : {
      "get" : {
        "summary" : "retrieve service provider",
        "operationId" : "getServiceProvider",
        "parameters" : [ {
          "name" : "ServiceProviderSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "service provider found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ServiceProvider"
                }
              }
            }
          },
          "404" : {
            "description" : "service provider not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update service provider",
        "operationId" : "updateServiceProvider",
        "parameters" : [ {
          "name" : "ServiceProviderSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ServiceProvider"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "service provider updated"
          },
          "404" : {
            "description" : "service provider not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete a service provider",
        "operationId" : "deleteServiceProvider",
        "parameters" : [ {
          "name" : "ServiceProviderSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "service provider successfully deleted"
          },
          "404" : {
            "description" : "service provider not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/MicrosoftTeamsTenants" : {
      "get" : {
        "summary" : "list MS Teams tenants",
        "operationId" : "listMsTeamsTenants",
        "responses" : {
          "200" : {
            "description" : "list of tenants",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/MsTeamsTenant"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "provision a customer tenant for MS Teams",
        "operationId" : "createMsTeamsTenant",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_8"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "tenant successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/MicrosoftTeamsTenants/{TenantSid}" : {
      "get" : {
        "summary" : "retrieve an MS Teams tenant",
        "operationId" : "getTenant",
        "parameters" : [ {
          "name" : "TenantSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "tenant found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/MsTeamsTenant"
                }
              }
            }
          },
          "404" : {
            "description" : "account not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update tenant",
        "operationId" : "updateAccount",
        "parameters" : [ {
          "name" : "TenantSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Tenant"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "tenant updated"
          },
          "404" : {
            "description" : "tenant not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete an MS Teams tenant",
        "operationId" : "deleteTenant",
        "parameters" : [ {
          "name" : "TenantSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "tenant successfully deleted"
          },
          "404" : {
            "description" : "tenant not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Accounts" : {
      "get" : {
        "summary" : "list accounts",
        "operationId" : "listAccounts",
        "responses" : {
          "200" : {
            "description" : "list of accounts",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Account"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create an account",
        "operationId" : "createAccount",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_9"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "account successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        },
        "callbacks" : {
          "onRegistrationAttempt" : {
            "{$request.body#/registrationUrl}/auth" : {
              "post" : {
                "requestBody" : {
                  "description" : "provides details of the authentication request.  The receiving server is responsible for authenticating the \nrequest as per [RFC 2617](https://tools.ietf.org/html/rfc2617)\n",
                  "content" : {
                    "application/json" : {
                      "schema" : {
                        "required" : [ "expires", "method", "nonce", "realm", "response", "uri", "username" ],
                        "type" : "object",
                        "properties" : {
                          "method" : {
                            "type" : "string",
                            "description" : "sip request method",
                            "example" : "REGISTER"
                          },
                          "realm" : {
                            "type" : "string",
                            "description" : "sip realm",
                            "example" : "mycompany.com"
                          },
                          "username" : {
                            "type" : "string",
                            "description" : "sip username provided",
                            "example" : "daveh"
                          },
                          "expires" : {
                            "type" : "number",
                            "description" : "expiration requested, in seconds",
                            "example" : 3600
                          },
                          "scheme" : {
                            "type" : "string",
                            "description" : "encryption protocol",
                            "example" : "digest"
                          },
                          "nonce" : {
                            "type" : "string",
                            "description" : "nonce value",
                            "example" : "InFriVGWVoKeCckYrTx7wg==\""
                          },
                          "uri" : {
                            "type" : "string",
                            "description" : "sip uri in request",
                            "format" : "uri",
                            "example" : "sip:mycompany.com"
                          },
                          "algorithm" : {
                            "type" : "string",
                            "description" : "encryption algorithm used, default to MD5 if not provided",
                            "example" : "MD5"
                          },
                          "qop" : {
                            "type" : "string",
                            "description" : "qop value",
                            "example" : "auth"
                          },
                          "cnonce" : {
                            "type" : "string",
                            "description" : "cnonce value",
                            "example" : "6b8b4567"
                          },
                          "nc" : {
                            "type" : "string",
                            "description" : "nc value",
                            "example" : "1"
                          },
                          "response" : {
                            "type" : "string",
                            "description" : "digest value calculated by the client",
                            "example" : "be641cf7951ff23ab04c57907d59f37d"
                          }
                        }
                      }
                    }
                  }
                },
                "responses" : {
                  "200" : {
                    "description" : "Your callback should return this HTTP status code in all cases.\nif the request was authenticated and you wish to admit \nthe client to the network, this is indicated by setting the 'response' \nattribute in the body to 'ok'\n",
                    "content" : {
                      "application/json" : {
                        "schema" : {
                          "required" : [ "status" ],
                          "type" : "object",
                          "properties" : {
                            "status" : {
                              "type" : "string",
                              "description" : "indicates whether the request was successfully authenticated",
                              "example" : "ok",
                              "enum" : [ "ok", "fail" ]
                            },
                            "message" : {
                              "type" : "string",
                              "description" : "a human-readable message",
                              "example" : "authentication granted"
                            },
                            "call_hook" : {
                              "type" : "string",
                              "description" : "url of application to invoke when this device places a call",
                              "format" : "url"
                            },
                            "expires" : {
                              "type" : "number",
                              "description" : "The expires value to grant to the requesting user.\nIf not provided, the expires value in the request is observed.\nIf provided, must be less than the requested expires value.\n"
                            },
                            "blacklist" : {
                              "type" : "number",
                              "description" : "If provided, represents a period in seconds during which the source IP \naddress should be blacklisted by the platform (0 means forever).\n"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/Accounts/{AccountSid}" : {
      "get" : {
        "summary" : "retrieve account",
        "operationId" : "getAccount",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "account found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Account"
                }
              }
            }
          },
          "404" : {
            "description" : "account not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update account",
        "operationId" : "updateAccount",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Account"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "account updated"
          },
          "404" : {
            "description" : "account not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete an account",
        "operationId" : "deleteAccount",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "account successfully deleted"
          },
          "404" : {
            "description" : "account not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Accounts/{AccountSid}/ApiKeys" : {
      "get" : {
        "summary" : "get all api keys for an account",
        "operationId" : "getAccountApiKeys",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string",
            "format" : "uuid"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "list of api keys",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ApiKey"
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "account not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Applications" : {
      "get" : {
        "summary" : "list applications",
        "operationId" : "listApplications",
        "responses" : {
          "200" : {
            "description" : "list of applications",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Application"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create application",
        "operationId" : "createApplication",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_10"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "application successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SuccessfulAdd"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Applications/{ApplicationSid}" : {
      "get" : {
        "summary" : "retrieve an application",
        "parameters" : [ {
          "name" : "ApplicationSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "application found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Application"
                }
              }
            }
          },
          "404" : {
            "description" : "application not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "put" : {
        "summary" : "update application",
        "operationId" : "updateApplication",
        "parameters" : [ {
          "name" : "ApplicationSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Application"
              }
            }
          }
        },
        "responses" : {
          "204" : {
            "description" : "application updated"
          },
          "404" : {
            "description" : "application not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete an application",
        "operationId" : "deleteApplication",
        "parameters" : [ {
          "name" : "ApplicationSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "application successfully deleted"
          },
          "404" : {
            "description" : "application not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Accounts/{AccountSid}/Calls" : {
      "get" : {
        "summary" : "list calls",
        "operationId" : "listCalls",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "list of calls for a specified account",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Call"
                  }
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "create a call",
        "operationId" : "createCall",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_11"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "call successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/inline_response_201"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request"
          }
        }
      }
    },
    "/Accounts/{AccountSid}/Calls/{CallSid}" : {
      "get" : {
        "summary" : "retrieve a call",
        "operationId" : "getCall",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "CallSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "call found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Call"
                }
              }
            }
          },
          "404" : {
            "description" : "call not found"
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "update a call",
        "operationId" : "updateCall",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "CallSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/body_12"
              }
            }
          }
        },
        "responses" : {
          "202" : {
            "description" : "Accepted"
          },
          "400" : {
            "description" : "bad request"
          },
          "404" : {
            "description" : "call not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "delete a call",
        "operationId" : "deleteCall",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "CallSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "call successfully deleted"
          },
          "404" : {
            "description" : "call not found"
          },
          "422" : {
            "description" : "unprocessable entity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          },
          "500" : {
            "description" : "system error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GeneralError"
                }
              }
            }
          }
        }
      }
    },
    "/Accounts/{AccountSid}/Messages" : {
      "post" : {
        "summary" : "create an outgoing SMS message",
        "operationId" : "createMessage",
        "parameters" : [ {
          "name" : "AccountSid",
          "in" : "path",
          "required" : true,
          "style" : "simple",
          "explode" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Message"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "call successfully created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/inline_response_201_1"
                }
              }
            }
          },
          "400" : {
            "description" : "bad request"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "Login" : {
        "required" : [ "user_sid" ],
        "type" : "object",
        "properties" : {
          "user_sid" : {
            "type" : "string"
          },
          "api_token" : {
            "type" : "string"
          },
          "change_password" : {
            "type" : "boolean"
          }
        }
      },
      "SuccessfulApiKeyAdd" : {
        "required" : [ "sid", "token" ],
        "type" : "object",
        "properties" : {
          "sid" : {
            "type" : "string"
          },
          "token" : {
            "type" : "string"
          }
        },
        "example" : {
          "sid" : "9d26a637-1679-471f-8da8-7150266e1254",
          "token" : "589cead6-de24-4689-8ac3-08ffaf102811"
        }
      },
      "SuccessfulAdd" : {
        "required" : [ "sid" ],
        "type" : "object",
        "properties" : {
          "sid" : {
            "type" : "string"
          }
        },
        "example" : {
          "sid" : "9d26a637-1679-471f-8da8-7150266e1254"
        }
      },
      "GeneralError" : {
        "required" : [ "msg" ],
        "type" : "object",
        "properties" : {
          "msg" : {
            "type" : "string"
          }
        },
        "example" : {
          "msg" : "specific error detail will be provided here"
        }
      },
      "ServiceProvider" : {
        "required" : [ "name", "service_provider_sid" ],
        "type" : "object",
        "properties" : {
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "root_domain" : {
            "type" : "string"
          },
          "registration_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "ms_teams_fqdn" : {
            "type" : "string"
          }
        }
      },
      "VoipCarrier" : {
        "required" : [ "name", "voip_carrier_sid" ],
        "type" : "object",
        "properties" : {
          "voip_carrier_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "e164_leading_plus" : {
            "type" : "boolean"
          },
          "requires_register" : {
            "type" : "boolean"
          },
          "register_username" : {
            "type" : "string"
          },
          "register_sip_realm" : {
            "type" : "string"
          },
          "register_password" : {
            "type" : "string"
          }
        }
      },
      "SipGateway" : {
        "required" : [ "ipv4", "port", "sip_gateway_sid", "voip_carrier_sid" ],
        "type" : "object",
        "properties" : {
          "sip_gateway_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "ipv4" : {
            "type" : "string"
          },
          "port" : {
            "type" : "number"
          },
          "voip_carrier_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "is_active" : {
            "type" : "boolean"
          },
          "inbound" : {
            "type" : "boolean"
          },
          "outbound" : {
            "type" : "boolean"
          }
        }
      },
      "Account" : {
        "required" : [ "account_sid", "name", "service_provider_sid" ],
        "type" : "object",
        "properties" : {
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "sip_realm" : {
            "type" : "string"
          },
          "registration_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "device_calling_application_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "Application" : {
        "required" : [ "account_sid", "application_sid", "name" ],
        "type" : "object",
        "properties" : {
          "application_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "name" : {
            "type" : "string"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "call_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "call_status_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "messaging_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "speech_synthesis_vendor" : {
            "type" : "string"
          },
          "speech_synthesis_voice" : {
            "type" : "string"
          },
          "speech_recognizer_vendor" : {
            "type" : "string"
          },
          "speech_recognizer_language" : {
            "type" : "string"
          }
        }
      },
      "ApiKey" : {
        "required" : [ "api_key_sid", "token" ],
        "type" : "object",
        "properties" : {
          "api_key_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "token" : {
            "type" : "string",
            "format" : "uuid"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "expires_at" : {
            "type" : "dateTime"
          },
          "created_at" : {
            "type" : "dateTime"
          },
          "last_used" : {
            "type" : "dateTime"
          }
        }
      },
      "PhoneNumber" : {
        "required" : [ "number", "phone_number_sid", "voip_carrier_sid" ],
        "type" : "object",
        "properties" : {
          "phone_number_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "number" : {
            "type" : "string"
          },
          "voip_carrier_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "application_sid" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "Registration" : {
        "required" : [ "domain", "registration_sid", "sip_contact", "username" ],
        "type" : "object",
        "properties" : {
          "registration_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "username" : {
            "type" : "string"
          },
          "domain" : {
            "type" : "string"
          },
          "sip_contact" : {
            "type" : "string"
          },
          "sip_user_agent" : {
            "type" : "string"
          }
        }
      },
      "Webhook" : {
        "required" : [ "url" ],
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string",
            "format" : "url"
          },
          "method" : {
            "type" : "string",
            "enum" : [ "get", "post" ]
          },
          "username" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          }
        },
        "example" : {
          "url" : "https://acme.com",
          "method" : "POST"
        }
      },
      "MsTeamsTenant" : {
        "required" : [ "service_provider_sid", "tenant_fqdn" ],
        "type" : "object",
        "properties" : {
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "application_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "tenant_fqdn" : {
            "type" : "string"
          }
        }
      },
      "Call" : {
        "required" : [ "account_sid", "call_id", "call_sid", "call_status", "direction", "from", "service_url", "sip_status", "to" ],
        "type" : "object",
        "properties" : {
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "application_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "call_id" : {
            "type" : "string"
          },
          "call_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "call_status" : {
            "type" : "string",
            "enum" : [ "trying", "ringing", "alerting", "in-progress", "completed", "busy", "no-answer", "failed", "queued" ]
          },
          "caller_name" : {
            "type" : "string"
          },
          "direction" : {
            "type" : "string",
            "enum" : [ "inbound", "outbound" ]
          },
          "duration" : {
            "type" : "integer"
          },
          "from" : {
            "type" : "string"
          },
          "originating_sip_trunk_name" : {
            "type" : "string"
          },
          "parent_call_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "service_url" : {
            "type" : "string"
          },
          "sip_status" : {
            "type" : "integer"
          },
          "to" : {
            "type" : "string"
          }
        }
      },
      "Target" : {
        "required" : [ "type" ],
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : [ "phone", "sip", "user" ]
          },
          "number" : {
            "type" : "string"
          },
          "sipUri" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "auth" : {
            "$ref" : "#/components/schemas/Target_auth"
          }
        },
        "example" : {
          "type" : "phone",
          "number" : "+16172375080"
        }
      },
      "Message" : {
        "required" : [ "from", "to" ],
        "properties" : {
          "provider" : {
            "type" : "string"
          },
          "from" : {
            "type" : "string"
          },
          "to" : {
            "type" : "string"
          },
          "text" : {
            "type" : "string"
          },
          "media" : {
            "type" : "string"
          }
        },
        "example" : {
          "from" : "13394445678",
          "to" : "16173333456",
          "text" : "please call when you can"
        }
      },
      "inline_response_200" : {
        "required" : [ "ipv4" ],
        "properties" : {
          "ipv4" : {
            "type" : "string",
            "description" : "ip address of one of our Sbcs"
          }
        }
      },
      "body" : {
        "required" : [ "ipv4" ],
        "type" : "object",
        "properties" : {
          "ipv4" : {
            "type" : "string"
          },
          "port" : {
            "type" : "number"
          },
          "service_provider_sid" : {
            "type" : "string",
            "description" : "service provider scope for the generated api key"
          }
        }
      },
      "body_1" : {
        "type" : "object",
        "properties" : {
          "service_provider_sid" : {
            "type" : "string",
            "description" : "service provider scope for the generated api key"
          },
          "account_sid" : {
            "type" : "string",
            "description" : "account scope for the generated api key"
          },
          "expiry_secs" : {
            "type" : "number",
            "description" : "duration of key validity, in seconds"
          }
        }
      },
      "body_2" : {
        "required" : [ "password", "username" ],
        "type" : "object",
        "properties" : {
          "username" : {
            "type" : "string",
            "description" : "login username"
          },
          "password" : {
            "type" : "string",
            "description" : "login password"
          }
        }
      },
      "body_3" : {
        "required" : [ "new_password", "old_password" ],
        "type" : "object",
        "properties" : {
          "old_password" : {
            "type" : "string",
            "description" : "existing password, which is to be replaced"
          },
          "new_password" : {
            "type" : "string",
            "description" : "new password"
          }
        }
      },
      "body_4" : {
        "required" : [ "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "voip carrier name",
            "example" : "fastco"
          },
          "description" : {
            "type" : "string",
            "example" : "my US sip trunking provider"
          },
          "e164_leading_plus" : {
            "type" : "boolean",
            "description" : "whether a leading + is required on INVITEs to this provider",
            "example" : true
          },
          "requires_register" : {
            "type" : "boolean",
            "description" : "wehther this provider requires us to send a REGISTER to them in order to receive calls"
          },
          "register_username" : {
            "type" : "string",
            "description" : "sip username to authenticate with, if registration is required",
            "example" : "foo"
          },
          "register_sip_realm" : {
            "type" : "string",
            "description" : "sip realm to authenticate with, if registration is required",
            "example" : "sip.fastco.com"
          },
          "register_password" : {
            "type" : "string",
            "description" : "sip password to authenticate with, if registration is required",
            "example" : "bar"
          }
        }
      },
      "body_5" : {
        "required" : [ "ipv4", "voip_carrier_sid" ],
        "type" : "object",
        "properties" : {
          "voip_carrier_sid" : {
            "type" : "string",
            "description" : "voip carrier that provides this gateway",
            "format" : "uuid"
          },
          "ipv4" : {
            "type" : "string"
          },
          "port" : {
            "type" : "number"
          },
          "is_active" : {
            "type" : "boolean"
          },
          "inbound" : {
            "type" : "boolean"
          },
          "outbound" : {
            "type" : "boolean"
          }
        }
      },
      "body_6" : {
        "required" : [ "number", "voip_carrier_sid" ],
        "type" : "object",
        "properties" : {
          "number" : {
            "type" : "string",
            "description" : "telephone number"
          },
          "voip_carrier_sid" : {
            "type" : "string",
            "format" : "uuid"
          }
        }
      },
      "body_7" : {
        "required" : [ "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "service provider name",
            "example" : "fastcomms"
          },
          "description" : {
            "type" : "string"
          },
          "root_domain" : {
            "type" : "string",
            "description" : "root domain for group of accounts that share a registration hook",
            "example" : "example.com"
          },
          "registration_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "ms_teams_fqdn" : {
            "type" : "string",
            "description" : "SBC domain name for Microsoft Teams",
            "example" : "contoso.com"
          }
        }
      },
      "body_8" : {
        "required" : [ "account", "service_provider_sid", "tenant_fqdn" ],
        "type" : "object",
        "properties" : {
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "85f9c036-ba61-4f28-b2f5-617c23fa68ff"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "85f9c036-ba61-4f28-b2f5-617c23fa68ff"
          },
          "application_sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "85f9c036-ba61-4f28-b2f5-617c23fa68ff"
          },
          "tenant_fqdn" : {
            "type" : "string",
            "example" : "customer.contoso.com"
          }
        }
      },
      "body_9" : {
        "required" : [ "name", "service_provider_sid" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "account name",
            "example" : "foobar"
          },
          "sip_realm" : {
            "type" : "string",
            "description" : "sip realm for registration",
            "example" : "sip.mycompany.com"
          },
          "registration_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "service_provider_sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "85f9c036-ba61-4f28-b2f5-617c23fa68ff"
          }
        }
      },
      "body_10" : {
        "required" : [ "account_sid", "call_hook", "call_status_hook", "name" ],
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "application name"
          },
          "account_sid" : {
            "type" : "string",
            "format" : "uuid"
          },
          "call_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "call_status_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "messaging_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "speech_synthesis_vendor" : {
            "type" : "string"
          },
          "speech_synthesis_voice" : {
            "type" : "string"
          },
          "speech_recognizer_vendor" : {
            "type" : "string"
          },
          "speech_recognizer_language" : {
            "type" : "string"
          }
        }
      },
      "body_11" : {
        "required" : [ "from", "to" ],
        "type" : "object",
        "properties" : {
          "application_sid" : {
            "type" : "string",
            "description" : "The application to use to control this call.  Either applicationSid or url is required.",
            "format" : "uuid"
          },
          "call_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "call_status_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "from" : {
            "type" : "string",
            "description" : "The calling party number",
            "example" : "16172375089"
          },
          "timeout" : {
            "type" : "integer",
            "description" : "the number of seconds to wait for call to be answered.  Defaults to 60.",
            "example" : 30
          },
          "tag" : {
            "type" : "object",
            "description" : "initial set of customer-supplied metadata to associate with the call (see jambonz 'tag' verb)",
            "example" : {
              "callCount" : 10
            }
          },
          "to" : {
            "$ref" : "#/components/schemas/Target"
          }
        }
      },
      "inline_response_201" : {
        "required" : [ "sid" ],
        "properties" : {
          "sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "2531329f-fb09-4ef7-887e-84e648214436"
          }
        }
      },
      "body_12" : {
        "type" : "object",
        "properties" : {
          "call_hook" : {
            "$ref" : "#/components/schemas/Webhook"
          },
          "call_status" : {
            "type" : "string",
            "enum" : [ "completed", "no-answer" ]
          },
          "listen_status" : {
            "type" : "string",
            "enum" : [ "pause", "resume" ]
          },
          "mute_status" : {
            "type" : "string",
            "enum" : [ "mute", "unmute" ]
          },
          "whisper" : {
            "$ref" : "#/components/schemas/Webhook"
          }
        }
      },
      "inline_response_201_1" : {
        "required" : [ "sid" ],
        "properties" : {
          "sid" : {
            "type" : "string",
            "format" : "uuid",
            "example" : "2531329f-fb09-4ef7-887e-84e648214436"
          },
          "providerResponse" : {
            "type" : "string"
          }
        }
      },
      "Target_auth" : {
        "type" : "object",
        "properties" : {
          "username" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          }
        }
      }
    },
    "securitySchemes" : {
      "bearerAuth" : {
        "type" : "http",
        "scheme" : "bearer",
        "bearerFormat" : "token"
      }
    }
  }
}