# Approve activity
Source: https://docs.turnkey.com/api-reference/activities/approve-activity
Approve an activity.
Enum options: `ACTIVITY_TYPE_APPROVE_ACTIVITY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
An artifact verifying a User's action.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The approveActivityIntent object
An artifact verifying a User's action.
The result of the activity
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/approve_activity \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_APPROVE_ACTIVITY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"fingerprint": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().approveActivity({
fingerprint: " (An artifact verifying a User's action.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_APPROVE_ACTIVITY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"approveActivityIntent": {
"fingerprint": ""
}
},
"result": "
# Broadcast EVM transaction
Source: https://docs.turnkey.com/api-reference/activities/broadcast-evm-transaction
Submit a transaction intent describing an EVM transaction you would like to broadcast.
Enum options: `ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A wallet or private key address to sign with. This does not support private key IDs.
Enum options: `eip155:1`, `eip155:11155111`, `eip155:8453`, `eip155:84532`, `eip155:137`, `eip155:80002`, `eip155:56`, `eip155:97`
Whether to sponsor this transaction via Gas Station. If false or unset, the EOA pays gas. A single call uses EIP-1559; multiple calls use EIP-7702 batch execution via Gas Station.
Outer transaction nonce. Omit to auto-fetch.
Maximum amount of gas for the outer transaction. Omit to auto-estimate.
Maximum total fee per gas unit (base fee + priority fee) in wei. Omit to auto-estimate.
Maximum priority fee (tip) per gas unit in wei. Omit to auto-estimate.
Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true.
The gas station delegate contract nonce. Only used when sponsor=true. Omit to auto-fetch.
Ordered list of calls to execute. Must contain between 1 and 50 entries. A single entry with sponsor=false uses EIP-1559; multiple entries use EIP-7702 batch execution via Gas Station.
Recipient address as a hex string with 0x prefix.
Amount of native asset to send in wei.
Hex-encoded call data for contract interactions.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The ethSendTransactionIntentV2 object
A wallet or private key address to sign with. This does not support private key IDs.
CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).
Enum options: `eip155:1`, `eip155:11155111`, `eip155:8453`, `eip155:84532`, `eip155:137`, `eip155:80002`, `eip155:56`, `eip155:97`
Whether to sponsor this transaction via Gas Station. If false or unset, the EOA pays gas. A single call uses EIP-1559; multiple calls use EIP-7702 batch execution via Gas Station.
Outer transaction nonce. Omit to auto-fetch.
Maximum amount of gas for the outer transaction. Omit to auto-estimate.
Maximum total fee per gas unit (base fee + priority fee) in wei. Omit to auto-estimate.
Maximum priority fee (tip) per gas unit in wei. Omit to auto-estimate.
Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true.
The gas station delegate contract nonce. Only used when sponsor=true. Omit to auto-fetch.
Ordered list of calls to execute. Must contain between 1 and 50 entries. A single entry with sponsor=false uses EIP-1559; multiple entries use EIP-7702 batch execution via Gas Station.
Recipient address as a hex string with 0x prefix.
Amount of native asset to send in wei.
Hex-encoded call data for contract interactions.
The result of the activity
The ethSendTransactionResultV2 object
The send\_transaction\_status ID associated with the transaction submission
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/eth_send_transaction \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"from": "",
"caip2": "",
"sponsor": "",
"nonce": "",
"gasLimit": "",
"maxFeePerGas": "",
"maxPriorityFeePerGas": "",
"deadline": "",
"gasStationNonce": "",
"calls": [
{
"to": "",
"value": "",
"data": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().ethSendTransaction({
from: " (A wallet or private key address to sign with. This does not support private key IDs.)",
caip2: "" // CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).,
sponsor: true // Whether to sponsor this transaction via Gas Station. If false or unset, the EOA pays gas. A single call uses EIP-1559; multiple calls use EIP-7702 batch execution via Gas Station.,
nonce: " (Outer transaction nonce. Omit to auto-fetch.)",
gasLimit: " (Maximum amount of gas for the outer transaction. Omit to auto-estimate.)",
maxFeePerGas: " (Maximum total fee per gas unit (base fee + priority fee) in wei. Omit to auto-estimate.)",
maxPriorityFeePerGas: " (Maximum priority fee (tip) per gas unit in wei. Omit to auto-estimate.)",
deadline: " (Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true.)",
gasStationNonce: " (The gas station delegate contract nonce. Only used when sponsor=true. Omit to auto-fetch.)",
calls: [{ // Ordered list of calls to execute. Must contain between 1 and 50 entries. A single entry with sponsor=false uses EIP-1559; multiple entries use EIP-7702 batch execution via Gas Station.,
to: " (Recipient address as a hex string with 0x prefix.)",
value: " (Amount of native asset to send in wei.)",
data: " (Hex-encoded call data for contract interactions.)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"ethSendTransactionIntentV2": {
"from": "",
"caip2": "",
"sponsor": "",
"nonce": "",
"gasLimit": "",
"maxFeePerGas": "",
"maxPriorityFeePerGas": "",
"deadline": "",
"gasStationNonce": "",
"calls": [
{
"to": "",
"value": "",
"data": ""
}
]
}
},
"result": {
"ethSendTransactionResultV2": {
"sendTransactionStatusId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Broadcast SVM transaction
Source: https://docs.turnkey.com/api-reference/activities/broadcast-svm-transaction
Submit a transaction intent describing an SVM transaction you would like to broadcast.
Enum options: `ACTIVITY_TYPE_SOL_SEND_TRANSACTION`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Base64-encoded serialized unsigned Solana transaction
A wallet or private key address to sign with. This does not support private key IDs.
Whether to sponsor this transaction via Gas Station.
Enum options: `solana:mainnet`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`, `solana:devnet`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG`
user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The solSendTransactionIntent object
Base64-encoded serialized unsigned Solana transaction
A wallet or private key address to sign with. This does not support private key IDs.
Whether to sponsor this transaction via Gas Station.
CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values.
Enum options: `solana:mainnet`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`, `solana:devnet`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG`
user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution
The result of the activity
The solSendTransactionResult object
The send\_transaction\_status ID associated with the transaction submission
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/sol_send_transaction \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"unsignedTransaction": "",
"signWith": "",
"sponsor": "",
"caip2": "",
"recentBlockhash": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().solSendTransaction({
unsignedTransaction: " (Base64-encoded serialized unsigned Solana transaction)",
signWith: " (A wallet or private key address to sign with. This does not support private key IDs.)",
sponsor: true // Whether to sponsor this transaction via Gas Station.,
caip2: "" // CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values.,
recentBlockhash: " (user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SOL_SEND_TRANSACTION",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"solSendTransactionIntent": {
"unsignedTransaction": "",
"signWith": "",
"sponsor": "",
"caip2": "",
"recentBlockhash": ""
}
},
"result": {
"solSendTransactionResult": {
"sendTransactionStatusId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Claim Spark transfer
Source: https://docs.turnkey.com/api-reference/activities/claim-spark-transfer
Construct receiver-side encrypted operator packages to claim a Spark transfer. Does not perform FROST signing.
Enum options: `ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Spark wallet account address identifying the wallet.
claim field
Leaves being claimed.
Leaf identifier (UUID).
ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key.
Hex-encoded 64-byte compact ECDSA signature binding (leaf\_id, transfer\_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption.
Shamir threshold for reconstructing the per-leaf claim secret.
Operators that will receive Shamir shares.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Spark transfer identifier (UUID). Used together with each leaf's sender\_signature to verify the sender bound this ciphertext to this transfer.
Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender\_signature fields.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The sparkClaimTransferIntent object
A Spark wallet account address identifying the wallet.
claim field
Leaves being claimed.
Leaf identifier (UUID).
ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key.
Hex-encoded 64-byte compact ECDSA signature binding (leaf\_id, transfer\_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption.
Shamir threshold for reconstructing the per-leaf claim secret.
Operators that will receive Shamir shares.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Spark transfer identifier (UUID). Used together with each leaf's sender\_signature to verify the sender bound this ciphertext to this transfer.
Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender\_signature fields.
The result of the activity
The sparkClaimTransferResult object
Per-operator ECIES-encrypted packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Newly-derived SigningLeaf public keys, one per leaf, in input order.
The Spark leaf\_id this public key was derived for.
Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf\_id.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/spark_claim_transfer \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"claim": {
"leaves": [
{
"leafId": "",
"ciphertext": "",
"senderSignature": ""
}
],
"threshold": "",
"operatorRecipients": [
{
"operatorId": "",
"encryptionPublicKey": ""
}
],
"transferId": "",
"senderIdentityPublicKey": ""
}
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().sparkClaimTransfer({
signWith: " (A Spark wallet account address identifying the wallet.)",
claim: { // claim field,
leaves: [{ // Leaves being claimed.,
leafId: " (Leaf identifier (UUID).)",
ciphertext: " (ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key.)",
senderSignature: " (Hex-encoded 64-byte compact ECDSA signature binding (leaf_id, transfer_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption.)",
}],
threshold: 0 // Shamir threshold for reconstructing the per-leaf claim secret.,
operatorRecipients: [{ // Operators that will receive Shamir shares.,
operatorId: " (Spark operator identifier (UUID).)",
encryptionPublicKey: " (Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).)",
}],
transferId: " (Spark transfer identifier (UUID). Used together with each leaf's sender_signature to verify the sender bound this ciphertext to this transfer.)",
senderIdentityPublicKey: " (Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender_signature fields.)",
}
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"sparkClaimTransferIntent": {
"signWith": "",
"claim": {
"leaves": [
{
"leafId": "",
"ciphertext": "",
"senderSignature": ""
}
],
"threshold": "",
"operatorRecipients": [
{
"operatorId": "",
"encryptionPublicKey": ""
}
],
"transferId": "",
"senderIdentityPublicKey": ""
}
}
},
"result": {
"sparkClaimTransferResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"newLeafPublicKeys": [
{
"leafId": "",
"publicKey": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create a Fiat On Ramp Credential
Source: https://docs.turnkey.com/api-reference/activities/create-a-fiat-on-ramp-credential
Create a fiat on ramp provider credential
Enum options: `ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
If the on-ramp credential is a sandbox credential
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createFiatOnRampCredentialIntent object
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
If the on-ramp credential is a sandbox credential
The result of the activity
The createFiatOnRampCredentialResult object
Unique identifier of the Fiat On-Ramp credential that was created
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_fiat_on_ramp_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"onrampProvider": "",
"projectId": "",
"publishableApiKey": "",
"encryptedSecretApiKey": "",
"encryptedPrivateApiKey": "",
"sandboxMode": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createFiatOnRampCredential({
onrampProvider: "" // onrampProvider field,
projectId: " (Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier)",
publishableApiKey: " (Publishable API key for the on-ramp provider)",
encryptedSecretApiKey: " (Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key)",
encryptedPrivateApiKey: " (Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.)",
sandboxMode: true // If the on-ramp credential is a sandbox credential
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createFiatOnRampCredentialIntent": {
"onrampProvider": "",
"projectId": "",
"publishableApiKey": "",
"encryptedSecretApiKey": "",
"encryptedPrivateApiKey": "",
"sandboxMode": ""
}
},
"result": {
"createFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create a TVC App
Source: https://docs.turnkey.com/api-reference/activities/create-a-tvc-app
Create a new TVC application
Enum options: `ACTIVITY_TYPE_CREATE_TVC_APP`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The name of the new TVC application
Quorum public key to use for this application
Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required
manifestSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
Array item type: string
item field
The threshold of operators needed to reach consensus in this new Operator Set
Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required
shareSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
Array item type: string
item field
The threshold of operators needed to reach consensus in this new Operator Set
Enables network egress for this TVC app. Default if not provided: false.
When true, this app may create deployments in debug-mode. Debug-mode deployments expose logs and emit zero'd attestation PCRs, so remote attestation cannot succeed. Cannot be changed after app creation. Setting this true means the app's quorum key is considered permanently insecure, and a new app with a fresh quorum key must be created. Default if not provided: false.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createTvcAppIntent object
The name of the new TVC application
Quorum public key to use for this application
Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required
manifestSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
item field
The threshold of operators needed to reach consensus in this new Operator Set
Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required
shareSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
item field
The threshold of operators needed to reach consensus in this new Operator Set
Enables network egress for this TVC app. Default if not provided: false.
When true, this app may create deployments in debug-mode. Debug-mode deployments expose logs and emit zero'd attestation PCRs, so remote attestation cannot succeed. Cannot be changed after app creation. Setting this true means the app's quorum key is considered permanently insecure, and a new app with a fresh quorum key must be created. Default if not provided: false.
The result of the activity
The createTvcAppResult object
The unique identifier for the TVC application
The unique identifier for the TVC manifest set
The unique identifier(s) of the manifest set operators
item field
The required number of approvals for the manifest set
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_tvc_app \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_TVC_APP",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"name": "",
"quorumPublicKey": "",
"manifestSetId": "",
"manifestSetParams": {
"name": "",
"newOperators": [
{
"name": "",
"publicKey": ""
}
],
"existingOperatorIds": [
""
],
"threshold": ""
},
"shareSetId": "",
"shareSetParams": {
"name": "",
"newOperators": [
{
"name": "",
"publicKey": ""
}
],
"existingOperatorIds": [
""
],
"threshold": ""
},
"enableEgress": "",
"enableDebugModeDeployments": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createTvcApp({
name: " (The name of the new TVC application)",
quorumPublicKey: " (Quorum public key to use for this application)",
manifestSetId: " (Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required)",
manifestSetParams: { // manifestSetParams field,
name: " (Short description for this new operator set)",
newOperators: [{ // Operators to create as part of this new operator set,
name: " (The name for this new operator)",
publicKey: " (Public key for this operator)",
}],
existingOperatorIds: [""] // Existing operators to use as part of this new operator set,
threshold: 0 // The threshold of operators needed to reach consensus in this new Operator Set,
},
shareSetId: " (Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required)",
shareSetParams: { // shareSetParams field,
name: " (Short description for this new operator set)",
newOperators: [{ // Operators to create as part of this new operator set,
name: " (The name for this new operator)",
publicKey: " (Public key for this operator)",
}],
existingOperatorIds: [""] // Existing operators to use as part of this new operator set,
threshold: 0 // The threshold of operators needed to reach consensus in this new Operator Set,
},
enableEgress: true // Enables network egress for this TVC app. Default if not provided: false.,
enableDebugModeDeployments: true // When true, this app may create deployments in debug-mode. Debug-mode deployments expose logs and emit zero'd attestation PCRs, so remote attestation cannot succeed. Cannot be changed after app creation. Setting this true means the app's quorum key is considered permanently insecure, and a new app with a fresh quorum key must be created. Default if not provided: false.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_TVC_APP",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createTvcAppIntent": {
"name": "",
"quorumPublicKey": "",
"manifestSetId": "",
"manifestSetParams": {
"name": "",
"newOperators": [
{
"name": "",
"publicKey": ""
}
],
"existingOperatorIds": [
""
],
"threshold": ""
},
"shareSetId": "",
"shareSetParams": {
"name": "",
"newOperators": [
{
"name": "",
"publicKey": ""
}
],
"existingOperatorIds": [
""
],
"threshold": ""
},
"enableEgress": "",
"enableDebugModeDeployments": ""
}
},
"result": {
"createTvcAppResult": {
"appId": "",
"manifestSetId": "",
"manifestSetOperatorIds": [
""
],
"manifestSetThreshold": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create a TVC Deployment
Source: https://docs.turnkey.com/api-reference/activities/create-a-tvc-deployment
Create a new TVC Deployment
Enum options: `ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The unique identifier of the to-be-deployed TVC application
The QuorumOS version to use to deploy this application
URL of the container containing the pivot binary
Location of the binary in the pivot container
Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example \["--foo", "bar"]
Array item type: string
item field
Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.
Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.
Enum options: `TVC_HEALTH_CHECK_TYPE_HTTP`, `TVC_HEALTH_CHECK_TYPE_GRPC`
Port to use for health checks.
Port to use for public ingress.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createTvcDeploymentIntent object
The unique identifier of the to-be-deployed TVC application
The QuorumOS version to use to deploy this application
URL of the container containing the pivot binary
Location of the binary in the pivot container
Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example \["--foo", "bar"]
item field
Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.
Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.
healthCheckType field
Enum options: `TVC_HEALTH_CHECK_TYPE_HTTP`, `TVC_HEALTH_CHECK_TYPE_GRPC`
Port to use for health checks.
Port to use for public ingress.
The result of the activity
The createTvcDeploymentResult object
The unique identifier for the TVC deployment
The unique identifier for the TVC manifest
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_tvc_deployment \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"appId": "",
"qosVersion": "",
"pivotContainerImageUrl": "",
"pivotPath": "",
"pivotArgs": [
""
],
"expectedPivotDigest": "",
"nonce": "",
"pivotContainerEncryptedPullSecret": "",
"debugMode": "",
"healthCheckType": "",
"healthCheckPort": "",
"publicIngressPort": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createTvcDeployment({
appId: " (The unique identifier of the to-be-deployed TVC application)",
qosVersion: " (The QuorumOS version to use to deploy this application)",
pivotContainerImageUrl: " (URL of the container containing the pivot binary)",
pivotPath: " (Location of the binary in the pivot container)",
pivotArgs: [""] // Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example ["--foo", "bar"],
expectedPivotDigest: " (Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.)",
nonce: 0 // Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.,
pivotContainerEncryptedPullSecret: " (Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.)",
debugMode: true // Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.,
healthCheckType: "" // healthCheckType field,
healthCheckPort: 0 // Port to use for health checks.,
publicIngressPort: 0 // Port to use for public ingress.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createTvcDeploymentIntent": {
"appId": "",
"qosVersion": "",
"pivotContainerImageUrl": "",
"pivotPath": "",
"pivotArgs": [
""
],
"expectedPivotDigest": "",
"nonce": "",
"pivotContainerEncryptedPullSecret": "",
"debugMode": "",
"healthCheckType": "",
"healthCheckPort": "",
"publicIngressPort": ""
}
},
"result": {
"createTvcDeploymentResult": {
"deploymentId": "",
"manifestId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create an OAuth 2.0 Credential
Source: https://docs.turnkey.com/api-reference/activities/create-an-oauth-20-credential
Enable authentication for end users with an OAuth 2.0 provider
Enum options: `ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createOauth2CredentialIntent object
provider field
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
The result of the activity
The createOauth2CredentialResult object
Unique identifier of the OAuth 2.0 credential that was created
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_oauth2_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"provider": "",
"clientId": "",
"encryptedClientSecret": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createOauth2Credential({
provider: "" // provider field,
clientId: " (The Client ID issued by the OAuth 2.0 provider)",
encryptedClientSecret: " (The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createOauth2CredentialIntent": {
"provider": "",
"clientId": "",
"encryptedClientSecret": ""
}
},
"result": {
"createOauth2CredentialResult": {
"oauth2CredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create API keys
Source: https://docs.turnkey.com/api-reference/activities/create-api-keys
Add API keys to an existing user.
Enum options: `ACTIVITY_TYPE_CREATE_API_KEYS_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of API Keys.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
Unique identifier for a given User.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createApiKeysIntentV2 object
A list of API Keys.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
Unique identifier for a given User.
The result of the activity
The createApiKeysResult object
A list of API Key IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_api_keys \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"userId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createApiKeys({
apiKeys: [{ // A list of API Keys.,
apiKeyName: " (Human-readable name for an API Key.)",
publicKey: " (The public component of a cryptographic key pair used to sign messages and transactions.)",
curveType: "" // curveType field,
expirationSeconds: " (Optional window (in seconds) indicating how long the API Key should last.)",
}],
userId: " (Unique identifier for a given User.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_API_KEYS_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createApiKeysIntentV2": {
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"userId": ""
}
},
"result": {
"createApiKeysResult": {
"apiKeyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create authenticators
Source: https://docs.turnkey.com/api-reference/activities/create-authenticators
Create authenticators to authenticate requests to Turnkey.
Enum options: `ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of Authenticators.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for a given User.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createAuthenticatorsIntentV2 object
A list of Authenticators.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for a given User.
The result of the activity
The createAuthenticatorsResult object
A list of Authenticator IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_authenticators \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"userId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createAuthenticators({
authenticators: [{ // A list of Authenticators.,
authenticatorName: " (Human-readable name for an Authenticator.)",
challenge: " (Challenge presented for authentication purposes.)",
attestation: { // attestation field,
credentialId: " (The cbor encoded then base64 url encoded id of the credential.)",
clientDataJson: " (A base64 url encoded payload containing metadata about the signing context and the challenge.)",
attestationObject: " (A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.)",
transports: "" // The type of authenticator transports.,
},
}],
userId: " (Unique identifier for a given User.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createAuthenticatorsIntentV2": {
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"userId": ""
}
},
"result": {
"createAuthenticatorsResult": {
"authenticatorIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create invitations
Source: https://docs.turnkey.com/api-reference/activities/create-invitations
Create invitations to join an existing organization.
Enum options: `ACTIVITY_TYPE_CREATE_INVITATIONS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of Invitations.
The name of the intended Invitation recipient.
The email address of the intended Invitation recipient.
A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body.
Array item type: string
item field
Enum options: `ACCESS_TYPE_WEB`, `ACCESS_TYPE_API`, `ACCESS_TYPE_ALL`
Unique identifier for the Sender of an Invitation.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createInvitationsIntent object
A list of Invitations.
The name of the intended Invitation recipient.
The email address of the intended Invitation recipient.
A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body.
item field
accessType field
Enum options: `ACCESS_TYPE_WEB`, `ACCESS_TYPE_API`, `ACCESS_TYPE_ALL`
Unique identifier for the Sender of an Invitation.
The result of the activity
The createInvitationsResult object
A list of Invitation IDs
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_invitations \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_INVITATIONS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"invitations": [
{
"receiverUserName": "",
"receiverUserEmail": "",
"receiverUserTags": [
""
],
"accessType": "",
"senderUserId": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createInvitations({
invitations: [{ // A list of Invitations.,
receiverUserName: " (The name of the intended Invitation recipient.)",
receiverUserEmail: " (The email address of the intended Invitation recipient.)",
receiverUserTags: [""] // A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body.,
accessType: "" // accessType field,
senderUserId: " (Unique identifier for the Sender of an Invitation.)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_INVITATIONS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createInvitationsIntent": {
"invitations": [
{
"receiverUserName": "",
"receiverUserEmail": "",
"receiverUserTags": [
""
],
"accessType": "",
"senderUserId": ""
}
]
}
},
"result": {
"createInvitationsResult": {
"invitationIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create MFA policy
Source: https://docs.turnkey.com/api-reference/activities/create-mfa-policy
Create a new MFA policy for a user.
Enum options: `ACTIVITY_TYPE_CREATE_MFA_POLICY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User to add the MFA Policy to.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createMfaPolicyIntent object
The ID of the User to add the MFA Policy to.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
type field
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
The result of the activity
The createMfaPolicyResult object
Unique identifier for a given MFA Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_mfa_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_MFA_POLICY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"mfaPolicyName": "",
"condition": "",
"requiredAuthenticationMethods": [
{
"any": [
{
"type": "",
"id": ""
}
]
}
],
"order": "",
"notes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createMfaPolicy({
userId: " (The ID of the User to add the MFA Policy to.)",
mfaPolicyName: " (Human-readable name for a Policy.)",
condition: " (A condition expression that evaluates to true or false, determining when this MFA policy applies.)",
requiredAuthenticationMethods: [""] // An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.,
order: 0 // The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.,
notes: " (Notes for an MFA Policy.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_MFA_POLICY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createMfaPolicyIntent": {
"userId": "",
"mfaPolicyName": "",
"condition": "",
"requiredAuthenticationMethods": [
{
"any": [
{
"type": "",
"id": ""
}
]
}
],
"order": "",
"notes": ""
}
},
"result": {
"createMfaPolicyResult": {
"mfaPolicyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create Oauth providers
Source: https://docs.turnkey.com/api-reference/activities/create-oauth-providers
Create Oauth providers for a specified user.
Enum options: `ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User to add an Oauth provider to
A list of Oauth providers.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createOauthProvidersIntentV2 object
The ID of the User to add an Oauth provider to
A list of Oauth providers.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
The result of the activity
The createOauthProvidersResultV2 object
A list of unique identifiers for Oauth Providers
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_oauth_providers \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createOauthProviders({
userId: " (The ID of the User to add an Oauth provider to)",
oauthProviders: [{ // A list of Oauth providers.,
providerName: " (Human-readable name to identify a Provider.)",
oidcToken: " (Base64 encoded OIDC token)",
oidcClaims: { // oidcClaims field,
iss: " (The issuer identifier from the OIDC token (iss claim))",
sub: " (The subject identifier from the OIDC token (sub claim))",
aud: " (The audience from the OIDC token (aud claim))",
},
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createOauthProvidersIntentV2": {
"userId": "",
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
]
}
},
"result": {
"createOauthProvidersResultV2": {
"providerIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create policies
Source: https://docs.turnkey.com/api-reference/activities/create-policies
Create new policies.
Enum options: `ACTIVITY_TYPE_CREATE_POLICIES`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
An array of policy intents to be created.
Human-readable name for a Policy.
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createPoliciesIntent object
An array of policy intents to be created.
Human-readable name for a Policy.
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
The result of the activity
The createPoliciesResult object
A list of unique identifiers for the created policies.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_policies \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_POLICIES",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"policies": [
{
"policyName": "",
"effect": "",
"condition": "",
"consensus": "",
"notes": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createPolicies({
policies: [{ // An array of policy intents to be created.,
policyName: " (Human-readable name for a Policy.)",
effect: "" // effect field,
condition: " (The condition expression that triggers the Effect)",
consensus: " (The consensus expression that triggers the Effect)",
notes: " (Notes for a Policy.)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_POLICIES",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createPoliciesIntent": {
"policies": [
{
"policyName": "",
"effect": "",
"condition": "",
"consensus": "",
"notes": ""
}
]
}
},
"result": {
"createPoliciesResult": {
"policyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create policy
Source: https://docs.turnkey.com/api-reference/activities/create-policy
Create a new policy.
Enum options: `ACTIVITY_TYPE_CREATE_POLICY_V3`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Human-readable name for a Policy.
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createPolicyIntentV3 object
Human-readable name for a Policy.
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
The result of the activity
The createPolicyResult object
Unique identifier for a given Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_POLICY_V3",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"policyName": "",
"effect": "",
"condition": "",
"consensus": "",
"notes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createPolicy({
policyName: " (Human-readable name for a Policy.)",
effect: "" // effect field,
condition: " (The condition expression that triggers the Effect)",
consensus: " (The consensus expression that triggers the Effect)",
notes: " (Notes for a Policy.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_POLICY_V3",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createPolicyIntentV3": {
"policyName": "",
"effect": "",
"condition": "",
"consensus": "",
"notes": ""
}
},
"result": {
"createPolicyResult": {
"policyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create private key tag
Source: https://docs.turnkey.com/api-reference/activities/create-private-key-tag
Create a private key tag and add it to private keys.
Enum options: `ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Human-readable name for a Private Key Tag.
A list of Private Key IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createPrivateKeyTagIntent object
Human-readable name for a Private Key Tag.
A list of Private Key IDs.
item field
The result of the activity
The createPrivateKeyTagResult object
Unique identifier for a given Private Key Tag.
A list of Private Key IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_private_key_tag \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeyTagName": "",
"privateKeyIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createPrivateKeyTag({
privateKeyTagName: " (Human-readable name for a Private Key Tag.)",
privateKeyIds: [""] // A list of Private Key IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createPrivateKeyTagIntent": {
"privateKeyTagName": "",
"privateKeyIds": [
""
]
}
},
"result": {
"createPrivateKeyTagResult": {
"privateKeyTagId": "",
"privateKeyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create private keys
Source: https://docs.turnkey.com/api-reference/activities/create-private-keys
Create new private keys.
Enum options: `ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of Private Keys.
Human-readable name for a Private Key.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.
Array item type: string
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createPrivateKeysIntentV2 object
A list of Private Keys.
Human-readable name for a Private Key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
The result of the activity
The createPrivateKeysResultV2 object
A list of Private Key IDs and addresses.
privateKeyId field
addresses field
format field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
address field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_private_keys \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeys": [
{
"privateKeyName": "",
"curve": "",
"privateKeyTags": [
""
],
"addressFormats": [
""
]
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createPrivateKeys({
privateKeys: [{ // A list of Private Keys.,
privateKeyName: " (Human-readable name for a Private Key.)",
curve: "" // curve field,
privateKeyTags: [""] // A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.,
addressFormats: "" // Cryptocurrency-specific formats for a derived address (e.g., Ethereum).,
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createPrivateKeysIntentV2": {
"privateKeys": [
{
"privateKeyName": "",
"curve": "",
"privateKeyTags": [
""
],
"addressFormats": [
""
]
}
]
}
},
"result": {
"createPrivateKeysResultV2": {
"privateKeys": [
{
"privateKeyId": "",
"addresses": [
{
"format": "",
"address": ""
}
]
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create read only session
Source: https://docs.turnkey.com/api-reference/activities/create-read-only-session
Create a read only session for a user (valid for 1 hour).
Enum options: `ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createReadOnlySessionIntent object
The result of the activity
The createReadOnlySessionResult object
Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons.
Human-readable name for an Organization.
Unique identifier for a given User.
Human-readable name for a User.
String representing a read only session
UTC timestamp in seconds representing the expiry time for the read only session.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_read_only_session \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createReadOnlySession({});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createReadOnlySessionIntent": {}
},
"result": {
"createReadOnlySessionResult": {
"organizationId": "",
"organizationName": "",
"userId": "",
"username": "",
"session": "",
"sessionExpiry": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create read write session
Source: https://docs.turnkey.com/api-reference/activities/create-read-write-session
Create a read write session for a user.
Enum options: `ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted.
Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request.
Optional human-readable name for an API Key. If none provided, default to Read Write Session - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated ReadWriteSession API keys
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createReadWriteSessionIntentV2 object
Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted.
Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request.
Optional human-readable name for an API Key. If none provided, default to Read Write Session - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated ReadWriteSession API keys
The result of the activity
The createReadWriteSessionResultV2 object
Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons.
Human-readable name for an Organization.
Unique identifier for a given User.
Human-readable name for a User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_read_write_session \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"targetPublicKey": "",
"userId": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createReadWriteSession({
targetPublicKey: " (Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted.)",
userId: " (Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request.)",
apiKeyName: " (Optional human-readable name for an API Key. If none provided, default to Read Write Session - )",
expirationSeconds: " (Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated ReadWriteSession API keys
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createReadWriteSessionIntentV2": {
"targetPublicKey": "",
"userId": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
},
"result": {
"createReadWriteSessionResultV2": {
"organizationId": "",
"organizationName": "",
"userId": "",
"username": "",
"apiKeyId": "",
"credentialBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create session profile
Source: https://docs.turnkey.com/api-reference/activities/create-session-profile
Create a new session profile for an organization.
Enum options: `ACTIVITY_TYPE_CREATE_SESSION_PROFILE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Human-readable name for a Session Profile.
The scope string that defines the permissions for this Session Profile.
The duration in seconds for which sessions created with this Session Profile are valid. If not set, expiration will be determined by the value passed in to the intent of login activities.
Notes for a Session Profile.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createSessionProfileIntent object
Human-readable name for a Session Profile.
The scope string that defines the permissions for this Session Profile.
The duration in seconds for which sessions created with this Session Profile are valid. If not set, expiration will be determined by the value passed in to the intent of login activities.
Notes for a Session Profile.
The result of the activity
The createSessionProfileResult object
Unique identifier for a given Session Profile.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_session_profile \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"sessionProfileName": "",
"scope": "",
"expirationSeconds": "",
"notes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createSessionProfile({
sessionProfileName: " (Human-readable name for a Session Profile.)",
scope: " (The scope string that defines the permissions for this Session Profile.)",
expirationSeconds: " (The duration in seconds for which sessions created with this Session Profile are valid. If not set, expiration will be determined by the value passed in to the intent of login activities.)",
notes: " (Notes for a Session Profile.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_SESSION_PROFILE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createSessionProfileIntent": {
"sessionProfileName": "",
"scope": "",
"expirationSeconds": "",
"notes": ""
}
},
"result": {
"createSessionProfileResult": {
"sessionProfileId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create smart contract interface
Source: https://docs.turnkey.com/api-reference/activities/create-smart-contract-interface
Create an ABI/IDL in JSON.
Enum options: `ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Corresponding contract address or program ID
ABI/IDL as a JSON string. Limited to 400kb
Enum options: `SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM`, `SMART_CONTRACT_INTERFACE_TYPE_SOLANA`
Human-readable name for a Smart Contract Interface.
Notes for a Smart Contract Interface.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createSmartContractInterfaceIntent object
Corresponding contract address or program ID
ABI/IDL as a JSON string. Limited to 400kb
type field
Enum options: `SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM`, `SMART_CONTRACT_INTERFACE_TYPE_SOLANA`
Human-readable name for a Smart Contract Interface.
Notes for a Smart Contract Interface.
The result of the activity
The createSmartContractInterfaceResult object
The ID of the created Smart Contract Interface.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_smart_contract_interface \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"smartContractAddress": "",
"smartContractInterface": "",
"type": "",
"label": "",
"notes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createSmartContractInterface({
smartContractAddress: " (Corresponding contract address or program ID)",
smartContractInterface: " (ABI/IDL as a JSON string. Limited to 400kb)",
type: "" // type field,
label: " (Human-readable name for a Smart Contract Interface.)",
notes: " (Notes for a Smart Contract Interface.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createSmartContractInterfaceIntent": {
"smartContractAddress": "",
"smartContractInterface": "",
"type": "",
"label": "",
"notes": ""
}
},
"result": {
"createSmartContractInterfaceResult": {
"smartContractInterfaceId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create sub-organization
Source: https://docs.turnkey.com/api-reference/activities/create-sub-organization
Create a new sub-organization.
Enum options: `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
Disable OTP SMS auth for the sub-organization
Disable OTP email auth for the sub-organization
Signed JWT containing a unique id, expiry, verification type, contact
clientSignature field
The public component of a cryptographic key pair used to create the signature.
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createSubOrganizationIntentV8 object
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
Disable OTP SMS auth for the sub-organization
Disable OTP email auth for the sub-organization
Signed JWT containing a unique id, expiry, verification type, contact
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
The result of the activity
The createSubOrganizationResultV8 object
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_sub_organization \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"subOrganizationName": "",
"rootUsers": [
{
"userName": "",
"userEmail": "",
"userPhoneNumber": "",
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
]
}
],
"rootQuorumThreshold": "",
"wallet": {
"walletName": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"mnemonicLength": ""
},
"disableEmailRecovery": "",
"disableEmailAuth": "",
"disableSmsAuth": "",
"disableOtpEmailAuth": "",
"verificationToken": "",
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
}
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createSubOrganization({
subOrganizationName: " (Name for this sub-organization)",
rootUsers: [{ // Root users to create within this sub-organization,
userName: " (Human-readable name for a User.)",
userEmail: " (The user's email address.)",
userPhoneNumber: " (The user's phone number in E.164 format e.g. +13214567890)",
apiKeys: [{ // A list of API Key parameters. This field, if not needed, should be an empty array in your request body.,
apiKeyName: " (Human-readable name for an API Key.)",
publicKey: " (The public component of a cryptographic key pair used to sign messages and transactions.)",
curveType: "" // curveType field,
expirationSeconds: " (Optional window (in seconds) indicating how long the API Key should last.)",
}],
authenticators: [{ // A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.,
authenticatorName: " (Human-readable name for an Authenticator.)",
challenge: " (Challenge presented for authentication purposes.)",
attestation: { // attestation field,
credentialId: " (The cbor encoded then base64 url encoded id of the credential.)",
clientDataJson: " (A base64 url encoded payload containing metadata about the signing context and the challenge.)",
attestationObject: " (A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.)",
transports: "" // The type of authenticator transports.,
},
}],
oauthProviders: [{ // A list of Oauth providers. This field, if not needed, should be an empty array in your request body.,
providerName: " (Human-readable name to identify a Provider.)",
oidcToken: " (Base64 encoded OIDC token)",
oidcClaims: { // oidcClaims field,
iss: " (The issuer identifier from the OIDC token (iss claim))",
sub: " (The subject identifier from the OIDC token (sub claim))",
aud: " (The audience from the OIDC token (aud claim))",
},
}],
}],
rootQuorumThreshold: 0 // The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users,
wallet: { // wallet field,
walletName: " (Human-readable name for a Wallet.)",
accounts: [{ // A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.,
curve: "" // curve field,
pathFormat: "" // pathFormat field,
path: " (Path used to generate a wallet Account.)",
addressFormat: "" // addressFormat field,
name: " (Optional human-readable name for the account.)",
}],
mnemonicLength: 0 // Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.,
},
disableEmailRecovery: true // Disable email recovery for the sub-organization,
disableEmailAuth: true // Disable email auth for the sub-organization,
disableSmsAuth: true // Disable OTP SMS auth for the sub-organization,
disableOtpEmailAuth: true // Disable OTP email auth for the sub-organization,
verificationToken: " (Signed JWT containing a unique id, expiry, verification type, contact)",
clientSignature: { // clientSignature field,
publicKey: " (The public component of a cryptographic key pair used to create the signature.)",
scheme: "" // scheme field,
message: " (The message that was signed.)",
signature: " (The cryptographic signature over the message.)",
}
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createSubOrganizationIntentV8": {
"subOrganizationName": "",
"rootUsers": [
{
"userName": "",
"userEmail": "",
"userPhoneNumber": "",
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
]
}
],
"rootQuorumThreshold": "",
"wallet": {
"walletName": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"mnemonicLength": ""
},
"disableEmailRecovery": "",
"disableEmailAuth": "",
"disableSmsAuth": "",
"disableOtpEmailAuth": "",
"verificationToken": "",
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
}
}
},
"result": {
"createSubOrganizationResultV8": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create TVC Manifest Approvals
Source: https://docs.turnkey.com/api-reference/activities/create-tvc-manifest-approvals
Post one or more manifest approvals for a TVC Manifest
Enum options: `ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier of the TVC deployment to approve
List of manifest approvals
Unique identifier of the operator providing this approval
Signature from the operator approving the manifest
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createTvcManifestApprovalsIntent object
Unique identifier of the TVC deployment to approve
List of manifest approvals
Unique identifier of the operator providing this approval
Signature from the operator approving the manifest
The result of the activity
The createTvcManifestApprovalsResult object
The unique identifier(s) for the manifest approvals
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_tvc_manifest_approvals \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"manifestId": "",
"approvals": [
{
"operatorId": "",
"signature": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createTvcManifestApprovals({
manifestId: " (Unique identifier of the TVC deployment to approve)",
approvals: [{ // List of manifest approvals,
operatorId: " (Unique identifier of the operator providing this approval)",
signature: " (Signature from the operator approving the manifest)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createTvcManifestApprovalsIntent": {
"manifestId": "",
"approvals": [
{
"operatorId": "",
"signature": ""
}
]
}
},
"result": {
"createTvcManifestApprovalsResult": {
"approvalIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create user tag
Source: https://docs.turnkey.com/api-reference/activities/create-user-tag
Create a user tag and add it to users.
Enum options: `ACTIVITY_TYPE_CREATE_USER_TAG`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Human-readable name for a User Tag.
A list of User IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createUserTagIntent object
Human-readable name for a User Tag.
A list of User IDs.
item field
The result of the activity
The createUserTagResult object
Unique identifier for a given User Tag.
A list of User IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_user_tag \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_USER_TAG",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userTagName": "",
"userIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createUserTag({
userTagName: " (Human-readable name for a User Tag.)",
userIds: [""] // A list of User IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_USER_TAG",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createUserTagIntent": {
"userTagName": "",
"userIds": [
""
]
}
},
"result": {
"createUserTagResult": {
"userTagId": "",
"userIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create users
Source: https://docs.turnkey.com/api-reference/activities/create-users
Create users in an existing organization.
Enum options: `ACTIVITY_TYPE_CREATE_USERS_V4`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of Users.
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createUsersIntentV4 object
A list of Users.
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
The result of the activity
The createUsersResult object
A list of User IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_users \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_USERS_V4",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"users": [
{
"userName": "",
"userEmail": "",
"userPhoneNumber": "",
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
],
"userTags": [
""
]
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createUsers({
users: [{ // A list of Users.,
userName: " (Human-readable name for a User.)",
userEmail: " (The user's email address.)",
userPhoneNumber: " (The user's phone number in E.164 format e.g. +13214567890)",
apiKeys: [{ // A list of API Key parameters. This field, if not needed, should be an empty array in your request body.,
apiKeyName: " (Human-readable name for an API Key.)",
publicKey: " (The public component of a cryptographic key pair used to sign messages and transactions.)",
curveType: "" // curveType field,
expirationSeconds: " (Optional window (in seconds) indicating how long the API Key should last.)",
}],
authenticators: [{ // A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.,
authenticatorName: " (Human-readable name for an Authenticator.)",
challenge: " (Challenge presented for authentication purposes.)",
attestation: { // attestation field,
credentialId: " (The cbor encoded then base64 url encoded id of the credential.)",
clientDataJson: " (A base64 url encoded payload containing metadata about the signing context and the challenge.)",
attestationObject: " (A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.)",
transports: "" // The type of authenticator transports.,
},
}],
oauthProviders: [{ // A list of Oauth providers. This field, if not needed, should be an empty array in your request body.,
providerName: " (Human-readable name to identify a Provider.)",
oidcToken: " (Base64 encoded OIDC token)",
oidcClaims: { // oidcClaims field,
iss: " (The issuer identifier from the OIDC token (iss claim))",
sub: " (The subject identifier from the OIDC token (sub claim))",
aud: " (The audience from the OIDC token (aud claim))",
},
}],
userTags: [""] // A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.,
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_USERS_V4",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createUsersIntentV4": {
"users": [
{
"userName": "",
"userEmail": "",
"userPhoneNumber": "",
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
],
"userTags": [
""
]
}
]
}
},
"result": {
"createUsersResult": {
"userIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create wallet
Source: https://docs.turnkey.com/api-reference/activities/create-wallet
Create a wallet and derive addresses.
Enum options: `ACTIVITY_TYPE_CREATE_WALLET`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createWalletIntent object
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
The result of the activity
The createWalletResult object
Unique identifier for a Wallet.
A list of account addresses.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_wallet \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_WALLET",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletName": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"mnemonicLength": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createWallet({
walletName: " (Human-readable name for a Wallet.)",
accounts: [{ // A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.,
curve: "" // curve field,
pathFormat: "" // pathFormat field,
path: " (Path used to generate a wallet Account.)",
addressFormat: "" // addressFormat field,
name: " (Optional human-readable name for the account.)",
}],
mnemonicLength: 0 // Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_WALLET",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createWalletIntent": {
"walletName": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"mnemonicLength": ""
}
},
"result": {
"createWalletResult": {
"walletId": "",
"addresses": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create wallet accounts
Source: https://docs.turnkey.com/api-reference/activities/create-wallet-accounts
Derive additional addresses using an existing wallet.
Enum options: `ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Wallet.
A list of wallet Accounts.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createWalletAccountsIntent object
Unique identifier for a given Wallet.
A list of wallet Accounts.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true.
The result of the activity
The createWalletAccountsResult object
A list of derived addresses.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_wallet_accounts \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletId": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"persist": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createWalletAccounts({
walletId: " (Unique identifier for a given Wallet.)",
accounts: [{ // A list of wallet Accounts.,
curve: "" // curve field,
pathFormat: "" // pathFormat field,
path: " (Path used to generate a wallet Account.)",
addressFormat: "" // addressFormat field,
name: " (Optional human-readable name for the account.)",
}],
persist: true // Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createWalletAccountsIntent": {
"walletId": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"persist": ""
}
},
"result": {
"createWalletAccountsResult": {
"addresses": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Create webhook endpoint
Source: https://docs.turnkey.com/api-reference/activities/create-webhook-endpoint
Create a webhook endpoint for an organization.
Enum options: `ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Event subscriptions to create for this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The createWebhookEndpointIntent object
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Event subscriptions to create for this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
The result of the activity
The createWebhookEndpointResult object
Unique identifier of the created webhook endpoint.
webhookEndpoint field
Unique identifier of the webhook endpoint.
Unique identifier for a given Organization.
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
Current subscriptions attached to this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_webhook_endpoint \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"url": "",
"name": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createWebhookEndpoint({
url: " (The destination URL for webhook delivery.)",
name: " (Human-readable name for this webhook endpoint.)",
subscriptions: [{ // Event subscriptions to create for this endpoint.,
eventType: " (The event type to subscribe to (for example, ACTIVITY_UPDATES, BALANCE_CONFIRMED_UPDATES, or BALANCE_FINALIZED_UPDATES).)",
filtersJson: " (JSON-encoded filter criteria for this subscription.)",
isActive: true // Whether this subscription is active.,
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createWebhookEndpointIntent": {
"url": "",
"name": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
},
"result": {
"createWebhookEndpointResult": {
"endpointId": "",
"webhookEndpoint": {
"endpointId": "",
"organizationId": "",
"url": "",
"name": "",
"isActive": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete a Fiat On Ramp Credential
Source: https://docs.turnkey.com/api-reference/activities/delete-a-fiat-on-ramp-credential
Delete a fiat on ramp provider credential
Enum options: `ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the fiat on-ramp credential to delete
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteFiatOnRampCredentialIntent object
The ID of the fiat on-ramp credential to delete
The result of the activity
The deleteFiatOnRampCredentialResult object
Unique identifier of the Fiat On-Ramp credential that was deleted
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_fiat_on_ramp_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"fiatOnrampCredentialId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteFiatOnRampCredential({
fiatOnrampCredentialId: " (The ID of the fiat on-ramp credential to delete)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteFiatOnRampCredentialIntent": {
"fiatOnrampCredentialId": ""
}
},
"result": {
"deleteFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete a TVC App and all of its deployments
Source: https://docs.turnkey.com/api-reference/activities/delete-a-tvc-app-and-all-of-its-deployments
Delete a TVC App and all of its deployments
Enum options: `ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The unique identifier of the TVC app to delete. The app and all associated deployments will be removed.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteTvcAppAndDeploymentsIntent object
The unique identifier of the TVC app to delete. The app and all associated deployments will be removed.
The result of the activity
The deleteTvcAppAndDeploymentsResult object
The unique identifier of the deleted TVC app.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_tvc_app_and_deployments \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"appId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteTvcAppAndDeployments({
appId: " (The unique identifier of the TVC app to delete. The app and all associated deployments will be removed.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteTvcAppAndDeploymentsIntent": {
"appId": ""
}
},
"result": {
"deleteTvcAppAndDeploymentsResult": {
"appId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete a TVC Deployment
Source: https://docs.turnkey.com/api-reference/activities/delete-a-tvc-deployment
Delete a TVC Deployment
Enum options: `ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The unique identifier of the TVC deployment to delete.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteTvcDeploymentIntent object
The unique identifier of the TVC deployment to delete.
The result of the activity
The deleteTvcDeploymentResult object
The unique identifier of the deleted TVC deployment.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_tvc_deployment \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"deploymentId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteTvcDeployment({
deploymentId: " (The unique identifier of the TVC deployment to delete.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteTvcDeploymentIntent": {
"deploymentId": ""
}
},
"result": {
"deleteTvcDeploymentResult": {
"deploymentId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete an OAuth 2.0 Credential
Source: https://docs.turnkey.com/api-reference/activities/delete-an-oauth-20-credential
Disable authentication for end users with an OAuth 2.0 provider
Enum options: `ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the OAuth 2.0 credential to delete
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteOauth2CredentialIntent object
The ID of the OAuth 2.0 credential to delete
The result of the activity
The deleteOauth2CredentialResult object
Unique identifier of the OAuth 2.0 credential that was deleted
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_oauth2_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"oauth2CredentialId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteOauth2Credential({
oauth2CredentialId: " (The ID of the OAuth 2.0 credential to delete)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteOauth2CredentialIntent": {
"oauth2CredentialId": ""
}
},
"result": {
"deleteOauth2CredentialResult": {
"oauth2CredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete API keys
Source: https://docs.turnkey.com/api-reference/activities/delete-api-keys
Remove api keys from a user.
Enum options: `ACTIVITY_TYPE_DELETE_API_KEYS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
A list of API Key IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteApiKeysIntent object
Unique identifier for a given User.
A list of API Key IDs.
item field
The result of the activity
The deleteApiKeysResult object
A list of API Key IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_api_keys \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_API_KEYS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"apiKeyIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteApiKeys({
userId: " (Unique identifier for a given User.)",
apiKeyIds: [""] // A list of API Key IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_API_KEYS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteApiKeysIntent": {
"userId": "",
"apiKeyIds": [
""
]
}
},
"result": {
"deleteApiKeysResult": {
"apiKeyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete authenticators
Source: https://docs.turnkey.com/api-reference/activities/delete-authenticators
Remove authenticators from a user.
Enum options: `ACTIVITY_TYPE_DELETE_AUTHENTICATORS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
A list of Authenticator IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteAuthenticatorsIntent object
Unique identifier for a given User.
A list of Authenticator IDs.
item field
The result of the activity
The deleteAuthenticatorsResult object
Unique identifier for a given Authenticator.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_authenticators \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"authenticatorIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteAuthenticators({
userId: " (Unique identifier for a given User.)",
authenticatorIds: [""] // A list of Authenticator IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_AUTHENTICATORS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteAuthenticatorsIntent": {
"userId": "",
"authenticatorIds": [
""
]
}
},
"result": {
"deleteAuthenticatorsResult": {
"authenticatorIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete invitation
Source: https://docs.turnkey.com/api-reference/activities/delete-invitation
Delete an existing invitation.
Enum options: `ACTIVITY_TYPE_DELETE_INVITATION`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Invitation object.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteInvitationIntent object
Unique identifier for a given Invitation object.
The result of the activity
The deleteInvitationResult object
Unique identifier for a given Invitation.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_invitation \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_INVITATION",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"invitationId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteInvitation({
invitationId: " (Unique identifier for a given Invitation object.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_INVITATION",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteInvitationIntent": {
"invitationId": ""
}
},
"result": {
"deleteInvitationResult": {
"invitationId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete MFA policy
Source: https://docs.turnkey.com/api-reference/activities/delete-mfa-policy
Delete an MFA policy for a user.
Enum options: `ACTIVITY_TYPE_DELETE_MFA_POLICY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User to delete the MFA Policy from.
Unique identifier for a given MFA Policy.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteMfaPolicyIntent object
The ID of the User to delete the MFA Policy from.
Unique identifier for a given MFA Policy.
The result of the activity
The deleteMfaPolicyResult object
Unique identifier for a given MFA Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_mfa_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_MFA_POLICY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"mfaPolicyId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteMfaPolicy({
userId: " (The ID of the User to delete the MFA Policy from.)",
mfaPolicyId: " (Unique identifier for a given MFA Policy.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_MFA_POLICY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteMfaPolicyIntent": {
"userId": "",
"mfaPolicyId": ""
}
},
"result": {
"deleteMfaPolicyResult": {
"mfaPolicyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete Oauth providers
Source: https://docs.turnkey.com/api-reference/activities/delete-oauth-providers
Remove Oauth providers for a specified user.
Enum options: `ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User to remove an Oauth provider from
Unique identifier for a given Provider.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteOauthProvidersIntent object
The ID of the User to remove an Oauth provider from
Unique identifier for a given Provider.
item field
The result of the activity
The deleteOauthProvidersResult object
A list of unique identifiers for Oauth Providers
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_oauth_providers \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"providerIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteOauthProviders({
userId: " (The ID of the User to remove an Oauth provider from)",
providerIds: [""] // Unique identifier for a given Provider.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteOauthProvidersIntent": {
"userId": "",
"providerIds": [
""
]
}
},
"result": {
"deleteOauthProvidersResult": {
"providerIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete policies
Source: https://docs.turnkey.com/api-reference/activities/delete-policies
Delete existing policies.
Enum options: `ACTIVITY_TYPE_DELETE_POLICIES`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
List of unique identifiers for policies within an organization
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deletePoliciesIntent object
List of unique identifiers for policies within an organization
item field
The result of the activity
The deletePoliciesResult object
A list of unique identifiers for the deleted policies.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_policies \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_POLICIES",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"policyIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deletePolicies({
policyIds: [""] // List of unique identifiers for policies within an organization
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_POLICIES",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deletePoliciesIntent": {
"policyIds": [
""
]
}
},
"result": {
"deletePoliciesResult": {
"policyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete policy
Source: https://docs.turnkey.com/api-reference/activities/delete-policy
Delete an existing policy.
Enum options: `ACTIVITY_TYPE_DELETE_POLICY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Policy.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deletePolicyIntent object
Unique identifier for a given Policy.
The result of the activity
The deletePolicyResult object
Unique identifier for a given Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_POLICY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"policyId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deletePolicy({
policyId: " (Unique identifier for a given Policy.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_POLICY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deletePolicyIntent": {
"policyId": ""
}
},
"result": {
"deletePolicyResult": {
"policyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete private key tags
Source: https://docs.turnkey.com/api-reference/activities/delete-private-key-tags
Delete private key tags within an organization.
Enum options: `ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of Private Key Tag IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deletePrivateKeyTagsIntent object
A list of Private Key Tag IDs.
item field
The result of the activity
The deletePrivateKeyTagsResult object
A list of Private Key Tag IDs.
item field
A list of Private Key IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_private_key_tags \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeyTagIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deletePrivateKeyTags({
privateKeyTagIds: [""] // A list of Private Key Tag IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deletePrivateKeyTagsIntent": {
"privateKeyTagIds": [
""
]
}
},
"result": {
"deletePrivateKeyTagsResult": {
"privateKeyTagIds": [
""
],
"privateKeyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete private keys
Source: https://docs.turnkey.com/api-reference/activities/delete-private-keys
Delete private keys for an organization.
Enum options: `ACTIVITY_TYPE_DELETE_PRIVATE_KEYS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
List of unique identifiers for private keys within an organization
Array item type: string
item field
Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deletePrivateKeysIntent object
List of unique identifiers for private keys within an organization
item field
Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored.
The result of the activity
The deletePrivateKeysResult object
A list of private key unique identifiers that were removed
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_private_keys \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeyIds": [
""
],
"deleteWithoutExport": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deletePrivateKeys({
privateKeyIds: [""] // List of unique identifiers for private keys within an organization,
deleteWithoutExport: true // Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deletePrivateKeysIntent": {
"privateKeyIds": [
""
],
"deleteWithoutExport": ""
}
},
"result": {
"deletePrivateKeysResult": {
"privateKeyIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete smart contract interface
Source: https://docs.turnkey.com/api-reference/activities/delete-smart-contract-interface
Delete a smart contract interface.
Enum options: `ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of a Smart Contract Interface intended for deletion.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteSmartContractInterfaceIntent object
The ID of a Smart Contract Interface intended for deletion.
The result of the activity
The deleteSmartContractInterfaceResult object
The ID of the deleted Smart Contract Interface.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_smart_contract_interface \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"smartContractInterfaceId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteSmartContractInterface({
smartContractInterfaceId: " (The ID of a Smart Contract Interface intended for deletion.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteSmartContractInterfaceIntent": {
"smartContractInterfaceId": ""
}
},
"result": {
"deleteSmartContractInterfaceResult": {
"smartContractInterfaceId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete sub-organization
Source: https://docs.turnkey.com/api-reference/activities/delete-sub-organization
Delete a sub-organization.
Enum options: `ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteSubOrganizationIntent object
Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false.
The result of the activity
The deleteSubOrganizationResult object
Unique identifier of the sub organization that was removed
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_sub_organization \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"deleteWithoutExport": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteSubOrganization({
deleteWithoutExport: true // Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteSubOrganizationIntent": {
"deleteWithoutExport": ""
}
},
"result": {
"deleteSubOrganizationResult": {
"subOrganizationUuid": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete user tags
Source: https://docs.turnkey.com/api-reference/activities/delete-user-tags
Delete user tags within an organization.
Enum options: `ACTIVITY_TYPE_DELETE_USER_TAGS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of User Tag IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteUserTagsIntent object
A list of User Tag IDs.
item field
The result of the activity
The deleteUserTagsResult object
A list of User Tag IDs.
item field
A list of User IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_user_tags \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_USER_TAGS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userTagIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteUserTags({
userTagIds: [""] // A list of User Tag IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_USER_TAGS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteUserTagsIntent": {
"userTagIds": [
""
]
}
},
"result": {
"deleteUserTagsResult": {
"userTagIds": [
""
],
"userIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete users
Source: https://docs.turnkey.com/api-reference/activities/delete-users
Delete users within an organization.
Enum options: `ACTIVITY_TYPE_DELETE_USERS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A list of User IDs.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteUsersIntent object
A list of User IDs.
item field
The result of the activity
The deleteUsersResult object
A list of User IDs.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_users \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_USERS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteUsers({
userIds: [""] // A list of User IDs.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_USERS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteUsersIntent": {
"userIds": [
""
]
}
},
"result": {
"deleteUsersResult": {
"userIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete wallet accounts
Source: https://docs.turnkey.com/api-reference/activities/delete-wallet-accounts
Delete wallet accounts for an organization.
Enum options: `ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
List of unique identifiers for wallet accounts within an organization
Array item type: string
item field
Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteWalletAccountsIntent object
List of unique identifiers for wallet accounts within an organization
item field
Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored.
The result of the activity
The deleteWalletAccountsResult object
A list of wallet account unique identifiers that were removed
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_wallet_accounts \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletAccountIds": [
""
],
"deleteWithoutExport": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteWalletAccounts({
walletAccountIds: [""] // List of unique identifiers for wallet accounts within an organization,
deleteWithoutExport: true // Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteWalletAccountsIntent": {
"walletAccountIds": [
""
],
"deleteWithoutExport": ""
}
},
"result": {
"deleteWalletAccountsResult": {
"walletAccountIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete wallets
Source: https://docs.turnkey.com/api-reference/activities/delete-wallets
Delete wallets for an organization.
Enum options: `ACTIVITY_TYPE_DELETE_WALLETS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
List of unique identifiers for wallets within an organization
Array item type: string
item field
Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteWalletsIntent object
List of unique identifiers for wallets within an organization
item field
Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored.
The result of the activity
The deleteWalletsResult object
A list of wallet unique identifiers that were removed
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_wallets \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_WALLETS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletIds": [
""
],
"deleteWithoutExport": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteWallets({
walletIds: [""] // List of unique identifiers for wallets within an organization,
deleteWithoutExport: true // Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_WALLETS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteWalletsIntent": {
"walletIds": [
""
],
"deleteWithoutExport": ""
}
},
"result": {
"deleteWalletsResult": {
"walletIds": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Delete webhook endpoint
Source: https://docs.turnkey.com/api-reference/activities/delete-webhook-endpoint
Delete a webhook endpoint for an organization.
Enum options: `ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier of the webhook endpoint to delete.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The deleteWebhookEndpointIntent object
Unique identifier of the webhook endpoint to delete.
The result of the activity
The deleteWebhookEndpointResult object
Unique identifier of the deleted webhook endpoint.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/delete_webhook_endpoint \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"endpointId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().deleteWebhookEndpoint({
endpointId: " (Unique identifier of the webhook endpoint to delete.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"deleteWebhookEndpointIntent": {
"endpointId": ""
}
},
"result": {
"deleteWebhookEndpointResult": {
"endpointId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Export private key
Source: https://docs.turnkey.com/api-reference/activities/export-private-key
Export a private key.
Enum options: `ACTIVITY_TYPE_EXPORT_PRIVATE_KEY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Private Key.
Client-side public key generated by the user, to which the export bundle will be encrypted.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The exportPrivateKeyIntent object
Unique identifier for a given Private Key.
Client-side public key generated by the user, to which the export bundle will be encrypted.
The result of the activity
The exportPrivateKeyResult object
Unique identifier for a given Private Key.
Export bundle containing a private key encrypted to the client's target public key.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/export_private_key \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeyId": "",
"targetPublicKey": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().exportPrivateKey({
privateKeyId: " (Unique identifier for a given Private Key.)",
targetPublicKey: " (Client-side public key generated by the user, to which the export bundle will be encrypted.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"exportPrivateKeyIntent": {
"privateKeyId": "",
"targetPublicKey": ""
}
},
"result": {
"exportPrivateKeyResult": {
"privateKeyId": "",
"exportBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Export wallet
Source: https://docs.turnkey.com/api-reference/activities/export-wallet
Export a wallet.
Enum options: `ACTIVITY_TYPE_EXPORT_WALLET`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Wallet.
Client-side public key generated by the user, to which the export bundle will be encrypted.
Enum options: `MNEMONIC_LANGUAGE_ENGLISH`, `MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE`, `MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE`, `MNEMONIC_LANGUAGE_CZECH`, `MNEMONIC_LANGUAGE_FRENCH`, `MNEMONIC_LANGUAGE_ITALIAN`, `MNEMONIC_LANGUAGE_JAPANESE`, `MNEMONIC_LANGUAGE_KOREAN`, `MNEMONIC_LANGUAGE_SPANISH`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The exportWalletIntent object
Unique identifier for a given Wallet.
Client-side public key generated by the user, to which the export bundle will be encrypted.
language field
Enum options: `MNEMONIC_LANGUAGE_ENGLISH`, `MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE`, `MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE`, `MNEMONIC_LANGUAGE_CZECH`, `MNEMONIC_LANGUAGE_FRENCH`, `MNEMONIC_LANGUAGE_ITALIAN`, `MNEMONIC_LANGUAGE_JAPANESE`, `MNEMONIC_LANGUAGE_KOREAN`, `MNEMONIC_LANGUAGE_SPANISH`
The result of the activity
The exportWalletResult object
Unique identifier for a given Wallet.
Export bundle containing a wallet mnemonic + optional newline passphrase encrypted by the client's target public key.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/export_wallet \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EXPORT_WALLET",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletId": "",
"targetPublicKey": "",
"language": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().exportWallet({
walletId: " (Unique identifier for a given Wallet.)",
targetPublicKey: " (Client-side public key generated by the user, to which the export bundle will be encrypted.)",
language: "" // language field
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EXPORT_WALLET",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"exportWalletIntent": {
"walletId": "",
"targetPublicKey": "",
"language": ""
}
},
"result": {
"exportWalletResult": {
"walletId": "",
"exportBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Export wallet account
Source: https://docs.turnkey.com/api-reference/activities/export-wallet-account
Export a wallet account.
Enum options: `ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Address to identify Wallet Account.
Client-side public key generated by the user, to which the export bundle will be encrypted.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The exportWalletAccountIntent object
Address to identify Wallet Account.
Client-side public key generated by the user, to which the export bundle will be encrypted.
The result of the activity
The exportWalletAccountResult object
Address to identify Wallet Account.
Export bundle containing a private key encrypted by the client's target public key.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/export_wallet_account \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"address": "",
"targetPublicKey": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().exportWalletAccount({
address: " (Address to identify Wallet Account.)",
targetPublicKey: " (Client-side public key generated by the user, to which the export bundle will be encrypted.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"exportWalletAccountIntent": {
"address": "",
"targetPublicKey": ""
}
},
"result": {
"exportWalletAccountResult": {
"address": "",
"exportBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Import private key
Source: https://docs.turnkey.com/api-reference/activities/import-private-key
Import a private key.
Enum options: `ACTIVITY_TYPE_IMPORT_PRIVATE_KEY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User importing a Private Key.
Human-readable name for a Private Key.
Bundle containing a raw private key encrypted to the enclave's target public key.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The importPrivateKeyIntent object
The ID of the User importing a Private Key.
Human-readable name for a Private Key.
Bundle containing a raw private key encrypted to the enclave's target public key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
The result of the activity
The importPrivateKeyResult object
Unique identifier for a Private Key.
A list of addresses.
format field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
address field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/import_private_key \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"privateKeyName": "",
"encryptedBundle": "",
"curve": "",
"addressFormats": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().importPrivateKey({
userId: " (The ID of the User importing a Private Key.)",
privateKeyName: " (Human-readable name for a Private Key.)",
encryptedBundle: " (Bundle containing a raw private key encrypted to the enclave's target public key.)",
curve: "" // curve field,
addressFormats: "" // Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"importPrivateKeyIntent": {
"userId": "",
"privateKeyName": "",
"encryptedBundle": "",
"curve": "",
"addressFormats": [
""
]
}
},
"result": {
"importPrivateKeyResult": {
"privateKeyId": "",
"addresses": [
{
"format": "",
"address": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Import wallet
Source: https://docs.turnkey.com/api-reference/activities/import-wallet
Import a wallet.
Enum options: `ACTIVITY_TYPE_IMPORT_WALLET`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User importing a Wallet.
Human-readable name for a Wallet.
Bundle containing a wallet mnemonic encrypted to the enclave's target public key.
A list of wallet Accounts.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The importWalletIntent object
The ID of the User importing a Wallet.
Human-readable name for a Wallet.
Bundle containing a wallet mnemonic encrypted to the enclave's target public key.
A list of wallet Accounts.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
The result of the activity
The importWalletResult object
Unique identifier for a Wallet.
A list of account addresses.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/import_wallet \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_IMPORT_WALLET",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"walletName": "",
"encryptedBundle": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().importWallet({
userId: " (The ID of the User importing a Wallet.)",
walletName: " (Human-readable name for a Wallet.)",
encryptedBundle: " (Bundle containing a wallet mnemonic encrypted to the enclave's target public key.)",
accounts: [{ // A list of wallet Accounts.,
curve: "" // curve field,
pathFormat: "" // pathFormat field,
path: " (Path used to generate a wallet Account.)",
addressFormat: "" // addressFormat field,
name: " (Optional human-readable name for the account.)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_IMPORT_WALLET",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"importWalletIntent": {
"userId": "",
"walletName": "",
"encryptedBundle": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
]
}
},
"result": {
"importWalletResult": {
"walletId": "",
"addresses": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init email recovery
Source: https://docs.turnkey.com/api-reference/activities/init-email-recovery
Initialize a new email recovery.
Enum options: `ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Email of the user starting recovery
Client-side public key generated by the user, to which the recovery bundle will be encrypted.
Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Optional custom email address from which to send the OTP email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initUserEmailRecoveryIntentV2 object
Email of the user starting recovery
Client-side public key generated by the user, to which the recovery bundle will be encrypted.
Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Optional custom email address from which to send the OTP email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
The result of the activity
The initUserEmailRecoveryResult object
Unique identifier for the user being recovered.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_user_email_recovery \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"email": "",
"targetPublicKey": "",
"expirationSeconds": "",
"emailCustomization": {
"appName": "",
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"sendFromEmailAddress": "",
"sendFromEmailSenderName": "",
"replyToEmailAddress": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initUserEmailRecovery({
email: " (Email of the user starting recovery)",
targetPublicKey: " (Client-side public key generated by the user, to which the recovery bundle will be encrypted.)",
expirationSeconds: " (Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.)",
emailCustomization: { // emailCustomization field,
appName: " (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)",
logoUrl: " (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)",
magicLinkTemplate: " (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)",
templateVariables: " (JSON object containing key/value pairs to be used with custom templates.)",
templateId: " (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)",
},
sendFromEmailAddress: " (Optional custom email address from which to send the OTP email)",
sendFromEmailSenderName: " (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')",
replyToEmailAddress: " (Optional custom email address to use as reply-to)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initUserEmailRecoveryIntentV2": {
"email": "",
"targetPublicKey": "",
"expirationSeconds": "",
"emailCustomization": {
"appName": "",
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"sendFromEmailAddress": "",
"sendFromEmailSenderName": "",
"replyToEmailAddress": ""
}
},
"result": {
"initUserEmailRecoveryResult": {
"userId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init fiat on ramp
Source: https://docs.turnkey.com/api-reference/activities/init-fiat-on-ramp
Initiate a fiat on ramp flow.
Enum options: `ACTIVITY_TYPE_INIT_FIAT_ON_RAMP`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Destination wallet address for the buy transaction.
Enum options: `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BITCOIN`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_ETHEREUM`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_SOLANA`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE`
Enum options: `FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC`
Enum options: `FIAT_ON_RAMP_CURRENCY_AUD`, `FIAT_ON_RAMP_CURRENCY_BGN`, `FIAT_ON_RAMP_CURRENCY_BRL`, `FIAT_ON_RAMP_CURRENCY_CAD`, `FIAT_ON_RAMP_CURRENCY_CHF`, `FIAT_ON_RAMP_CURRENCY_COP`, `FIAT_ON_RAMP_CURRENCY_CZK`, `FIAT_ON_RAMP_CURRENCY_DKK`, `FIAT_ON_RAMP_CURRENCY_DOP`, `FIAT_ON_RAMP_CURRENCY_EGP`, `FIAT_ON_RAMP_CURRENCY_EUR`, `FIAT_ON_RAMP_CURRENCY_GBP`, `FIAT_ON_RAMP_CURRENCY_HKD`, `FIAT_ON_RAMP_CURRENCY_IDR`, `FIAT_ON_RAMP_CURRENCY_ILS`, `FIAT_ON_RAMP_CURRENCY_JOD`, `FIAT_ON_RAMP_CURRENCY_KES`, `FIAT_ON_RAMP_CURRENCY_KWD`, `FIAT_ON_RAMP_CURRENCY_LKR`, `FIAT_ON_RAMP_CURRENCY_MXN`, `FIAT_ON_RAMP_CURRENCY_NGN`, `FIAT_ON_RAMP_CURRENCY_NOK`, `FIAT_ON_RAMP_CURRENCY_NZD`, `FIAT_ON_RAMP_CURRENCY_OMR`, `FIAT_ON_RAMP_CURRENCY_PEN`, `FIAT_ON_RAMP_CURRENCY_PLN`, `FIAT_ON_RAMP_CURRENCY_RON`, `FIAT_ON_RAMP_CURRENCY_SEK`, `FIAT_ON_RAMP_CURRENCY_THB`, `FIAT_ON_RAMP_CURRENCY_TRY`, `FIAT_ON_RAMP_CURRENCY_TWD`, `FIAT_ON_RAMP_CURRENCY_USD`, `FIAT_ON_RAMP_CURRENCY_VND`, `FIAT_ON_RAMP_CURRENCY_ZAR`
Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount.
Enum options: `FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD`, `FIAT_ON_RAMP_PAYMENT_METHOD_APPLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_OPEN_BANKING_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_GOOGLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_SEPA_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_PIX_INSTANT_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_PAYPAL`, `FIAT_ON_RAMP_PAYMENT_METHOD_VENMO`, `FIAT_ON_RAMP_PAYMENT_METHOD_MOONPAY_BALANCE`, `FIAT_ON_RAMP_PAYMENT_METHOD_CRYPTO_ACCOUNT`, `FIAT_ON_RAMP_PAYMENT_METHOD_FIAT_WALLET`, `FIAT_ON_RAMP_PAYMENT_METHOD_ACH_BANK_ACCOUNT`
ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB.
ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country\_code=US.
Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false.
Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initFiatOnRampIntent object
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Destination wallet address for the buy transaction.
network field
Enum options: `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BITCOIN`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_ETHEREUM`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_SOLANA`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE`
cryptoCurrencyCode field
Enum options: `FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC`
fiatCurrencyCode field
Enum options: `FIAT_ON_RAMP_CURRENCY_AUD`, `FIAT_ON_RAMP_CURRENCY_BGN`, `FIAT_ON_RAMP_CURRENCY_BRL`, `FIAT_ON_RAMP_CURRENCY_CAD`, `FIAT_ON_RAMP_CURRENCY_CHF`, `FIAT_ON_RAMP_CURRENCY_COP`, `FIAT_ON_RAMP_CURRENCY_CZK`, `FIAT_ON_RAMP_CURRENCY_DKK`, `FIAT_ON_RAMP_CURRENCY_DOP`, `FIAT_ON_RAMP_CURRENCY_EGP`, `FIAT_ON_RAMP_CURRENCY_EUR`, `FIAT_ON_RAMP_CURRENCY_GBP`, `FIAT_ON_RAMP_CURRENCY_HKD`, `FIAT_ON_RAMP_CURRENCY_IDR`, `FIAT_ON_RAMP_CURRENCY_ILS`, `FIAT_ON_RAMP_CURRENCY_JOD`, `FIAT_ON_RAMP_CURRENCY_KES`, `FIAT_ON_RAMP_CURRENCY_KWD`, `FIAT_ON_RAMP_CURRENCY_LKR`, `FIAT_ON_RAMP_CURRENCY_MXN`, `FIAT_ON_RAMP_CURRENCY_NGN`, `FIAT_ON_RAMP_CURRENCY_NOK`, `FIAT_ON_RAMP_CURRENCY_NZD`, `FIAT_ON_RAMP_CURRENCY_OMR`, `FIAT_ON_RAMP_CURRENCY_PEN`, `FIAT_ON_RAMP_CURRENCY_PLN`, `FIAT_ON_RAMP_CURRENCY_RON`, `FIAT_ON_RAMP_CURRENCY_SEK`, `FIAT_ON_RAMP_CURRENCY_THB`, `FIAT_ON_RAMP_CURRENCY_TRY`, `FIAT_ON_RAMP_CURRENCY_TWD`, `FIAT_ON_RAMP_CURRENCY_USD`, `FIAT_ON_RAMP_CURRENCY_VND`, `FIAT_ON_RAMP_CURRENCY_ZAR`
Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount.
paymentMethod field
Enum options: `FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD`, `FIAT_ON_RAMP_PAYMENT_METHOD_APPLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_OPEN_BANKING_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_GOOGLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_SEPA_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_PIX_INSTANT_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_PAYPAL`, `FIAT_ON_RAMP_PAYMENT_METHOD_VENMO`, `FIAT_ON_RAMP_PAYMENT_METHOD_MOONPAY_BALANCE`, `FIAT_ON_RAMP_PAYMENT_METHOD_CRYPTO_ACCOUNT`, `FIAT_ON_RAMP_PAYMENT_METHOD_FIAT_WALLET`, `FIAT_ON_RAMP_PAYMENT_METHOD_ACH_BANK_ACCOUNT`
ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB.
ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country\_code=US.
Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false.
Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled.
The result of the activity
The initFiatOnRampResult object
Unique URL for a given fiat on-ramp flow.
Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow.
Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_fiat_on_ramp \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"onrampProvider": "",
"walletAddress": "",
"network": "",
"cryptoCurrencyCode": "",
"fiatCurrencyCode": "",
"fiatCurrencyAmount": "",
"paymentMethod": "",
"countryCode": "",
"countrySubdivisionCode": "",
"sandboxMode": "",
"urlForSignature": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initFiatOnRamp({
onrampProvider: "" // onrampProvider field,
walletAddress: " (Destination wallet address for the buy transaction.)",
network: "" // network field,
cryptoCurrencyCode: "" // cryptoCurrencyCode field,
fiatCurrencyCode: "" // fiatCurrencyCode field,
fiatCurrencyAmount: " (Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount.)",
paymentMethod: "" // paymentMethod field,
countryCode: " (ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB.)",
countrySubdivisionCode: " (ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country_code=US.)",
sandboxMode: true // Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false.,
urlForSignature: " (Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initFiatOnRampIntent": {
"onrampProvider": "",
"walletAddress": "",
"network": "",
"cryptoCurrencyCode": "",
"fiatCurrencyCode": "",
"fiatCurrencyAmount": "",
"paymentMethod": "",
"countryCode": "",
"countrySubdivisionCode": "",
"sandboxMode": "",
"urlForSignature": ""
}
},
"result": {
"initFiatOnRampResult": {
"onRampUrl": "",
"onRampTransactionId": "",
"onRampUrlSignature": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init generic OTP
Source: https://docs.turnkey.com/api-reference/activities/init-generic-otp
Initiate a generic OTP activity.
Enum options: `ACTIVITY_TYPE_INIT_OTP_V3`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
The name of the application.
Optional length of the OTP code. Default = 9
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initOtpIntentV3 object
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
The name of the application.
Optional length of the OTP code. Default = 9
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
The result of the activity
The initOtpResultV2 object
Unique identifier for an OTP flow
Signed bundle containing a target encryption key to use when submitting OTP codes.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_otp \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_OTP_V3",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"otpType": "",
"contact": "",
"appName": "",
"otpLength": "",
"emailCustomization": {
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"smsCustomization": {
"template": ""
},
"userIdentifier": "",
"sendFromEmailAddress": "",
"alphanumeric": "",
"sendFromEmailSenderName": "",
"expirationSeconds": "",
"replyToEmailAddress": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initOtp({
otpType: " (Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL)",
contact: " (Email or phone number to send the OTP code to)",
appName: " (The name of the application.)",
otpLength: 0 // Optional length of the OTP code. Default = 9,
emailCustomization: { // emailCustomization field,
logoUrl: " (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)",
magicLinkTemplate: " (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)",
templateVariables: " (JSON object containing key/value pairs to be used with custom templates.)",
templateId: " (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)",
},
smsCustomization: { // smsCustomization field,
template: " (Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}})",
},
userIdentifier: " (Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.)",
sendFromEmailAddress: " (Optional custom email address from which to send the OTP email)",
alphanumeric: true // Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true,
sendFromEmailSenderName: " (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')",
expirationSeconds: " (Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes))",
replyToEmailAddress: " (Optional custom email address to use as reply-to)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_OTP_V3",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initOtpIntentV3": {
"otpType": "",
"contact": "",
"appName": "",
"otpLength": "",
"emailCustomization": {
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"smsCustomization": {
"template": ""
},
"userIdentifier": "",
"sendFromEmailAddress": "",
"alphanumeric": "",
"sendFromEmailSenderName": "",
"expirationSeconds": "",
"replyToEmailAddress": ""
}
},
"result": {
"initOtpResultV2": {
"otpId": "",
"otpEncryptionTargetBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init import private key
Source: https://docs.turnkey.com/api-reference/activities/init-import-private-key
Initialize a new private key import.
Enum options: `ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User importing a Private Key.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initImportPrivateKeyIntent object
The ID of the User importing a Private Key.
The result of the activity
The initImportPrivateKeyResult object
Import bundle containing a public key and signature to use for importing client data.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_import_private_key \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initImportPrivateKey({
userId: " (The ID of the User importing a Private Key.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initImportPrivateKeyIntent": {
"userId": ""
}
},
"result": {
"initImportPrivateKeyResult": {
"importBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init import wallet
Source: https://docs.turnkey.com/api-reference/activities/init-import-wallet
Initialize a new wallet import.
Enum options: `ACTIVITY_TYPE_INIT_IMPORT_WALLET`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User importing a Wallet.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initImportWalletIntent object
The ID of the User importing a Wallet.
The result of the activity
The initImportWalletResult object
Import bundle containing a public key and signature to use for importing client data.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_import_wallet \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initImportWallet({
userId: " (The ID of the User importing a Wallet.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_IMPORT_WALLET",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initImportWalletIntent": {
"userId": ""
}
},
"result": {
"initImportWalletResult": {
"importBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Init OTP auth
Source: https://docs.turnkey.com/api-reference/activities/init-otp-auth
Initiate an OTP auth activity.
Enum options: `ACTIVITY_TYPE_INIT_OTP_AUTH_V3`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The initOtpAuthIntentV3 object
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
The result of the activity
The initOtpAuthResultV2 object
Unique identifier for an OTP authentication
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/init_otp_auth \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_INIT_OTP_AUTH_V3",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"otpType": "",
"contact": "",
"otpLength": "",
"appName": "",
"emailCustomization": {
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"smsCustomization": {
"template": ""
},
"userIdentifier": "",
"sendFromEmailAddress": "",
"alphanumeric": "",
"sendFromEmailSenderName": "",
"expirationSeconds": "",
"replyToEmailAddress": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().initOtpAuth({
otpType: " (Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL)",
contact: " (Email or phone number to send the OTP code to)",
otpLength: 0 // Optional length of the OTP code. Default = 9,
appName: " (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)",
emailCustomization: { // emailCustomization field,
logoUrl: " (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)",
magicLinkTemplate: " (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)",
templateVariables: " (JSON object containing key/value pairs to be used with custom templates.)",
templateId: " (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)",
},
smsCustomization: { // smsCustomization field,
template: " (Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}})",
},
userIdentifier: " (Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.)",
sendFromEmailAddress: " (Optional custom email address from which to send the OTP email)",
alphanumeric: true // Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true,
sendFromEmailSenderName: " (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')",
expirationSeconds: " (Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes))",
replyToEmailAddress: " (Optional custom email address to use as reply-to)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_INIT_OTP_AUTH_V3",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"initOtpAuthIntentV3": {
"otpType": "",
"contact": "",
"otpLength": "",
"appName": "",
"emailCustomization": {
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"smsCustomization": {
"template": ""
},
"userIdentifier": "",
"sendFromEmailAddress": "",
"alphanumeric": "",
"sendFromEmailSenderName": "",
"expirationSeconds": "",
"replyToEmailAddress": ""
}
},
"result": {
"initOtpAuthResultV2": {
"otpId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Login with a stamp
Source: https://docs.turnkey.com/api-reference/activities/login-with-a-stamp
Create a session for a user through stamping client side (API key, wallet client, or passkey client).
Enum options: `ACTIVITY_TYPE_STAMP_LOGIN`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The stampLoginIntent object
Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
The result of the activity
The stampLoginResult object
Signed JWT containing an expiry, public key, session type, user id, and organization id
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/stamp_login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_STAMP_LOGIN",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"publicKey": "",
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().stampLogin({
publicKey: " (Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request)",
expirationSeconds: " (Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated Login API keys,
sessionProfileId: " (Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_STAMP_LOGIN",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"stampLoginIntent": {
"publicKey": "",
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
},
"result": {
"stampLoginResult": {
"session": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Login with Oauth
Source: https://docs.turnkey.com/api-reference/activities/login-with-oauth
Create an Oauth session for a user.
Enum options: `ACTIVITY_TYPE_OAUTH_LOGIN`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Base64 encoded OIDC token
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The oauthLoginIntent object
Base64 encoded OIDC token
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
The result of the activity
The oauthLoginResult object
Signed JWT containing an expiry, public key, session type, user id, and organization id
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/oauth_login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_OAUTH_LOGIN",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"oidcToken": "",
"publicKey": "",
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().oauthLogin({
oidcToken: " (Base64 encoded OIDC token)",
publicKey: " (Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request)",
expirationSeconds: " (Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated Login API keys,
sessionProfileId: " (Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OAUTH_LOGIN",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"oauthLoginIntent": {
"oidcToken": "",
"publicKey": "",
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
},
"result": {
"oauthLoginResult": {
"session": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Login with OTP
Source: https://docs.turnkey.com/api-reference/activities/login-with-otp
Create an OTP session for a user.
Enum options: `ACTIVITY_TYPE_OTP_LOGIN_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Signed Verification Token containing a unique id, expiry, verification type, contact
Client-side public key generated by the user, used as the session public key upon successful login
clientSignature field
The public component of a cryptographic key pair used to create the signature.
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login sessions
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The otpLoginIntentV2 object
Signed Verification Token containing a unique id, expiry, verification type, contact
Client-side public key generated by the user, used as the session public key upon successful login
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login sessions
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
The result of the activity
The otpLoginResult object
Signed JWT containing an expiry, public key, session type, user id, and organization id
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/otp_login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_OTP_LOGIN_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"verificationToken": "",
"publicKey": "",
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
},
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().otpLogin({
verificationToken: " (Signed Verification Token containing a unique id, expiry, verification type, contact)",
publicKey: " (Client-side public key generated by the user, used as the session public key upon successful login)",
clientSignature: { // clientSignature field,
publicKey: " (The public component of a cryptographic key pair used to create the signature.)",
scheme: "" // scheme field,
message: " (The message that was signed.)",
signature: " (The cryptographic signature over the message.)",
},
expirationSeconds: " (Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated Login sessions,
sessionProfileId: " (Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OTP_LOGIN_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"otpLoginIntentV2": {
"verificationToken": "",
"publicKey": "",
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
},
"expirationSeconds": "",
"invalidateExisting": "",
"sessionProfileId": ""
}
},
"result": {
"otpLoginResult": {
"session": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Oauth
Source: https://docs.turnkey.com/api-reference/activities/oauth
Authenticate a user with an OIDC token (Oauth).
Enum options: `ACTIVITY_TYPE_OAUTH`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Base64 encoded OIDC token
Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Oauth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Oauth API keys
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The oauthIntent object
Base64 encoded OIDC token
Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Oauth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Oauth API keys
The result of the activity
The oauthResult object
Unique identifier for the authenticating User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/oauth \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_OAUTH",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"oidcToken": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().oauth({
oidcToken: " (Base64 encoded OIDC token)",
targetPublicKey: " (Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted.)",
apiKeyName: " (Optional human-readable name for an API Key. If none provided, default to Oauth - )",
expirationSeconds: " (Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated Oauth API keys
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OAUTH",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"oauthIntent": {
"oidcToken": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
},
"result": {
"oauthResult": {
"userId": "",
"apiKeyId": "",
"credentialBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# OAuth 2.0 authentication
Source: https://docs.turnkey.com/api-reference/activities/oauth-20-authentication
Authenticate a user with an OAuth 2.0 provider and receive an OIDC token to use with the LoginWithOAuth or CreateSubOrganization activities
Enum options: `ACTIVITY_TYPE_OAUTH2_AUTHENTICATE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The OAuth 2.0 credential id whose client\_id and client\_secret will be used in the OAuth 2.0 flow
The auth\_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow
The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider
The code verifier used by OAuth 2.0 PKCE providers
A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key
An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The oauth2AuthenticateIntent object
The OAuth 2.0 credential id whose client\_id and client\_secret will be used in the OAuth 2.0 flow
The auth\_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow
The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider
The code verifier used by OAuth 2.0 PKCE providers
A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key
An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token
The result of the activity
The oauth2AuthenticateResult object
Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/oauth2_authenticate \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"oauth2CredentialId": "",
"authCode": "",
"redirectUri": "",
"codeVerifier": "",
"nonce": "",
"bearerTokenTargetPublicKey": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().oauth2Authenticate({
oauth2CredentialId: " (The OAuth 2.0 credential id whose client_id and client_secret will be used in the OAuth 2.0 flow)",
authCode: " (The auth_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow)",
redirectUri: " (The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider)",
codeVerifier: " (The code verifier used by OAuth 2.0 PKCE providers)",
nonce: " (A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key)",
bearerTokenTargetPublicKey: " (An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"oauth2AuthenticateIntent": {
"oauth2CredentialId": "",
"authCode": "",
"redirectUri": "",
"codeVerifier": "",
"nonce": "",
"bearerTokenTargetPublicKey": ""
}
},
"result": {
"oauth2AuthenticateResult": {
"oidcToken": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# OTP auth
Source: https://docs.turnkey.com/api-reference/activities/otp-auth
Authenticate a user with an OTP code sent via email or SMS.
Enum options: `ACTIVITY_TYPE_OTP_AUTH`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
ID representing the result of an init OTP activity.
OTP sent out to a user's contact (email or SMS)
Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to OTP Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated OTP Auth API keys
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The otpAuthIntent object
ID representing the result of an init OTP activity.
OTP sent out to a user's contact (email or SMS)
Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to OTP Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated OTP Auth API keys
The result of the activity
The otpAuthResult object
Unique identifier for the authenticating User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/otp_auth \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_OTP_AUTH",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"otpId": "",
"otpCode": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().otpAuth({
otpId: " (ID representing the result of an init OTP activity.)",
otpCode: " (OTP sent out to a user's contact (email or SMS))",
targetPublicKey: " (Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted.)",
apiKeyName: " (Optional human-readable name for an API Key. If none provided, default to OTP Auth - )",
expirationSeconds: " (Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.)",
invalidateExisting: true // Invalidate all other previously generated OTP Auth API keys
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OTP_AUTH",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"otpAuthIntent": {
"otpId": "",
"otpCode": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"invalidateExisting": ""
}
},
"result": {
"otpAuthResult": {
"userId": "",
"apiKeyId": "",
"credentialBundle": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Activities
Source: https://docs.turnkey.com/api-reference/activities/overview
Activities are requests to securely execute a workload in Turnkey. Submission endpoints are always prefixed with `/public/v1/submit`.
# What are activities?
Activities are requests to create, modify, or use resources within Turnkey.
Submission endpoints are always prefixed with `/public/v1/submit`.
* **Policy enforcement:** Activities are subject to consensus or condition enforcement via the policy engine.
* **Optimistic execution:** Activities execute optimistically synchronous — if possible, the request completes synchronously; otherwise it falls back to asynchronous processing. Your services should account for this by checking the activity status in the response:
* `ACTIVITY_STATUS_COMPLETED`: The activity succeeded and the `result` field is populated.
* `ACTIVITY_STATUS_FAILED`: The activity failed and the `failure` field contains the reason.
* `ACTIVITY_STATUS_CONSENSUS_NEEDED`: More signatures (votes) are required to process the request.
* `ACTIVITY_STATUS_PENDING`: The request is processing asynchronously.
* **Approval expiration:** Activities do not expire. However, when an activity is submitted, the requester's submission counts as the first approval and starts a 24-hour window. If consensus is not reached within that window, existing approvals expire and must be re-submitted while the activity remains in `ACTIVITY_STATUS_CONSENSUS_NEEDED`.
* **Status updates:** Poll `get_activity` with the `activity.id`, or re-submit the original request (see idempotency below).
* **Idempotency:** The submission API is idempotent. Each request's POST body is hashed into a fingerprint — any two requests with the same fingerprint return the same activity. To generate a new activity, change the `timestampMs` value in your request.
# Perform email auth
Source: https://docs.turnkey.com/api-reference/activities/perform-email-auth
Authenticate a user via email.
Enum options: `ACTIVITY_TYPE_EMAIL_AUTH_V3`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Email of the authenticating user.
Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Email Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Invalidate all other previously generated Email Auth API keys
Optional custom email address from which to send the email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The emailAuthIntentV3 object
Email of the authenticating user.
Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Email Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Invalidate all other previously generated Email Auth API keys
Optional custom email address from which to send the email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
The result of the activity
The emailAuthResult object
Unique identifier for the authenticating User.
Unique identifier for the created API key.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/email_auth \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EMAIL_AUTH_V3",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"email": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"emailCustomization": {
"appName": "",
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"invalidateExisting": "",
"sendFromEmailAddress": "",
"sendFromEmailSenderName": "",
"replyToEmailAddress": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().emailAuth({
email: " (Email of the authenticating user.)",
targetPublicKey: " (Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.)",
apiKeyName: " (Optional human-readable name for an API Key. If none provided, default to Email Auth - )",
expirationSeconds: " (Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.)",
emailCustomization: { // emailCustomization field,
appName: " (The name of the application. This field is required and will be used in email notifications if an email template is not provided.)",
logoUrl: " (A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.)",
magicLinkTemplate: " (A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.)",
templateVariables: " (JSON object containing key/value pairs to be used with custom templates.)",
templateId: " (Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.)",
},
invalidateExisting: true // Invalidate all other previously generated Email Auth API keys,
sendFromEmailAddress: " (Optional custom email address from which to send the email)",
sendFromEmailSenderName: " (Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications')",
replyToEmailAddress: " (Optional custom email address to use as reply-to)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EMAIL_AUTH_V3",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"emailAuthIntentV3": {
"email": "",
"targetPublicKey": "",
"apiKeyName": "",
"expirationSeconds": "",
"emailCustomization": {
"appName": "",
"logoUrl": "",
"magicLinkTemplate": "",
"templateVariables": "",
"templateId": ""
},
"invalidateExisting": "",
"sendFromEmailAddress": "",
"sendFromEmailSenderName": "",
"replyToEmailAddress": ""
}
},
"result": {
"emailAuthResult": {
"userId": "",
"apiKeyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Prepare Spark transfer
Source: https://docs.turnkey.com/api-reference/activities/prepare-spark-transfer
Construct sender-side encrypted operator packages for a Spark BTC transfer. Does not perform FROST signing.
Enum options: `ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Spark wallet account address identifying the wallet.
transfer field
Spark transfer identifier (UUID).
Leaves being transferred.
Leaf identifier (UUID).
oldLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
newLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Client-produced CPFP refund signature (hex-encoded), passed through verbatim into the per-operator SendLeafKeyTweak. Empty omits the field from the operator package.
Client-produced direct refund signature (hex-encoded). Passed through verbatim.
Client-produced direct-from-CPFP refund signature (hex-encoded). Passed through verbatim.
Feldman VSS threshold for reconstructing the per-leaf tweak scalar.
Operators that will receive Feldman shares of the per-leaf tweak. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Recipient's identity pubkey (hex-encoded compressed secp256k1 point). Each leaf's new\_priv is ECIES-encrypted to this key and embedded in the per-operator package for claim-time delivery.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The sparkPrepareTransferIntent object
A Spark wallet account address identifying the wallet.
transfer field
Spark transfer identifier (UUID).
Leaves being transferred.
Leaf identifier (UUID).
oldLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
newLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Client-produced CPFP refund signature (hex-encoded), passed through verbatim into the per-operator SendLeafKeyTweak. Empty omits the field from the operator package.
Client-produced direct refund signature (hex-encoded). Passed through verbatim.
Client-produced direct-from-CPFP refund signature (hex-encoded). Passed through verbatim.
Feldman VSS threshold for reconstructing the per-leaf tweak scalar.
Operators that will receive Feldman shares of the per-leaf tweak. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Recipient's identity pubkey (hex-encoded compressed secp256k1 point). Each leaf's new\_priv is ECIES-encrypted to this key and embedded in the per-operator package for claim-time delivery.
The result of the activity
The sparkPrepareTransferResult object
Per-operator ECIES-encrypted packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Hex-encoded ECDSA-DER signature of the TransferPackage signing payload, signed with the wallet's IDENTITY key.
Newly-derived SigningLeaf public keys, one per leaf, in input order.
The Spark leaf\_id this public key was derived for.
Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf\_id.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/spark_prepare_transfer \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"transfer": {
"transferId": "",
"leaves": [
{
"leafId": "",
"oldLeafDerivation": {
"identity": "
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"sparkPrepareTransferIntent": {
"signWith": "",
"transfer": {
"transferId": "",
"leaves": [
{
"leafId": "",
"oldLeafDerivation": {
"identity": "",
"signingLeaf": {
"leafId": ""
},
"deposit": "",
"staticDeposit": {
"index": ""
},
"htlcPreimage": ""
},
"newLeafDerivation": {
"identity": "",
"signingLeaf": {
"leafId": ""
},
"deposit": "",
"staticDeposit": {
"index": ""
},
"htlcPreimage": ""
},
"refundSignature": "",
"directRefundSignature": "",
"directFromCpfpRefundSignature": ""
}
],
"threshold": "",
"operatorRecipients": [
{
"operatorId": "",
"encryptionPublicKey": ""
}
],
"receiverPublicKey": ""
}
}
},
"result": {
"sparkPrepareTransferResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"transferUserSignature": "",
"newLeafPublicKeys": [
{
"leafId": "",
"publicKey": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Recover a user
Source: https://docs.turnkey.com/api-reference/activities/recover-a-user
Complete the process of recovering a user by adding an authenticator.
Enum options: `ACTIVITY_TYPE_RECOVER_USER`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
authenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for the user performing recovery.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The recoverUserIntent object
authenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for the user performing recovery.
The result of the activity
The recoverUserResult object
ID of the authenticator created.
item field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/recover_user \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_RECOVER_USER",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"authenticator": {
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
},
"userId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().recoverUser({
authenticator: { // authenticator field,
authenticatorName: " (Human-readable name for an Authenticator.)",
challenge: " (Challenge presented for authentication purposes.)",
attestation: { // attestation field,
credentialId: " (The cbor encoded then base64 url encoded id of the credential.)",
clientDataJson: " (A base64 url encoded payload containing metadata about the signing context and the challenge.)",
attestationObject: " (A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.)",
transports: "" // The type of authenticator transports.,
},
},
userId: " (Unique identifier for the user performing recovery.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_RECOVER_USER",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"recoverUserIntent": {
"authenticator": {
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
},
"userId": ""
}
},
"result": {
"recoverUserResult": {
"authenticatorId": [
""
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Reject activity
Source: https://docs.turnkey.com/api-reference/activities/reject-activity
Reject an activity.
Enum options: `ACTIVITY_TYPE_REJECT_ACTIVITY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
An artifact verifying a User's action.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
ACTIVITY\_STATUS\_REJECTED
The activity type
The intent of the activity
The rejectActivityIntent object
An artifact verifying a User's action.
The result of the activity
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/reject_activity \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_REJECT_ACTIVITY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"fingerprint": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().rejectActivity({
fingerprint: " (An artifact verifying a User's action.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_REJECT_ACTIVITY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"rejectActivityIntent": {
"fingerprint": ""
}
},
"result": {},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Remove IP Allowlist
Source: https://docs.turnkey.com/api-reference/activities/remove-ip-allowlist
Delete IP allowlist and all associated rules for organization or API key. After removal, access will be determined by organization-level allowlist (for API keys) or allowed from all IPs (for organizations).
Enum options: `ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The removeIpAllowlistIntent object
The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key.
The result of the activity
The removeIpAllowlistResult object
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/remove_ip_allowlist \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"publicKey": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().removeIpAllowlist({
publicKey: " (The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"removeIpAllowlistIntent": {
"publicKey": ""
}
},
"result": {
"removeIpAllowlistResult": {}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Remove organization feature
Source: https://docs.turnkey.com/api-reference/activities/remove-organization-feature
Remove an organization feature. This activity must be approved by the current root quorum.
Enum options: `ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The removeOrganizationFeatureIntent object
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
The result of the activity
The removeOrganizationFeatureResult object
Resulting list of organization features.
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
value field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/remove_organization_feature \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"name": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().removeOrganizationFeature({
name: "" // name field
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"removeOrganizationFeatureIntent": {
"name": ""
}
},
"result": {
"removeOrganizationFeatureResult": {
"features": [
{
"name": "",
"value": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Restore a TVC Deployment
Source: https://docs.turnkey.com/api-reference/activities/restore-a-tvc-deployment
Restore a deleted TVC Deployment
Enum options: `ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The unique identifier of the TVC deployment to restore.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The restoreTvcDeploymentIntent object
The unique identifier of the TVC deployment to restore.
The result of the activity
The restoreTvcDeploymentResult object
The unique identifier of the restored TVC deployment.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/restore_tvc_deployment \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"deploymentId": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().restoreTvcDeployment({
deploymentId: " (The unique identifier of the TVC deployment to restore.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"restoreTvcDeploymentIntent": {
"deploymentId": ""
}
},
"result": {
"restoreTvcDeploymentResult": {
"deploymentId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Set IP Allowlist
Source: https://docs.turnkey.com/api-reference/activities/set-ip-allowlist
Create or update IP allowlist and rules for organization or API key. The IP allowlist restricts API access to specific CIDR blocks. Organization-level allowlists apply to all API keys unless overridden by a key-specific allowlist.
Enum options: `ACTIVITY_TYPE_SET_IP_ALLOWLIST`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key.
Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists.
List of IP allowlist rules with CIDR blocks and optional labels.
CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32').
Optional human-readable label for this rule (e.g., 'Office VPN').
Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The setIpAllowlistIntent object
The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key.
Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists.
List of IP allowlist rules with CIDR blocks and optional labels.
CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32').
Optional human-readable label for this rule (e.g., 'Office VPN').
Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.
The result of the activity
The setIpAllowlistResult object
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/set_ip_allowlist \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"publicKey": "",
"enabled": "",
"rules": [
{
"cidr": "",
"label": ""
}
],
"onEvaluationError": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().setIpAllowlist({
publicKey: " (The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key.)",
enabled: true // Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists.,
rules: [{ // List of IP allowlist rules with CIDR blocks and optional labels.,
cidr: " (CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32').)",
label: " (Optional human-readable label for this rule (e.g., 'Office VPN').)",
}],
onEvaluationError: " (Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SET_IP_ALLOWLIST",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"setIpAllowlistIntent": {
"publicKey": "",
"enabled": "",
"rules": [
{
"cidr": "",
"label": ""
}
],
"onEvaluationError": ""
}
},
"result": {
"setIpAllowlistResult": {}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Set organization feature
Source: https://docs.turnkey.com/api-reference/activities/set-organization-feature
Set an organization feature. This activity must be approved by the current root quorum.
Enum options: `ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
Optional value for the feature. Will override existing values if feature is already set.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The setOrganizationFeatureIntent object
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
Optional value for the feature. Will override existing values if feature is already set.
The result of the activity
The setOrganizationFeatureResult object
Resulting list of organization features.
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
value field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/set_organization_feature \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"name": "",
"value": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().setOrganizationFeature({
name: "" // name field,
value: " (Optional value for the feature. Will override existing values if feature is already set.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"setOrganizationFeatureIntent": {
"name": "",
"value": ""
}
},
"result": {
"setOrganizationFeatureResult": {
"features": [
{
"name": "",
"value": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Sign Frost Spark
Source: https://docs.turnkey.com/api-reference/activities/sign-frost-spark
Perform pure FROST partial signing for a Spark wallet. Produces partial signatures without constructing operator packages.
Enum options: `ACTIVITY_TYPE_SPARK_SIGN_FROST`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Spark wallet account address identifying the wallet to sign with.
Batched sign requests. Each produces a partial signature plus Turnkey's public commitments.
derivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Hex-encoded 32-byte sighash to sign.
Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P\_ops + P\_user. Bound into the nonce HMAC.
Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC.
FROST participant identifier, hex-encoded (32-byte scalar).
Hiding commitment D, hex-encoded compressed secp256k1 point.
Binding commitment E, hex-encoded compressed secp256k1 point.
Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case).
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The sparkSignFrostIntent object
A Spark wallet account address identifying the wallet to sign with.
Batched sign requests. Each produces a partial signature plus Turnkey's public commitments.
derivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Hex-encoded 32-byte sighash to sign.
Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P\_ops + P\_user. Bound into the nonce HMAC.
Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC.
FROST participant identifier, hex-encoded (32-byte scalar).
Hiding commitment D, hex-encoded compressed secp256k1 point.
Binding commitment E, hex-encoded compressed secp256k1 point.
Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case).
The result of the activity
The sparkSignFrostResult object
Partial signatures plus Turnkey commitments, one per request, in order.
Hex-encoded FROST partial signature.
Turnkey's hiding commitment D (hex-encoded compressed secp256k1 point). Forward to the Spark Operator.
Turnkey's binding commitment E (hex-encoded compressed secp256k1 point). Forward to the Spark Operator.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/spark_sign_frost \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_SIGN_FROST",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"signatures": [
{
"derivation": {
"identity": "",
"signingLeaf": {
"leafId": ""
},
"deposit": "",
"staticDeposit": {
"index": ""
},
"htlcPreimage": ""
},
"message": "",
"verifyingKey": "",
"operatorCommitments": [
{
"id": "",
"hiding": "",
"binding": ""
}
],
"adaptorPublicKey": ""
}
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().sparkSignFrost({
signWith: " (A Spark wallet account address identifying the wallet to sign with.)",
signatures: [{ // Batched sign requests. Each produces a partial signature plus Turnkey's public commitments.,
derivation: { // derivation field,
identity: { /* object */ } // identity field,
signingLeaf: { // signingLeaf field,
leafId: " (Unique identifier for the Spark signing leaf.)",
},
deposit: { /* object */ } // deposit field,
staticDeposit: { // staticDeposit field,
index: 0 // Index used to derive the static deposit key.,
},
htlcPreimage: { /* object */ } // htlcPreimage field,
},
message: " (Hex-encoded 32-byte sighash to sign.)",
verifyingKey: " (Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P_ops + P_user. Bound into the nonce HMAC.)",
operatorCommitments: [{ // Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC.,
id: " (FROST participant identifier, hex-encoded (32-byte scalar).)",
hiding: " (Hiding commitment D, hex-encoded compressed secp256k1 point.)",
binding: " (Binding commitment E, hex-encoded compressed secp256k1 point.)",
}],
adaptorPublicKey: " (Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case).)",
}]
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_SIGN_FROST",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"sparkSignFrostIntent": {
"signWith": "",
"signatures": [
{
"derivation": {
"identity": "",
"signingLeaf": {
"leafId": ""
},
"deposit": "",
"staticDeposit": {
"index": ""
},
"htlcPreimage": ""
},
"message": "",
"verifyingKey": "",
"operatorCommitments": [
{
"id": "",
"hiding": "",
"binding": ""
}
],
"adaptorPublicKey": ""
}
]
}
},
"result": {
"sparkSignFrostResult": {
"signatures": [
{
"signatureShare": "",
"hiding": "",
"binding": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Sign raw payload
Source: https://docs.turnkey.com/api-reference/activities/sign-raw-payload
Sign a raw payload.
Enum options: `ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned payload to be signed.
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The signRawPayloadIntentV2 object
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned payload to be signed.
encoding field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
hashFunction field
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
The result of the activity
The signRawPayloadResult object
Component of an ECSDA signature.
Component of an ECSDA signature.
Component of an ECSDA signature.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/sign_raw_payload \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"payload": "",
"encoding": "",
"hashFunction": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().signRawPayload({
signWith: " (A Wallet account address, Private Key address, or Private Key identifier.)",
payload: " (Raw unsigned payload to be signed.)",
encoding: "" // encoding field,
hashFunction: "" // hashFunction field
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"signRawPayloadIntentV2": {
"signWith": "",
"payload": "",
"encoding": "",
"hashFunction": ""
}
},
"result": {
"signRawPayloadResult": {
"r": "",
"s": "",
"v": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Sign raw payloads
Source: https://docs.turnkey.com/api-reference/activities/sign-raw-payloads
Sign multiple raw payloads with the same signing parameters.
Enum options: `ACTIVITY_TYPE_SIGN_RAW_PAYLOADS`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Wallet account address, Private Key address, or Private Key identifier.
An array of raw unsigned payloads to be signed.
Array item type: string
item field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The signRawPayloadsIntent object
A Wallet account address, Private Key address, or Private Key identifier.
An array of raw unsigned payloads to be signed.
item field
encoding field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
hashFunction field
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
The result of the activity
The signRawPayloadsResult object
signatures field
Component of an ECSDA signature.
Component of an ECSDA signature.
Component of an ECSDA signature.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/sign_raw_payloads \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"payloads": [
""
],
"encoding": "",
"hashFunction": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().signRawPayloads({
signWith: " (A Wallet account address, Private Key address, or Private Key identifier.)",
payloads: [""] // An array of raw unsigned payloads to be signed.,
encoding: "" // encoding field,
hashFunction: "" // hashFunction field
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"signRawPayloadsIntent": {
"signWith": "",
"payloads": [
""
],
"encoding": "",
"hashFunction": ""
}
},
"result": {
"signRawPayloadsResult": {
"signatures": [
{
"r": "",
"s": "",
"v": ""
}
]
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Sign transaction
Source: https://docs.turnkey.com/api-reference/activities/sign-transaction
Sign a transaction.
Enum options: `ACTIVITY_TYPE_SIGN_TRANSACTION_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned transaction to be signed
Enum options: `TRANSACTION_TYPE_ETHEREUM`, `TRANSACTION_TYPE_SOLANA`, `TRANSACTION_TYPE_TRON`, `TRANSACTION_TYPE_BITCOIN`, `TRANSACTION_TYPE_TEMPO`
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The signTransactionIntentV2 object
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned transaction to be signed
type field
Enum options: `TRANSACTION_TYPE_ETHEREUM`, `TRANSACTION_TYPE_SOLANA`, `TRANSACTION_TYPE_TRON`, `TRANSACTION_TYPE_BITCOIN`, `TRANSACTION_TYPE_TEMPO`
The result of the activity
The signTransactionResult object
signedTransaction field
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/sign_transaction \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"unsignedTransaction": "",
"type": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().signTransaction({
signWith: " (A Wallet account address, Private Key address, or Private Key identifier.)",
unsignedTransaction: " (Raw unsigned transaction to be signed)",
type: "" // type field
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"signTransactionIntentV2": {
"signWith": "",
"unsignedTransaction": "",
"type": ""
}
},
"result": {
"signTransactionResult": {
"signedTransaction": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Spark prepare Lightning receive
Source: https://docs.turnkey.com/api-reference/activities/spark-prepare-lightning-receive
Generate a Lightning preimage and distribute Feldman shares to operators for a Spark Lightning receive. Does not perform FROST signing.
Enum options: `ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
A Spark wallet account address identifying the wallet.
lightningReceive field
Feldman VSS threshold for reconstructing the preimage.
Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The sparkPrepareLightningReceiveIntent object
A Spark wallet account address identifying the wallet.
lightningReceive field
Feldman VSS threshold for reconstructing the preimage.
Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
The result of the activity
The sparkPrepareLightningReceiveResult object
Per-operator ECIES-encrypted Feldman share packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Hex-encoded SHA256(preimage). Forward to the Lightning node.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/spark_prepare_lightning_receive \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"signWith": "",
"lightningReceive": {
"threshold": "",
"operatorRecipients": [
{
"operatorId": "",
"encryptionPublicKey": ""
}
]
}
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().sparkPrepareLightningReceive({
signWith: " (A Spark wallet account address identifying the wallet.)",
lightningReceive: { // lightningReceive field,
threshold: 0 // Feldman VSS threshold for reconstructing the preimage.,
operatorRecipients: [{ // Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.,
operatorId: " (Spark operator identifier (UUID).)",
encryptionPublicKey: " (Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).)",
}],
}
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"sparkPrepareLightningReceiveIntent": {
"signWith": "",
"lightningReceive": {
"threshold": "",
"operatorRecipients": [
{
"operatorId": "",
"encryptionPublicKey": ""
}
]
}
}
},
"result": {
"sparkPrepareLightningReceiveResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"paymentHash": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update a Fiat On Ramp Credential
Source: https://docs.turnkey.com/api-reference/activities/update-a-fiat-on-ramp-credential
Update a fiat on ramp provider credential
Enum options: `ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the fiat on-ramp credential to update
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier.
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateFiatOnRampCredentialIntent object
The ID of the fiat on-ramp credential to update
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier.
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
The result of the activity
The updateFiatOnRampCredentialResult object
Unique identifier of the Fiat On-Ramp credential that was updated
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_fiat_on_ramp_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"fiatOnrampCredentialId": "",
"onrampProvider": "",
"projectId": "",
"publishableApiKey": "",
"encryptedSecretApiKey": "",
"encryptedPrivateApiKey": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateFiatOnRampCredential({
fiatOnrampCredentialId: " (The ID of the fiat on-ramp credential to update)",
onrampProvider: "" // onrampProvider field,
projectId: " (Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier.)",
publishableApiKey: " (Publishable API key for the on-ramp provider)",
encryptedSecretApiKey: " (Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key)",
encryptedPrivateApiKey: " (Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateFiatOnRampCredentialIntent": {
"fiatOnrampCredentialId": "",
"onrampProvider": "",
"projectId": "",
"publishableApiKey": "",
"encryptedSecretApiKey": "",
"encryptedPrivateApiKey": ""
}
},
"result": {
"updateFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update an OAuth 2.0 Credential
Source: https://docs.turnkey.com/api-reference/activities/update-an-oauth-20-credential
Update an OAuth 2.0 provider credential
Enum options: `ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the OAuth 2.0 credential to update
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateOauth2CredentialIntent object
The ID of the OAuth 2.0 credential to update
provider field
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
The result of the activity
The updateOauth2CredentialResult object
Unique identifier of the OAuth 2.0 credential that was updated
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_oauth2_credential \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"oauth2CredentialId": "",
"provider": "",
"clientId": "",
"encryptedClientSecret": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateOauth2Credential({
oauth2CredentialId: " (The ID of the OAuth 2.0 credential to update)",
provider: "" // provider field,
clientId: " (The Client ID issued by the OAuth 2.0 provider)",
encryptedClientSecret: " (The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateOauth2CredentialIntent": {
"oauth2CredentialId": "",
"provider": "",
"clientId": "",
"encryptedClientSecret": ""
}
},
"result": {
"updateOauth2CredentialResult": {
"oauth2CredentialId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update MFA policy
Source: https://docs.turnkey.com/api-reference/activities/update-mfa-policy
Update an MFA policy for a user.
Enum options: `ACTIVITY_TYPE_UPDATE_MFA_POLICY`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The ID of the User to update the MFA Policy for.
Unique identifier for a given MFA Policy.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateMfaPolicyIntent object
The ID of the User to update the MFA Policy for.
Unique identifier for a given MFA Policy.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
type field
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
The result of the activity
The updateMfaPolicyResult object
Unique identifier for a given MFA Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_mfa_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"mfaPolicyId": "",
"mfaPolicyName": "",
"condition": "",
"requiredAuthenticationMethods": [
{
"any": [
{
"type": "",
"id": ""
}
]
}
],
"order": "",
"notes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateMfaPolicy({
userId: " (The ID of the User to update the MFA Policy for.)",
mfaPolicyId: " (Unique identifier for a given MFA Policy.)",
mfaPolicyName: " (Human-readable name for a Policy.)",
condition: " (A condition expression that evaluates to true or false, determining when this MFA policy applies.)",
requiredAuthenticationMethods: [""] // An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.,
order: 0 // The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.,
notes: " (Notes for an MFA Policy.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_MFA_POLICY",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateMfaPolicyIntent": {
"userId": "",
"mfaPolicyId": "",
"mfaPolicyName": "",
"condition": "",
"requiredAuthenticationMethods": [
{
"any": [
{
"type": "",
"id": ""
}
]
}
],
"order": "",
"notes": ""
}
},
"result": {
"updateMfaPolicyResult": {
"mfaPolicyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update organization name
Source: https://docs.turnkey.com/api-reference/activities/update-organization-name
Update the name of an organization.
Enum options: `ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
New name for the Organization.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateOrganizationNameIntent object
New name for the Organization.
The result of the activity
The updateOrganizationNameResult object
Unique identifier for the Organization.
The updated organization name.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_organization_name \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"organizationName": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateOrganizationName({
organizationName: " (New name for the Organization.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateOrganizationNameIntent": {
"organizationName": ""
}
},
"result": {
"updateOrganizationNameResult": {
"organizationId": "",
"organizationName": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update policy
Source: https://docs.turnkey.com/api-reference/activities/update-policy
Update an existing policy.
Enum options: `ACTIVITY_TYPE_UPDATE_POLICY_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Policy.
Human-readable name for a Policy.
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect (optional).
The consensus expression that triggers the Effect (optional).
Accompanying notes for a Policy (optional).
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updatePolicyIntentV2 object
Unique identifier for a given Policy.
Human-readable name for a Policy.
policyEffect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect (optional).
The consensus expression that triggers the Effect (optional).
Accompanying notes for a Policy (optional).
The result of the activity
The updatePolicyResultV2 object
Unique identifier for a given Policy.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_policy \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_POLICY_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"policyId": "",
"policyName": "",
"policyEffect": "",
"policyCondition": "",
"policyConsensus": "",
"policyNotes": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updatePolicy({
policyId: " (Unique identifier for a given Policy.)",
policyName: " (Human-readable name for a Policy.)",
policyEffect: "" // policyEffect field,
policyCondition: " (The condition expression that triggers the Effect (optional).)",
policyConsensus: " (The consensus expression that triggers the Effect (optional).)",
policyNotes: " (Accompanying notes for a Policy (optional).)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_POLICY_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updatePolicyIntentV2": {
"policyId": "",
"policyName": "",
"policyEffect": "",
"policyCondition": "",
"policyConsensus": "",
"policyNotes": ""
}
},
"result": {
"updatePolicyResultV2": {
"policyId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update private key tag
Source: https://docs.turnkey.com/api-reference/activities/update-private-key-tag
Update human-readable name or associated private keys. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.
Enum options: `ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Private Key Tag.
The new, human-readable name for the tag with the given ID.
A list of Private Keys IDs to add this tag to.
Array item type: string
item field
A list of Private Key IDs to remove this tag from.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updatePrivateKeyTagIntent object
Unique identifier for a given Private Key Tag.
The new, human-readable name for the tag with the given ID.
A list of Private Keys IDs to add this tag to.
item field
A list of Private Key IDs to remove this tag from.
item field
The result of the activity
The updatePrivateKeyTagResult object
Unique identifier for a given Private Key Tag.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_private_key_tag \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"privateKeyTagId": "",
"newPrivateKeyTagName": "",
"addPrivateKeyIds": [
""
],
"removePrivateKeyIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updatePrivateKeyTag({
privateKeyTagId: " (Unique identifier for a given Private Key Tag.)",
newPrivateKeyTagName: " (The new, human-readable name for the tag with the given ID.)",
addPrivateKeyIds: [""] // A list of Private Keys IDs to add this tag to.,
removePrivateKeyIds: [""] // A list of Private Key IDs to remove this tag from.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updatePrivateKeyTagIntent": {
"privateKeyTagId": "",
"newPrivateKeyTagName": "",
"addPrivateKeyIds": [
""
],
"removePrivateKeyIds": [
""
]
}
},
"result": {
"updatePrivateKeyTagResult": {
"privateKeyTagId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update root quorum
Source: https://docs.turnkey.com/api-reference/activities/update-root-quorum
Set the threshold and members of the root quorum. This activity must be approved by the current root quorum.
Enum options: `ACTIVITY_TYPE_UPDATE_ROOT_QUORUM`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
The threshold of unique approvals to reach quorum.
The unique identifiers of users who comprise the quorum set.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateRootQuorumIntent object
The threshold of unique approvals to reach quorum.
The unique identifiers of users who comprise the quorum set.
item field
The result of the activity
The updateRootQuorumResult object
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_root_quorum \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"threshold": "",
"userIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateRootQuorum({
threshold: 0 // The threshold of unique approvals to reach quorum.,
userIds: [""] // The unique identifiers of users who comprise the quorum set.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateRootQuorumIntent": {
"threshold": "",
"userIds": [
""
]
}
},
"result": {
"updateRootQuorumResult": {}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update user
Source: https://docs.turnkey.com/api-reference/activities/update-user
Update a user in an existing organization.
Enum options: `ACTIVITY_TYPE_UPDATE_USER`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
Human-readable name for a User.
The user's email address.
An updated list of User Tags to apply to this User. This field, if not needed, should be an empty array in your request body.
Array item type: string
item field
The user's phone number in E.164 format e.g. +13214567890
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateUserIntent object
Unique identifier for a given User.
Human-readable name for a User.
The user's email address.
An updated list of User Tags to apply to this User. This field, if not needed, should be an empty array in your request body.
item field
The user's phone number in E.164 format e.g. +13214567890
The result of the activity
The updateUserResult object
A User ID.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_user \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_USER",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"userName": "",
"userEmail": "",
"userTagIds": [
""
],
"userPhoneNumber": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateUser({
userId: " (Unique identifier for a given User.)",
userName: " (Human-readable name for a User.)",
userEmail: " (The user's email address.)",
userTagIds: [""] // An updated list of User Tags to apply to this User. This field, if not needed, should be an empty array in your request body.,
userPhoneNumber: " (The user's phone number in E.164 format e.g. +13214567890)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_USER",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateUserIntent": {
"userId": "",
"userName": "",
"userEmail": "",
"userTagIds": [
""
],
"userPhoneNumber": ""
}
},
"result": {
"updateUserResult": {
"userId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update user tag
Source: https://docs.turnkey.com/api-reference/activities/update-user-tag
Update human-readable name or associated users. Note that this activity is atomic: all of the updates will succeed at once, or all of them will fail.
Enum options: `ACTIVITY_TYPE_UPDATE_USER_TAG`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User Tag.
The new, human-readable name for the tag with the given ID.
A list of User IDs to add this tag to.
Array item type: string
item field
A list of User IDs to remove this tag from.
Array item type: string
item field
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateUserTagIntent object
Unique identifier for a given User Tag.
The new, human-readable name for the tag with the given ID.
A list of User IDs to add this tag to.
item field
A list of User IDs to remove this tag from.
item field
The result of the activity
The updateUserTagResult object
Unique identifier for a given User Tag.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_user_tag \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_USER_TAG",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userTagId": "",
"newUserTagName": "",
"addUserIds": [
""
],
"removeUserIds": [
""
]
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateUserTag({
userTagId: " (Unique identifier for a given User Tag.)",
newUserTagName: " (The new, human-readable name for the tag with the given ID.)",
addUserIds: [""] // A list of User IDs to add this tag to.,
removeUserIds: [""] // A list of User IDs to remove this tag from.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_USER_TAG",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateUserTagIntent": {
"userTagId": "",
"newUserTagName": "",
"addUserIds": [
""
],
"removeUserIds": [
""
]
}
},
"result": {
"updateUserTagResult": {
"userTagId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update user's email
Source: https://docs.turnkey.com/api-reference/activities/update-users-email
Update a user's email in an existing organization.
Enum options: `ACTIVITY_TYPE_UPDATE_USER_EMAIL`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
The user's email address. Setting this to an empty string will remove the user's email.
Signed JWT containing a unique id, expiry, verification type, contact
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateUserEmailIntent object
Unique identifier for a given User.
The user's email address. Setting this to an empty string will remove the user's email.
Signed JWT containing a unique id, expiry, verification type, contact
The result of the activity
The updateUserEmailResult object
Unique identifier of the User whose email was updated.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_user_email \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_USER_EMAIL",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"userEmail": "",
"verificationToken": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateUserEmail({
userId: " (Unique identifier for a given User.)",
userEmail: " (The user's email address. Setting this to an empty string will remove the user's email.)",
verificationToken: " (Signed JWT containing a unique id, expiry, verification type, contact)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_USER_EMAIL",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateUserEmailIntent": {
"userId": "",
"userEmail": "",
"verificationToken": ""
}
},
"result": {
"updateUserEmailResult": {
"userId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update user's name
Source: https://docs.turnkey.com/api-reference/activities/update-users-name
Update a user's name in an existing organization.
Enum options: `ACTIVITY_TYPE_UPDATE_USER_NAME`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
Human-readable name for a User.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateUserNameIntent object
Unique identifier for a given User.
Human-readable name for a User.
The result of the activity
The updateUserNameResult object
Unique identifier of the User whose name was updated.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_user_name \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_USER_NAME",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"userName": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateUserName({
userId: " (Unique identifier for a given User.)",
userName: " (Human-readable name for a User.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_USER_NAME",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateUserNameIntent": {
"userId": "",
"userName": ""
}
},
"result": {
"updateUserNameResult": {
"userId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update user's phone number
Source: https://docs.turnkey.com/api-reference/activities/update-users-phone-number
Update a user's phone number in an existing organization.
Enum options: `ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given User.
The user's phone number in E.164 format e.g. +13214567890. Setting this to an empty string will remove the user's phone number.
Signed JWT containing a unique id, expiry, verification type, contact
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateUserPhoneNumberIntent object
Unique identifier for a given User.
The user's phone number in E.164 format e.g. +13214567890. Setting this to an empty string will remove the user's phone number.
Signed JWT containing a unique id, expiry, verification type, contact
The result of the activity
The updateUserPhoneNumberResult object
Unique identifier of the User whose phone number was updated.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_user_phone_number \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"userId": "",
"userPhoneNumber": "",
"verificationToken": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateUserPhoneNumber({
userId: " (Unique identifier for a given User.)",
userPhoneNumber: " (The user's phone number in E.164 format e.g. +13214567890. Setting this to an empty string will remove the user's phone number.)",
verificationToken: " (Signed JWT containing a unique id, expiry, verification type, contact)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateUserPhoneNumberIntent": {
"userId": "",
"userPhoneNumber": "",
"verificationToken": ""
}
},
"result": {
"updateUserPhoneNumberResult": {
"userId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update wallet
Source: https://docs.turnkey.com/api-reference/activities/update-wallet
Update a wallet for an organization.
Enum options: `ACTIVITY_TYPE_UPDATE_WALLET`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier for a given Wallet.
Human-readable name for a Wallet.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateWalletIntent object
Unique identifier for a given Wallet.
Human-readable name for a Wallet.
The result of the activity
The updateWalletResult object
A Wallet ID.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_wallet \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_WALLET",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"walletId": "",
"walletName": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateWallet({
walletId: " (Unique identifier for a given Wallet.)",
walletName: " (Human-readable name for a Wallet.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_WALLET",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateWalletIntent": {
"walletId": "",
"walletName": ""
}
},
"result": {
"updateWalletResult": {
"walletId": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Update webhook endpoint
Source: https://docs.turnkey.com/api-reference/activities/update-webhook-endpoint
Update a webhook endpoint for an organization.
Enum options: `ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
Unique identifier of the webhook endpoint to update.
Updated destination URL for webhook delivery.
Updated human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The updateWebhookEndpointIntent object
Unique identifier of the webhook endpoint to update.
Updated destination URL for webhook delivery.
Updated human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
The result of the activity
The updateWebhookEndpointResult object
Unique identifier of the updated webhook endpoint.
webhookEndpoint field
Unique identifier of the webhook endpoint.
Unique identifier for a given Organization.
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
Current subscriptions attached to this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_webhook_endpoint \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"endpointId": "",
"url": "",
"name": "",
"isActive": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateWebhookEndpoint({
endpointId: " (Unique identifier of the webhook endpoint to update.)",
url: " (Updated destination URL for webhook delivery.)",
name: " (Updated human-readable name for this webhook endpoint.)",
isActive: true // Whether this webhook endpoint is active.
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"updateWebhookEndpointIntent": {
"endpointId": "",
"url": "",
"name": "",
"isActive": ""
}
},
"result": {
"updateWebhookEndpointResult": {
"endpointId": "",
"webhookEndpoint": {
"endpointId": "",
"organizationId": "",
"url": "",
"name": "",
"isActive": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Verify generic OTP
Source: https://docs.turnkey.com/api-reference/activities/verify-generic-otp
Verify a generic OTP.
Enum options: `ACTIVITY_TYPE_VERIFY_OTP_V2`
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
The parameters object containing the specific intent data for this activity.
UUID representing an OTP flow. A new UUID is created for each init OTP activity.
Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT\_OTP activity result.
Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours)
Enable to have your activity generate and return App Proofs, enabling verifiability.
A successful response returns the following fields:
The activity object containing type, intent, and result
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
The activity status
The activity type
The intent of the activity
The verifyOtpIntentV2 object
UUID representing an OTP flow. A new UUID is created for each init OTP activity.
Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT\_OTP activity result.
Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours)
The result of the activity
The verifyOtpResult object
Signed JWT containing a unique id, expiry, verification type, contact. Verification status of a user is updated when the token is consumed (in OTP\_LOGIN requests)
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
An artifact verifying a User's action.
Whether the activity can be approved.
Whether the activity can be rejected.
The creation timestamp.
The last update timestamp.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/verify_otp \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_VERIFY_OTP_V2",
"timestampMs": " (e.g. 1746736509954)",
"organizationId": " (Your Organization ID)",
"parameters": {
"otpId": "",
"encryptedOtpBundle": "",
"expirationSeconds": ""
}
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().verifyOtp({
otpId: " (UUID representing an OTP flow. A new UUID is created for each init OTP activity.)",
encryptedOtpBundle: " (Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT_OTP activity result.)",
expirationSeconds: " (Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours))"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_VERIFY_OTP_V2",
"organizationId": "",
"timestampMs": " (e.g. 1746736509954)",
"result": {
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"verifyOtpIntentV2": {
"otpId": "",
"encryptedOtpBundle": "",
"expirationSeconds": ""
}
},
"result": {
"verifyOtpResult": {
"verificationToken": ""
}
},
"votes": "",
"fingerprint": "",
"canApprove": "",
"canReject": "",
"createdAt": "",
"updatedAt": ""
}
}
}
}
```
# Get Account
Source: https://docs.turnkey.com/api-reference/auth-proxy/account
Return organization id associated with a given phone number, email, public key, credential ID or OIDC token.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
Specifies the type of filter to apply, i.e 'CREDENTIAL\_ID', 'NAME', 'USERNAME', 'EMAIL', 'PHONE\_NUMBER', 'OIDC\_TOKEN' or 'PUBLIC\_KEY'
The value of the filter to apply for the specified type. For example, a specific email or name string.
Signed JWT containing a unique id, expiry, verification type, contact. Used to verify access to PII (email/phone number) when filter\_type is 'EMAIL' or 'PHONE\_NUMBER'.
OIDC token to verify access to PII (email/phone number) when filter\_type is 'EMAIL' or 'PHONE\_NUMBER'. Needed for social linking when verification\_token is not available.
A successful response returns the following fields:
organizationId field
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/account \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"filterType": "",
"filterValue": "",
"verificationToken": "",
"oidcToken": ""
}'
```
```json 200 theme={"system"}
{
"organizationId": ""
}
```
# OAuth Login
Source: https://docs.turnkey.com/api-reference/auth-proxy/oauth-login
Login using an OIDC token and public key.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
Base64 encoded OIDC token
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request
Invalidate all other previously generated Login API keys
Unique identifier for a given Organization. If provided, this organization id will be used directly. If omitted, uses the OIDC token to look up the associated organization id.
A successful response returns the following fields:
Signed JWT containing an expiry, public key, session type, user id, and organization id
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/oauth_login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"oidcToken": "",
"publicKey": "",
"invalidateExisting": "",
"organizationId": ""
}'
```
```json 200 theme={"system"}
{
"session": ""
}
```
# OAuth 2.0 Authenticate
Source: https://docs.turnkey.com/api-reference/auth-proxy/oauth2-authenticate
Authenticate with an OAuth 2.0 provider and receive an OIDC token issued by Turnkey in response.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The auth\_code provided by the OAuth 2.0 to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow
The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider
The code verifier used by OAuth 2.0 PKCE providers
A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key
The client ID registered with the OAuth 2.0 provider
A successful response returns the following fields:
A Turnkey issued OIDC token to be used with the LoginWithOAuth activity
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/oauth2_authenticate \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"provider": "",
"authCode": "",
"redirectUri": "",
"codeVerifier": "",
"nonce": "",
"clientId": ""
}'
```
```json 200 theme={"system"}
{
"oidcToken": ""
}
```
# Init OTP
Source: https://docs.turnkey.com/api-reference/auth-proxy/otp-init
Start a new OTP flow and return a new OTP flow ID.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
Enum to specify whether to send OTP code via SMS or email
Email or phone number to send the OTP code to
emailCustomization field
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
A successful response returns the following fields:
Unique identifier for an OTP flow.Signed bundle containing a target encryption key to use when submitting OTP codes.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/otp_init_v2 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"otpType": "",
"contact": "",
"emailCustomization": {
"templateId": ""
}
}'
```
```json 200 theme={"system"}
{
"otpId": "",
"otpEncryptionTargetBundle": ""
}
```
# OTP Login
Source: https://docs.turnkey.com/api-reference/auth-proxy/otp-login
Login using an existing OTP Verification Token and a client-side signature. The signature's public key must match the public key contained within the OTP Verification Token.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
Session containing a unique id, expiry, verification type, contact. Verification status of a user is updated when the token is consumed (in OTP\_LOGIN requests)
Client-side public key generated by the user, used as the session public key upon successful login.
clientSignature field
The public component of a cryptographic key pair used to create the signature.
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Invalidate all other previously generated Login sessions
Unique identifier for a given Organization. If provided, this organization id will be used directly. If omitted, uses the verification token to look up the verified sub-organization based on the contact and verification type.
A successful response returns the following fields:
Session containing an expiry, public key, session type, user id, and organization id
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/otp_login_v2 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"verificationToken": "",
"publicKey": "",
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
},
"invalidateExisting": "",
"organizationId": ""
}'
```
```json 200 theme={"system"}
{
"session": ""
}
```
# Verify OTP
Source: https://docs.turnkey.com/api-reference/auth-proxy/otp-verify
Verify the OTP code previously sent to the user's contact and return a verification token.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
ID representing the result of an init OTP activity.
Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT\_OTP activity result.
A successful response returns the following fields:
Verification Token containing a unique id, expiry, verification type, contact signed by Turnkey's enclaves. Verification status of a user is updated when the token is consumed (in OTP\_LOGIN requests)
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/otp_verify_v2 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"otpId": "",
"encryptedOtpBundle": ""
}'
```
```json 200 theme={"system"}
{
"verificationToken": ""
}
```
# Signup
Source: https://docs.turnkey.com/api-reference/auth-proxy/signup
Onboard a new user.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
userEmail field
userPhoneNumber field
userTag field
userName field
organizationName field
verificationToken field
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
clientSignature field
The public component of a cryptographic key pair used to create the signature.
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
A successful response returns the following fields:
organizationId field
wallet field
walletId field
A list of account addresses.
item field
Root user ID created for this sub-organization
A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations.
scheme field
Enum options: `SIGNATURE_SCHEME_EPHEMERAL_KEY_P256`
Ephemeral public key.
JSON serialized AppProofPayload.
Signature over hashed proof\_payload.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/signup_v2 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{
"userEmail": "",
"userPhoneNumber": "",
"userTag": "",
"userName": "",
"organizationName": "",
"verificationToken": "",
"apiKeys": [
{
"apiKeyName": "",
"publicKey": "",
"curveType": "",
"expirationSeconds": ""
}
],
"authenticators": [
{
"authenticatorName": "",
"challenge": "",
"attestation": {
"credentialId": "",
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
]
}
}
],
"oauthProviders": [
{
"providerName": "",
"oidcToken": "",
"oidcClaims": {
"iss": "",
"sub": "",
"aud": ""
}
}
],
"wallet": {
"walletName": "",
"accounts": [
{
"curve": "",
"pathFormat": "",
"path": "",
"addressFormat": "",
"name": ""
}
],
"mnemonicLength": ""
},
"clientSignature": {
"publicKey": "",
"scheme": "",
"message": "",
"signature": ""
}
}'
```
```json 200 theme={"system"}
{
"organizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"userId": "",
"appProofs": [
{
"scheme": "",
"publicKey": "",
"proofPayload": "",
"signature": ""
}
]
}
```
# Get WalletKit Config
Source: https://docs.turnkey.com/api-reference/auth-proxy/wallet-kit-config
Get wallet kit settings and feature toggles for the calling organization.
Your Auth Proxy config ID, found in **Dashboard → AUTH**. See [Auth Proxy reference](/reference/auth-proxy) for setup.
A successful response returns the following fields:
List of enabled authentication providers (e.g., 'facebook', 'google', 'apple', 'email', 'sms', 'passkey', 'wallet')
item field
Session expiration duration in secondsThe organization ID this configuration applies toMapping of social login providers to their OAuth client IDs.OAuth redirect URL to be used for social login flows.otpAlphanumeric fieldotpLength field
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://authproxy.turnkey.com/v1/wallet_kit_config \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Auth-Proxy-Config-Id: (see Authorizations)" \
--data '{}'
```
```json 200 theme={"system"}
{
"enabledProviders": [
""
],
"sessionExpirationSeconds": "",
"organizationId": "",
"oauthClientIds": "",
"oauthRedirectUrl": "",
"otpAlphanumeric": "",
"otpLength": ""
}
```
# Errors
Source: https://docs.turnkey.com/api-reference/overview/errors
Error codes, messages, and troubleshooting guide for the Turnkey API.
An error returned by the Turnkey API might look something like this:
```bash theme={"system"}
Turnkey error 3: organization mismatch: request is targeting organization ("USER SUB ORG"), but voters are in organization ("OUR MAIN ORG") (Details: [{"@type":"type.googleapis.com/errors.v1.TurnkeyErrorDetail","turnkeyErrorCode":"ORGANIZATION_MISMATCH"}])
```
Within this error message there are a few different parts that are worth breaking down. First the GRPC Error code:
```bash theme={"system"}
Turnkey error 3:
```
This GRPC error wraps what we call a Turnkey Error which looks something like:
```bash theme={"system"}
organization mismatch: request is targeting organization ("USER SUB ORG"), but voters are in organization ("OUR MAIN ORG")
```
And when available, a `turnkeyErrorCode` in the Details section:
```bash theme={"system"}
(Details: [{"@type":"type.googleapis.com/errors.v1.TurnkeyErrorDetail","turnkeyErrorCode":"ORGANIZATION_MISMATCH"}])
```
## Error handling best practices
What matters most for error handling is the **Turnkey Error**: the human-readable message and `turnkeyErrorCode` (when available). You should **not** perform error handling based on the GRPC code - these are used internally and will eventually be removed. More on that [here](#grpc-error-codes).
**Understanding TurnkeyErrorCodes:** These codes represent **categories** of errors, not specific messages. For example, `SIGNATURE_INVALID` may appear with messages like "could not verify WebAuthn signature" or "could not verify api key signature". Use the `turnkeyErrorCode` to identify the error category programmatically, and use the human-readable message for specific details.
### Available TurnkeyErrorCodes
The following error codes may be returned in error details:
| Code | Description |
| :------------------------------- | :---------------------------------------------------------------------------------------------------------------- |
| `UNSPECIFIED` | Error code not specified |
| `INTERNAL` | Internal server error |
| `ORGANIZATION_NOT_FOUND` | The specified organization could not be found |
| `API_OPERATIONS_DISABLED` | Global API access is temporarily disabled |
| `SIGNING_QUOTA_EXCEEDED` | Organization has exceeded its signing quota and cannot execute activities |
| `REQUEST_NOT_AUTHORIZED` | Request is not authorized - may occur when accessing resources outside permissions or beyond session restrictions |
| `PUBLIC_KEY_NOT_FOUND` | Public key could not be found in the organization or its parent |
| `RATE_LIMIT_EXCEEDED` | Organization has been rate limited and cannot execute activities |
| `SIGNATURE_MISSING` | Required authentication signature is missing from the request |
| `SIGNATURE_INVALID` | Could not verify API key or WebAuthn signature |
| `CREDENTIAL_NOT_FOUND` | Credential or WebAuthn authenticator not found in organization or its parent |
| `CREDENTIAL_CONFLICT` | Multiple sub-organizations are associated with this credential, creating ambiguous authentication |
| `API_KEY_EXPIRED` | The API key has expired and can no longer be used |
| `REQUEST_INVALID` | Request contains invalid or missing required parameters |
| `FORBIDDEN` | User does not have permission to view or access this organization |
| `UNAUTHENTICATED` | Authentication failed - request lacks valid authentication credentials |
| `UNSUPPORTED_TRANSACTION_TYPE` | Transaction type is not supported (supported: Ethereum, Solana, Tron, Bitcoin, Tempo) |
| `INVALID_TRANSACTION` | Transaction structure is invalid (e.g., too many addresses in Solana transaction) |
| `INVALID_OIDC_TOKEN` | OIDC token is invalid or missing required claims (aud, sub, iss) |
| `INVALID_ORGANIZATION_ID` | Organization ID is invalid or malformed (must be a valid UUID) |
| `OAUTH2_CREDENTIAL_NOT_FOUND` | The specified OAuth 2.0 credential could not be found |
| `OAUTH2_PROVIDER_NOT_FOUND` | The specified OAuth 2.0 provider could not be found |
| `INVALID_OAUTH2_PROVIDER` | OAuth 2.0 provider configuration is invalid or misconfigured |
| `OAUTH2_PROVIDER_NOT_CONFIGURED` | OAuth 2.0 provider has not been configured for this organization |
| `INVALID_ACTIVITY_CALLER` | This activity cannot be called by sub-organizations |
| `WALLET_ACCOUNT_NOT_EXPORTED` | Wallet account has not been exported and cannot be deleted without export |
| `INVALID_TIME` | Time range is invalid or results in excessive intervals |
| `RPC_CALL_ERROR` | RPC provider communication error |
| `INVALID_EMAIL` | Email address is invalid - check format, domain, and TLD (Top-Level Domain) |
| `INVALID_FQDN` | Email domain could not be reached or verified |
| `OAUTH_PROVIDER_ALREADY_EXISTS` | OAuth provider with same audience, subject, and issuer already exists |
| `EMAIL_SENDING_DISABLED` | Email sending functionality is currently disabled |
Not all errors currently include a `turnkeyErrorCode`, though we aim to include one in all customer-facing errors. If you encounter an error where you would expect a `turnkeyErrorCode` but don't see one, please contact Turnkey support.
## Detailed error messages
The below table enumerates common errors across different actions that can be taken using the API. It contains GRPC codes, HTTP codes, and error messages. More on GRPC error codes [below](#grpc-error-codes). Click on the message to view detailed explanation of possible causes and troubleshooting tips for that specific error.
| GRPC Code | HTTP Code | Message |
| :---------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| InvalidArgument | 400 | [malformed organization ID provided](#malformed-organization-id-provided) |
| InvalidArgument | 400 | [bad request body](#bad-request-body) |
| InvalidArgument | 400 | [failed to load organizations](#failed-to-load-organizations) |
| InvalidArgument | 400 | [policy label must be unique](#policy-label-must-be-unique) |
| InvalidArgument | 400 | [invalid policy consensus](#invalid-policy-consensus) |
| InvalidArgument | 400 | [invalid policy condition](#invalid-policy-condition) |
| InvalidArgument | 400 | [quorum threshold must be non-zero integer](#quorum-threshold-must-be-non-zero-integer) |
| InvalidArgument | 400 | [quorum users missing](#quorum-users-missing) |
| InvalidArgument | 400 | [invalid api key expiration](#invalid-api-key-expiration) |
| InvalidArgument | 400 | [missing parameter: user authenticator attestation](#missing-parameter-user-authenticator-attestation) |
| InvalidArgument | 400 | [invalid authenticator attestation](#invalid-authenticator-attestation) |
| InvalidArgument | 400 | [missing parameter: user authenticator attestation auth data](#missing-parameter-user-authenticator-attestation-auth-data) |
| InvalidArgument | 400 | [missing wallet params](#missing-wallet-params) |
| InvalidArgument | 400 | [invalid path format](#invalid-path-format) |
| InvalidArgument | 400 | [invalid path](#invalid-path) |
| InvalidArgument | 400 | [invalid address format](#invalid-address-format) |
| InvalidArgument | 400 | [invalid curve](#invalid-curve) |
| InvalidArgument | 400 | [curve required](#curve-required) |
| InvalidArgument | 400 | [invalid payload encoding](#invalid-payload-encoding) |
| InvalidArgument | 400 | [invalid hash function](#invalid-hash-function) |
| InvalidArgument | 400 | [invalid magic link template](#invalid-magic-link-template) |
| InvalidArgument | 400 | [failed to get email template contents](#failed-to-get-email-template-contents) |
| InvalidArgument | 400 | [failed to unmarshal template variables](#failed-to-unmarshal-template-variables) |
| InvalidArgument | 400 | [organization mismatch](#organization-mismatch) |
| InvalidArgument | 400 | [invalid wallet account UUID](#invalid-wallet-account-uuid) |
| InvalidArgument | 400 | [wallet account not part of your organization](#wallet-account-not-part-of-your-organization) |
| InvalidArgument | 400 | [wallet account has not been exported](#wallet-account-has-not-been-exported) |
| InvalidArgument | 400 | [invalid OIDC token](#invalid-oidc-token) |
| InvalidArgument | 400 | [invalid email address](#invalid-email-address) |
| InvalidArgument | 400 | [could not reach email](#could-not-reach-email) |
| InvalidArgument | 400 | [auth\_code must be set](#oauth2-parameter-errors) |
| InvalidArgument | 400 | [code\_verifier must be set](#oauth2-parameter-errors) |
| InvalidArgument | 400 | [oauth2\_credential\_id must be set](#oauth2-parameter-errors) |
| InvalidArgument | 400 | [redirect\_uri must be set](#oauth2-parameter-errors) |
| InvalidArgument | 400 | [client\_id must be set](#oauth2-parameter-errors) |
| Unauthenticated | 401 | [no valid authentication signature found for request](#no-valid-authentication-signature-found-for-request) |
| Unauthenticated | 401 | [could not find public key in organization](#could-not-find-public-key-in-organization) |
| Unauthenticated | 401 | [failed while looking up public key in parent organization](#failed-while-looking-up-public-key-in-parent-organization) |
| Unauthenticated | 401 | [could not find public key in organization or its parent organization](#could-not-find-public-key-in-organization-or-its-parent-organization) |
| Unauthenticated | 401 | [could not verify WebAuthN signature](#could-not-verify-webauthn-signature) |
| Unauthenticated | 401 | [credential ID could not be found in organization or its parent organization](#credential-id-could-not-be-found-in-organization-or-its-parent-organization) |
| Unauthenticated | 401 | [public key could not be found in organization or its parent organization](#public-key-could-not-be-found-in-organization-or-its-parent-organization) |
| Unauthenticated | 401 | [more than one suborg associated with a credential ID](#more-than-one-suborg-associated-with-a-credential-id) |
| Unauthenticated | 401 | [more than one suborg associated with a public key](#more-than-one-suborg-associated-with-a-public-key) |
| Unauthenticated | 401 | [could not verify api key signature](#could-not-verify-api-key-signature) |
| Unauthenticated | 401 | [expired api key](#expired-api-key) |
| Unauthenticated | 401 | [malformed activity stamp](#malformed-activity-stamp) |
| Unauthenticated | 401 | [could not extract webauthn stamp](#could-not-extract-webauthn-stamp) |
| Unauthenticated | 401 | [could not extract api key stamp](#could-not-extract-api-key-stamp) |
| Unauthenticated | 401 | [cannot authenticate public API activity request without a stamp (X-Stamp/X-Stamp-Webauthn header)](#cannot-authenticate-public-api-activity-request-without-a-stamp-x-stampx-stamp-webauthn-header) |
| PermissionDenied | 403 | [request not authorized](#request-not-authorized) |
| PermissionDenied | 403 | [api operations disabled](#api-operations-disabled) |
| PermissionDenied | 403 | [authentication failed](#authentication-failed) |
| NotFound | 404 | [webauthn authenticator not found in organization](#webauthn-authenticator-not-found-in-organization) |
| NotFound | 404 | [webauthn authenticator not found in organization or parent organization](#webauthn-authenticator-not-found-in-organization-or-parent-organization) |
| NotFound | 404 | [no organization found with the given ID](#no-organization-found-with-the-given-id) |
| NotFound | 404 | [No activity found with fingerprint. Consensus activities must target an existing activity by fingerprint](#no-activity-found-with-fingerprint-consensus-activities-must-target-an-existing-activity-by-fingerprint) |
| ResourceExhausted | 429 | [user has exceeded maximum authenticators](#user-has-exceeded-maximum-authenticators) |
| ResourceExhausted | 429 | [user has exceeded maximum long-lived api keys](#user-has-exceeded-maximum-long-lived-api-keys) |
| ResourceExhausted | 429 | [user has exceeded maximum short-lived api keys](#user-has-exceeded-maximum-short-lived-api-keys) |
| ResourceExhausted | 429 | [this organization cannot execute activities because it is over its allotted quota. Please reach out to the Turnkey team (help@turnkey.com) for more information.](#this-organization-cannot-execute-activities-because-it-is-over-its-allotted-quota-please-reach-out-to-the-turnkey-team-helpturnkeycom-for-more-information) |
| ResourceExhausted | 429 | [this sub-organization cannot execute activities because its parent is over its allotted quota. Please reach out to the Turnkey team (help@turnkey.com) for more information.](#this-sub-organization-cannot-execute-activities-because-its-parent-is-over-its-allotted-quota-please-reach-out-to-the-turnkey-team-helpturnkeycom-for-more-information) |
| ResourceExhausted | 429 | [this organization cannot execute activities because it has been rate limited. Please reach out to the Turnkey team (help@turnkey.com) for more information.](#this-organization-cannot-execute-activities-because-it-has-been-rate-limited-please-reach-out-to-the-turnkey-team-helpturnkeycom-for-more-information) |
| ResourceExhausted | 429 | [this sub-organization cannot execute activities because its parent has been rate limited. Please reach out to the Turnkey team (help@turnkey.com) for more information.](#this-sub-organization-cannot-execute-activities-because-its-parent-has-been-rate-limited-please-reach-out-to-the-turnkey-team-helpturnkeycom-for-more-information) |
| Internal | 500 | [internal server error](#internal-server-error) |
## GRPC error codes
Turnkey uses GRPC internally to communicate with our internal services whenever an API request is made. Due to this some errors will be wrapped with GRPC error messages. These error codes are listed below for your convenience, however these will not remain in Turnkey error messages forever and you should **not** do error handling based on these codes as these could be removed at any time. In the following example `Turnkey error 3:` represents a grpc error (error code 3, INVALID\_ARGUMENT) wrapping a Turnkey error.
Example
```bash theme={"system"}
Turnkey error 3: organization mismatch: request is targeting organization ("USER SUB ORG"), but voters are in organization ("OUR MAIN ORG")
```
### GRPC status codes reference
| Code | Number | Description |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OK | 0 | Not an error; returned on success. |
| CANCELLED | 1 | The operation was cancelled, typically by the caller. |
| UNKNOWN | 2 | Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. |
| INVALID\_ARGUMENT | 3 | The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). |
| DEADLINE\_EXCEEDED | 4 | The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long |
| NOT\_FOUND | 5 | Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. |
| ALREADY\_EXISTS | 6 | The entity that a client attempted to create (e.g., file or directory) already exists. |
| PERMISSION\_DENIED | 7 | The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. |
| RESOURCE\_EXHAUSTED | 8 | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. |
| FAILED\_PRECONDITION | 9 | The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level (e.g., when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence). (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. |
| ABORTED | 10 | The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. |
| OUT\_OF\_RANGE | 11 | The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range \[0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. |
| UNIMPLEMENTED | 12 | The operation is not implemented or is not supported/enabled in this service. |
| INTERNAL | 13 | Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. |
| UNAVAILABLE | 14 | The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. |
| DATA\_LOSS | 15 | Unrecoverable data loss or corruption. |
| UNAUTHENTICATED | 16 | The request does not have valid authentication credentials for the operation. |
Source: [https://grpc.io/docs/guides/status-codes/](https://grpc.io/docs/guides/status-codes/)
## Troubleshooting
### no organization found with the given ID
Common causes:
* An unknown organization ID was passed in a request made to the Turnkey API
Troubleshooting tips:
* Confirm that you are using the proper Organization ID. All Turnkey resources are identified with a UUID, so confirm you are not passing a different resource's UUID as the organization ID in your request.
### malformed organization ID provided
Common causes:
* An improperly formatted organization ID UUID was passed in a request made to the Turnkey API
Troubleshooting tips:
* Confirm the the UUID conforms to the UUID standard `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX`
### bad request body
Common causes:
* A malformed request body was passed in a request made to the Turnky API
Troubleshooting tips:
* A typical activity request has the `type`, `timestampMS`, and `organizationId` parameters at the top level and then a `parameters` parameter with more specific parameters based on the request type. For example a CREATE\_WALLET activity request body might look something like this:
```json theme={"system"}
{
"type": "ACTIVITY_TYPE_CREATE_WALLET",
"timestampMs": "",
"organizationId": "string",
"parameters": {
"walletName": "string",
"accounts": [
{
"curve": "CURVE_SECP256K1",
"pathFormat": "PATH_FORMAT_BIP32",
"path": "string",
"addressFormat": "ADDRESS_FORMAT_UNCOMPRESSED"
}
],
"mnemonicLength": 0
}
}
```
* A get resource request body might look slightly different with less fields. An example of a GET\_WALLET request body looks something like this:
```json theme={"system"}
{
"organizationId": "string",
"walletId": "string"
}
```
### api operations disabled
Common causes:
* Turnkey has disabled API operations globally.
Troubleshooting tips:
* This situation will only happen in the most extreme case and should not be something you need to worry about.
### this organization cannot execute activities because it is over its allotted quota. Please reach out to the Turnkey team ([help@turnkey.com](mailto:help@turnkey.com)) for more information.
Common causes:
* You have exceeded your monthly signing quota. The first 25 signatures a month are free for "free" users.
* You have reached a resource limit on a particular resource. You can find out about our resource limits [here](/reference/resource-limits).
Troubleshooting tips:
* If you need to increase your signature limit take a look at our [pricing page](https://www.turnkey.com/pricing) and contact us at [help@turnkey.com](mailto:help@turnkey.com)!
* Resource limits are imposed globally and cannot be increased, speak with our team at [help@turnkey.com](mailto:help@turnkey.com) to understand how to better integrate Turnkey with your system to utilize Turnkey to its highest potential.
### this sub-organization cannot execute activities because its parent is over its allotted quota. Please reach out to the Turnkey team ([help@turnkey.com](mailto:help@turnkey.com)) for more information.
Common causes:
* You have exceeded your monthly signing quota. The first 25 signatures a month are free for "free" users.
* You have reached a resource limit on a particular resource. You can find out about our resource limits [here](/reference/resource-limits).
Troubleshooting tips:
* If you need to increase your signature limit take a look at our [pricing page](https://www.turnkey.com/pricing) and contact us at [help@turnkey.com](mailto:help@turnkey.com)!
* Resource limits are imposed globally and cannot be increased, speak with our team at [help@turnkey.com](mailto:help@turnkey.com) to understand how to better integrate Turnkey with your system to utilize Turnkey to its highest potential.
### this organization cannot execute activities because it has been rate limited. Please reach out to the Turnkey team ([help@turnkey.com](mailto:help@turnkey.com)) for more information.
Common causes:
* You have exceeded your rate limit. We need to maintain a per-customer rate limit to ensure that the service we provide to all of our customers service can be exceptional.
Troubleshooting tips:
* If you are interested in increasing your rate limit reach out to us at [help@turnkey.com](mailto:help@turnkey.com)!
### this sub-organization cannot execute activities because its parent has been rate limited. Please reach out to the Turnkey team ([help@turnkey.com](mailto:help@turnkey.com)) for more information.
Common causes:
* You have exceeded your rate limit. We need to maintain a per-customer rate limit to ensure that the service we provide to all of our customers service can be exceptional.
Troubleshooting tips:
* If you are interested in increasing your rate limit reach out to us at [help@turnkey.com](mailto:help@turnkey.com)!
### request not authorized
Common causes:
* A user that created a request is not allowed to complete the action that was requested.
* For example a parent-organization trying to create a wallet within a sub-organization that does not have a delegated access API key.
Troubleshooting tips:
* Confirm that you are using the correct credentials for the request you are making.
* Confirm that all necessary [policies](/features/policies/overview) are in place so that the action that is requested can be performed.
### no valid authentication signature found for request
Common causes:
* No signature, or [stamp](/api-reference/overview/stamps), is attached to a request. All requests made to Turnkey's api must be stamped so that Turnkey can authenticate and authorize the user who performed the request.
Troubleshooting tips:
* Take a look at the page on [stamps](/api-reference/overview/stamps) to get some information about stamps, what they are, and how they are created.
* At a base level our SDK's abstract away the complicated stamping process for you. [Here](https://github.com/tkhq/sdk/tree/main/examples) are some example projects with our JS/TS SDK to get you started!
### could not find public key in organization
Common causes:
* The public key corresponding to the signature in a stamp is not found in the organization the request is targeting. This means that a request was formatted properly, but the authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### failed while looking up public key in parent organization
Common causes:
* The public key corresponding to the signature in a stamp is not found in the organization the request is targeting. This means that a request was formatted properly, but the authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### could not find public key in organization or its parent organization
Common causes:
* The public key corresponding to the signature in a stamp is not found in the organization the request is targeting. This means that a request was formatted properly, but the authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### could not verify WebAuthN signature
Common causes:
* The signature used to create a stamp for a request cannot be verified for the organization the request is targeting. Again this means the request is formatted properly, but the authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### credential ID could not be found in organization or its parent organization
Common causes:
* Turnkey cannot translate a public key obtained from a stamp that was created with a WebAuthn authenticator to a parent organization or one of its corresponding sub-organizations that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### public key could not be found in organization or its parent organization
Common causes:
* Turnkey cannot translate a public key obtained from a stamp to a parent organization or one of its corresponding sub-organizations that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticators to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### more than one suborg associated with a credential ID
Common causes:
* This error occurs for requests like [whoami](/api-reference/queries/who-am-i). In particular this request tries to go backwards from the stamp to the public key then to a corresponding sub-orgnaization under a parent organization. If there are multiple sub-organizations with the same public key corresponding to an authenticator it is unknown who is initiating that particular request without more context.
Troubleshooting tips:
* Inlcude the sub-organization ID in the whoami request body.
* Avoid including the same authenticator in multiple sub-organizations
### more than one suborg associated with a public key
Common causes:
* This error occurs for requests like [whoami](/api-reference/queries/who-am-i). In particular this request tries to go backwards from the stamp to the public key then to a corresponding sub-orgnaization under a parent organization. If there are multiple sub-organizations with the same public key it is unknown who is initiating that particular request without more context.
Troubleshooting tips:
* Inlcude the sub-organization ID in the whoami request body.
* Avoid including the same authenticator in multiple sub-organizations
### could not verify api key signature
Common causes:
* The signature used to create a stamp for a request cannot be verified for the organization the request is targeting. This means the request is formatted properly, but the api-key used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper api-keys to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### expired api key
Common causes:
* The API key used for the request has expired
Troubleshooting tips:
* Create a new API key to use for the request
* Create an API key that doesn't expire
### malformed activity stamp
Common causes:
* The stamp attached to a request is not formatted properly.
Troubleshooting tips:
* Take a look at the page on [stamps](/api-reference/overview/stamps) to get some information about stamps, what they are, and how they are created.
* At a base level our SDK's abstract away the complicated stamping process for you. [Here](https://github.com/tkhq/sdk/tree/main/examples) are some example projects with our JS/TS SDK to get you started!
### could not extract webauthn stamp
Common causes:
* A stamp is not attached to a request.
Troubleshooting tips:
* Take a look at the page on [stamps](/api-reference/overview/stamps) to get some information about stamps, what they are, and how they are created.
* At a base level our SDK's abstract away the complicated stamping process for you. [Here](https://github.com/tkhq/sdk/tree/main/examples) are some example projects with our JS/TS SDK to get you started!
### could not extract api key stamp
Common causes:
* A stamp is not attached to a request.
Troubleshooting tips:
* Take a look at the page on [stamps](/api-reference/overview/stamps) to get some information about stamps, what they are, and how they are created.
* At a base level our SDK's abstract away the complicated stamping process for you. [Here](https://github.com/tkhq/sdk/tree/main/examples) are some example projects with our JS/TS SDK to get you started!
### cannot authenticate public API activity request without a stamp (X-Stamp/X-Stamp-Webauthn header)
Common causes:
* A stamp is not attached to a request.
Troubleshooting tips:
* Take a look at the page on [stamps](/api-reference/overview/stamps) to get some information about stamps, what they are, and how they are created.
* At a base level our SDK's abstract away the complicated stamping process for you. [Here](https://github.com/tkhq/sdk/tree/main/examples) are some example projects with our JS/TS SDK to get you started!
### webauthn authenticator not found in organization
Common causes:
* The signature used to create a stamp for a request cannot be verified for the organization the request is targeting. This means the request is formatted properly, but the webauthn authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticator to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### webauthn authenticator not found in organization or parent organization
Common causes:
* The signature used to create a stamp for a request cannot be verified for the organization the request is targeting. This means the request is formatted properly, but the webauthn authenticator used to create the request is not associated with the organization that the request was made for.
Troubleshooting tips:
* Ensure that you have added the proper authenticator to the organization you are targeting.
* Ensure that you are targeting the proper organization.
### invalid payload encoding
Common causes:
* This error is specific to the [sign\_raw\_payload](/api-reference/signing/sign-raw-payload) endpoint. A valid encoding needs to be passed so that Turnkey can properly sign the requested message.
Troubleshooting tips:
* Use a valid encoding scheme from the following: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`
### invalid hash function
Common causes:
* This error is specific to the [sign\_raw\_payload](/api-reference/signing/sign-raw-payload) endpoint. A valid hash function needs to be passed so that Turnkey can properly hash and sign the requested message.
Troubleshooting tips:
* Use a valid hash function scheme from the following: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
* More information about `HASH_FUNCTION_NO_OP` [here](/reference/faq#what-does-hash_function_no_op-mean)
* More information about `HASH_FUNCTION_NOT_APPLICABLE` [here](/reference/faq#what-is-hash_function_not_applicable-and-how-does-it-differ-from-hash_function_no_op)
### invalid magic link template
Common causes:
* The email template provided for specific activities is invalid.
Troubleshooting tips:
* Read more about [bespoke email templates](/features/authentication/email#bespoke-email-templates)
* Reach out to Turnkey at [help@turnkey.com](mailto:help@turnkey.com)!
### failed to get email template contents
Common causes:
* There was an error getting the email template for an associated activity
Troubleshooting tips:
* Reach out to Turnkey at [help@turnkey.com](mailto:help@turnkey.com)!
### failed to unmarshal template variables
Common causes:
* There are invalid template variables used in your email template.
Troubleshooting tips:
* Read more about [bespoke email templates](/features/authentication/email#bespoke-email-templates)
* Reach out to Turnkey at [help@turnkey.com](mailto:help@turnkey.com)!
### authentication failed
Common causes:
* Turnkey was unable to authenticate the user based on the stamp provided.
Troubleshooting tips:
* Ensure that all proper authenticators and api-keys have been added to the organization.
* Read more about how to create a stamp for a request [here](/api-reference/overview/stamps)
### failed to load organizations
Common causes:
* A request is targeting an unknown organization ID.
Troubleshooting tips:
* Ensure that the passed organization ID in the request is valid.
### policy label must be unique
Common causes:
* A new policy that is to be created shares the same name as a different policy. Policy names must be unique, and names in general must be unique per resource, so that they can be properly identified.
Troubleshooting tips:
* Change the label/name that will be used for the new policy.
* Delete the old policy.
* Update the old policy to have a new name.
### invalid policy consensus
Common causes:
* An invalid consensus expression is passed.
Troubleshooting tips:
* Read more about policy structure [here](/features/policies/overview#policy-structure)
### invalid policy condition
Common causes:
* An invalid condition expression is passed.
Troubleshooting tips:
* Read more about policy structure [here](/features/policies/overview#policy-structure)
### quorum threshold must be non-zero integer
Common causes:
* Quorum is the required amount of approvals by [root quorum members](/features/users/root-quorum) needed for an action to take place within an organization.
Troubleshooting tips:
* When creating a sub-organization or updating the root quroum amount, use a non-zero positive integer.
### quorum users missing
Common causes:
* A user marked as part of the root quorum is missing from the set of users within an organization. This is a validation error that can occur when trying to delete a user that is part of the root quorum.
Troubleshooting tips:
* Before deleting the user, remove them from the root quroum using [Update Root Quorum](/api-reference/organizations/update-root-quorum)
### invalid api key expiration
Common causes:
* An invalid expiration time was passed in for an api key's expiration time parameter when using [Create API Key](/api-reference/api-keys/create-api-keys)
Troubleshooting tips:
* The `expirationSeconds` parameter is passed as string of seconds of how long the key should last. Any non-positive non-integer string will be considered invalid.
### missing parameter: user authenticator attestation
Common causes:
* An attestation parameter is not passed when performing a request regarding an authenticator. For example [Create Authenticators](/api-reference/authenticators/create-authenticators)
Troubleshooting tips:
* The attestation generated by the authenticator includes a new key pair, the challenge, and device metadata that is signed, read more about attestations [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/Attestation_and_Assertion).
* An example of getting the correct parameters needed to use the Create Authenticators endpoint can be found within our [react-components](https://github.com/tkhq/sdk/blob/main/examples/demos/react-components/src/app/dashboard/page.tsx#L246-L276) SDK example
### invalid authenticator attestation
Common causes:
* An attestation parameter is not valid when performing a request regarding an authenticator. For example [Create Authenticators](/api-reference/authenticators/create-authenticators)
Troubleshooting tips:
* The attestation generated by the authenticator includes a new key pair, the challenge, and device metadata that is signed, read more about attestations [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/Attestation_and_Assertion).
* An example of getting the correct parameters needed to use the Create Authenticators endpoint can be found within our [react-components](https://github.com/tkhq/sdk/blob/main/examples/demos/react-components/src/app/dashboard/page.tsx#L246-L276) SDK example
### missing parameter: user authenticator attestation auth data
Common causes:
* The attestation auth data parameter is not valid when performing a request regarding an authenticator. For example [Create Authenticators](/api-reference/authenticators/create-authenticators). This parameter is obtained as part of the attestation object.
Troubleshooting tips:
* An example of getting the correct parameters needed to use the Create Authenticators endpoint can be found within our [react-components](https://github.com/tkhq/sdk/blob/main/examples/demos/react-components/src/app/dashboard/page.tsx#L246-L276) SDK example
### user has exceeded maximum authenticators
Common causes:
* Turnkey allows up to 10 authenticators per user. This is a hard resource limit. More information on resource limits [here](/reference/resource-limits).
Troubleshooting Tips:
* Delete any unnecessary authenticators attached to a user.
* Create a new user within the same organization and attach the authenicator to that user.
### user has exceeded maximum long-lived api keys
Common causes:
* Turnkey allows up to 10 long-lived api keys per user. This is a hard resource limit. More information on resource limits [here](/reference/resource-limits).
Troubleshooting Tips:
* Delete any unnecessary long-lived API keys attached to a user.
* Create a new user within the same organization and attach the API key to that user.
### user has exceeded maximum short-lived api keys
Common causes:
* Turnkey allows up to 10 short-lived api keys per user. This is a hard resource limit. More information on resource limits [here](/reference/resource-limits). Short-lived API keys will automatically be deleted from an organization when they are expired.
Troubleshooting Tips:
* Delete any unnecessary short-lived API keys attached to a user.
* Create a new user within the same organization and attach the API key to that user.
### missing wallet params
Common causes:
* Some wallet/wallet account parameters have been omitted when creating a sub-organization
Troubleshooting tips:
* Include all of the required parameters when creating a wallet during sub-organization creation. More info on the parameters [here](/api-reference/organizations/create-sub-organization).
### invalid path format
Common causes:
* This error occurs when an invalid path format parameter is passed to a request like [Create Wallet Accounts](/api-reference/wallets/create-wallet-accounts).
Troubleshooting tips:
* For now the path format must be: `PATH_FORMAT_BIP32`.
### invalid path
Common causes:
* An invalid path parameter is passed to a request like [Create Wallet Accounts](/api-reference/wallets/create-wallet-accounts). Paths cannot be reused within the same HD wallet.
Troubleshooting tips:
* The path is a string that is used to derive a new account within an HD wallet. A list of default paths per address format can be found [here](/features/wallets#hd-wallet-default-paths)
* Paths cannot be reused within the same HD wallet.
### invalid address format
Common causes:
* An invalid address format parameter is passed to a request like [Create Wallet Accounts](/api-reference/wallets/create-wallet-accounts).
Troubleshooting tips:
* Turnkey offers a wide range of support for many ecosystems. A list of valid address formats can be found in the table [here](/features/wallets#address-formats-and-curves).
* More about Turnkey and general ecosystem support can be found [here](/features/networks/overview).
### invalid curve
Common causes:
* An invalid curve parameter is passed to a request like [Create Wallet Accounts](/api-reference/wallets/create-wallet-accounts).
Troubleshooting tips:
* Before ecosystem level integrations Turnkey offers support on a curve level. This makes us extendable to any ecosystem that is based on a curve we support. A list of valid curve parameters can be found in the table [here](/features/wallets#address-formats-and-curves).
* More about Turnkey and general ecosystem support can be found [here](/features/networks/overview).
### curve required
Common causes:
* The curve parameter is not passed to a request like [Create Wallet Accounts](/api-reference/wallets/create-wallet-accounts).
Troubleshooting tips:
* Before ecosystem level integrations Turnkey offers support on a curve level. This makes us extendable to any ecosystem that is based on a curve we support. A list of valid curve parameters can be found in the table [here](/features/wallets#address-formats-and-curves).
* More about Turnkey and general ecosystem support can be found [here](/features/networks/overview).
### failed to parse transaction
Common causes:
* The unsignedTransaction payload cannot be decoded by the policy engine, it might have not been serlialized properly.
Troubleshooting tips:
* Try to decode the payload independently and see if it returns the expected result.
* We've noticed that for EIP1559 transaction types, the go-ethereum [MarshalBinary()](https://pkg.go.dev/github.com/ethereum/go-ethereum/core/types#Transaction.MarshalBinary) function will include the R, S, V values which should not be present within the serialized payload. Try to reconstruct the RLP payload manually without the R, S, V values, see the example below:
```go theme={"system"}
package main
import (
"encoding/hex"
"fmt"
"log"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
)
func main() {
to := common.HexToAddress("0x...")
txData := &types.DynamicFeeTx{
ChainID: big.NewInt(1),
Nonce: 0,
GasTipCap: big.NewInt(12344),
GasFeeCap: big.NewInt(10010000000),
Gas: 100000,
To: &to,
Value: big.NewInt(1),
Data: hexDecode(""),
AccessList: types.AccessList{}, // Optional
}
// RLP-encode only the fields included in the unsigned tx
unsignedRLP := encodeUnsignedDynamicFeeTx(txData)
// Prepend EIP-1559 type byte (0x02)
serializedUnsigned := append([]byte{types.DynamicFeeTxType}, unsignedRLP...)
fmt.Printf("Unsigned serialized tx: 0x%x\n", serializedUnsigned)
}
func encodeUnsignedDynamicFeeTx(tx *types.DynamicFeeTx) []byte {
rlpInput := []interface{}{
tx.ChainID,
tx.Nonce,
tx.GasTipCap,
tx.GasFeeCap,
tx.Gas,
tx.To,
tx.Value,
tx.Data,
tx.AccessList,
}
out, err := rlp.EncodeToBytes(rlpInput)
if err != nil {
log.Fatalf("failed to encode RLP: %v", err)
}
return out
}
func hexDecode(input string) []byte {
b, err := hex.DecodeString(input)
if err != nil {
log.Fatal(err)
}
return b
}
```
### No activity found with fingerprint. Consensus activities must target an existing activity by fingerprint
Common causes:
* This error occurs during the [Approve/Reject Activity](/api-reference/consensus/approve-activity) activity. The fingerprint parameter must be a fingerprint of a valid activity.
Troubleshooting tips:
* Confirm that a valid fingerprint of an activity that requires approval or rejection is passed as part of this activity.
### internal server error
Common causes:
* This error is thrown for a variety of internal server errors that are not due to user error. These activities will have an error id passed with them like: `internal server error (9fbfda54-7141-4192-ae72-8bac3512149a)` that can be used for troubleshooting.
Troubleshooting tips:
* Retry the activity. This could be a fluke case and the following activity could pass without failure.
* If you think there is problem or if your service is degraded, please reach out to Turnkey [help@turnkey.com](mailto:help@turnkey.com) and provide the error id in the error message.
### organization mismatch
Common causes:
* The request is targeting one organization (e.g., a sub-organization), but the users signing/approving the request belong to a different organization (e.g., the parent organization)
Troubleshooting tips:
* Ensure the `organizationId` in your request matches the organization where your signing users are located
### invalid wallet account UUID
Common causes:
* A malformed or invalid UUID was provided for a wallet account ID
Troubleshooting tips:
* Verify the wallet account ID is a valid UUID in the format `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX`
### wallet account not part of your organization
Common causes:
* Attempting to delete or modify a wallet account that belongs to a different organization
* Using a wallet account ID from another organization
Troubleshooting tips:
* Verify the wallet account ID belongs to your organization
* Check that you're using the correct organization ID in your request
### wallet account has not been exported
Common causes:
* Attempting to delete a wallet account that has not been exported
* The `deleteWithoutExport` parameter is not set to `true` when trying to delete an unexported wallet account
Troubleshooting tips:
* Export the wallet account before deleting it using the export wallet account activity
* Set `deleteWithoutExport` to `true` in your delete request if you want to delete without exporting (use with caution)
### invalid OIDC token
Common causes:
* The OIDC token format is invalid (not a valid JWT with 3 parts)
* Required claims are missing from the OIDC token (`aud`, `sub`, or `iss`)
* The token structure doesn't match the expected format
Troubleshooting tips:
* Verify the OIDC token is a valid JWT with three parts separated by periods (header.payload.signature)
* Ensure the token includes all required claims:
* `aud` (audience): The intended recipient of the token
* `sub` (subject): The user identifier
* `iss` (issuer): The identity provider that issued the token
* Check that your OIDC provider is correctly configured to include these claims
### failed to parse user JSON: missing field `data` (X/Twitter OAuth)
Common causes:
* X (Twitter) legacy Free tier developer apps were not automatically migrated to the new Pay-Per-Use pricing model when X launched their new [developer console and pricing](https://devcommunity.x.com/t/announcing-the-launch-of-x-api-pay-per-use-pricing/256476)
* The app is still on a legacy Free plan, which no longer has access to the `GET /2/users/me` endpoint required for Turnkey's X OAuth flow
Troubleshooting tips:
* Go to [console.x.com](https://console.x.com/) and manually update your app to the **Pay-Per-Use** plan
* This is a one-time migration — once updated, X OAuth with Turnkey should work as expected
### invalid email address
Common causes:
* Email address format is invalid
Troubleshooting tips:
* Verify the email address follows the standard format: `user@domain.com`
* Remove any extra spaces or invalid characters from the email address
### could not reach email
Common causes:
* The email domain cannot be reached or verified
* Invalid MX (Mail Exchange) records for the email domain
* The email provider's servers are unreachable or non-existent
* The domain doesn't have proper DNS configuration
Troubleshooting tips:
* Verify the email domain is a valid, active domain
* Check that the email provider's MX records are properly configured
* Try using an email address from a well-known provider (Gmail, Outlook, etc.) to test
* If you believe this is in error, please contact Turnkey
# Introduction
Source: https://docs.turnkey.com/api-reference/overview/intro
Turnkey's API is a remote procedure call (RPC) API.
## RPC/HTTP
We chose RPC-over-HTTP for convenience and ease-of-use. Most of our users should be able to integrate with our API without a major re-architecture of their existing systems.
Many client libraries are available to make requests to a RPC/HTTP API, across many languages. Turnkey will provide SDKs for the most popular programming languages. For other languages, a RPC/HTTP API ensures there is an easy integration path available via raw http clients.
## POST-only
If you look at the [API reference](/api-reference/overview/intro) you'll notice that all API calls to Turnkey are HTTP POST requests. Requests contain a POST body and a header with a digital signature over the POST body. We call this digital signature a [Stamp](/api-reference/overview/stamps).
Requests must be stamped by registered user credentials and verified by Turnkey's secure enclaves before they are processed. This ensures cryptographic integrity end-to-end which eliminates the ability for any party to modify a user's request.
### Queries and submissions
Turnkey's API is divided into 2 broad categories: queries and submissions.
* Queries are read requests (e.g. `get_users`, `list_users`)
* Submissions are requests to execute a workload (e.g. `create_policy`, `sign_transaction`, `delete_user`)
## Dive deeper
* Creating your first [Stamp](/api-reference/overview/stamps)
* Fetching data with [Queries](/api-reference/queries/overview)
* Executing workloads with [Submissions](/api-reference/activities/overview)
# Stamps
Source: https://docs.turnkey.com/api-reference/overview/stamps
Every request made to Turnkey must include a signature over the POST body attached as a HTTP header. Our secure enclave applications use this signature to verify the integrity and authenticity of the request.
### API keys
To create a valid, API key stamped request follow these steps:
Sign the JSON-encoded POST body with your API key to produce a `signature` (DER-encoded)
Hex encode the `signature`
Create a JSON-encoded stamp:
* `publicKey`: the public key of the API key. Turnkey supports multiple API key curves: `API_KEY_CURVE_P256, API_KEY_CURVE_SECP256K1, API_KEY_CURVE_ED25519`
* `signature`: the signature produced by the API key
* `scheme`: the signature scheme used to sign the request, matching the curve of the `publicKey`. The supported schemes are: `SIGNATURE_SCHEME_TK_API_P256, SIGNATURE_SCHEME_TK_API_SECP256K1, SIGNATURE_SCHEME_TK_API_ED25519, SIGNATURE_SCHEME_TK_API_SECP256K1_EIP191`
Base64URL encode the stamp
Attach the encoded string to your request as a `X-Stamp` header
Submit the stamped request to Turnkey's API
### WebAuthn
To create a valid, WebAuthn authenticator stamped request follow these steps:
Compute the WebAuthn challenge by hashing the POST body bytes (JSON encoded) with SHA256. For example, if the POST body is `{"organization_id": "1234", "type": "ACTIVITY_TYPE_CREATE_API_KEYS", "params": {"for": "example"}}`, the WebAuthn challenge is the string `7e8b4653fc7e51dc119cea031942f4693b4742ceca4dda269b925802b38b2147`
Include the challenge amongst WebAuthn signing options. Refer to the existing stamper implementations in the [following section](#stampers) for examples
* Note that if you need to pass the challenge as bytes, you'll need to utf8-encode the challenge string (in JS, the challenge bytes will be `TextEncoder().encode("7e8b4653fc7e51dc119cea031942f4693b4742ceca4dda269b925802b38b2147")`)
* Additional note for React Native contexts: the resulting string should then additionally be base64-encoded. See [implementation](https://github.com/tkhq/sdk/blob/b52db566e79a65eec8d8e7066053d6a3ac5f3943/packages/react-native-passkey-stamper/src/util.ts#L5-L10)
Create a JSON-encoded stamp:
* `credentialId`: the id of the WebAuthn authenticator
* `authenticatorData`: the authenticator data produced by the WebAuthn assertion
* `clientDataJson`: the client data produced by the WebAuthn assertion
* `signature`: the signature produced by the WebAuthn assertion
Attach the JSON-encoded stamp to your request as a `X-Stamp-Webauthn` header
* Header names are case-insensitive (so `X-Stamp-Webauthn` and `X-Stamp-WebAuthn` are considered equivalent)
* Unlike API key stamps, the format is just JSON; no base64URL encoding necessary! For example: `X-Stamp-Webauthn: {"authenticatorData":"UaQZ...","clientDataJson":"eyJ0...","credentialId":"Grf...","signature":"MEQ..."}`
Submit the stamped request to Turnkey's API. If you would like your client request to be proxied through a backend, refer to the patterns mentioned [here](/features/authentication/passkeys/integration#proxying-signed-requests). An example application that uses this pattern can be found at wallet.tx.xyz (code [here](https://github.com/tkhq/demo-embedded-wallet/))
### Stampers
Our [JS SDK](https://github.com/tkhq/sdk) and [CLI](https://github.com/tkhq/tkcli) abstract request stamping for you. If you choose to use an independent client, you will need to implement this yourself. For reference, check out our implementations:
Our CLI has a `--no-post` option to generate stamps without sending anything over the network. This is a useful tool should you have trouble with debugging stamping-related logic. A sample command might look something like:
```json theme={"system"}
turnkey request --no-post --host api.turnkey.com --path /api/v1/sign --body '{"payload": "hello from TKHQ"}'
{
"curlCommand": "curl -X POST -d'{\"payload\": \"hello from TKHQ\"}' -H'X-Stamp: eyJwdWJsaWNLZXkiOiIwMzI3YTUwMDMyZTZmMDYzMWQ1NjA1YjZhZGEzMmI3NzkwNzRmMzQ2ZTgxYjY4ZTEyODAxNjQwZjFjOWVlMDNkYWUiLCJzaWduYXR1cmUiOiIzMDQ0MDIyMDM2MjNkZWZkNjE4ZWIzZTIxOTk3MDQ5NjQwN2ViZTkyNDQ3MzE3ZGFkNzVlNDEyYmQ0YTYyNjdjM2I1ZTIyMjMwMjIwMjQ1Yjc0MDg0OGE3MmQwOGI2MGQ2Yzg0ZjMzOTczN2I2M2RiM2JjYmFkYjNiZDBkY2IxYmZiODY1NzE1ZDhiNSIsInNjaGVtZSI6IlNJR05BVFVSRV9TQ0hFTUVfVEtfQVBJX1AyNTYifQ' -v 'https://api.turnkey.com/api/v1/sign'",
"message": "{\"payload\": \"hello from TKHQ\"}",
"stamp": "eyJwdWJsaWNLZXkiOiIwMzI3YTUwMDMyZTZmMDYzMWQ1NjA1YjZhZGEzMmI3NzkwNzRmMzQ2ZTgxYjY4ZTEyODAxNjQwZjFjOWVlMDNkYWUiLCJzaWduYXR1cmUiOiIzMDQ0MDIyMDM2MjNkZWZkNjE4ZWIzZTIxOTk3MDQ5NjQwN2ViZTkyNDQ3MzE3ZGFkNzVlNDEyYmQ0YTYyNjdjM2I1ZTIyMjMwMjIwMjQ1Yjc0MDg0OGE3MmQwOGI2MGQ2Yzg0ZjMzOTczN2I2M2RiM2JjYmFkYjNiZDBkY2IxYmZiODY1NzE1ZDhiNSIsInNjaGVtZSI6IlNJR05BVFVSRV9TQ0hFTUVfVEtfQVBJX1AyNTYifQ"
}
```
# Get a specific boot proof
Source: https://docs.turnkey.com/api-reference/queries/get-a-specific-boot-proof
Get the boot proof for a given ephemeral key.
Unique identifier for a given Organization.
Hex encoded ephemeral public key.
A successful response returns the following fields:
bootProof field
The hex encoded Ephemeral Public Key.
The DER encoded COSE Sign1 struct Attestation doc.
The base64 encoded QOS manifest. Encoding depends on qos\_manifest\_version.
The base64 encoded QOS manifest envelope. Encoding depends on qos\_manifest\_version.
The label under which the enclave app was deployed.
Name of the enclave app
Owner of the app i.e. 'tkhq'
createdAt field
seconds field
nanos field
QOS manifest schema version.
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/query/get_boot_proof \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"organizationId": "",
"ephemeralKey": ""
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().getBootProof({
organizationId: " (Unique identifier for a given Organization.)",
ephemeralKey: " (Hex encoded ephemeral public key.)"
});
```
```json 200 theme={"system"}
{
"bootProof": {
"ephemeralPublicKeyHex": "",
"awsAttestationDocB64": "",
"qosManifestB64": "",
"qosManifestEnvelopeB64": "",
"deploymentLabel": "",
"enclaveApp": "",
"owner": "",
"createdAt": {
"seconds": "",
"nanos": ""
},
"qosManifestVersion": ""
}
}
```
# Get activity
Source: https://docs.turnkey.com/api-reference/queries/get-activity
Get details about an activity.
Unique identifier for a given organization.
Unique identifier for a given activity object.
A successful response returns the following fields:
activity field
Unique identifier for a given Activity object.
Unique identifier for a given Organization.
status field
Enum options: `ACTIVITY_STATUS_CREATED`, `ACTIVITY_STATUS_PENDING`, `ACTIVITY_STATUS_COMPLETED`, `ACTIVITY_STATUS_FAILED`, `ACTIVITY_STATUS_CONSENSUS_NEEDED`, `ACTIVITY_STATUS_REJECTED`, `ACTIVITY_STATUS_AUTHENTICATORS_NEEDED`
type field
Enum options: `ACTIVITY_TYPE_CREATE_API_KEYS`, `ACTIVITY_TYPE_CREATE_USERS`, `ACTIVITY_TYPE_CREATE_PRIVATE_KEYS`, `ACTIVITY_TYPE_SIGN_RAW_PAYLOAD`, `ACTIVITY_TYPE_CREATE_INVITATIONS`, `ACTIVITY_TYPE_ACCEPT_INVITATION`, `ACTIVITY_TYPE_CREATE_POLICY`, `ACTIVITY_TYPE_DISABLE_PRIVATE_KEY`, `ACTIVITY_TYPE_DELETE_USERS`, `ACTIVITY_TYPE_DELETE_API_KEYS`, `ACTIVITY_TYPE_DELETE_INVITATION`, `ACTIVITY_TYPE_DELETE_ORGANIZATION`, `ACTIVITY_TYPE_DELETE_POLICY`, `ACTIVITY_TYPE_CREATE_USER_TAG`, `ACTIVITY_TYPE_DELETE_USER_TAGS`, `ACTIVITY_TYPE_CREATE_ORGANIZATION`, `ACTIVITY_TYPE_SIGN_TRANSACTION`, `ACTIVITY_TYPE_APPROVE_ACTIVITY`, `ACTIVITY_TYPE_REJECT_ACTIVITY`, `ACTIVITY_TYPE_DELETE_AUTHENTICATORS`, `ACTIVITY_TYPE_CREATE_AUTHENTICATORS`, `ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG`, `ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS`, `ACTIVITY_TYPE_SET_PAYMENT_METHOD`, `ACTIVITY_TYPE_ACTIVATE_BILLING_TIER`, `ACTIVITY_TYPE_DELETE_PAYMENT_METHOD`, `ACTIVITY_TYPE_CREATE_POLICY_V2`, `ACTIVITY_TYPE_CREATE_POLICY_V3`, `ACTIVITY_TYPE_CREATE_API_ONLY_USERS`, `ACTIVITY_TYPE_UPDATE_ROOT_QUORUM`, `ACTIVITY_TYPE_UPDATE_USER_TAG`, `ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG`, `ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2`, `ACTIVITY_TYPE_CREATE_ORGANIZATION_V2`, `ACTIVITY_TYPE_CREATE_USERS_V2`, `ACTIVITY_TYPE_ACCEPT_INVITATION_V2`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2`, `ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS`, `ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2`, `ACTIVITY_TYPE_UPDATE_USER`, `ACTIVITY_TYPE_UPDATE_POLICY`, `ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3`, `ACTIVITY_TYPE_CREATE_WALLET`, `ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS`, `ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY`, `ACTIVITY_TYPE_RECOVER_USER`, `ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE`, `ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE`, `ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2`, `ACTIVITY_TYPE_SIGN_TRANSACTION_V2`, `ACTIVITY_TYPE_EXPORT_PRIVATE_KEY`, `ACTIVITY_TYPE_EXPORT_WALLET`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4`, `ACTIVITY_TYPE_EMAIL_AUTH`, `ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT`, `ACTIVITY_TYPE_INIT_IMPORT_WALLET`, `ACTIVITY_TYPE_IMPORT_WALLET`, `ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY`, `ACTIVITY_TYPE_IMPORT_PRIVATE_KEY`, `ACTIVITY_TYPE_CREATE_POLICIES`, `ACTIVITY_TYPE_SIGN_RAW_PAYLOADS`, `ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION`, `ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS`, `ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5`, `ACTIVITY_TYPE_OAUTH`, `ACTIVITY_TYPE_CREATE_API_KEYS_V2`, `ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION`, `ACTIVITY_TYPE_EMAIL_AUTH_V2`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6`, `ACTIVITY_TYPE_DELETE_PRIVATE_KEYS`, `ACTIVITY_TYPE_DELETE_WALLETS`, `ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2`, `ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION`, `ACTIVITY_TYPE_INIT_OTP_AUTH`, `ACTIVITY_TYPE_OTP_AUTH`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7`, `ACTIVITY_TYPE_UPDATE_WALLET`, `ACTIVITY_TYPE_UPDATE_POLICY_V2`, `ACTIVITY_TYPE_CREATE_USERS_V3`, `ACTIVITY_TYPE_INIT_OTP_AUTH_V2`, `ACTIVITY_TYPE_INIT_OTP`, `ACTIVITY_TYPE_VERIFY_OTP`, `ACTIVITY_TYPE_OTP_LOGIN`, `ACTIVITY_TYPE_STAMP_LOGIN`, `ACTIVITY_TYPE_OAUTH_LOGIN`, `ACTIVITY_TYPE_UPDATE_USER_NAME`, `ACTIVITY_TYPE_UPDATE_USER_EMAIL`, `ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER`, `ACTIVITY_TYPE_INIT_FIAT_ON_RAMP`, `ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE`, `ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE`, `ACTIVITY_TYPE_ENABLE_AUTH_PROXY`, `ACTIVITY_TYPE_DISABLE_AUTH_PROXY`, `ACTIVITY_TYPE_UPDATE_AUTH_PROXY_CONFIG`, `ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL`, `ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL`, `ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL`, `ACTIVITY_TYPE_OAUTH2_AUTHENTICATE`, `ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS`, `ACTIVITY_TYPE_DELETE_POLICIES`, `ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION`, `ACTIVITY_TYPE_ETH_SEND_TRANSACTION`, `ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL`, `ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL`, `ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL`, `ACTIVITY_TYPE_EMAIL_AUTH_V3`, `ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2`, `ACTIVITY_TYPE_INIT_OTP_AUTH_V3`, `ACTIVITY_TYPE_INIT_OTP_V2`, `ACTIVITY_TYPE_UPSERT_GAS_USAGE_CONFIG`, `ACTIVITY_TYPE_CREATE_TVC_APP`, `ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT`, `ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS`, `ACTIVITY_TYPE_SOL_SEND_TRANSACTION`, `ACTIVITY_TYPE_INIT_OTP_V3`, `ACTIVITY_TYPE_VERIFY_OTP_V2`, `ACTIVITY_TYPE_OTP_LOGIN_V2`, `ACTIVITY_TYPE_UPDATE_ORGANIZATION_NAME`, `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8`, `ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2`, `ACTIVITY_TYPE_CREATE_USERS_V4`, `ACTIVITY_TYPE_CREATE_WEBHOOK_ENDPOINT`, `ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT`, `ACTIVITY_TYPE_DELETE_WEBHOOK_ENDPOINT`, `ACTIVITY_TYPE_SET_IP_ALLOWLIST`, `ACTIVITY_TYPE_REMOVE_IP_ALLOWLIST`, `ACTIVITY_TYPE_UPDATE_TVC_APP_LIVE_DEPLOYMENT`, `ACTIVITY_TYPE_DELETE_TVC_DEPLOYMENT`, `ACTIVITY_TYPE_DELETE_TVC_APP_AND_DEPLOYMENTS`, `ACTIVITY_TYPE_RESTORE_TVC_DEPLOYMENT`, `ACTIVITY_TYPE_SPARK_SIGN_FROST`, `ACTIVITY_TYPE_SPARK_PREPARE_TRANSFER`, `ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER`, `ACTIVITY_TYPE_SPARK_PREPARE_LIGHTNING_RECEIVE`, `ACTIVITY_TYPE_POST_TVC_QUORUM_KEY_SHARE`, `ACTIVITY_TYPE_ETH_SEND_TRANSACTION_V2`, `ACTIVITY_TYPE_CREATE_MFA_POLICY`, `ACTIVITY_TYPE_UPDATE_MFA_POLICY`, `ACTIVITY_TYPE_DELETE_MFA_POLICY`, `ACTIVITY_TYPE_CREATE_SESSION_PROFILE`
intent field
createOrganizationIntent field
Human-readable name for an Organization.
The root user's email address.
rootAuthenticator field
Human-readable name for an Authenticator.
Unique identifier for a given User.
attestation field
id field
type field
Enum options: `public-key`
rawId field
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
response field
clientDataJson field
attestationObject field
transports field
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
clientExtensionResults field
appid field
appidExclude field
credProps field
rk field
Challenge presented for authentication purposes.
Unique identifier for the root user object.
createAuthenticatorsIntent field
A list of Authenticators.
Human-readable name for an Authenticator.
Unique identifier for a given User.
attestation field
id field
type field
Enum options: `public-key`
rawId field
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
response field
clientDataJson field
attestationObject field
transports field
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
clientExtensionResults field
appid field
appidExclude field
credProps field
rk field
Challenge presented for authentication purposes.
Unique identifier for a given User.
createUsersIntent field
A list of Users.
Human-readable name for a User.
The user's email address.
accessType field
Enum options: `ACCESS_TYPE_WEB`, `ACCESS_TYPE_API`, `ACCESS_TYPE_ALL`
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Unique identifier for a given User.
attestation field
id field
type field
Enum options: `public-key`
rawId field
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
response field
clientDataJson field
attestationObject field
transports field
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
clientExtensionResults field
appid field
appidExclude field
credProps field
rk field
Challenge presented for authentication purposes.
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
createPrivateKeysIntent field
A list of Private Keys.
Human-readable name for a Private Key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
signRawPayloadIntent field
Unique identifier for a given Private Key.
Raw unsigned payload to be signed.
encoding field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
hashFunction field
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
createInvitationsIntent field
A list of Invitations.
The name of the intended Invitation recipient.
The email address of the intended Invitation recipient.
A list of tags assigned to the Invitation recipient. This field, if not needed, should be an empty array in your request body.
item field
accessType field
Enum options: `ACCESS_TYPE_WEB`, `ACCESS_TYPE_API`, `ACCESS_TYPE_ALL`
Unique identifier for the Sender of an Invitation.
acceptInvitationIntent field
Unique identifier for a given Invitation object.
Unique identifier for a given User.
authenticator field
Human-readable name for an Authenticator.
Unique identifier for a given User.
attestation field
id field
type field
Enum options: `public-key`
rawId field
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
response field
clientDataJson field
attestationObject field
transports field
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
authenticatorAttachment field
Enum options: `cross-platform`, `platform`
clientExtensionResults field
appid field
appidExclude field
credProps field
rk field
Challenge presented for authentication purposes.
createPolicyIntent field
Human-readable name for a Policy.
A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details.
subject field
operator field
Enum options: `OPERATOR_EQUAL`, `OPERATOR_MORE_THAN`, `OPERATOR_MORE_THAN_OR_EQUAL`, `OPERATOR_LESS_THAN`, `OPERATOR_LESS_THAN_OR_EQUAL`, `OPERATOR_CONTAINS`, `OPERATOR_NOT_EQUAL`, `OPERATOR_IN`, `OPERATOR_NOT_IN`, `OPERATOR_CONTAINS_ONE`, `OPERATOR_CONTAINS_ALL`
target field
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
notes field
disablePrivateKeyIntent field
Unique identifier for a given Private Key.
deleteUsersIntent field
A list of User IDs.
item field
deleteAuthenticatorsIntent field
Unique identifier for a given User.
A list of Authenticator IDs.
item field
deleteInvitationIntent field
Unique identifier for a given Invitation object.
deleteOrganizationIntent field
Unique identifier for a given Organization.
deletePolicyIntent field
Unique identifier for a given Policy.
createUserTagIntent field
Human-readable name for a User Tag.
A list of User IDs.
item field
deleteUserTagsIntent field
A list of User Tag IDs.
item field
signTransactionIntent field
Unique identifier for a given Private Key.
Raw unsigned transaction to be signed by a particular Private Key.
type field
Enum options: `TRANSACTION_TYPE_ETHEREUM`, `TRANSACTION_TYPE_SOLANA`, `TRANSACTION_TYPE_TRON`, `TRANSACTION_TYPE_BITCOIN`, `TRANSACTION_TYPE_TEMPO`
createApiKeysIntent field
A list of API Keys.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
Unique identifier for a given User.
deleteApiKeysIntent field
Unique identifier for a given User.
A list of API Key IDs.
item field
approveActivityIntent field
An artifact verifying a User's action.
rejectActivityIntent field
An artifact verifying a User's action.
createPrivateKeyTagIntent field
Human-readable name for a Private Key Tag.
A list of Private Key IDs.
item field
deletePrivateKeyTagsIntent field
A list of Private Key Tag IDs.
item field
createPolicyIntentV2 field
Human-readable name for a Policy.
A list of simple functions each including a subject, target and boolean. See Policy Engine Language section for additional details.
subject field
operator field
Enum options: `OPERATOR_EQUAL`, `OPERATOR_MORE_THAN`, `OPERATOR_MORE_THAN_OR_EQUAL`, `OPERATOR_LESS_THAN`, `OPERATOR_LESS_THAN_OR_EQUAL`, `OPERATOR_CONTAINS`, `OPERATOR_NOT_EQUAL`, `OPERATOR_IN`, `OPERATOR_NOT_IN`, `OPERATOR_CONTAINS_ONE`, `OPERATOR_CONTAINS_ALL`
targets field
item field
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
notes field
setPaymentMethodIntent field
The account number of the customer's credit card.
The verification digits of the customer's credit card.
The month that the credit card expires.
The year that the credit card expires.
The email that will receive invoices for the credit card.
The name associated with the credit card.
activateBillingTierIntent field
The product that the customer wants to subscribe to.
orbPlanId field
deletePaymentMethodIntent field
The payment method that the customer wants to remove.
createPolicyIntentV3 field
Human-readable name for a Policy.
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
createApiOnlyUsersIntent field
A list of API-only Users to create.
The name of the new API-only User.
The email address for this API-only User (optional).
A list of tags assigned to the new API-only User. This field, if not needed, should be an empty array in your request body.
item field
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
updateRootQuorumIntent field
The threshold of unique approvals to reach quorum.
The unique identifiers of users who comprise the quorum set.
item field
updateUserTagIntent field
Unique identifier for a given User Tag.
The new, human-readable name for the tag with the given ID.
A list of User IDs to add this tag to.
item field
A list of User IDs to remove this tag from.
item field
updatePrivateKeyTagIntent field
Unique identifier for a given Private Key Tag.
The new, human-readable name for the tag with the given ID.
A list of Private Keys IDs to add this tag to.
item field
A list of Private Key IDs to remove this tag from.
item field
createAuthenticatorsIntentV2 field
A list of Authenticators.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for a given User.
acceptInvitationIntentV2 field
Unique identifier for a given Invitation object.
Unique identifier for a given User.
authenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
createOrganizationIntentV2 field
Human-readable name for an Organization.
The root user's email address.
rootAuthenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for the root user object.
createUsersIntentV2 field
A list of Users.
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
createSubOrganizationIntent field
Name for this sub-organization
rootAuthenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
createSubOrganizationIntentV2 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
updateAllowedOriginsIntent field
Additional origins requests are allowed from besides Turnkey origins
item field
createPrivateKeysIntentV2 field
A list of Private Keys.
Human-readable name for a Private Key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
updateUserIntent field
Unique identifier for a given User.
Human-readable name for a User.
The user's email address.
An updated list of User Tags to apply to this User. This field, if not needed, should be an empty array in your request body.
item field
The user's phone number in E.164 format e.g. +13214567890
updatePolicyIntent field
Unique identifier for a given Policy.
Human-readable name for a Policy.
policyEffect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect (optional).
The consensus expression that triggers the Effect (optional).
Accompanying notes for a Policy (optional).
setPaymentMethodIntentV2 field
The id of the payment method that was created clientside.
The email that will receive invoices for the credit card.
The name associated with the credit card.
createSubOrganizationIntentV3 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
A list of Private Keys.
Human-readable name for a Private Key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
A list of Private Key Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
createWalletIntent field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
createWalletAccountsIntent field
Unique identifier for a given Wallet.
A list of wallet Accounts.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true.
initUserEmailRecoveryIntent field
Email of the user starting recovery
Client-side public key generated by the user, to which the recovery bundle will be encrypted.
Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Optional custom email address from which to send the OTP email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
recoverUserIntent field
authenticator field
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
Unique identifier for the user performing recovery.
setOrganizationFeatureIntent field
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
Optional value for the feature. Will override existing values if feature is already set.
removeOrganizationFeatureIntent field
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
signRawPayloadIntentV2 field
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned payload to be signed.
encoding field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
hashFunction field
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
signTransactionIntentV2 field
A Wallet account address, Private Key address, or Private Key identifier.
Raw unsigned transaction to be signed
type field
Enum options: `TRANSACTION_TYPE_ETHEREUM`, `TRANSACTION_TYPE_SOLANA`, `TRANSACTION_TYPE_TRON`, `TRANSACTION_TYPE_BITCOIN`, `TRANSACTION_TYPE_TEMPO`
exportPrivateKeyIntent field
Unique identifier for a given Private Key.
Client-side public key generated by the user, to which the export bundle will be encrypted.
exportWalletIntent field
Unique identifier for a given Wallet.
Client-side public key generated by the user, to which the export bundle will be encrypted.
language field
Enum options: `MNEMONIC_LANGUAGE_ENGLISH`, `MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE`, `MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE`, `MNEMONIC_LANGUAGE_CZECH`, `MNEMONIC_LANGUAGE_FRENCH`, `MNEMONIC_LANGUAGE_ITALIAN`, `MNEMONIC_LANGUAGE_JAPANESE`, `MNEMONIC_LANGUAGE_KOREAN`, `MNEMONIC_LANGUAGE_SPANISH`
createSubOrganizationIntentV4 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
emailAuthIntent field
Email of the authenticating user.
Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Email Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Invalidate all other previously generated Email Auth API keys
Optional custom email address from which to send the email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
exportWalletAccountIntent field
Address to identify Wallet Account.
Client-side public key generated by the user, to which the export bundle will be encrypted.
initImportWalletIntent field
The ID of the User importing a Wallet.
importWalletIntent field
The ID of the User importing a Wallet.
Human-readable name for a Wallet.
Bundle containing a wallet mnemonic encrypted to the enclave's target public key.
A list of wallet Accounts.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
initImportPrivateKeyIntent field
The ID of the User importing a Private Key.
importPrivateKeyIntent field
The ID of the User importing a Private Key.
Human-readable name for a Private Key.
Bundle containing a raw private key encrypted to the enclave's target public key.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
Cryptocurrency-specific formats for a derived address (e.g., Ethereum).
item field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
createPoliciesIntent field
An array of policy intents to be created.
Human-readable name for a Policy.
effect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect
The consensus expression that triggers the Effect
Notes for a Policy.
signRawPayloadsIntent field
A Wallet account address, Private Key address, or Private Key identifier.
An array of raw unsigned payloads to be signed.
item field
encoding field
Enum options: `PAYLOAD_ENCODING_HEXADECIMAL`, `PAYLOAD_ENCODING_TEXT_UTF8`, `PAYLOAD_ENCODING_EIP712`, `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
hashFunction field
Enum options: `HASH_FUNCTION_NO_OP`, `HASH_FUNCTION_SHA256`, `HASH_FUNCTION_KECCAK256`, `HASH_FUNCTION_NOT_APPLICABLE`
createReadOnlySessionIntent field
createOauthProvidersIntent field
The ID of the User to add an Oauth provider to
A list of Oauth providers.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
deleteOauthProvidersIntent field
The ID of the User to remove an Oauth provider from
Unique identifier for a given Provider.
item field
createSubOrganizationIntentV5 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
oauthIntent field
Base64 encoded OIDC token
Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Oauth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Oauth API keys
createApiKeysIntentV2 field
A list of API Keys.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
Unique identifier for a given User.
createReadWriteSessionIntent field
Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted.
Email of the user to create a read write session for
Optional human-readable name for an API Key. If none provided, default to Read Write Session - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailAuthIntentV2 field
Email of the authenticating user.
Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Email Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Invalidate all other previously generated Email Auth API keys
Optional custom email address from which to send the email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
createSubOrganizationIntentV6 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
deletePrivateKeysIntent field
List of unique identifiers for private keys within an organization
item field
Optional parameter for deleting the private keys, even if any have not been previously exported. If they have been exported, this field is ignored.
deleteWalletsIntent field
List of unique identifiers for wallets within an organization
item field
Optional parameter for deleting the wallets, even if any have not been previously exported. If they have been exported, this field is ignored.
createReadWriteSessionIntentV2 field
Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted.
Optional unique identifier for a given User. If none provided, the read write session will be created for the user who is making the request.
Optional human-readable name for an API Key. If none provided, default to Read Write Session - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated ReadWriteSession API keys
deleteSubOrganizationIntent field
Sub-organization deletion, by default, requires associated wallets and private keys to be exported for security reasons. Set this boolean to true to force sub-organization deletion even if some wallets or private keys within it have not been exported yet. Default: false.
initOtpAuthIntent field
Enum to specify whether to send OTP via SMS or email
Email or phone number to send the OTP code to
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
otpAuthIntent field
ID representing the result of an init OTP activity.
OTP sent out to a user's contact (email or SMS)
Client-side public key generated by the user, to which the OTP bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to OTP Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated OTP Auth API keys
createSubOrganizationIntentV7 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
Disable OTP SMS auth for the sub-organization
Disable OTP email auth for the sub-organization
Signed JWT containing a unique id, expiry, verification type, contact
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
updateWalletIntent field
Unique identifier for a given Wallet.
Human-readable name for a Wallet.
updatePolicyIntentV2 field
Unique identifier for a given Policy.
Human-readable name for a Policy.
policyEffect field
Enum options: `EFFECT_ALLOW`, `EFFECT_DENY`
The condition expression that triggers the Effect (optional).
The consensus expression that triggers the Effect (optional).
Accompanying notes for a Policy (optional).
createUsersIntentV3 field
A list of Users.
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
initOtpAuthIntentV2 field
Enum to specify whether to send OTP via SMS or email
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
initOtpIntent field
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
emailCustomization field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
verifyOtpIntent field
ID representing the result of an init OTP activity.
OTP sent out to a user's contact (email or SMS)
Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours)
Client-side public key generated by the user, which will be added to the JWT response and verified in subsequent requests via a client proof signature
otpLoginIntent field
Signed JWT containing a unique id, expiry, verification type, contact
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the verification token
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
stampLoginIntent field
Client-side public key generated by the user, which will be conditionally added to org data based on the passkey stamp associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
oauthLoginIntent field
Base64 encoded OIDC token
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the oidc token associated with this request
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login API keys
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
updateUserNameIntent field
Unique identifier for a given User.
Human-readable name for a User.
updateUserEmailIntent field
Unique identifier for a given User.
The user's email address. Setting this to an empty string will remove the user's email.
Signed JWT containing a unique id, expiry, verification type, contact
updateUserPhoneNumberIntent field
Unique identifier for a given User.
The user's phone number in E.164 format e.g. +13214567890. Setting this to an empty string will remove the user's phone number.
Signed JWT containing a unique id, expiry, verification type, contact
initFiatOnRampIntent field
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Destination wallet address for the buy transaction.
network field
Enum options: `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BITCOIN`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_ETHEREUM`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_SOLANA`, `FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE`
cryptoCurrencyCode field
Enum options: `FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_ETH`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_SOL`, `FIAT_ON_RAMP_CRYPTO_CURRENCY_USDC`
fiatCurrencyCode field
Enum options: `FIAT_ON_RAMP_CURRENCY_AUD`, `FIAT_ON_RAMP_CURRENCY_BGN`, `FIAT_ON_RAMP_CURRENCY_BRL`, `FIAT_ON_RAMP_CURRENCY_CAD`, `FIAT_ON_RAMP_CURRENCY_CHF`, `FIAT_ON_RAMP_CURRENCY_COP`, `FIAT_ON_RAMP_CURRENCY_CZK`, `FIAT_ON_RAMP_CURRENCY_DKK`, `FIAT_ON_RAMP_CURRENCY_DOP`, `FIAT_ON_RAMP_CURRENCY_EGP`, `FIAT_ON_RAMP_CURRENCY_EUR`, `FIAT_ON_RAMP_CURRENCY_GBP`, `FIAT_ON_RAMP_CURRENCY_HKD`, `FIAT_ON_RAMP_CURRENCY_IDR`, `FIAT_ON_RAMP_CURRENCY_ILS`, `FIAT_ON_RAMP_CURRENCY_JOD`, `FIAT_ON_RAMP_CURRENCY_KES`, `FIAT_ON_RAMP_CURRENCY_KWD`, `FIAT_ON_RAMP_CURRENCY_LKR`, `FIAT_ON_RAMP_CURRENCY_MXN`, `FIAT_ON_RAMP_CURRENCY_NGN`, `FIAT_ON_RAMP_CURRENCY_NOK`, `FIAT_ON_RAMP_CURRENCY_NZD`, `FIAT_ON_RAMP_CURRENCY_OMR`, `FIAT_ON_RAMP_CURRENCY_PEN`, `FIAT_ON_RAMP_CURRENCY_PLN`, `FIAT_ON_RAMP_CURRENCY_RON`, `FIAT_ON_RAMP_CURRENCY_SEK`, `FIAT_ON_RAMP_CURRENCY_THB`, `FIAT_ON_RAMP_CURRENCY_TRY`, `FIAT_ON_RAMP_CURRENCY_TWD`, `FIAT_ON_RAMP_CURRENCY_USD`, `FIAT_ON_RAMP_CURRENCY_VND`, `FIAT_ON_RAMP_CURRENCY_ZAR`
Specifies a preset fiat amount for the transaction, e.g., '100'. Must be greater than '20'. If not provided, the user will be prompted to enter an amount.
paymentMethod field
Enum options: `FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD`, `FIAT_ON_RAMP_PAYMENT_METHOD_APPLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_GBP_OPEN_BANKING_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_GOOGLE_PAY`, `FIAT_ON_RAMP_PAYMENT_METHOD_SEPA_BANK_TRANSFER`, `FIAT_ON_RAMP_PAYMENT_METHOD_PIX_INSTANT_PAYMENT`, `FIAT_ON_RAMP_PAYMENT_METHOD_PAYPAL`, `FIAT_ON_RAMP_PAYMENT_METHOD_VENMO`, `FIAT_ON_RAMP_PAYMENT_METHOD_MOONPAY_BALANCE`, `FIAT_ON_RAMP_PAYMENT_METHOD_CRYPTO_ACCOUNT`, `FIAT_ON_RAMP_PAYMENT_METHOD_FIAT_WALLET`, `FIAT_ON_RAMP_PAYMENT_METHOD_ACH_BANK_ACCOUNT`
ISO 3166-1 two-digit country code for Coinbase representing the purchasing user’s country of residence, e.g., US, GB.
ISO 3166-2 two-digit country subdivision code for Coinbase representing the purchasing user’s subdivision of residence within their country, e.g. NY. Required if country\_code=US.
Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false.
Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled.
createSmartContractInterfaceIntent field
Corresponding contract address or program ID
ABI/IDL as a JSON string. Limited to 400kb
type field
Enum options: `SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM`, `SMART_CONTRACT_INTERFACE_TYPE_SOLANA`
Human-readable name for a Smart Contract Interface.
Notes for a Smart Contract Interface.
deleteSmartContractInterfaceIntent field
The ID of a Smart Contract Interface intended for deletion.
enableAuthProxyIntent field
disableAuthProxyIntent field
updateAuthProxyConfigIntent field
Updated list of allowed origins for CORS.
item field
Updated list of allowed proxy authentication methods.
item field
Custom 'from' address for auth-related emails.
Custom reply-to address for auth-related emails.
Template ID for email-auth messages.
Template ID for OTP SMS messages.
emailCustomizationParams field
The name of the application.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomizationParams field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
walletKitSettings field
List of enabled social login providers (e.g., 'apple', 'google', 'facebook')
item field
Mapping of social login providers to their Oauth client IDs.
Oauth redirect URL to be used for social login flows.
OTP code lifetime in seconds.
Verification-token lifetime in seconds.
Session lifetime in seconds.
Enable alphanumeric OTP codes.
Desired OTP code length (6–9).
Custom 'from' email sender for auth-related emails.
Verification token required for get account with PII (email/phone number). Default false.
Whitelisted OAuth client IDs for social account linking. When a user authenticates via a social provider with an email matching an existing account, the accounts will be linked if the client ID is in this list and the issuer is considered a trusted provider.
item field
createOauth2CredentialIntent field
provider field
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
updateOauth2CredentialIntent field
The ID of the OAuth 2.0 credential to update
provider field
Enum options: `OAUTH2_PROVIDER_X`, `OAUTH2_PROVIDER_DISCORD`
The Client ID issued by the OAuth 2.0 provider
The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
deleteOauth2CredentialIntent field
The ID of the OAuth 2.0 credential to delete
oauth2AuthenticateIntent field
The OAuth 2.0 credential id whose client\_id and client\_secret will be used in the OAuth 2.0 flow
The auth\_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow
The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider
The code verifier used by OAuth 2.0 PKCE providers
A nonce value set to sha256(publicKey), used to bind the OIDC token to a specific public key
An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token
deleteWalletAccountsIntent field
List of unique identifiers for wallet accounts within an organization
item field
Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored.
deletePoliciesIntent field
List of unique identifiers for policies within an organization
item field
ethSendRawTransactionIntent field
The raw, signed transaction to be sent.
CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).
Enum options: `eip155:1`, `eip155:11155111`, `eip155:8453`, `eip155:84532`, `eip155:137`, `eip155:80002`, `eip155:56`, `eip155:97`
ethSendTransactionIntent field
A wallet or private key address to sign with. This does not support private key IDs.
Whether to sponsor this transaction via Gas Station.
CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).
Enum options: `eip155:1`, `eip155:11155111`, `eip155:8453`, `eip155:84532`, `eip155:137`, `eip155:80002`, `eip155:56`, `eip155:97`
Recipient address as a hex string with 0x prefix.
Amount of native asset to send in wei.
Hex-encoded call data for contract interactions.
Transaction nonce, for EIP-1559 and Turnkey Gas Station authorizations.
Maximum amount of gas to use for this transaction, for EIP-1559 transactions.
Maximum total fee per gas unit (base fee + priority fee) in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions.
Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions.
Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true.
The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture.
createFiatOnRampCredentialIntent field
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
If the on-ramp credential is a sandbox credential
updateFiatOnRampCredentialIntent field
The ID of the fiat on-ramp credential to update
onrampProvider field
Enum options: `FIAT_ON_RAMP_PROVIDER_COINBASE`, `FIAT_ON_RAMP_PROVIDER_MOONPAY`
Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier.
Publishable API key for the on-ramp provider
Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
deleteFiatOnRampCredentialIntent field
The ID of the fiat on-ramp credential to delete
emailAuthIntentV3 field
Email of the authenticating user.
Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted.
Optional human-readable name for an API Key. If none provided, default to Email Auth - \
Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Invalidate all other previously generated Email Auth API keys
Optional custom email address from which to send the email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
initUserEmailRecoveryIntentV2 field
Email of the user starting recovery
Client-side public key generated by the user, to which the recovery bundle will be encrypted.
Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used.
emailCustomization field
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
Optional custom email address from which to send the OTP email
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Optional custom email address to use as reply-to
initOtpIntentV2 field
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
initOtpAuthIntentV3 field
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
Optional length of the OTP code. Default = 9
The name of the application. This field is required and will be used in email notifications if an email template is not provided.
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
upsertGasUsageConfigIntent field
Gas sponsorship USD limit for the billing organization window.
Gas sponsorship USD limit for sub-organizations under the billing organization.
Rolling sponsorship window duration, expressed in minutes. This value can't exceed 30 days (43200 minutes).
Whether gas sponsorship is enabled for the organization.
solanaConfig field
Whether Solana rent prefunding is enabled for the organization. When omitted, the existing rent-prefund state is left unchanged.
createTvcAppIntent field
The name of the new TVC application
Quorum public key to use for this application
Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required
manifestSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
item field
The threshold of operators needed to reach consensus in this new Operator Set
Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required
shareSetParams field
Short description for this new operator set
Operators to create as part of this new operator set
The name for this new operator
Public key for this operator
Existing operators to use as part of this new operator set
item field
The threshold of operators needed to reach consensus in this new Operator Set
Enables network egress for this TVC app. Default if not provided: false.
When true, this app may create deployments in debug-mode. Debug-mode deployments expose logs and emit zero'd attestation PCRs, so remote attestation cannot succeed. Cannot be changed after app creation. Setting this true means the app's quorum key is considered permanently insecure, and a new app with a fresh quorum key must be created. Default if not provided: false.
createTvcDeploymentIntent field
The unique identifier of the to-be-deployed TVC application
The QuorumOS version to use to deploy this application
URL of the container containing the pivot binary
Location of the binary in the pivot container
Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example \["--foo", "bar"]
item field
Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity.
Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds.
Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty.
Optional flag to indicate whether to deploy the TVC app in debug mode, which includes additional logging and debugging tools. Default is false.
healthCheckType field
Enum options: `TVC_HEALTH_CHECK_TYPE_HTTP`, `TVC_HEALTH_CHECK_TYPE_GRPC`
Port to use for health checks.
Port to use for public ingress.
createTvcManifestApprovalsIntent field
Unique identifier of the TVC deployment to approve
List of manifest approvals
Unique identifier of the operator providing this approval
Signature from the operator approving the manifest
solSendTransactionIntent field
Base64-encoded serialized unsigned Solana transaction
A wallet or private key address to sign with. This does not support private key IDs.
Whether to sponsor this transaction via Gas Station.
CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values.
Enum options: `solana:mainnet`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`, `solana:devnet`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`, `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG`
user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution
initOtpIntentV3 field
Whether to send OTP via SMS or email. Possible values: OTP\_TYPE\_SMS, OTP\_TYPE\_EMAIL
Email or phone number to send the OTP code to
The name of the application.
Optional length of the OTP code. Default = 9
emailCustomization field
A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px.
A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`.
JSON object containing key/value pairs to be used with custom templates.
Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template.
smsCustomization field
Template containing references to .OtpCode i.e Your OTP is \{\{.OtpCode}}
Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address.
Optional custom email address from which to send the OTP email
Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). If set to false, OTP code will only be numeric. Default = true
Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'
Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)
Optional custom email address to use as reply-to
verifyOtpIntentV2 field
UUID representing an OTP flow. A new UUID is created for each init OTP activity.
Encrypted bundle containing the OTP code and a client-generated public key. Turnkey's secure enclaves will decrypt this bundle, verify the OTP code, and issue a new Verification Token. Encrypted using the target encryption key provided in the INIT\_OTP activity result.
Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours)
otpLoginIntentV2 field
Signed Verification Token containing a unique id, expiry, verification type, contact
Client-side public key generated by the user, used as the session public key upon successful login
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
Invalidate all other previously generated Login sessions
Optional session profile ID to specify which Session Profile to use for this login. If not provided, the default read/write session will be used.
updateOrganizationNameIntent field
New name for the Organization.
createSubOrganizationIntentV8 field
Name for this sub-organization
Root users to create within this sub-organization
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
wallet field
Human-readable name for a Wallet.
A list of wallet Accounts. This field, if not needed, should be an empty array in your request body.
curve field
Enum options: `CURVE_SECP256K1`, `CURVE_ED25519`, `CURVE_P256`
pathFormat field
Enum options: `PATH_FORMAT_BIP32`
Path used to generate a wallet Account.
addressFormat field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
Optional human-readable name for the account.
Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24.
Disable email recovery for the sub-organization
Disable email auth for the sub-organization
Disable OTP SMS auth for the sub-organization
Disable OTP email auth for the sub-organization
Signed JWT containing a unique id, expiry, verification type, contact
clientSignature field
The public component of a cryptographic key pair used to create the signature.
scheme field
Enum options: `CLIENT_SIGNATURE_SCHEME_API_P256`
The message that was signed.
The cryptographic signature over the message.
createOauthProvidersIntentV2 field
The ID of the User to add an Oauth provider to
A list of Oauth providers.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
createUsersIntentV4 field
A list of Users.
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an API Key.
The public component of a cryptographic key pair used to sign messages and transactions.
curveType field
Enum options: `API_KEY_CURVE_P256`, `API_KEY_CURVE_SECP256K1`, `API_KEY_CURVE_ED25519`
Optional window (in seconds) indicating how long the API Key should last.
A list of Authenticator parameters. This field, if not needed, should be an empty array in your request body.
Human-readable name for an Authenticator.
Challenge presented for authentication purposes.
attestation field
The cbor encoded then base64 url encoded id of the credential.
A base64 url encoded payload containing metadata about the signing context and the challenge.
A base64 url encoded payload containing authenticator data and any attestation the webauthn provider chooses.
The type of authenticator transports.
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
A list of Oauth providers. This field, if not needed, should be an empty array in your request body.
Human-readable name to identify a Provider.
Base64 encoded OIDC token
oidcClaims field
The issuer identifier from the OIDC token (iss claim)
The subject identifier from the OIDC token (sub claim)
The audience from the OIDC token (aud claim)
A list of User Tag IDs. This field, if not needed, should be an empty array in your request body.
item field
createWebhookEndpointIntent field
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Event subscriptions to create for this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
updateWebhookEndpointIntent field
Unique identifier of the webhook endpoint to update.
Updated destination URL for webhook delivery.
Updated human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
deleteWebhookEndpointIntent field
Unique identifier of the webhook endpoint to delete.
setIpAllowlistIntent field
The public component of an API key. If null, the IP allowlist applies at the organization level. If set, it applies only to this specific API key.
Whether the IP allowlist is enabled. Only meaningful for organization-level allowlists. Omit for API key-level allowlists.
List of IP allowlist rules with CIDR blocks and optional labels.
CIDR block (e.g., '192.168.1.0/24', '2001:db8::/32').
Optional human-readable label for this rule (e.g., 'Office VPN').
Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.
removeIpAllowlistIntent field
The public component of an API key. If null, removes the organization-level IP allowlist. If set, removes the IP allowlist for this specific API key.
updateTvcAppLiveDeploymentIntent field
The unique identifier of the TVC deployment to set as live for the app.
deleteTvcDeploymentIntent field
The unique identifier of the TVC deployment to delete.
deleteTvcAppAndDeploymentsIntent field
The unique identifier of the TVC app to delete. The app and all associated deployments will be removed.
restoreTvcDeploymentIntent field
The unique identifier of the TVC deployment to restore.
sparkSignFrostIntent field
A Spark wallet account address identifying the wallet to sign with.
Batched sign requests. Each produces a partial signature plus Turnkey's public commitments.
derivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Hex-encoded 32-byte sighash to sign.
Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P\_ops + P\_user. Bound into the nonce HMAC.
Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC.
FROST participant identifier, hex-encoded (32-byte scalar).
Hiding commitment D, hex-encoded compressed secp256k1 point.
Binding commitment E, hex-encoded compressed secp256k1 point.
Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case).
sparkPrepareTransferIntent field
A Spark wallet account address identifying the wallet.
transfer field
Spark transfer identifier (UUID).
Leaves being transferred.
Leaf identifier (UUID).
oldLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
newLeafDerivation field
identity field
signingLeaf field
Unique identifier for the Spark signing leaf.
deposit field
staticDeposit field
Index used to derive the static deposit key.
htlcPreimage field
Client-produced CPFP refund signature (hex-encoded), passed through verbatim into the per-operator SendLeafKeyTweak. Empty omits the field from the operator package.
Client-produced direct refund signature (hex-encoded). Passed through verbatim.
Client-produced direct-from-CPFP refund signature (hex-encoded). Passed through verbatim.
Feldman VSS threshold for reconstructing the per-leaf tweak scalar.
Operators that will receive Feldman shares of the per-leaf tweak. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Recipient's identity pubkey (hex-encoded compressed secp256k1 point). Each leaf's new\_priv is ECIES-encrypted to this key and embedded in the per-operator package for claim-time delivery.
sparkClaimTransferIntent field
A Spark wallet account address identifying the wallet.
claim field
Leaves being claimed.
Leaf identifier (UUID).
ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key.
Hex-encoded 64-byte compact ECDSA signature binding (leaf\_id, transfer\_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption.
Shamir threshold for reconstructing the per-leaf claim secret.
Operators that will receive Shamir shares.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
Spark transfer identifier (UUID). Used together with each leaf's sender\_signature to verify the sender bound this ciphertext to this transfer.
Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender\_signature fields.
sparkPrepareLightningReceiveIntent field
A Spark wallet account address identifying the wallet.
lightningReceive field
Feldman VSS threshold for reconstructing the preimage.
Operators that will receive Feldman shares of the preimage. Order must match the operators' numeric IDs in the Spark operator config - share index is the 1-based position in this list.
Spark operator identifier (UUID).
Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).
postTvcQuorumKeyShareIntent field
Unique identifier of the TVC deployment receiving quorum key share
Hex-encoded ephemeral public key used to encrypt the quorum key share
shareApprovalBundle field
Unique identifier of the operator providing this quorum key share
Hex-encoded re-encrypted quorum key share
Signature from the share set operator approving the manifest
ethSendTransactionIntentV2 field
A wallet or private key address to sign with. This does not support private key IDs.
CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet).
Enum options: `eip155:1`, `eip155:11155111`, `eip155:8453`, `eip155:84532`, `eip155:137`, `eip155:80002`, `eip155:56`, `eip155:97`
Whether to sponsor this transaction via Gas Station. If false or unset, the EOA pays gas. A single call uses EIP-1559; multiple calls use EIP-7702 batch execution via Gas Station.
Outer transaction nonce. Omit to auto-fetch.
Maximum amount of gas for the outer transaction. Omit to auto-estimate.
Maximum total fee per gas unit (base fee + priority fee) in wei. Omit to auto-estimate.
Maximum priority fee (tip) per gas unit in wei. Omit to auto-estimate.
Unix timestamp in seconds for EIP-712 execution deadline. Only used when sponsor=true.
The gas station delegate contract nonce. Only used when sponsor=true. Omit to auto-fetch.
Ordered list of calls to execute. Must contain between 1 and 50 entries. A single entry with sponsor=false uses EIP-1559; multiple entries use EIP-7702 batch execution via Gas Station.
Recipient address as a hex string with 0x prefix.
Amount of native asset to send in wei.
Hex-encoded call data for contract interactions.
createMfaPolicyIntent field
The ID of the User to add the MFA Policy to.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
type field
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
updateMfaPolicyIntent field
The ID of the User to update the MFA Policy for.
Unique identifier for a given MFA Policy.
Human-readable name for a Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
type field
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., UUID of a passkey authenticator). If not provided, any authenticator of the specified type can be used.
The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first.
Notes for an MFA Policy.
deleteMfaPolicyIntent field
The ID of the User to delete the MFA Policy from.
Unique identifier for a given MFA Policy.
createSessionProfileIntent field
Human-readable name for a Session Profile.
The scope string that defines the permissions for this Session Profile.
The duration in seconds for which sessions created with this Session Profile are valid. If not set, expiration will be determined by the value passed in to the intent of login activities.
Notes for a Session Profile.
result field
createOrganizationResult field
Unique identifier for a given Organization.
createAuthenticatorsResult field
A list of Authenticator IDs.
item field
createUsersResult field
A list of User IDs.
item field
createPrivateKeysResult field
A list of Private Key IDs.
item field
createInvitationsResult field
A list of Invitation IDs
item field
acceptInvitationResult field
Unique identifier for a given Invitation.
Unique identifier for a given User.
signRawPayloadResult field
Component of an ECSDA signature.
Component of an ECSDA signature.
Component of an ECSDA signature.
createPolicyResult field
Unique identifier for a given Policy.
disablePrivateKeyResult field
Unique identifier for a given Private Key.
deleteUsersResult field
A list of User IDs.
item field
deleteAuthenticatorsResult field
Unique identifier for a given Authenticator.
item field
deleteInvitationResult field
Unique identifier for a given Invitation.
deleteOrganizationResult field
Unique identifier for a given Organization.
deletePolicyResult field
Unique identifier for a given Policy.
createUserTagResult field
Unique identifier for a given User Tag.
A list of User IDs.
item field
deleteUserTagsResult field
A list of User Tag IDs.
item field
A list of User IDs.
item field
signTransactionResult field
signedTransaction field
deleteApiKeysResult field
A list of API Key IDs.
item field
createApiKeysResult field
A list of API Key IDs.
item field
createPrivateKeyTagResult field
Unique identifier for a given Private Key Tag.
A list of Private Key IDs.
item field
deletePrivateKeyTagsResult field
A list of Private Key Tag IDs.
item field
A list of Private Key IDs.
item field
setPaymentMethodResult field
The last four digits of the credit card added.
The name associated with the payment method.
The email address associated with the payment method.
activateBillingTierResult field
The id of the product being subscribed to.
deletePaymentMethodResult field
The payment method that was removed.
createApiOnlyUsersResult field
A list of API-only User IDs.
item field
updateRootQuorumResult field
updateUserTagResult field
Unique identifier for a given User Tag.
updatePrivateKeyTagResult field
Unique identifier for a given Private Key Tag.
createSubOrganizationResult field
subOrganizationId field
rootUserIds field
item field
updateAllowedOriginsResult field
createPrivateKeysResultV2 field
A list of Private Key IDs and addresses.
privateKeyId field
addresses field
format field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
address field
updateUserResult field
A User ID.
updatePolicyResult field
Unique identifier for a given Policy.
createSubOrganizationResultV3 field
subOrganizationId field
A list of Private Key IDs and addresses.
privateKeyId field
addresses field
format field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
address field
rootUserIds field
item field
createWalletResult field
Unique identifier for a Wallet.
A list of account addresses.
item field
createWalletAccountsResult field
A list of derived addresses.
item field
initUserEmailRecoveryResult field
Unique identifier for the user being recovered.
recoverUserResult field
ID of the authenticator created.
item field
setOrganizationFeatureResult field
Resulting list of organization features.
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
value field
removeOrganizationFeatureResult field
Resulting list of organization features.
name field
Enum options: `FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY`, `FEATURE_NAME_WEBAUTHN_ORIGINS`, `FEATURE_NAME_EMAIL_AUTH`, `FEATURE_NAME_EMAIL_RECOVERY`, `FEATURE_NAME_WEBHOOK`, `FEATURE_NAME_SMS_AUTH`, `FEATURE_NAME_OTP_EMAIL_AUTH`, `FEATURE_NAME_AUTH_PROXY`, `FEATURE_NAME_SOLANA_RENT_PREFUND_ENABLED`
value field
exportPrivateKeyResult field
Unique identifier for a given Private Key.
Export bundle containing a private key encrypted to the client's target public key.
exportWalletResult field
Unique identifier for a given Wallet.
Export bundle containing a wallet mnemonic + optional newline passphrase encrypted by the client's target public key.
createSubOrganizationResultV4 field
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
emailAuthResult field
Unique identifier for the authenticating User.
Unique identifier for the created API key.
exportWalletAccountResult field
Address to identify Wallet Account.
Export bundle containing a private key encrypted by the client's target public key.
initImportWalletResult field
Import bundle containing a public key and signature to use for importing client data.
importWalletResult field
Unique identifier for a Wallet.
A list of account addresses.
item field
initImportPrivateKeyResult field
Import bundle containing a public key and signature to use for importing client data.
importPrivateKeyResult field
Unique identifier for a Private Key.
A list of addresses.
format field
Enum options: `ADDRESS_FORMAT_UNCOMPRESSED`, `ADDRESS_FORMAT_COMPRESSED`, `ADDRESS_FORMAT_ETHEREUM`, `ADDRESS_FORMAT_SOLANA`, `ADDRESS_FORMAT_COSMOS`, `ADDRESS_FORMAT_TRON`, `ADDRESS_FORMAT_SUI`, `ADDRESS_FORMAT_APTOS`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH`, `ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH`, `ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR`, `ADDRESS_FORMAT_SEI`, `ADDRESS_FORMAT_XLM`, `ADDRESS_FORMAT_DOGE_MAINNET`, `ADDRESS_FORMAT_DOGE_TESTNET`, `ADDRESS_FORMAT_TON_V3R2`, `ADDRESS_FORMAT_TON_V4R2`, `ADDRESS_FORMAT_TON_V5R1`, `ADDRESS_FORMAT_XRP`, `ADDRESS_FORMAT_SPARK_MAINNET`, `ADDRESS_FORMAT_SPARK_REGTEST`
address field
createPoliciesResult field
A list of unique identifiers for the created policies.
item field
signRawPayloadsResult field
signatures field
Component of an ECSDA signature.
Component of an ECSDA signature.
Component of an ECSDA signature.
createReadOnlySessionResult field
Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons.
Human-readable name for an Organization.
Unique identifier for a given User.
Human-readable name for a User.
String representing a read only session
UTC timestamp in seconds representing the expiry time for the read only session.
createOauthProvidersResult field
A list of unique identifiers for Oauth Providers
item field
deleteOauthProvidersResult field
A list of unique identifiers for Oauth Providers
item field
createSubOrganizationResultV5 field
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
oauthResult field
Unique identifier for the authenticating User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
createReadWriteSessionResult field
Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons.
Human-readable name for an Organization.
Unique identifier for a given User.
Human-readable name for a User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
createSubOrganizationResultV6 field
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
deletePrivateKeysResult field
A list of private key unique identifiers that were removed
item field
deleteWalletsResult field
A list of wallet unique identifiers that were removed
item field
createReadWriteSessionResultV2 field
Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons.
Human-readable name for an Organization.
Unique identifier for a given User.
Human-readable name for a User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
deleteSubOrganizationResult field
Unique identifier of the sub organization that was removed
initOtpAuthResult field
Unique identifier for an OTP authentication
otpAuthResult field
Unique identifier for the authenticating User.
Unique identifier for the created API key.
HPKE encrypted credential bundle
createSubOrganizationResultV7 field
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
updateWalletResult field
A Wallet ID.
updatePolicyResultV2 field
Unique identifier for a given Policy.
initOtpAuthResultV2 field
Unique identifier for an OTP authentication
initOtpResult field
Unique identifier for an OTP authentication
verifyOtpResult field
Signed JWT containing a unique id, expiry, verification type, contact. Verification status of a user is updated when the token is consumed (in OTP\_LOGIN requests)
otpLoginResult field
Signed JWT containing an expiry, public key, session type, user id, and organization id
stampLoginResult field
Signed JWT containing an expiry, public key, session type, user id, and organization id
oauthLoginResult field
Signed JWT containing an expiry, public key, session type, user id, and organization id
updateUserNameResult field
Unique identifier of the User whose name was updated.
updateUserEmailResult field
Unique identifier of the User whose email was updated.
updateUserPhoneNumberResult field
Unique identifier of the User whose phone number was updated.
initFiatOnRampResult field
Unique URL for a given fiat on-ramp flow.
Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow.
Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project.
createSmartContractInterfaceResult field
The ID of the created Smart Contract Interface.
deleteSmartContractInterfaceResult field
The ID of the deleted Smart Contract Interface.
enableAuthProxyResult field
A User ID with permission to initiate authentication.
disableAuthProxyResult field
updateAuthProxyConfigResult field
Unique identifier for a given User. (representing the turnkey signer user id)
createOauth2CredentialResult field
Unique identifier of the OAuth 2.0 credential that was created
updateOauth2CredentialResult field
Unique identifier of the OAuth 2.0 credential that was updated
deleteOauth2CredentialResult field
Unique identifier of the OAuth 2.0 credential that was deleted
oauth2AuthenticateResult field
Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity
deleteWalletAccountsResult field
A list of wallet account unique identifiers that were removed
item field
deletePoliciesResult field
A list of unique identifiers for the deleted policies.
item field
ethSendRawTransactionResult field
The transaction hash of the sent transaction
createFiatOnRampCredentialResult field
Unique identifier of the Fiat On-Ramp credential that was created
updateFiatOnRampCredentialResult field
Unique identifier of the Fiat On-Ramp credential that was updated
deleteFiatOnRampCredentialResult field
Unique identifier of the Fiat On-Ramp credential that was deleted
ethSendTransactionResult field
The send\_transaction\_status ID associated with the transaction submission
upsertGasUsageConfigResult field
Unique identifier for the gas usage configuration that was created or updated.
createTvcAppResult field
The unique identifier for the TVC application
The unique identifier for the TVC manifest set
The unique identifier(s) of the manifest set operators
item field
The required number of approvals for the manifest set
createTvcDeploymentResult field
The unique identifier for the TVC deployment
The unique identifier for the TVC manifest
createTvcManifestApprovalsResult field
The unique identifier(s) for the manifest approvals
item field
solSendTransactionResult field
The send\_transaction\_status ID associated with the transaction submission
initOtpResultV2 field
Unique identifier for an OTP flow
Signed bundle containing a target encryption key to use when submitting OTP codes.
updateOrganizationNameResult field
Unique identifier for the Organization.
The updated organization name.
createSubOrganizationResultV8 field
subOrganizationId field
wallet field
walletId field
A list of account addresses.
item field
rootUserIds field
item field
createOauthProvidersResultV2 field
A list of unique identifiers for Oauth Providers
item field
createWebhookEndpointResult field
Unique identifier of the created webhook endpoint.
webhookEndpoint field
Unique identifier of the webhook endpoint.
Unique identifier for a given Organization.
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
Current subscriptions attached to this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
updateWebhookEndpointResult field
Unique identifier of the updated webhook endpoint.
webhookEndpoint field
Unique identifier of the webhook endpoint.
Unique identifier for a given Organization.
The destination URL for webhook delivery.
Human-readable name for this webhook endpoint.
Whether this webhook endpoint is active.
Current subscriptions attached to this endpoint.
The event type to subscribe to (for example, ACTIVITY\_UPDATES, BALANCE\_CONFIRMED\_UPDATES, or BALANCE\_FINALIZED\_UPDATES).
JSON-encoded filter criteria for this subscription.
Whether this subscription is active.
deleteWebhookEndpointResult field
Unique identifier of the deleted webhook endpoint.
setIpAllowlistResult field
removeIpAllowlistResult field
updateTvcAppLiveDeploymentResult field
deleteTvcDeploymentResult field
The unique identifier of the deleted TVC deployment.
deleteTvcAppAndDeploymentsResult field
The unique identifier of the deleted TVC app.
restoreTvcDeploymentResult field
The unique identifier of the restored TVC deployment.
sparkSignFrostResult field
Partial signatures plus Turnkey commitments, one per request, in order.
Hex-encoded FROST partial signature.
Turnkey's hiding commitment D (hex-encoded compressed secp256k1 point). Forward to the Spark Operator.
Turnkey's binding commitment E (hex-encoded compressed secp256k1 point). Forward to the Spark Operator.
sparkPrepareTransferResult field
Per-operator ECIES-encrypted packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Hex-encoded ECDSA-DER signature of the TransferPackage signing payload, signed with the wallet's IDENTITY key.
Newly-derived SigningLeaf public keys, one per leaf, in input order.
The Spark leaf\_id this public key was derived for.
Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf\_id.
sparkClaimTransferResult field
Per-operator ECIES-encrypted packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Newly-derived SigningLeaf public keys, one per leaf, in input order.
The Spark leaf\_id this public key was derived for.
Hex-encoded compressed secp256k1 point (33 bytes) for the SigningLeaf derivation at leaf\_id.
sparkPrepareLightningReceiveResult field
Per-operator ECIES-encrypted Feldman share packages.
Spark operator identifier (UUID).
ECIES ciphertext (hex-encoded) opaque to Turnkey after emission.
Hex-encoded SHA256(preimage). Forward to the Lightning node.
postTvcQuorumKeyShareResult field
The unique identifier for the provisioning quorum key share
ethSendTransactionResultV2 field
The send\_transaction\_status ID associated with the transaction submission
createMfaPolicyResult field
Unique identifier for a given MFA Policy.
updateMfaPolicyResult field
Unique identifier for a given MFA Policy.
deleteMfaPolicyResult field
Unique identifier for a given MFA Policy.
createSessionProfileResult field
Unique identifier for a given Session Profile.
A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata.
Unique identifier for a given Vote object.
Unique identifier for a given User.
user field
Unique identifier for a given User.
Human-readable name for a User.
The user's email address.
The user's phone number in E.164 format e.g. +13214567890
A list of Authenticator parameters.
Types of transports that may be used by an Authenticator (e.g., USB, NFC, BLE).
item field
Enum options: `AUTHENTICATOR_TRANSPORT_BLE`, `AUTHENTICATOR_TRANSPORT_INTERNAL`, `AUTHENTICATOR_TRANSPORT_NFC`, `AUTHENTICATOR_TRANSPORT_USB`, `AUTHENTICATOR_TRANSPORT_HYBRID`
attestationType field
Identifier indicating the type of the Security Key.
Unique identifier for a WebAuthn credential.
The type of Authenticator device.
credential field
The public component of a cryptographic key pair used to sign messages and transactions.
type field
Enum options: `CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR`, `CREDENTIAL_TYPE_API_KEY_P256`, `CREDENTIAL_TYPE_RECOVER_USER_KEY_P256`, `CREDENTIAL_TYPE_API_KEY_SECP256K1`, `CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256`, `CREDENTIAL_TYPE_API_KEY_ED25519`, `CREDENTIAL_TYPE_OTP_AUTH_KEY_P256`, `CREDENTIAL_TYPE_READ_WRITE_SESSION_KEY_P256`, `CREDENTIAL_TYPE_OAUTH_KEY_P256`, `CREDENTIAL_TYPE_LOGIN`
The session profile associated with this credential, if any. This field is only applicable for credentials of type CREDENTIAL\_TYPE\_LOGIN.
Unique identifier for a given Authenticator.
Human-readable name for an Authenticator.
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
credential field
The public component of a cryptographic key pair used to sign messages and transactions.
type field
Enum options: `CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR`, `CREDENTIAL_TYPE_API_KEY_P256`, `CREDENTIAL_TYPE_RECOVER_USER_KEY_P256`, `CREDENTIAL_TYPE_API_KEY_SECP256K1`, `CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256`, `CREDENTIAL_TYPE_API_KEY_ED25519`, `CREDENTIAL_TYPE_OTP_AUTH_KEY_P256`, `CREDENTIAL_TYPE_READ_WRITE_SESSION_KEY_P256`, `CREDENTIAL_TYPE_OAUTH_KEY_P256`, `CREDENTIAL_TYPE_LOGIN`
The session profile associated with this credential, if any. This field is only applicable for credentials of type CREDENTIAL\_TYPE\_LOGIN.
Unique identifier for a given API Key.
Human-readable name for an API Key.
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
Optional window (in seconds) indicating how long the API Key should last.
A list of User Tag IDs.
item field
A list of Oauth Providers.
Unique identifier for an OAuth Provider
Human-readable name to identify a Provider.
The issuer of the token, typically a URL indicating the authentication server, e.g [https://accounts.google.com](https://accounts.google.com)
Expected audience ('aud' attribute of the signed token) which represents the app ID
Expected subject ('sub' attribute of the signed token) which represents the user ID
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
A list of MFA Policies that define multi-factor authentication requirements for this user.
Unique identifier for a given MFA Policy.
Human-readable name for an MFA Policy.
A condition expression that evaluates to true or false, determining when this MFA policy applies.
An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA.
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
type field
Enum options: `AUTHENTICATION_TYPE_EMAIL_OTP`, `AUTHENTICATION_TYPE_SMS_OTP`, `AUTHENTICATION_TYPE_PASSKEY`, `AUTHENTICATION_TYPE_API_KEY`, `AUTHENTICATION_TYPE_OAUTH`, `AUTHENTICATION_TYPE_SESSION`
Optional specific authenticator ID required (e.g., for requiring a specific session profile id)
The order in which this policy is evaluated relative to other MFA policies.
Optional human-readable notes added by a User to describe a particular MFA policy.
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
Unique identifier for a given Activity object.
selection field
Enum options: `VOTE_SELECTION_APPROVED`, `VOTE_SELECTION_REJECTED`
The raw message being signed within a Vote.
The public component of a cryptographic key pair used to sign messages and transactions.
The signature applied to a particular vote.
Method used to produce a signature.
createdAt field
seconds field
nanos field
A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations.
scheme field
Enum options: `SIGNATURE_SCHEME_EPHEMERAL_KEY_P256`
Ephemeral public key.
JSON serialized AppProofPayload.
Signature over hashed proof\_payload.
An artifact verifying a User's action.
canApprove field
canReject field
createdAt field
seconds field
nanos field
updatedAt field
seconds field
nanos field
failure field
code field
message field
details field
@type field
```bash title="cURL" theme={"system"}
curl --request POST \
--url https://api.turnkey.com/public/v1/query/get_activity \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: (see Authorizations)" \
--data '{
"organizationId": "",
"activityId": ""
}'
```
```javascript title="JavaScript" theme={"system"}
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().getActivity({
organizationId: " (Unique identifier for a given organization.)",
activityId: " (Unique identifier for a given activity object.)"
});
```
```json 200 theme={"system"}
{
"activity": {
"id": "",
"organizationId": "",
"status": "",
"type": "",
"intent": {
"createOrganizationIntent": {
"organizationName": "",
"rootEmail": "",
"rootAuthenticator": {
"authenticatorName": "",
"userId": "",
"attestation": {
"id": "",
"type": "",
"rawId": "",
"authenticatorAttachment": "",
"response": {
"clientDataJson": "",
"attestationObject": "",
"transports": [
""
],
"authenticatorAttachment": ""
},
"clientExtensionResults": {
"appid": "",
"appidExclude": "",
"credProps": {
"rk": ""
}
}
},
"challenge": ""
},
"rootUserId": ""
}
},
"result": {
"createOrganizationResult": {
"organizationId": ""
},
"createAuthenticatorsResult": {
"authenticatorIds": [
""
]
},
"createUsersResult": {
"userIds": [
""
]
},
"createPrivateKeysResult": {
"privateKeyIds": [
""
]
},
"createInvitationsResult": {
"invitationIds": [
""
]
},
"acceptInvitationResult": {
"invitationId": "",
"userId": ""
},
"signRawPayloadResult": {
"r": "",
"s": "",
"v": ""
},
"createPolicyResult": {
"policyId": ""
},
"disablePrivateKeyResult": {
"privateKeyId": ""
},
"deleteUsersResult": {
"userIds": [
""
]
},
"deleteAuthenticatorsResult": {
"authenticatorIds": [
""
]
},
"deleteInvitationResult": {
"invitationId": ""
},
"deleteOrganizationResult": {
"organizationId": ""
},
"deletePolicyResult": {
"policyId": ""
},
"createUserTagResult": {
"userTagId": "",
"userIds": [
""
]
},
"deleteUserTagsResult": {
"userTagIds": [
""
],
"userIds": [
""
]
},
"signTransactionResult": {
"signedTransaction": ""
},
"deleteApiKeysResult": {
"apiKeyIds": [
""
]
},
"createApiKeysResult": {
"apiKeyIds": [
""
]
},
"createPrivateKeyTagResult": {
"privateKeyTagId": "",
"privateKeyIds": [
""
]
},
"deletePrivateKeyTagsResult": {
"privateKeyTagIds": [
""
],
"privateKeyIds": [
""
]
},
"setPaymentMethodResult": {
"lastFour": "",
"cardHolderName": "",
"cardHolderEmail": ""
},
"activateBillingTierResult": {
"productId": ""
},
"deletePaymentMethodResult": {
"paymentMethodId": ""
},
"createApiOnlyUsersResult": {
"userIds": [
""
]
},
"updateRootQuorumResult": "",
"updateUserTagResult": {
"userTagId": ""
},
"updatePrivateKeyTagResult": {
"privateKeyTagId": ""
},
"createSubOrganizationResult": {
"subOrganizationId": "",
"rootUserIds": [
""
]
},
"updateAllowedOriginsResult": "",
"createPrivateKeysResultV2": {
"privateKeys": [
{
"privateKeyId": "",
"addresses": [
{
"format": "",
"address": ""
}
]
}
]
},
"updateUserResult": {
"userId": ""
},
"updatePolicyResult": {
"policyId": ""
},
"createSubOrganizationResultV3": {
"subOrganizationId": "",
"privateKeys": [
{
"privateKeyId": "",
"addresses": [
{
"format": "",
"address": ""
}
]
}
],
"rootUserIds": [
""
]
},
"createWalletResult": {
"walletId": "",
"addresses": [
""
]
},
"createWalletAccountsResult": {
"addresses": [
""
]
},
"initUserEmailRecoveryResult": {
"userId": ""
},
"recoverUserResult": {
"authenticatorId": [
""
]
},
"setOrganizationFeatureResult": {
"features": [
{
"name": "",
"value": ""
}
]
},
"removeOrganizationFeatureResult": {
"features": [
{
"name": "",
"value": ""
}
]
},
"exportPrivateKeyResult": {
"privateKeyId": "",
"exportBundle": ""
},
"exportWalletResult": {
"walletId": "",
"exportBundle": ""
},
"createSubOrganizationResultV4": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
},
"emailAuthResult": {
"userId": "",
"apiKeyId": ""
},
"exportWalletAccountResult": {
"address": "",
"exportBundle": ""
},
"initImportWalletResult": {
"importBundle": ""
},
"importWalletResult": {
"walletId": "",
"addresses": [
""
]
},
"initImportPrivateKeyResult": {
"importBundle": ""
},
"importPrivateKeyResult": {
"privateKeyId": "",
"addresses": [
{
"format": "",
"address": ""
}
]
},
"createPoliciesResult": {
"policyIds": [
""
]
},
"signRawPayloadsResult": {
"signatures": [
{
"r": "",
"s": "",
"v": ""
}
]
},
"createReadOnlySessionResult": {
"organizationId": "",
"organizationName": "",
"userId": "",
"username": "",
"session": "",
"sessionExpiry": ""
},
"createOauthProvidersResult": {
"providerIds": [
""
]
},
"deleteOauthProvidersResult": {
"providerIds": [
""
]
},
"createSubOrganizationResultV5": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
},
"oauthResult": {
"userId": "",
"apiKeyId": "",
"credentialBundle": ""
},
"createReadWriteSessionResult": {
"organizationId": "",
"organizationName": "",
"userId": "",
"username": "",
"apiKeyId": "",
"credentialBundle": ""
},
"createSubOrganizationResultV6": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
},
"deletePrivateKeysResult": {
"privateKeyIds": [
""
]
},
"deleteWalletsResult": {
"walletIds": [
""
]
},
"createReadWriteSessionResultV2": {
"organizationId": "",
"organizationName": "",
"userId": "",
"username": "",
"apiKeyId": "",
"credentialBundle": ""
},
"deleteSubOrganizationResult": {
"subOrganizationUuid": ""
},
"initOtpAuthResult": {
"otpId": ""
},
"otpAuthResult": {
"userId": "",
"apiKeyId": "",
"credentialBundle": ""
},
"createSubOrganizationResultV7": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
},
"updateWalletResult": {
"walletId": ""
},
"updatePolicyResultV2": {
"policyId": ""
},
"initOtpAuthResultV2": {
"otpId": ""
},
"initOtpResult": {
"otpId": ""
},
"verifyOtpResult": {
"verificationToken": ""
},
"otpLoginResult": {
"session": ""
},
"stampLoginResult": {
"session": ""
},
"oauthLoginResult": {
"session": ""
},
"updateUserNameResult": {
"userId": ""
},
"updateUserEmailResult": {
"userId": ""
},
"updateUserPhoneNumberResult": {
"userId": ""
},
"initFiatOnRampResult": {
"onRampUrl": "",
"onRampTransactionId": "",
"onRampUrlSignature": ""
},
"createSmartContractInterfaceResult": {
"smartContractInterfaceId": ""
},
"deleteSmartContractInterfaceResult": {
"smartContractInterfaceId": ""
},
"enableAuthProxyResult": {
"userId": ""
},
"disableAuthProxyResult": "",
"updateAuthProxyConfigResult": {
"configId": ""
},
"createOauth2CredentialResult": {
"oauth2CredentialId": ""
},
"updateOauth2CredentialResult": {
"oauth2CredentialId": ""
},
"deleteOauth2CredentialResult": {
"oauth2CredentialId": ""
},
"oauth2AuthenticateResult": {
"oidcToken": ""
},
"deleteWalletAccountsResult": {
"walletAccountIds": [
""
]
},
"deletePoliciesResult": {
"policyIds": [
""
]
},
"ethSendRawTransactionResult": {
"transactionHash": ""
},
"createFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
},
"updateFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
},
"deleteFiatOnRampCredentialResult": {
"fiatOnRampCredentialId": ""
},
"ethSendTransactionResult": {
"sendTransactionStatusId": ""
},
"upsertGasUsageConfigResult": {
"gasUsageConfigId": ""
},
"createTvcAppResult": {
"appId": "",
"manifestSetId": "",
"manifestSetOperatorIds": [
""
],
"manifestSetThreshold": ""
},
"createTvcDeploymentResult": {
"deploymentId": "",
"manifestId": ""
},
"createTvcManifestApprovalsResult": {
"approvalIds": [
""
]
},
"solSendTransactionResult": {
"sendTransactionStatusId": ""
},
"initOtpResultV2": {
"otpId": "",
"otpEncryptionTargetBundle": ""
},
"updateOrganizationNameResult": {
"organizationId": "",
"organizationName": ""
},
"createSubOrganizationResultV8": {
"subOrganizationId": "",
"wallet": {
"walletId": "",
"addresses": [
""
]
},
"rootUserIds": [
""
]
},
"createOauthProvidersResultV2": {
"providerIds": [
""
]
},
"createWebhookEndpointResult": {
"endpointId": "",
"webhookEndpoint": {
"endpointId": "",
"organizationId": "",
"url": "",
"name": "",
"isActive": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
},
"updateWebhookEndpointResult": {
"endpointId": "",
"webhookEndpoint": {
"endpointId": "",
"organizationId": "",
"url": "",
"name": "",
"isActive": "",
"subscriptions": [
{
"eventType": "",
"filtersJson": "",
"isActive": ""
}
]
}
},
"deleteWebhookEndpointResult": {
"endpointId": ""
},
"setIpAllowlistResult": "",
"removeIpAllowlistResult": "",
"updateTvcAppLiveDeploymentResult": "",
"deleteTvcDeploymentResult": {
"deploymentId": ""
},
"deleteTvcAppAndDeploymentsResult": {
"appId": ""
},
"restoreTvcDeploymentResult": {
"deploymentId": ""
},
"sparkSignFrostResult": {
"signatures": [
{
"signatureShare": "",
"hiding": "",
"binding": ""
}
]
},
"sparkPrepareTransferResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"transferUserSignature": "",
"newLeafPublicKeys": [
{
"leafId": "",
"publicKey": ""
}
]
},
"sparkClaimTransferResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"newLeafPublicKeys": [
{
"leafId": "",
"publicKey": ""
}
]
},
"sparkPrepareLightningReceiveResult": {
"operatorPackages": [
{
"operatorId": "",
"encryptedPackage": ""
}
],
"paymentHash": ""
},
"postTvcQuorumKeyShareResult": {
"provisioningShareId": ""
},
"ethSendTransactionResultV2": {
"sendTransactionStatusId": ""
},
"createMfaPolicyResult": {
"mfaPolicyId": ""
},
"updateMfaPolicyResult": {
"mfaPolicyId": ""
},
"deleteMfaPolicyResult": {
"mfaPolicyId": ""
},
"createSessionProfileResult": {
"sessionProfileId": ""
}
},
"votes": [
{
"id": "",
"userId": "",
"user": {
"userId": "",
"userName": "",
"userEmail": "",
"userPhoneNumber": "",
"authenticators": [
{
"transports": [
""
],
"attestationType": "",
"aaguid": "",
"credentialId": "",
"model": "",
"credential": {
"publicKey": "",
"type": "",
"sessionProfileId": ""
},
"authenticatorId": "