curl --request PUT \
--url https://api.qbank.cl/platform/v1/otp/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "payout",
"required": true,
"channel": "totp"
}
'import requests
url = "https://api.qbank.cl/platform/v1/otp/preferences"
payload = {
"action": "payout",
"required": True,
"channel": "totp"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'payout', required: true, channel: 'totp'})
};
fetch('https://api.qbank.cl/platform/v1/otp/preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/otp/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'payout',
'required' => true,
'channel' => 'totp'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/otp/preferences"
payload := strings.NewReader("{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.qbank.cl/platform/v1/otp/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/otp/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"actions": [
{
"action": "payout",
"required": true,
"channel": "totp",
"source": "account"
}
]
}Update my 2FA preferences
Lets the account owner configure its own 2FA. You can always harden (enable actions, move to a stronger channel: totp > email > sms/whatsapp) but never go below the organization floor. Weakening (disabling an active action or lowering the channel) requires an X-OTP-Token for the security_settings action. Choosing channel:totp requires the authenticator app already enrolled. Enabling 2FA for the login action over a phone channel (sms/whatsapp) requires the account phone number to be verified first (complete any SMS/WhatsApp OTP challenge); otherwise the request is rejected with 409 phone_verification_required — this prevents locking yourself out with a mistyped number.
curl --request PUT \
--url https://api.qbank.cl/platform/v1/otp/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "payout",
"required": true,
"channel": "totp"
}
'import requests
url = "https://api.qbank.cl/platform/v1/otp/preferences"
payload = {
"action": "payout",
"required": True,
"channel": "totp"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'payout', required: true, channel: 'totp'})
};
fetch('https://api.qbank.cl/platform/v1/otp/preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/otp/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'payout',
'required' => true,
'channel' => 'totp'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/otp/preferences"
payload := strings.NewReader("{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.qbank.cl/platform/v1/otp/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/otp/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"payout\",\n \"required\": true,\n \"channel\": \"totp\"\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"actions": [
{
"action": "payout",
"required": true,
"channel": "totp",
"source": "account"
}
]
}Authorizations
Session JWT (from register/login) or API key (pk_...).
X-API-Key: <token> is accepted as an alternative header.
Headers
Body
login, payout, crypto_withdrawal, transfer, banking_operation, card_reveal, api_key_create, member_add, phone_change, password_change, email_change, security_settings sms, whatsapp, email, totp Response
Updated effective policy.