(0.0.0)

Download OpenAPI specification:

create_account

Create a new account

Creates an account for the authenticated user. The user is extracted from the JWT token.

Authorizations:
None
Request Body schema:
required
currency
required
string (CurrencyEnum)
Value: "USD"
  • USD - USD

Responses

Request samples

Content type
{
  • "currency": "USD"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "owner": "string",
  • "balance": 0,
  • "currency": "USD",
  • "created_at": "2019-08-24T14:15:22Z"
}

create_user

Create new user

Registers a new user and returns the user's public info.

Authorizations:
None
Request Body schema:
required
username
required
string <= 255 characters
password
required
string >= 6 characters
full_name
required
string <= 255 characters
email
required
string <email> <= 254 characters

Responses

Request samples

Content type
{
  • "username": "string",
  • "password": "string",
  • "full_name": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "full_name": "string",
  • "email": "user@example.com",
  • "password_changed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z"
}

get_account

Retrieve account by ID

Returns a specific account if it belongs to the authenticated user.

Authorizations:
None
path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "owner": "string",
  • "balance": 0,
  • "currency": "USD",
  • "created_at": "2019-08-24T14:15:22Z"
}

list_accounts

List user's accounts

Returns a paginated list of accounts belonging to the authenticated user.

Authorizations:
None
query Parameters
page
integer

Page number

page_size
integer

Number of results per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

login_user

Login user

Authenticates a user and returns JWT tokens, session ID, and user info.

Authorizations:
None
Request Body schema:
required
username
required
string
password
required
string

Responses

Request samples

Content type
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",
  • "access_token": "string",
  • "access_token_expires_at": "2019-08-24T14:15:22Z",
  • "refresh_token": "string",
  • "refresh_token_expires_at": "2019-08-24T14:15:22Z",
  • "user": {
    }
}

schema

schema_retrieve

OpenApi3 schema for this API. Format can be selected via content negotiation.

  • YAML: application/vnd.oai.openapi
  • JSON: application/vnd.oai.openapi+json
Authorizations:
None
query Parameters
format
string
Enum: "json" "yaml"
lang
string
Enum: "af" "ar" "ar-dz" "ast" "az" "be" "bg" "bn" "br" "bs" "ca" "ckb" "cs" "cy" "da" "de" "dsb" "el" "en" "en-au" "en-gb" "eo" "es" "es-ar" "es-co" "es-mx" "es-ni" "es-ve" "et" "eu" "fa" "fi" "fr" "fy" "ga" "gd" "gl" "he" "hi" "hr" "hsb" "hu" "hy" "ia" "id" "ig" "io" "is" "it" "ja" "ka" "kab" "kk" "km" "kn" "ko" "ky" "lb" "lt" "lv" "mk" "ml" "mn" "mr" "ms" "my" "nb" "ne" "nl" "nn" "os" "pa" "pl" "pt" "pt-br" "ro" "ru" "sk" "sl" "sq" "sr" "sr-latn" "sv" "sw" "ta" "te" "tg" "th" "tk" "tr" "tt" "udm" "ug" "uk" "ur" "uz" "vi" "zh-hans" "zh-hant"

Responses

Response samples

Content type
No sample

transfers

Create a money transfer

Transfers funds from one account to another. Both accounts must have the same currency and the user must own the source account.

Authorizations:
None
Request Body schema:
required
from_account_id
required
integer
to_account_id
required
integer
amount
required
integer <int64> [ -9223372036854776000 .. 9223372036854776000 ]

Must be positive

currency
required
string

Responses

Request samples

Content type
{
  • "from_account_id": 0,
  • "to_account_id": 0,
  • "amount": -9223372036854776000,
  • "currency": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "from_account_id": 0,
  • "to_account_id": 0,
  • "amount": -9223372036854776000,
  • "created_at": "2019-08-24T14:15:22Z"
}

update_user

Update user

    Partially updates a user's details.
    - If you're a **regular user**, you can only update yourself.
    - If you're a **banker**, you can update anyone.
    
Authorizations:
None
Request Body schema:
full_name
string <= 255 characters
email
string <email> <= 254 characters
hashed_password
string >= 6 characters

Responses

Request samples

Content type
{
  • "full_name": "string",
  • "email": "user@example.com",
  • "hashed_password": "string"
}

Response samples

Content type
application/json
{
  • "username": "string",
  • "full_name": "string",
  • "email": "user@example.com"
}

Users

Verify user's email

Validates the email and secret code. Marks user as verified if correct and not used before.

Authorizations:
None
Request Body schema:
required
email_id
required
string <email>
secret_code
required
string

Responses

Request samples

Content type
{
  • "email_id": "user@example.com",
  • "secret_code": "string"
}

Response samples

Content type
application/json
{
  • "is_verified": true
}