Skip to content

Commit ef5c39b

Browse files
committed
Document functionality to delete accounts
1 parent 81f66f3 commit ef5c39b

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

_accounts.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,37 @@ Retrieves the details about a specific account.
111111
### Response
112112

113113
Returns a fully formed [Account Object](#account-object) representing the requested account.
114+
115+
## Remove Account
116+
117+
```bash
118+
curl https://api.uphold.com/v0/me/accounts/18843b6d-5a43-480f-8e2b-73b27d726bf0 \
119+
-X DELETE
120+
-H "Authorization: Bearer <token>"
121+
```
122+
123+
> The above command returns a response with no body, and HTTP status code `204`
124+
([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)).
125+
126+
Deletes a specific account.
127+
128+
### Request
129+
130+
`DELETE https://api.uphold.com/v0/me/accounts/:id`
131+
132+
<aside class="notice">
133+
Requires the <code>accounts:write</code> scope for Uphold Connect applications.
134+
</aside>
135+
<aside class="notice">
136+
The account id must be owned by the user performing the API call.
137+
</aside>
138+
139+
### Response
140+
141+
In case of success, returns a response with no body and an HTTP status code of `204`
142+
([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)).
143+
144+
If the account doesn't exist under the authorization-granting user, returns a <a href="#errors">404 HTTP error</a>.
145+
146+
If the token lacks the `accounts:write` scope, returns a <a href="#errors">404 HTTP error</a>
147+
with the JSON body `{ "error": "invalid_scope" }`.

_totp.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,5 @@ curl https://api.uphold.com/v0/me/authentication_methods/3f8f8264-2f5e-4b2b-8333
138138

139139
### Response
140140

141-
Returns an HTTP status code of <code>204</code> and no JSON body, in case of success.
141+
Returns an HTTP status code of `204` ([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5))
142+
and no JSON body, in case of success.

0 commit comments

Comments
 (0)