Skip to main content

Delete Account

Use this endpoint to delete an account. Deleting an account will automatically delete all transactions associated with that account.

This endpoint accepts the optional MX-SKIP-WEBHOOK header.

DELETE
/users/{user_id/members/{member_id}/accounts/{account_id}

Path Parameters

FieldRequiredType

user_id

Required
String

member_id

Required
String

account_id

Required
String

Request sample

Language:

_54
import java.io.BufferedReader;
_54
import java.io.InputStreamReader;
_54
import java.net.URL;
_54
import javax.net.ssl.HttpsURLConnection;
_54
_54
public class MDX_RealTime {
_54
private String BaseUrl, ClientId, ApiKey;
_54
_54
public MDX_RealTime(String BaseUrl, String ClientId, String ApiKey) {
_54
this.BaseUrl = BaseUrl;
_54
this.ClientId = ClientId;
_54
this.ApiKey = ApiKey;
_54
}
_54
_54
public static void main(String[] args) throws Exception {
_54
String base_url = "https://int-live.moneydesktop.com";
_54
String client_id = ":client_id";
_54
String api_key = ":api_key";
_54
_54
MDX_RealTime mdx = new MDX_RealTime(base_url, client_id, api_key);
_54
_54
/// Setup IDs
_54
String user_id = "U-39XBF7";
_54
String member_id = "M-39XBF7";
_54
String account_id = "A-XA5Y4L";
_54
_54
mdx.DeleteAccount(user_id, member_id, account_id);
_54
}
_54
_54
public void DeleteAccount(String user_id, String member_id, String account_id) {
_54
try {
_54
String uri = BaseUrl + "/" + ClientId + "/users/" + user_id + "/members/" + member_id + "/accounts/" + account_id + ".json";
_54
URL url = new URL(uri);
_54
_54
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
_54
con.setRequestMethod("DELETE");
_54
con.setRequestProperty("Accept", "application/vnd.moneydesktop.mdx.v5+json");
_54
con.setRequestProperty("MD-API-KEY", ApiKey);
_54
_54
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
_54
String inputLine;
_54
StringBuffer response = new StringBuffer();
_54
while ((inputLine = in.readLine()) != null) {
_54
response.append(inputLine);
_54
}
_54
in.close();
_54
con.disconnect();
_54
_54
System.out.println(response.toString());
_54
} catch (Exception e) {
_54
System.out.println(e);
_54
}
_54
}
_54
}

Response sample

204
Language:shell

_10
No Content