> For the complete documentation index, see [llms.txt](https://elacitylabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elacitylabs.gitbook.io/docs/api/reference/account.md).

# Account

User account management and profile operations

## POST /account/accountdetails

> Update account profile details

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"StatusResponse":{"type":"object","properties":{"status":{"type":"string"}}}}},"paths":{"/account/accountdetails":{"post":{"tags":["Account"],"summary":"Update account profile details","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alias":{"type":"string"},"email":{"type":"string"},"bio":{"type":"string"},"imageHash":{"type":"string"},"bannerHash":{"type":"string"}}}}}},"responses":{"200":{"description":"Account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}}}}
```

## POST /account/update

> Update account fields

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/update":{"post":{"tags":["Account"],"summary":"Update account fields","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Account updated"}}}}}}
```

## POST /account/find

> Search for accounts

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/account/find":{"post":{"tags":["Account"],"summary":"Search for accounts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"Matching accounts","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}}}}}}}},"components":{"schemas":{"Account":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"alias":{"type":"string"},"email":{"type":"string"},"bio":{"type":"string"},"imageHash":{"type":"string"},"bannerHash":{"type":"string"},"nonce":{"type":"integer"},"isAdmin":{"type":"boolean"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## GET /account/getaccountinfo

> Get current authenticated user info

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Account":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"alias":{"type":"string"},"email":{"type":"string"},"bio":{"type":"string"},"imageHash":{"type":"string"},"bannerHash":{"type":"string"},"nonce":{"type":"integer"},"isAdmin":{"type":"boolean"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/account/getaccountinfo":{"get":{"tags":["Account"],"summary":"Get current authenticated user info","responses":{"200":{"description":"Account info","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/Account"}}}}}}}}}}}
```

## POST /account/getuseraccountinfo

> Get account info for any user

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/account/getuseraccountinfo":{"post":{"tags":["Account"],"summary":"Get account info for any user","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Account info","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/Account"}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Account":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"alias":{"type":"string"},"email":{"type":"string"},"bio":{"type":"string"},"imageHash":{"type":"string"},"bannerHash":{"type":"string"},"nonce":{"type":"integer"},"isAdmin":{"type":"boolean"}}}}}}
```

## GET /account/nonce/{address}

> Get nonce for signature verification

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/account/nonce/{address}":{"get":{"tags":["Account"],"summary":"Get nonce for signature verification","parameters":[{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"description":"Nonce value","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"integer"}}}}}}}}}}}
```

## POST /account/notificationsettings

> Update notification settings

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/notificationsettings":{"post":{"tags":["Account"],"summary":"Update notification settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object"}}}}}},"responses":{"200":{"description":"Settings updated"}}}}}}
```

## GET /account/getnotificationsettings

> Get notification settings

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/getnotificationsettings":{"get":{"tags":["Account"],"summary":"Get notification settings","responses":{"200":{"description":"Notification settings"}}}}}}
```

## POST /account/admin

> Add an admin address

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"Admin","description":"Administrative operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}},"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"paths":{"/account/admin":{"post":{"tags":["Account","Admin"],"summary":"Add an admin address","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Admin added"}}}}}}
```

## POST /account/admin/check

> Check if address is admin

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"Admin","description":"Administrative operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"paths":{"/account/admin/check":{"post":{"tags":["Account","Admin"],"summary":"Check if address is admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/Address"}}}}}},"responses":{"200":{"description":"Admin status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"boolean"}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}}}
```

## POST /account/did/link

> Link a DID identity to account

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/link":{"post":{"tags":["Account","DID"],"summary":"Link a DID identity to account","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"DID linked"}}}}}}
```

## POST /account/did/approve-credential

> Approve a verifiable credential

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/approve-credential":{"post":{"tags":["Account","DID"],"summary":"Approve a verifiable credential","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Credential approved"}}}}}}
```

## POST /account/did/remove-credential

> Remove a verifiable credential

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/remove-credential":{"post":{"tags":["Account","DID"],"summary":"Remove a verifiable credential","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Credential removed"}}}}}}
```

## POST /account/did/verify-email

> Verify email address via DID

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/verify-email":{"post":{"tags":["Account","DID"],"summary":"Verify email address via DID","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"Email verification initiated"}}}}}}
```

## POST /account/did/set-email-visibility

> Set email visibility in profile

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/set-email-visibility":{"post":{"tags":["Account","DID"],"summary":"Set email visibility in profile","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"visible":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Visibility updated"}}}}}}
```

## PUT /account/did/kyc-status

> Update KYC status

```json
{"openapi":"3.0.3","info":{"title":"REST Server API (Elacity)","version":"1.11.0"},"tags":[{"name":"Account","description":"User account management and profile operations"},{"name":"DID","description":"Decentralized Identity (Elastos DID) operations"}],"servers":[{"url":"http://localhost:3001","description":"Local development server"},{"url":"https://staging.ela.city/api","description":"Staging Server"},{"url":"https://next.ela.city/api","description":"ESC-Network Server (Next)"},{"url":"https://base.ela.city/api","description":"Base-Network Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtained via POST /auth/getToken (24h expiration)"}}},"paths":{"/account/did/kyc-status":{"put":{"tags":["Account","DID"],"summary":"Update KYC status","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"KYC status updated"}}}}}}
```
