Identity Storage (4.7.7)

Download OpenAPI specification:Download

Overview

Identity Storage uses JSON:API convention to format requests and responses. Key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Security

Request signature implementation is based on IETF HTTP Signatures draft RFC, except that implicit headers parameter is not supported; clients must explicitly specify headers used for signing. The only signature algorithm supported is ed25519-sha256, which uses public signer key as keyId. Both Signature and Authorization HTTP authentication schemas are supported. The minimum recommended data to sign are (request-header) and date.

Sign Up Flow

To have full access to the platform, a client should create their own account entity. To achieve this, the following steps must be completed.

  • create wallet

  • depending on the platform settings, additional verification may be required; for details, see email verification flow

Create Wallet

Wallet

Factor

Keychain derived using the same email/password but with different account and salt. Used as a second factor to confirm the password possession.

KDF

id - version of KDF parameters used to derive the wallet data Creates a new session.

Request Body schema: application/vnd.api+json
data
required
object (CreateWallet)
included
required
Array of One of multiple values

password is required

Responses

201

current wallet state

400

invalid request

409

wallet or recovery conflict

500

failed to save wallets or failed to create account

post /wallets

TokenD Developer Environment

https://api.achilles.tokend.io/wallets

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Sign In Flow

The process of signing in lies in acquiring client's signing key from encrypted keychain data.

  • get KDF parameters for an existing wallet using email. If email parameter is not specified, then the default KDF will be used.

  • derive wallet id using email and password

    Wallet id is an SHA256HMAC of a key derived from wallet email and client-generated salt with the help of scrypt.

    Default KDF parameters provided by the key server should be used for each new wallet id and keychain derivation.

    Wallet id should be hex encoded.

  • get wallet with encrypted keychain data

    Get current wallet state by wallet id.

  • decrypt keychain data

    Keychain may be used to store wallet keys and any arbitrary, client-specific data.

To login with email/password, a client should store at least account id and seed.

KDF

KDF params

Returns current default derivation parameters or parameters used to derive a particular wallet.

Parameters

email - will return KDF parameters for wallet keychain, 404 Not Found if email is unknown.

is_recovery - boolean denoting if the client wants to get KDF for the recovery keychain.

If the email parameter is not specified, the default KDF will be used.

query Parameters
email
string

will return KDF parameters for the wallet keychain

is_recovery
string
Example: is_recovery=false

boolean denoting whether or not the client wants to get KDF for the recovery keychain

Responses

200

Success

404

KDF not found

500

Internal Error

get /kdf

TokenD Developer Environment

https://api.achilles.tokend.io/kdf

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Get Wallet

Wallet

Returns wallet by its id. Creates a new session.

path Parameters
wallet-id
required
string

id of wallet

query Parameters
public_ip
string
Example: public_ip=false

if public_ip = true client`s ip is not saved

Responses

200

Success

403

wallet verificationor additional factor required

404

wallet not found

get /wallets/{wallet-id}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Email Verification Flow

Depending on the implementation, TokenD system can require email verifications. If this is the case, then any attempt to get user's wallet will be failed with 403 Forbidden error.

After the wallet creation, a user will receive an email letter with a verification link.

To verify an email, a user has to follow the link in the verification message. Verification link contains client router payload with meta fields token and wallet id. Use this values for the wallet verification request.

Request Verification

Requesting verification resend

Instant delivery is not guaranteed.

path Parameters
wallet-id
required
string

related wallet id

Responses

204

token created

400

email already confirmed

500

failed to get token

post /wallets/{wallet-id}/verification

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/verification

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Verify Wallet

Verify Wallet

After the wallet is created (and verified is false), a user should receive an email with the verification link with client router payload

path Parameters
wallet-id
required
string

related wallet id

Request Body schema:

Email verification token

data
object (VerificationRequest)

Responses

204

Wallet was verified

400

invalid input parameters

500

failed to verify token

put /wallets/{wallet-id}/verification

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/verification

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

KYC Recovery Flow

To perform the kyc recovery, a user has to update wallet (this process is similar to changing wallet id, yet is slightly different)

  • obtain KDF parameters with email and the is_recovery flag set to true

  • generate new account id that will be used as signer for initiating kyc recovery.

  • perform a wallet update request with the new keychain_data, recovery-wallet type and new signer relation. New wallet id should be used during the wallet update.

KDF

KDF params

Returns current default derivation parameters or parameters used to derive a particular wallet.

Parameters

email - will return KDF parameters for wallet keychain, 404 Not Found if email is unknown.

is_recovery - boolean denoting if the client wants to get KDF for the recovery keychain.

If the email parameter is not specified, the default KDF will be used.

query Parameters
email
string

will return KDF parameters for the wallet keychain

is_recovery
string
Example: is_recovery=false

boolean denoting whether or not the client wants to get KDF for the recovery keychain

Responses

200

Success

404

KDF not found

500

Internal Error

get /kdf

TokenD Developer Environment

https://api.achilles.tokend.io/kdf

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Update Wallet

Update Wallet

Similar to the wallet creation, but it also contains additional transaction resource used to update account signers or new signer as relation and new wallet-id as url parameter for KYC recovery.

Wallet changes will be commited only if blockchain transaction submission has been successful.

Successful request might update wallet id if the new password were used during the derivation.

🔒 An owner's signature is needed

Transaction

envelope - base64 encoded transaction envelope used to update account signers

path Parameters
wallet-id
required
string

id of wallet

query Parameters
public_ip
string
Example: public_ip=false

if public_ip = true client`s ip is not saved

Request Body schema: application/vnd.api+json
data
required
UpdateWallet (object) or KYCRecoveryWallet (object)
included
required
Array of TransactionEnvelope (object) or Password (object) 2 items

transaction is required when updating wallet

Responses

200

Success

400

invalid request

401

not allowed

403

additional factor required

404

wallet not found

409

wallet already exist

500

failed to update wallet

put /wallets/{wallet-id}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Wallet

Wallet exists entirely on the key server, and its purpose is to hold encrypted user data and provide additional authentication means such as 2FA and email confirmation. Wallets are identified by a wallet id that is derived from email and password.

Wallet id derivation

Wallet id is a SHA256 HMAC of scrypt key derived from wallet email and client-generated salt.

Default KDF parameters provided by the key server should be used for each new wallet id and keychain derivation.

Wallet id should be hex encoded.

Keychain derivation

Keychain may be used to store wallet keys and any arbitrary, client-specific data.

To login with email/password, a client should store at least account id and seed.

Wallet

Factor

Keychain derived using the same email/password but with different account and salt. Used as a second factor to confirm the password possession.

KDF

id - version of KDF parameters used to derive the wallet data Creates a new session.

Request Body schema: application/vnd.api+json
data
required
object (CreateWallet)
included
required
Array of One of multiple values

password is required

Responses

201

current wallet state

400

invalid request

409

wallet or recovery conflict

500

failed to save wallets or failed to create account

post /wallets

TokenD Developer Environment

https://api.achilles.tokend.io/wallets

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Wallet

Returns wallet by its id. Creates a new session.

path Parameters
wallet-id
required
string

id of wallet

query Parameters
public_ip
string
Example: public_ip=false

if public_ip = true client`s ip is not saved

Responses

200

Success

403

wallet verificationor additional factor required

404

wallet not found

get /wallets/{wallet-id}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Remove Wallet Deprecated

Delete the specified wallet

🔒 An admin's signature is needed

path Parameters
wallet-id
required
string

id of wallet

query Parameters
public_ip
string
Example: public_ip=false

if public_ip = true client`s ip is not saved

Responses

204

deleted

401

not allowed

500

failed to delete wallet

delete /wallets/{wallet-id}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}

Update Wallet

Similar to the wallet creation, but it also contains additional transaction resource used to update account signers or new signer as relation and new wallet-id as url parameter for KYC recovery.

Wallet changes will be commited only if blockchain transaction submission has been successful.

Successful request might update wallet id if the new password were used during the derivation.

🔒 An owner's signature is needed

Transaction

envelope - base64 encoded transaction envelope used to update account signers

path Parameters
wallet-id
required
string

id of wallet

query Parameters
public_ip
string
Example: public_ip=false

if public_ip = true client`s ip is not saved

Request Body schema: application/vnd.api+json
data
required
UpdateWallet (object) or KYCRecoveryWallet (object)
included
required
Array of TransactionEnvelope (object) or Password (object) 2 items

transaction is required when updating wallet

Responses

200

Success

400

invalid request

401

not allowed

403

additional factor required

404

wallet not found

409

wallet already exist

500

failed to update wallet

put /wallets/{wallet-id}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Requesting verification resend

Instant delivery is not guaranteed.

path Parameters
wallet-id
required
string

related wallet id

Responses

204

token created

400

email already confirmed

500

failed to get token

post /wallets/{wallet-id}/verification

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/verification

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Verify Wallet

After the wallet is created (and verified is false), a user should receive an email with the verification link with client router payload

path Parameters
wallet-id
required
string

related wallet id

Request Body schema:

Email verification token

data
object (VerificationRequest)

Responses

204

Wallet was verified

400

invalid input parameters

500

failed to verify token

put /wallets/{wallet-id}/verification

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/verification

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

2FA

Factors

Returns list of factors used for 2FA

path Parameters
wallet-id
required
string

id of a wallet

Responses

200

Success

404

wallet not found

500

failed to update wallet

get /wallets/{wallet-id}/factors

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/factors

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Factor

Creates non-active TFA factor of given type

🔒 An owner's signature is needed

path Parameters
wallet-id
required
string

id of a wallet

Request Body schema: application/json
data
required
object (TFAKey)

Responses

200

Success

400

invalid request

401

not allowed

403

factor check failed

404

wallet not found

409

factor should be created during the signup

500

failed to get wallet, failed to generate backend, failed to save backend

post /wallets/{wallet-id}/factors

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/factors

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Factor

Deletes the given factor

🔒 An owner's signature is needed

path Parameters
wallet-id
required
string

id of a wallet

backend
required
string

id of a factor

Responses

200

Success

400

invalid request

401

not allowed

403

additional factor required

404

backend not found

500

failed to get backend

delete /wallets/{wallet-id}/factors/{backend}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/factors/{backend}

Update factor

Updates the given TFA factor. Updating priority to non-zero value (i.e., enabling the factor) requires the TFA verification with this factor

🔒 An owner's signature is needed

path Parameters
wallet-id
required
string

id of a wallet

backend
required
string

id of a factor

Request Body schema: application/json
data
required
object (WalletFactor)

Responses

204

Success

400

invalid request

401

not allowed

403

tfa check failed

404

backend not found

500

failed to update factor

patch /wallets/{wallet-id}/factors/{backend}

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/factors/{backend}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Factor verification

Verifies the factor value

path Parameters
wallet-id
required
string

id of a wallet

backend
required
string

id of a factor

Request Body schema: application/json
data
required
object (VerifyFactor)

Responses

200

Success

400

invalid request

404

backend not found

500

failed to mark token as verified

put /wallets/{wallet-id}/factors/{backend}/verification

TokenD Developer Environment

https://api.achilles.tokend.io/wallets/{wallet-id}/factors/{backend}/verification

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

KDF

KDF params

Returns current default derivation parameters or parameters used to derive a particular wallet.

Parameters

email - will return KDF parameters for wallet keychain, 404 Not Found if email is unknown.

is_recovery - boolean denoting if the client wants to get KDF for the recovery keychain.

If the email parameter is not specified, the default KDF will be used.

query Parameters
email
string

will return KDF parameters for the wallet keychain

is_recovery
string
Example: is_recovery=false

boolean denoting whether or not the client wants to get KDF for the recovery keychain

Responses

200

Success

404

KDF not found

500

Internal Error

get /kdf

TokenD Developer Environment

https://api.achilles.tokend.io/kdf

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Blob

Blobs allow users to store arbitrary text.

Any blob has privacy settings and client-provided tags for filtering.

To access private blobs, the request signature is required; otherwise only public ones will be returned.

Type Public Filter
asset_description public 1
fund_overview public 2
fund_update public 4
nav_update public 8
fund_document public 16
alpha public 32
bravo public 64
charlie public 128
delta public 256
token_terms public 512
token_metrics public 1024
kyc_form private 2048
kyc_id_document private 4096
kyc_poa private 8192
identity_mind_reject private 16384

Account-owned Blob Deprecated

Create account-owned blob.

🔒 An owner's signature is needed

path Parameters
address
required
string

account identifier

Request Body schema:

Create Blob

data
required
object (Blob)

Responses

200

Success

401

blob creation not allowed

404

account does not exist

500

failed to save blob

post /accounts/{address}/blobs

TokenD Developer Environment

https://api.achilles.tokend.io/accounts/{address}/blobs

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Account-owned blob Deprecated

Get account-owned blob.

🔒 An owner's or admin's signature is needed for private blobs

path Parameters
address
required
string

account identifier

blob
required
string

blob identifier

Responses

200

Success

400

invalid request

404

blob not found

500

failed to get blobs

get /accounts/{address}/blobs/{blob}

TokenD Developer Environment

https://api.achilles.tokend.io/accounts/{address}/blobs/{blob}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Blob

Create blob

🔒 An admin's signature is needed

Request Body schema:
data
required
object (BlobRequest)

Responses

200

Success

401

blob creation not allowed

500

failed to save blob

post /blobs

TokenD Developer Environment

https://api.achilles.tokend.io/blobs

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Blob

🔒 An admin's signature is needed for private blobs

path Parameters
blob
required
string

Blob identifier

Responses

200

Success

400

invalid request

404

blob not found

500

failed to get blob

get /blobs/{blob}

TokenD Developer Environment

https://api.achilles.tokend.io/blobs/{blob}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Remove Blob

🔒 An admin's signature is needed

path Parameters
blob
required
string

Blob identifier

Responses

204

Blob deleted

400

invalid blob id

500

failed to get blob or failed to mark blob deleted

delete /blobs/{blob}

TokenD Developer Environment

https://api.achilles.tokend.io/blobs/{blob}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Identity

Identity is created simultaneously with the creation of an account, and it represents the state of an account in the system.

List private identities

List of full identities

🔒. An admin's signature is needed

query Parameters
filter[email]
string

filtering by email

filter[address]
string

filtering by address

filter[phone]
string

filtering by phone number

filter[identifier]
required
string

filtering by email or phone number

Responses

200

Success

400

signer not allowed

500

failed get identities

get /identities '

TokenD Developer Environment

https://api.achilles.tokend.io/identities '

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "links":
    {
    }
}

Add Identity

Creates an identity with status unregistered and account with one system signer. Can be used to perform payments before registration. After registration system signer will be removed and new wallet will be tided with previosly created account.

Request Body schema: application/json
data
object (IdentityRequest)

Responses

200

Success

400

invalid request

500

internal error

post /identities

TokenD Developer Environment

https://api.achilles.tokend.io/identities

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

List Identities

Get list of identities. One of filters must be set.

query Parameters
filter[email]
required
string

filtering by email.

filter[address]
required
string

filtering by address.

filter[phone]
required
string

filtering by phone number

filter[identifier]
required
string

filtering by email or phone number

Responses

200

Success

400

invalid request or email/address filter not set

500

failed to get identities

get /identities

TokenD Developer Environment

https://api.achilles.tokend.io/identities

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "links":
    {
    }
}

Change PhoneNumber

Add or change user's phonenumber

path Parameters
address
required
string

account identifier

Request Body schema: application/json
data
object (ChangePhone)

Responses

200

Success

403

additional factor required

409

phone number already exist

500

failed to change phone

put /identities/{address}/settings/phone

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{address}/settings/phone

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Change Telegram Username

Add or change user's telegram username

path Parameters
address
required
string

account identifier

Request Body schema: application/json
data
object (ChangeTelegramUsername)

Responses

200

Success

403

additional factor required

409

username already exist

500

failed to change telegram username

put /identities/{address}/settings/telegram

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{address}/settings/telegram

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Delete Identity & Wallet with email

🔒 An owner's signature is needed

path Parameters
email_address
required
string

Account email address

Responses

204

Success

400

invalid request

401

auth error

403

removing verified user is forbidden

404

identity by email is not found

500

internal error

delete /identities/{email_address}

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{email_address}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

By Emails

🔒 An admin's signature is needed

Request Body schema: application/json
data
Array of objects (MassEmailsKey)

Responses

200

Success

400

account does not exist

500

failed to add email

post /identities/mass-emails

TokenD Developer Environment

https://api.achilles.tokend.io/identities/mass-emails

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ],
  • "links":
    {
    }
}

Add Identities

Creates an identity with status unregistered and account with one system signer. Can be used to perform payments before registration. After registration system signer will be removed and new wallet will be tided with previosly created account.

Request Body schema: application/json
data
Array of objects (IdentityRequest)

Responses

200

Success

400

invalid request

500

internal error

post /identities/multi

TokenD Developer Environment

https://api.achilles.tokend.io/identities/multi

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Verification Token

Request email verification token

Request Body schema: application/vnd.api+json
data
required
object (RequestToken)

Responses

200

Success

400

invalid request

500

failed to get email token

post /verification

TokenD Developer Environment

https://api.achilles.tokend.io/verification

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Document

Allows getting upload policy and document url.

Type Public
asset_logo public
fund_logo public
fund_document public
nav_report public
alpha public
bravo public
charlie public
delta public
token_terms public
token_metrics public
general_public public
asset_photo public
kyc_id_document private
kyc_poa private
kyc_selfie private
general_private private

Upload Policy (with owner) Deprecated

Get upload policy.

🔒 An owner's signature is needed

path Parameters
address
required
string

account identifier

blob
required
string

blob identifier

Request Body schema:

Get Upload Policy

data
required
object (DocumentRequest)

Responses

200

Success

400

invalid request

403

must have account for uploading documents

404

wallet not found

500

failed to build form data

post /accounts/{address}/blobs/{blob}

TokenD Developer Environment

https://api.achilles.tokend.io/accounts/{address}/blobs/{blob}

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Document URL (with owner) Deprecated

Get document url.

🔒 An owner's or admin's signature is needed

path Parameters
address
required
string

account identifier

document
required
string

document identifier

Responses

200

Success

401

must be signer

500

failed get document url

get /accounts/{address}/documents/{document}

TokenD Developer Environment

https://api.achilles.tokend.io/accounts/{address}/documents/{document}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "document_url",
  • "attributes":
    {
    }
}

Upload Policy

Get upload policy.

🔒 An admin's signature is needed

Request Body schema:

Get Upload Policy

data
required
object (Document)

Responses

200

Success

400

invalid request

401

only master is allowed

500

failed to build form data

post /documents

TokenD Developer Environment

https://api.achilles.tokend.io/documents

Request samples

Content type
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Document URL

Get document url.

🔒 An admin's signature is needed

path Parameters
document
required
string

document identifier

Responses

200

Success

401

only master is allowed

500

failed get document url

get /documents/{document}

TokenD Developer Environment

https://api.achilles.tokend.io/documents/{document}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "document_url",
  • "attributes":
    {
    }
}

Enum

Enums Deprecated

Returns enums presented in the system.

Responses

200

Success

get /data/enums

TokenD Developer Environment

https://api.achilles.tokend.io/data/enums

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Invites

Invites

Create invites using user's email. If account already exist - invite token will be sent. Otherwise pending invite will be saved until account creation. 🔒 An sale owner's (for whitelist invites) or admin's signature is needed

Request Body schema: application/json
data
Array of WhitelistInvite (object) or GeneralInvite (object)

Responses

200

email added to list

409

invite already exist

500

failed to add email

post /invites_multi

TokenD Developer Environment

https://api.achilles.tokend.io/invites_multi

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Invites Deprecated

Create invite using user's email. If account already exist - invite token will be sent. Otherwise pending invite will be saved until account creation. 🔒 An sale owner's (for whitelist invites) or admin's signature is needed

Request Body schema: application/json
data
WhitelistInvite (object) or GeneralInvite (object)

Responses

200

email added to list

500

failed to add email

post /invites

TokenD Developer Environment

https://api.achilles.tokend.io/invites

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

List invites

List pending invites. 🔒 An sale owner's (for filtering whitelist invites by sale-id) or admin's signature is needed

query Parameters
filter[sale-id]
string

filtering by sale id. An sale owner's signature is needed

page[number]
integer

The number of a page to return.

Responses

200

Success

404

not found

500

failed to get invites list

get /invites

TokenD Developer Environment

https://api.achilles.tokend.io/invites

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Delete invites

🔒 An sale owner's or admin's signature is needed

Request Body schema: application/json
data
Array of InviteEntityKey (object)

Responses

200

email added to list

500

failed to add email

delete /invites

TokenD Developer Environment

https://api.achilles.tokend.io/invites

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    [
    ]
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

Multisig

createSigner

Returns signer data to add a new signer. New signer's identity should be different than the existing.

Saves signer to to add a signature to the account transactions.

path Parameters
address
required
string

account identifier

Request Body schema: application/json
data
required
object

Responses

201

Success

500

failed to create signer

put /integrations/multisig/accounts/{address}/relationships/signer

TokenD Developer Environment

https://api.achilles.tokend.io/integrations/multisig/accounts/{address}/relationships/signer

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

multisigTransactions

Checks TFA factor with the highest priopity (transaction purpose will be returned in meta).

Adds the signature of the saved signer and submit transaction to the network.

Request Body schema: application/json
tx
required
string

base-64 encoded XDR representation of transaction itself

wait_for_ingest
boolean
Default: false

defines whether to wait for ingest of transaction or not

Responses

200

successfully submitted

400

bad input parameter

403

additional factor required

408

request has timed out

500

transaction failed

post /integrations/multisig/transactions

TokenD Developer Environment

https://api.achilles.tokend.io/integrations/multisig/transactions

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tx": "AAAAAEHCX5tmu0fXlkE9GLIOLO185ih5QI7V+PZ1mtb1tnzSA59veKFdUjsAAAAAAAAAAAAAAABchp31A...",
  • "wait_for_ingest": false
}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "id": "17179869186",
  • "type": "transactions",
  • "attributes":
    {
    },
  • "relationships":
    {
    }
}

Sessions

Session is created on login and contains session key and session ID.

Expires in 10 minutes by default.

getSession

Returns session by session token.

Extends session.

path Parameters
id
required
string

session token

Responses

200

Success

404

token or session not found

get /sessions/{id}

TokenD Developer Environment

https://api.achilles.tokend.io/sessions/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Settings

Settings allow to assign any custom settings to account

Get settings

Get all account settings.

🔒 An owner's or master signature is needed

Reserved keys:

  • client_domain - store domain of user webclient
path Parameters
address
required
string

account identifier

query Parameters
page[number]
integer

The number of a page to return.

Responses

200

Success

400

invalid request

401

auth error

500

internal error

get /identities/{address}/settings

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{address}/settings

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "type": "identity_settings",
  • "id": "string",
  • "attributes":
    {
    },
  • "relationships":
    {
    }
}

Set settings item

Set settings item.

🔒 An owner's signature is needed

path Parameters
address
required
string

account identifier

Responses

200

Success

400

invalid request

401

auth error

500

internal error

put /identities/{address}/settings

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{address}/settings

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "type": "identity_settings",
  • "id": "string",
  • "attributes":
    {
    },
  • "relationships":
    {
    }
}

Get settings item

Get settings item by specified key. If item not found returns 200 with settings item model, but value attribute will be null.

🔒 An owner's or master signature is needed

path Parameters
address
required
string

account identifier

key
required
string

settings item key

Responses

200

Success

400

invalid request

401

auth error

500

internal error

get /identities/{address}/settings/{key}

TokenD Developer Environment

https://api.achilles.tokend.io/identities/{address}/settings/{key}

Response samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "type": "identity_settings",
  • "id": "string",
  • "attributes":
    {
    },
  • "relationships":
    {
    }
}

Account

Create Account

Creates account using provided account-id and signers

Request Body schema: application/vnd.api+json
data
required
object (CreateAccount)
included
required
Array of Signer (object)

Responses

201

account created

400

invalid request

409

account already exist

500

failed to create account

post /accounts

TokenD Developer Environment

https://api.achilles.tokend.io/accounts

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    },
  • "included":
    [
    ]
}

Add Signer

Adds signer to account when some service needs to perform some action with unregistred account.

🔒 An admin's signature is needed

path Parameters
address
required
string

account identifier

Request Body schema: application/vnd.api+json
data
required
object (IdentitySigner)

Responses

201

created

400

invalid request

500

failed to create signer

post /accounts/{address}/signers

TokenD Developer Environment

https://api.achilles.tokend.io/accounts/{address}/signers

Request samples

Content type
application/vnd.api+json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}