Skip to content

Commit

Permalink
Document functionality to delete accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
waldyrious committed Jul 2, 2021
1 parent 911d3e5 commit 7df83f1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions _accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <token>"
```

> 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`

<aside class="notice">
Requires the <code>accounts:write</code> scope for Uphold Connect applications.
</aside>
<aside class="notice">
The account id must be owned by the user performing the API call.
</aside>

### 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 <a href="#errors">404 HTTP error</a>.

If the token lacks the `accounts:write` scope, returns a <a href="#errors">404 HTTP error</a>
with the JSON body `{ "error": "invalid_scope" }`.
3 changes: 2 additions & 1 deletion _totp.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ curl https://api.uphold.com/v0/me/authentication_methods/3f8f8264-2f5e-4b2b-8333

### Response

Returns an HTTP status code of <code>204</code> 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.

0 comments on commit 7df83f1

Please sign in to comment.