Download OpenAPI specification:Download
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.
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
.
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
Keychain derived using the same email/password but with different account and salt. Used as a second factor to confirm the password possession.
id
- version of KDF parameters used to derive the wallet data
Creates a new session.
data required | object (CreateWallet) |
included required | Array of One of multiple values password is required |
current wallet state
invalid request
wallet or recovery conflict
failed to save wallets or failed to create account
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "salt": "qonp0sJgd30NQ916fzpO2A==",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbi...RlTmFtZSI6ImdjbSJ9",
- "verification_code": "Q916"
}, - "relationships": {
- "password": {
- "data": {
- "id": "passwordID",
- "type": "password"
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "signers": [
- {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "signer"
}
]
}
}, - "included": [
- {
- "id": "passwordID",
- "type": "password",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "salt": "qonp0sJgd30NQ916fzpO2A=="
}
}
]
}
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}
}
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
.
Returns current default derivation parameters or parameters used to derive a particular wallet.
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.
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 |
Success
KDF not found
Internal Error
TokenD Developer Environment
{- "data": {
- "type": "kdf",
- "id": 2,
- "attributes": {
- "algorithm": "scrypt",
- "bits": 256,
- "n": 4096,
- "r": 8,
- "p": 1,
- "salt": "E8C7204F5E3E91FA87662308B7E459F01757B005C647E49A7A49AEF32845D868"
}
}
}
Returns wallet by its id. Creates a new session.
wallet-id required | string id of wallet |
public_ip | string Example: public_ip=false if |
Success
wallet verificationor additional factor required
wallet not found
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}, - "included": [
- {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions",
- "attributes": {
- "expires_at": "2019-05-29T16:44:58Z",
- "encryption_key": "f95d70b7ffae669d0bc24d247a9b517ecbde8c636d1e8ab3bbb7f8b0bddd3f9f"
}
}
]
}
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.
Instant delivery is not guaranteed.
wallet-id required | string related wallet id |
token created
email already confirmed
failed to get token
TokenD Developer Environment
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
After the wallet is created (and verified
is false), a user should receive an email with the verification link with client router payload
wallet-id required | string related wallet id |
Email verification token
data | object (VerificationRequest) |
Wallet was verified
invalid input parameters
failed to verify token
TokenD Developer Environment
{- "data": {
- "type": "wallet_verification",
- "attributes": {
- "token": "JOqIgfCNSjnGWDrTPWbW"
}
}
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
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.
Returns current default derivation parameters or parameters used to derive a particular wallet.
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.
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 |
Success
KDF not found
Internal Error
TokenD Developer Environment
{- "data": {
- "type": "kdf",
- "id": 2,
- "attributes": {
- "algorithm": "scrypt",
- "bits": 256,
- "n": 4096,
- "r": 8,
- "p": 1,
- "salt": "E8C7204F5E3E91FA87662308B7E459F01757B005C647E49A7A49AEF32845D868"
}
}
}
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
envelope
- base64 encoded transaction envelope used to update account signers
wallet-id required | string id of wallet |
public_ip | string Example: public_ip=false if |
data required | UpdateWallet (object) or KYCRecoveryWallet (object) |
included required | Array of TransactionEnvelope (object) or Password (object) 2 items transaction is required when updating wallet |
Success
invalid request
not allowed
additional factor required
wallet not found
wallet already exist
failed to update wallet
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "salt": "qonp0sJgd30NQ916fzpO2A==",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbi...RlTmFtZSI6ImdjbSJ9"
}, - "relationships": {
- "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "transaction": {
- "data": {
- "id": "transactionID",
- "type": "transaction"
}
}
}
}, - "included": [
- {
- "id": "transactionID",
- "type": "transaction",
- "attributes": {
- "envelope": "AAA...AAAA"
}
}, - {
- "id": "transactionID",
- "type": "transaction",
- "attributes": {
- "envelope": "AAA...AAAA"
}
}
]
}
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}
}
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 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 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
.
Keychain derived using the same email/password but with different account and salt. Used as a second factor to confirm the password possession.
id
- version of KDF parameters used to derive the wallet data
Creates a new session.
data required | object (CreateWallet) |
included required | Array of One of multiple values password is required |
current wallet state
invalid request
wallet or recovery conflict
failed to save wallets or failed to create account
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "salt": "qonp0sJgd30NQ916fzpO2A==",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbi...RlTmFtZSI6ImdjbSJ9",
- "verification_code": "Q916"
}, - "relationships": {
- "password": {
- "data": {
- "id": "passwordID",
- "type": "password"
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "signers": [
- {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "signer"
}
]
}
}, - "included": [
- {
- "id": "passwordID",
- "type": "password",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "salt": "qonp0sJgd30NQ916fzpO2A=="
}
}
]
}
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}
}
Returns wallet by its id. Creates a new session.
wallet-id required | string id of wallet |
public_ip | string Example: public_ip=false if |
Success
wallet verificationor additional factor required
wallet not found
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}, - "included": [
- {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions",
- "attributes": {
- "expires_at": "2019-05-29T16:44:58Z",
- "encryption_key": "f95d70b7ffae669d0bc24d247a9b517ecbde8c636d1e8ab3bbb7f8b0bddd3f9f"
}
}
]
}
Delete the specified wallet
🔒 An admin's signature is needed
wallet-id required | string id of wallet |
public_ip | string Example: public_ip=false if |
deleted
not allowed
failed to delete wallet
TokenD Developer Environment
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
envelope
- base64 encoded transaction envelope used to update account signers
wallet-id required | string id of wallet |
public_ip | string Example: public_ip=false if |
data required | UpdateWallet (object) or KYCRecoveryWallet (object) |
included required | Array of TransactionEnvelope (object) or Password (object) 2 items transaction is required when updating wallet |
Success
invalid request
not allowed
additional factor required
wallet not found
wallet already exist
failed to update wallet
TokenD Developer Environment
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "salt": "qonp0sJgd30NQ916fzpO2A==",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbi...RlTmFtZSI6ImdjbSJ9"
}, - "relationships": {
- "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "transaction": {
- "data": {
- "id": "transactionID",
- "type": "transaction"
}
}
}
}, - "included": [
- {
- "id": "transactionID",
- "type": "transaction",
- "attributes": {
- "envelope": "AAA...AAAA"
}
}, - {
- "id": "transactionID",
- "type": "transaction",
- "attributes": {
- "envelope": "AAA...AAAA"
}
}
]
}
{- "data": {
- "type": "wallet",
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "attributes": {
- "account_id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "keychain_data": "eyJJViI6IlRaRHppWWRTNEdKMjBYbisiLCJjaXBo...CJtb2RlTmFtZSI6ImdjbSJ9",
- "verified": true,
- "last_sent_at": "2018-11-23T16:35:11Z"
}, - "relationships": {
- "password": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "kdf": {
- "data": {
- "type": "kdf",
- "id": 2
}
}, - "factor": {
- "data": {
- "type": "password",
- "id": "id"
}
}, - "referrer": {
- "data": {
- "id": "id",
- "type": "referrer"
}
}, - "session": {
- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions"
}
}
}
}
}
Instant delivery is not guaranteed.
wallet-id required | string related wallet id |
token created
email already confirmed
failed to get token
TokenD Developer Environment
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
After the wallet is created (and verified
is false), a user should receive an email with the verification link with client router payload
wallet-id required | string related wallet id |
Email verification token
data | object (VerificationRequest) |
Wallet was verified
invalid input parameters
failed to verify token
TokenD Developer Environment
{- "data": {
- "type": "wallet_verification",
- "attributes": {
- "token": "JOqIgfCNSjnGWDrTPWbW"
}
}
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
Returns list of factors used for 2FA
wallet-id required | string id of a wallet |
Success
wallet not found
failed to update wallet
TokenD Developer Environment
{- "data": [
- {
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "type": "password",
- "attributes": {
- "priority": 100
}
}
]
}
Creates non-active TFA factor of given type
🔒 An owner's signature is needed
wallet-id required | string id of a wallet |
data required | object (TFAKey) |
Success
invalid request
not allowed
factor check failed
wallet not found
factor should be created during the signup
failed to get wallet, failed to generate backend, failed to save backend
TokenD Developer Environment
{- "data": {
- "type": "totp"
}
}
{- "data": {
- "id": 1,
- "type": "backend",
- "attributes": {
- "type": "totp"
}
}
}
Deletes the given factor
🔒 An owner's signature is needed
wallet-id required | string id of a wallet |
backend required | string id of a factor |
Success
invalid request
not allowed
additional factor required
backend not found
failed to get backend
TokenD Developer Environment
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
wallet-id required | string id of a wallet |
backend required | string id of a factor |
data required | object (WalletFactor) |
Success
invalid request
not allowed
tfa check failed
backend not found
failed to update factor
TokenD Developer Environment
{- "data": {
- "id": "388108095960430b80554ac3efb6807a9f286854033aca47f6f466094ab50876",
- "type": "password",
- "attributes": {
- "priority": 100
}
}
}
Verifies the factor value
wallet-id required | string id of a wallet |
backend required | string id of a factor |
data required | object (VerifyFactor) |
Success
invalid request
backend not found
failed to mark token as verified
TokenD Developer Environment
{- "data": {
- "type": "factor_verification",
- "attributes": {
- "token": "4402502ad8d4c80d06d28e988071aabe082afea1",
- "otp": 123456
}
}
}
Returns current default derivation parameters or parameters used to derive a particular wallet.
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.
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 |
Success
KDF not found
Internal Error
TokenD Developer Environment
{- "data": {
- "type": "kdf",
- "id": 2,
- "attributes": {
- "algorithm": "scrypt",
- "bits": 256,
- "n": 4096,
- "r": 8,
- "p": 1,
- "salt": "E8C7204F5E3E91FA87662308B7E459F01757B005C647E49A7A49AEF32845D868"
}
}
}
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 |
Create account-owned blob.
🔒 An owner's signature is needed
address required | string account identifier |
Create Blob
data required | object (Blob) |
Success
blob creation not allowed
account does not exist
failed to save blob
TokenD Developer Environment
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}
}
}
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}
}
}
Get account-owned blob.
🔒 An owner's or admin's signature is needed for private blobs
address required | string account identifier |
blob required | string blob identifier |
Success
invalid request
blob not found
failed to get blobs
TokenD Developer Environment
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}
}
}
Create blob
🔒 An admin's signature is needed
data required | object (BlobRequest) |
Success
blob creation not allowed
failed to save blob
TokenD Developer Environment
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH"
}
}
}
}
}
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}
}
}
🔒 An admin's signature is needed for private blobs
blob required | string Blob identifier |
Success
invalid request
blob not found
failed to get blob
TokenD Developer Environment
{- "data": {
- "id": "blah",
- "type": "asset_description",
- "attributes": {
- "value": "foobar"
}
}
}
🔒 An admin's signature is needed
blob required | string Blob identifier |
Blob deleted
invalid blob id
failed to get blob or failed to mark blob deleted
TokenD Developer Environment
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
Identity is created simultaneously with the creation of an account, and it represents the state of an account in the system.
List of full identities
🔒. An admin's signature is needed
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 |
Success
signer not allowed
failed get identities
TokenD Developer Environment
{- "data": {
- "id": 1,
- "type": "identity",
- "attributes": {
- "address": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "updated_at": "2018-11-23T16:35:11Z",
- "phone_number": "0123456789",
- "telegram_username": "username",
- "status": "active"
}, - "relationships": {
- "account": {
- "links": {
- "related": "/v3/accounts/GB2AHC3Z4CKLAVVT5U3KFFSLCWARR4JS26GYOXBAC6K3LAN3NHULZKMW"
}
}
}
}, - "links": {
- "next": "/identities?page[number]=2&page[limit]=15",
- "self": "identities?page[number]=1&page[limit]=15"
}
}
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.
data | object (IdentityRequest) |
Success
invalid request
internal error
TokenD Developer Environment
{
}
{- "data": {
- "id": 1,
- "type": "identity",
- "attributes": {
- "address": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "updated_at": "2018-11-23T16:35:11Z",
- "phone_number": "0123456789",
- "telegram_username": "username",
- "status": "active"
}, - "relationships": {
- "account": {
- "links": {
- "related": "/v3/accounts/GB2AHC3Z4CKLAVVT5U3KFFSLCWARR4JS26GYOXBAC6K3LAN3NHULZKMW"
}
}
}
}
}
Get list of identities. One of filters must be set.
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 |
Success
invalid request or email/address filter not set
failed to get identities
TokenD Developer Environment
{- "data": {
- "type": "identity",
- "attributes": {
- "address": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "phone_number": "0123456789",
- "telegram_username": "username",
- "status": "active"
}, - "relationships": {
- "account": {
- "links": {
- "related": "/v3/accounts/GB2AHC3Z4CKLAVVT5U3KFFSLCWARR4JS26GYOXBAC6K3LAN3NHULZKMW"
}
}
}
}, - "links": {
- "next": "/identities?filter[address]=GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH&page[number]=2&page[limit]=15",
- "self": "identities?filter[address]=GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH&page[number]=1&page[limit]=15"
}
}
Add or change user's phonenumber
address required | string account identifier |
data | object (ChangePhone) |
Success
additional factor required
phone number already exist
failed to change phone
TokenD Developer Environment
{- "data": {
- "type": "phone",
- "id": "id",
- "attributes": {
- "phone": "string"
}
}
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
Add or change user's telegram username
address required | string account identifier |
data | object (ChangeTelegramUsername) |
Success
additional factor required
username already exist
failed to change telegram username
TokenD Developer Environment
{- "data": {
- "type": "telegram-username",
- "id": "id",
- "attributes": {
- "username": "string"
}
}
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
🔒 An owner's signature is needed
email_address required | string Account email address |
Success
invalid request
auth error
removing verified user is forbidden
identity by email is not found
internal error
TokenD Developer Environment
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
🔒 An admin's signature is needed
data | Array of objects (MassEmailsKey) |
Success
account does not exist
failed to add email
TokenD Developer Environment
{- "data": [
- {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "account"
}
]
}
{- "data": [
- {
- "type": "identity",
- "attributes": {
- "address": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "phone_number": "0123456789",
- "telegram_username": "username",
- "status": "active"
}, - "relationships": {
- "account": {
- "links": {
- "related": "/v3/accounts/GB2AHC3Z4CKLAVVT5U3KFFSLCWARR4JS26GYOXBAC6K3LAN3NHULZKMW"
}
}
}
}
], - "links": {
- "next": "/identities?filter[address]=GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH&page[number]=2&page[limit]=15",
- "self": "identities?filter[address]=GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH&page[number]=1&page[limit]=15"
}
}
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.
data | Array of objects (IdentityRequest) |
Success
invalid request
internal error
TokenD Developer Environment
{
}
{- "data": [
- {
- "id": 1,
- "type": "identity",
- "attributes": {
- "address": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "updated_at": "2018-11-23T16:35:11Z",
- "phone_number": "0123456789",
- "telegram_username": "username",
- "status": "active"
}, - "relationships": {
- "account": {
- "links": {
- "related": "/v3/accounts/GB2AHC3Z4CKLAVVT5U3KFFSLCWARR4JS26GYOXBAC6K3LAN3NHULZKMW"
}
}
}
}
]
}
Request email verification token
data required | object (RequestToken) |
Success
invalid request
failed to get email token
TokenD Developer Environment
{- "data": {
- "type": "token-request",
- "id": "id",
- "attributes": {
- "email": "string"
}
}
}
{- "data": {
- "type": "verification-token",
- "id": "id",
- "attributes": {
- "token": "string"
}
}
}
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 |
Get upload policy.
🔒 An owner's signature is needed
address required | string account identifier |
blob required | string blob identifier |
Get Upload Policy
data required | object (DocumentRequest) |
Success
invalid request
must have account for uploading documents
wallet not found
failed to build form data
TokenD Developer Environment
{- "data": {
- "type": "asset_logo",
- "attributes": {
- "content_type": "application/pdf"
}
}
}
{- "data": {
- "type": "upload_policy",
- "attributes": {
- "bucket": "foobar",
- "key": "document123",
- "policy": "string",
- "url": "string",
- "x-amz-algorithm": "string",
- "x-amz-credential": "string",
- "x-amz-date": "string",
- "x-amz-signature": "string"
}
}
}
Get document url.
🔒 An owner's or admin's signature is needed
address required | string account identifier |
document required | string document identifier |
Success
must be signer
failed get document url
TokenD Developer Environment
{- "type": "document_url",
- "attributes": {
- "url": "string"
}
}
Get upload policy.
🔒 An admin's signature is needed
Get Upload Policy
data required | object (Document) |
Success
invalid request
only master is allowed
failed to build form data
TokenD Developer Environment
{- "data": {
- "type": "asset_logo",
- "attributes": {
- "content_type": "application/pdf"
}, - "relationships": {
- "owner": {
- "data": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH"
}
}
}
}
}
{- "data": {
- "type": "upload_policy",
- "attributes": {
- "bucket": "foobar",
- "key": "document123",
- "policy": "string",
- "url": "string",
- "x-amz-algorithm": "string",
- "x-amz-credential": "string",
- "x-amz-date": "string",
- "x-amz-signature": "string"
}
}
}
Get document url.
🔒 An admin's signature is needed
document required | string document identifier |
Success
only master is allowed
failed get document url
TokenD Developer Environment
{- "type": "document_url",
- "attributes": {
- "url": "string"
}
}
TokenD Developer Environment
{- "data": {
- "type": "enums",
- "attributes": {
- "business_type": [
- "General Trading"
], - "countries": [
- "Aland Islands"
]
}
}
}
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
data | Array of WhitelistInvite (object) or GeneralInvite (object) |
email added to list
invite already exist
failed to add email
TokenD Developer Environment
{- "data": [
- {
- "type": "whitelist-invite",
- "relationships": {
- "sales": {
- "id": 1,
- "type": "sales"
}
}
}
]
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
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
data | WhitelistInvite (object) or GeneralInvite (object) |
email added to list
failed to add email
TokenD Developer Environment
{- "data": {
- "type": "whitelist-invite",
- "relationships": {
- "sales": {
- "id": 1,
- "type": "sales"
}
}
}
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
List pending invites. 🔒 An sale owner's (for filtering whitelist invites by sale-id) or admin's signature is needed
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. |
Success
not found
failed to get invites list
TokenD Developer Environment
{- "data": [
- {
- "id": 1,
- "type": "whitelist-invite",
- "relationships": {
- "sales": {
- "id": 1,
- "type": "sales"
}, - "accounts": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "accounts"
}
}
}
]
}
🔒 An sale owner's or admin's signature is needed
data | Array of InviteEntityKey (object) |
email added to list
failed to add email
TokenD Developer Environment
{- "data": [
- {
- "id": 1,
- "type": "whitelist-invite"
}
]
}
{- "errors": [
- {
- "title": "Bad Request",
- "detail": "Request body was expected",
- "status": 400
}
]
}
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.
address required | string account identifier |
data required | object |
Success
failed to create signer
TokenD Developer Environment
{- "data": {
- "type": "signer",
- "attributes": {
- "role_id": 1,
- "weight": 1000
}
}
}
{- "data": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "signer",
- "attributes": {
- "role_id": 1,
- "weight": 1000,
- "identity": 1
}
}
}
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.
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 |
successfully submitted
bad input parameter
additional factor required
request has timed out
transaction failed
TokenD Developer Environment
{- "tx": "AAAAAEHCX5tmu0fXlkE9GLIOLO185ih5QI7V+PZ1mtb1tnzSA59veKFdUjsAAAAAAAAAAAAAAABchp31A...",
- "wait_for_ingest": false
}
{- "id": "17179869186",
- "type": "transactions",
- "attributes": {
- "hash": "575a8bad0a67378029c778d92eb5367136e89530830ed8275ff20ac80160a80d",
- "ledger_sequence": 4,
- "created_at": "2019-03-04T18:42:15Z",
- "envelope_xdr": "AAAAAEHCX5tmu0fXlkE9GLIOLO185ih5QI7V+PZ1mtb1tnzSA59veKFdUjsAAAAAAAAAAAAAAABchp31A...",
- "result_xdr": "AAAAAAAAAAAAAAAAAAAAAQAAAAAAAAALAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAA",
- "result_meta_xdr": "AAAAAAAAAAEAAAAMAAAAAwAAAAEAAAAaAAAAAAAAAAEAAAABAAAAAAAAAAEAAAACe30AAAAAAAAAAAAAAAAAAwAAAA.."
}, - "relationships": {
- "operations": [
- {
- "id": "17179869186",
- "type": "operations"
}
], - "source": {
- "data": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "accounts"
}
}, - "ledger_entry_changes": [
- {
- "id": "17179869186:17179869186:0",
- "type": "ledger-entry-changes"
}
]
}
}
Session is created on login and contains session key and session ID.
Expires in 10 minutes by default.
Returns session by session token.
Extends session.
id required | string session token |
Success
token or session not found
TokenD Developer Environment
{- "data": {
- "id": "01D78XYFJ1PRM1WPBCBT3VHMNV",
- "type": "sessions",
- "attributes": {
- "expires_at": "2019-05-29T16:44:58Z",
- "encryption_key": "f95d70b7ffae669d0bc24d247a9b517ecbde8c636d1e8ab3bbb7f8b0bddd3f9f"
}
}
}
Get all account settings.
🔒 An owner's or master signature is needed
Reserved keys:
client_domain
- store domain of user webclientaddress required | string account identifier |
page[number] | integer The number of a page to return. |
Success
invalid request
auth error
internal error
TokenD Developer Environment
{- "type": "identity_settings",
- "id": "string",
- "attributes": {
- "key": "string",
- "value": { }
}, - "relationships": {
- "identity": {
- "id": 1,
- "type": "identity"
}
}
}
Set settings item.
🔒 An owner's signature is needed
address required | string account identifier |
Success
invalid request
auth error
internal error
TokenD Developer Environment
{- "type": "identity_settings",
- "id": "string",
- "attributes": {
- "key": "string",
- "value": { }
}, - "relationships": {
- "identity": {
- "id": 1,
- "type": "identity"
}
}
}
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
address required | string account identifier |
key required | string settings item key |
Success
invalid request
auth error
internal error
TokenD Developer Environment
{- "type": "identity_settings",
- "id": "string",
- "attributes": {
- "key": "string",
- "value": { }
}, - "relationships": {
- "identity": {
- "id": 1,
- "type": "identity"
}
}
}
Creates account using provided account-id and signers
data required | object (CreateAccount) |
included required | Array of Signer (object) |
account created
invalid request
account already exist
failed to create account
TokenD Developer Environment
{- "data": {
- "type": "identity-account",
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "relationships": {
- "signers": {
- "data": [
- {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "signer"
}
]
}
}
}, - "included": [
- {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "signer",
- "attributes": {
- "role_id": 1,
- "weight": 1000,
- "identity": 1
}
}
]
}
Adds signer to account when some service needs to perform some action with unregistred account.
🔒 An admin's signature is needed
address required | string account identifier |
data required | object (IdentitySigner) |
created
invalid request
failed to create signer
TokenD Developer Environment
{- "data": {
- "id": "GBSR6JG5AYSAW7HK6EGJFYVIVN54LVGSY3ZLJ6X3IBQZ766EJABCZQTH",
- "type": "identity-signer",
- "attributes": {
- "role_id": 1,
- "weight": 1000,
- "identity": 1
}
}
}