Delete a rule
curl --request POST \
--url https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete', 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.liddie.io/api/v1/me/auto-withdrawals/{id}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAuto-withdrawals
Delete a rule
Delete a Liddie auto-withdrawal rule by id to stop its automatic per-currency balance sweep, verified with a fresh MFA factor from the dashboard user.
POST
/
api
/
v1
/
me
/
auto-withdrawals
/
{id}
/
delete
Delete a rule
curl --request POST \
--url https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete', 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.liddie.io/api/v1/me/auto-withdrawals/{id}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.liddie.io/api/v1/me/auto-withdrawals/{id}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDelete an auto-withdrawal rule by id. Once deleted, the automatic sweep for that currency stops.
cURL
# The body must include one fresh MFA factor
# (VERIFICATION_PROPS - see the Authentication guide).
curl -X POST https://api.liddie.io/api/v1/me/auto-withdrawals/<id>/delete \
-H "Authorization: Bearer <dashboard-jwt>" \
-H "Content-Type: application/json" \
-d '{ }'
Authorization
Dashboard-only (JWT) with rolemerchant_admin, merchant_member or super_admin, plus the auto-withdrawals:manage team permission. API keys are not accepted — an API key gets 401 {"error":"Invalid or expired token"}.
The body must carry one fresh MFA factor (passkey / TOTP / emailed code — the VERIFICATION_PROPS fields; see the Authentication guide). Email codes come from Send auto-withdrawal email code. Rate limit: 10/min.
Parameters
string
required
The rule id to delete (from List auto-withdrawal rules).
MFA fields (dashboard sessions)
MFA fields (dashboard sessions)
string
The single-use emailed code.
string
A 6-digit code from your authenticator app — an alternative to
emailCode. Backup codes are not accepted here: the field is validated against ^[0-9]{6}$ and backup codes are 16 hexadecimal characters. They work only at login (POST /2fa/validate). If you have lost your authenticator, request an emailed code instead.object
WebAuthn assertion, used together with
challengeKey.string
Accompanies
passkeyResponse.Not verifying with a passkey or TOTP? Request an emailed code via Send auto-withdrawal email code right before this call — the code is single-use.
Full request example
JavaScript
// Dashboard-session auth: send the dashboard JWT as a Bearer token.
// The body must include one fresh MFA factor
// (VERIFICATION_PROPS - see the Authentication guide).
const res = await fetch('https://api.liddie.io/api/v1/me/auto-withdrawals/<id>/delete', {
method: 'POST',
headers: {
Authorization: 'Bearer <dashboard-jwt>',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
})
const body = await res.json()
Errors
| Status | Body | Why |
|---|---|---|
| 400 | {"ok":false,"error":{"code":"VERIFICATION_FAILED","message":"Verification required: provide email code, OTP, or passkey"}} | The body lacks a valid fresh MFA factor. |
| 401 | {"ok":false,"error":{"code":"VERIFICATION_FAILED","message":"Invalid email code"}} | Wrong, already-used or invalid email code, OTP or passkey assertion. Same code, different status — do not treat this 401 as an expired session. |
| 403 | {"ok":false,"error":{"code":"VERIFICATION_FAILED","message":"TOTP is not enabled on this account"}} | A totpCode was sent by a user with no authenticator enrolled. |
| 429 | {"ok":false,"error":{"code":"VERIFICATION_FAILED","message":"Too many incorrect codes. Request a new one."}} | Five wrong email codes — the challenge is voided; request a fresh code. |
| 429 | {"ok":false,"error":{"code":"VERIFICATION_FAILED","message":"Too many failed attempts. Try again later."}} | TOTP lockout after repeated wrong codes. |
| 401 | {"error":"Invalid or expired token"} | Called with an API key or a missing/expired dashboard JWT. |
| 404 | {"ok":false,"error":{"code":"NOT_FOUND","message":"Auto-withdrawal rule not found"}} | Unknown id, or a rule belonging to another merchant — the same 404 either way, so the endpoint is not an existence oracle. |
See also
- List auto-withdrawal rules: find the rule id to delete.
- Create or update a rule: recreate or adjust a rule instead of deleting it.
- Send auto-withdrawal email code: request the emailed-code MFA factor for this call.