diff --git a/_accounts.md b/_accounts.md index 37eac4c..e72c543 100644 --- a/_accounts.md +++ b/_accounts.md @@ -111,3 +111,37 @@ Retrieves the details about a specific account. ### Response Returns a fully formed [Account Object](#account-object) representing the requested account. + +## Remove Account + +```bash +curl https://api.uphold.com/v0/me/accounts/18843b6d-5a43-480f-8e2b-73b27d726bf0 \ + -X DELETE + -H "Authorization: Bearer " +``` + +> The above command returns a response with no body, and HTTP status code `204` +([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)). + +Deletes a specific account. + +### Request + +`DELETE https://api.uphold.com/v0/me/accounts/:id` + + + + +### Response + +In case of success, returns a response with no body and an HTTP status code of `204` +([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)). + +If the account doesn't exist under the authorization-granting user, returns a 404 HTTP error. + +If the token lacks the `accounts:write` scope, returns a 404 HTTP error +with the JSON body `{ "error": "invalid_scope" }`. diff --git a/_totp.md b/_totp.md index a38660c..a7c783e 100644 --- a/_totp.md +++ b/_totp.md @@ -138,4 +138,5 @@ curl https://api.uphold.com/v0/me/authentication_methods/3f8f8264-2f5e-4b2b-8333 ### Response -Returns an HTTP status code of 204 and no JSON body, in case of success. +Returns an HTTP status code of `204` ([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)) +and no JSON body, in case of success.