Revoke an API key
curl --request DELETE \
--url https://api.sandbox.rails.wayex.com/v1/api-keys/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.rails.wayex.com/v1/api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.rails.wayex.com/v1/api-keys/{id}', 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.sandbox.rails.wayex.com/v1/api-keys/{id}",
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://api.sandbox.rails.wayex.com/v1/api-keys/{id}"
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://api.sandbox.rails.wayex.com/v1/api-keys/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/api-keys/{id}")
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{
"id": "<string>",
"counterpartyId": "<string>",
"kind": "secret",
"name": "<string>",
"maskedKey": "<string>",
"lastFour": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"rotatedToId": "<string>",
"scopes": [
"customers:read"
],
"allowedIps": [
"<string>"
]
}Webhooks and account administration
Revoke an API key
Revokes an API key so it can no longer authenticate new requests.
DELETE
/
v1
/
api-keys
/
{id}
Revoke an API key
curl --request DELETE \
--url https://api.sandbox.rails.wayex.com/v1/api-keys/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.rails.wayex.com/v1/api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.rails.wayex.com/v1/api-keys/{id}', 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.sandbox.rails.wayex.com/v1/api-keys/{id}",
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://api.sandbox.rails.wayex.com/v1/api-keys/{id}"
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://api.sandbox.rails.wayex.com/v1/api-keys/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/api-keys/{id}")
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{
"id": "<string>",
"counterpartyId": "<string>",
"kind": "secret",
"name": "<string>",
"maskedKey": "<string>",
"lastFour": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"rotatedToId": "<string>",
"scopes": [
"customers:read"
],
"allowedIps": [
"<string>"
]
}What this endpoint does
Revokes an API key so it can no longer authenticate new requests.When to use it
Revoke a key when an integration is retired, compromised, or replaced.Before you call
Manage keys from a console session with a recent second-factor (MFA) confirmation — a request authenticated only with an API key is refused with403 step_up_required — and pass a key ID owned by the same tenant account. Ensure another administrator key remains available.
Money and balance effect
This changes a resource or configuration but does not directly reserve, debit, credit, or settle wallet money.States and completion
Revocation is the terminal key state. It does not cancel money operations already accepted.Safe retries
DELETE does not use anIdempotency-Key. If the response is lost, list the key first. An already revoked or absent key means there is no active credential left to revoke.
Read API keys for the complete workflow.Authorizations
BearerApiKey
Send the same Wayex API key as Authorization: Bearer <key>.
Path Parameters
Response
The revoked key.
Minimum string length:
1Minimum string length:
1Available options:
secret, publishable Minimum string length:
1Minimum string length:
1Available options:
active, revoked Minimum string length:
1Available options:
customers:read, customers:write, routes:read, routes:write, transfers:read, transfers:write, treasury:read, treasury:write, rates:read, webhooks:read, webhooks:write, fees:read, fees:write, keys:read, keys:write, settings:read, settings:write, team:read, team:write Required string length:
1 - 49Pattern:
^[0-9a-fA-F:.]+(\/\d{1,3})?$
