Delete OAuth API key
curl --request DELETE \
--url https://whitebit.com/oauth2/api-key/{externalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://whitebit.com/oauth2/api-key/{externalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://whitebit.com/oauth2/api-key/{externalId}', 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://whitebit.com/oauth2/api-key/{externalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://whitebit.com/oauth2/api-key/{externalId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://whitebit.com/oauth2/api-key/{externalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/oauth2/api-key/{externalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": []
}{
"data": {
"message": [
"Unauthorized."
]
}
}{
"data": {
"message": [
"Forbidden."
]
}
}{
"data": {
"message": [
"Key not found."
]
}
}Delete OAuth API key
The endpoint deletes a partner-issued API key owned by the authenticated OAuth2 client. The deletion triggers an email notification to the user. The endpoint applies to active keys — disabled keys must be removed by the user from the WhiteBIT dashboard.
Required scope: apikeys.delete.
Region availability: The endpoint is available on the global server (https://whitebit.com) only.
DELETE
/
oauth2
/
api-key
/
{externalId}
Delete OAuth API key
curl --request DELETE \
--url https://whitebit.com/oauth2/api-key/{externalId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://whitebit.com/oauth2/api-key/{externalId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://whitebit.com/oauth2/api-key/{externalId}', 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://whitebit.com/oauth2/api-key/{externalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://whitebit.com/oauth2/api-key/{externalId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://whitebit.com/oauth2/api-key/{externalId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://whitebit.com/oauth2/api-key/{externalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": []
}{
"data": {
"message": [
"Unauthorized."
]
}
}{
"data": {
"message": [
"Forbidden."
]
}
}{
"data": {
"message": [
"Key not found."
]
}
}Authentication
OAuth 2.0 Bearer token. Required scope:apikeys.delete. See Authentication. The endpoint is available on https://whitebit.com only.
Cache
No caching.Notes
The endpoint deletes only OAuth-issued API keys owned by the authenticated OAuth2 client. Keys belonging to other OAuth2 clients return403. Manually-created API keys are not deletable through this endpoint. Disabled keys (post-inactivity, awaiting user-side deletion) require user-initiated deletion from the WhiteBIT dashboard.
Partner-initiated deletion through the endpoint triggers an email to the user. User-initiated dashboard deletion does not send an email.
- Obtain the
externalIdpath parameter from Check OAuth API key existence. - Automatic deletion triggers (14-day inactivity, account password change, account block, account freeze) also send an email to the user.
Used in these guides
- Copy Trading — mirror a lead trader’s orders into followers’ own accounts via OAuth-issued keys.
- Fast API Key integration — OAuth-issued API keys created on behalf of end users.
Authorizations
OAuth 2.0 Bearer Token authentication. Include the access token in the Authorization header.
Example: Authorization: Bearer YOUR_ACCESS_TOKEN
Path Parameters
External UUID of the API key.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Response
Successful deletion.
Example:
[]
Was this page helpful?