Skip to content
Odinex Cloud
API reference

Account

GET
/account

Authorization

cookieAuth
cookieodx_session<token>

Response Body

Current account

application/json
  1. response
user*
organizations*array<>
mfa_required*boolean

True while the session still needs a second factor; other endpoints return 401 mfa_required.

curl -X GET "https://example.com/account"
{  "user": {    "id": 0,    "email": "string",    "name": "string",    "locale": "string",    "email_verified": true,    "mfa_enabled": true,    "has_password": true,    "created": "2019-08-24T14:15:22Z"  },  "organizations": [    {      "id": 0,      "name": "string",      "kind": "personal",      "role": "owner",      "status": "active"    }  ],  "mfa_required": true}

Update name or locale

PATCH
/account

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
name?string
Length1 <= length <= 100
locale?string
Value in"en""de""fa""tr"

Response Body

Updated user

application/json
  1. response
user*
curl -X PATCH "https://example.com/account" \  -H "Content-Type: application/json" \  -d '{}'
{  "user": {    "id": 0,    "email": "string",    "name": "string",    "locale": "string",    "email_verified": true,    "mfa_enabled": true,    "has_password": true,    "created": "2019-08-24T14:15:22Z"  }}
POST
/account/password

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
current_password?string

Required when the account has a password

new_password*string
Length10 <= length <= 128

Response Body

Changed

curl -X POST "https://example.com/account/password" \  -H "Content-Type: application/json" \  -d '{    "new_password": "stringstri"  }'
Empty

Start TOTP enrollment

POST
/account/mfa/totp/setup

Authorization

cookieAuth
cookieodx_session<token>

Response Body

Secret to show as a QR code

application/json
  1. response
secret*string
otpauth_url*string
curl -X POST "https://example.com/account/mfa/totp/setup"
{  "secret": "string",  "otpauth_url": "string"}
POST
/account/mfa/totp/enable

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
code*string

Response Body

Enabled

application/json
  1. response
recovery_codes*array<string>
curl -X POST "https://example.com/account/mfa/totp/enable" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "recovery_codes": [    "string"  ]}
POST
/account/mfa/totp/disable

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
code*string

Response Body

Disabled

curl -X POST "https://example.com/account/mfa/totp/disable" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
Empty
GET
/account/sessions

Authorization

cookieAuth
cookieodx_session<token>

Response Body

Sessions

application/json
  1. response
sessions*array<>
curl -X GET "https://example.com/account/sessions"
{  "sessions": [    {      "id": 0,      "ip": "string",      "user_agent": "string",      "current": true,      "created": "2019-08-24T14:15:22Z",      "last_seen": "2019-08-24T14:15:22Z"    }  ]}

Sign out a session

DELETE
/account/sessions/{id}

Authorization

cookieAuth
cookieodx_session<token>

Path Parameters

id*integer
Formatint64

Response Body

Revoked

curl -X DELETE "https://example.com/account/sessions/0"
Empty
GET
/account/export

Authorization

cookieAuth
cookieodx_session<token>

Response Body

JSON export

application/json
  1. response
[key: string]?any
curl -X GET "https://example.com/account/export"
{}
POST
/account/delete

Only possible when your personal organization has no resources left and no negative balance. Personal data is erased; invoices and ledger entries are kept as the law requires, without your name.

Authorization

cookieAuth
cookieodx_session<token>

Request Body

application/json
  1. body
confirm*string

Must be your email address

password?string

Required when the account has a password

code?string

TOTP code when two-factor authentication is on

Response Body

Deleted and signed out

curl -X POST "https://example.com/account/delete" \  -H "Content-Type: application/json" \  -d '{    "confirm": "string"  }'
Empty