1
0
Fork 0
freesewing/markdown/dev/reference/backend/account/en.md
Joost De Cock b34a2ee2ed feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content
from our markdown module.

We've imported this without history because the repo contains our
blog posts and showcases posts content prior to porting them to strapi.

Since this contains many images, it would balloon the size of this repo
to import the full history.

Instead, please refer to the history of the (archived) markdown repo
at: https://github.com/freesewing/markdown
2021-08-25 16:09:31 +02:00

110 lines
1.7 KiB
Markdown

---
title: Account
---
## Load account
```
GET /account
```
On success: The account data
On failure:
```
400
```
## Update account
```
PUT /account
{
'bio': 'The new bio',
'avatar': 'data:image/png;base64,iVBORw0KGg...'
'password': 'new password',
'username': 'new username',
'email': 'new.email@domain.com',
'social': {
'github': 'githubUsername',
'twitter': 'twitterUsername',
'isntagram': 'instagramUsername'
},
'settings': {
'language': 'fr',
'units': 'imperial',
},
'consent': {
'profile': true,
'model': false,
'openData': false
},
```
On success: The (updated) account data
On failure:
```
400
```
- This will only update what you pass it
- This will only handle one top-level attribute per call
- A change of email won't take effect immediately but instead trigger an email for confirmation. The email will be sent to the new email address, with the current email address in CC.
## Remove account
```
DELETE /account
```
On success:
```
204
```
On failure:
```
400
```
Removes the account and all user's data. Will also trigger a goodbye email.
## Confirm email change
```
POST /account/change/email
{
'id': '98e132041ad3f369443f1d3d'
}
```
On success: The account data
On failure:
```
400
```
Changing your email address requires confirmation, and this endpoint is for that.
## Export account
```
GET /account/export
```
On success:
```
200
{
'export': 'https://static.freesewing.org/tmp/msypflkyyw/export.zip'
}
```
On failure:
```
400
```
Will export the user data and publish it for download.
## Restrict account
```
GET /account/restrict
```
On success:
```
200
```
On failure:
```
400
```
Will lock the user account, thereby restricting processing of their data.