Archive an external account
curl --request DELETE \
--url https://api.example.com/client/accounts/{accountId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Hevn-Account: <x-hevn-account>'import requests
url = "https://api.example.com/client/accounts/{accountId}"
headers = {
"X-Hevn-Account": "<x-hevn-account>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Hevn-Account': '<x-hevn-account>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/client/accounts/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "acc_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"kind": "external",
"asset": "USDC",
"chain": "base",
"address": "<string>",
"balance": "500.00",
"createdAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Accounts
Archive an external account
Archive an external account and close every receiving account opened on it. An archived account is no longer listed and cannot be used; adding the address again creates a new account. A sub account returns 409 account_archive_unsupported.
DELETE
/
client
/
accounts
/
{accountId}
Archive an external account
curl --request DELETE \
--url https://api.example.com/client/accounts/{accountId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Hevn-Account: <x-hevn-account>'import requests
url = "https://api.example.com/client/accounts/{accountId}"
headers = {
"X-Hevn-Account": "<x-hevn-account>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Hevn-Account': '<x-hevn-account>', Authorization: 'Bearer <token>'}
};
fetch('https://api.example.com/client/accounts/{accountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"accountId": "acc_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"kind": "external",
"asset": "USDC",
"chain": "base",
"address": "<string>",
"balance": "500.00",
"createdAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Headers
Path Parameters
Response
Successful Response
Was this page helpful?