curl -X POST https://api.liddie.io/api/v1/withdrawals/send-email-code \
-H "Cookie: <dashboard session cookies>"
// Dashboard-session auth: send the session JWT as a Bearer token
const res = await fetch('https://api.liddie.io/api/v1/withdrawals/send-email-code', {
method: 'POST',
headers: { Authorization: `Bearer ${dashboardJwt}` },
})
const body = await res.json()
Withdrawals
Send withdrawal email code
Send a single-use email code to your account address, then pass it as the emailCode MFA factor when requesting a Liddie withdrawal.
POST
/
api
/
v1
/
withdrawals
/
send-email-code
curl -X POST https://api.liddie.io/api/v1/withdrawals/send-email-code \
-H "Cookie: <dashboard session cookies>"
// Dashboard-session auth: send the session JWT as a Bearer token
const res = await fetch('https://api.liddie.io/api/v1/withdrawals/send-email-code', {
method: 'POST',
headers: { Authorization: `Bearer ${dashboardJwt}` },
})
const body = await res.json()
Emails a single-use MFA code to the account’s email address. Pass the received code as the email-code verification factor when calling Request a withdrawal.
This endpoint takes no parameters — the email address is inferred from your dashboard session.
Cookie-authenticated writes also need an
Origin header. Any non-GET request that carries the liddie_access session cookie is checked against the allowed dashboard origins; a bare cURL that sends only the cookie is rejected with 403 {"ok":false,"error":{"code":"CSRF_ORIGIN_MISMATCH","message":"Forbidden"}} before the handler runs. The snippet below is shown for shape — from a browser the dashboard sends the origin for you; from a script, prefer an API key where the endpoint accepts one.curl -X POST https://api.liddie.io/api/v1/withdrawals/send-email-code \
-H "Cookie: <dashboard session cookies>"
// Dashboard-session auth: send the session JWT as a Bearer token
const res = await fetch('https://api.liddie.io/api/v1/withdrawals/send-email-code', {
method: 'POST',
headers: { Authorization: `Bearer ${dashboardJwt}` },
})
const body = await res.json()
Authorization
Dashboard-only (JWT session). Roles:merchant_admin / merchant_member / super_admin, with team permission withdrawals:manage. Rate limit: 3 per 15 minutes.
Calling with an API key fails with 401 {"error":"Invalid or expired token"} — the key is not a JWT.
The code is single-use and this endpoint is rate limited to 3 requests per 15 minutes — request a code only when you are ready to submit the withdrawal, then pass it as
emailCode in Request a withdrawal.Errors
| Status | Body | Why |
|---|---|---|
| 401 | {"error":"Invalid or expired token"} | Called with an API key (or an expired session) — this endpoint is dashboard-JWT only. |
See also
- Request a withdrawal: the endpoint that consumes this code as its
emailCodeMFA factor. - List withdrawals: follow the withdrawal’s status after submitting it.