Prepare a MicroVault authorization
curl --request POST \
--url https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"action": "create_vault",
"parameters": {
"customerVaultNonce": "3",
"baseAsset": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"name": "Acme Treasury MicroVault",
"symbol": "acmeUSDC",
"feeRecipient": "0x1111111111111111111111111111111111111111",
"managementFeeBps": 25,
"performanceFeeBps": 1000
},
"deadline": 1789088400,
"nonce": "7"
}
'import requests
url = "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations"
payload = {
"action": "create_vault",
"parameters": {
"customerVaultNonce": "3",
"baseAsset": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"name": "Acme Treasury MicroVault",
"symbol": "acmeUSDC",
"feeRecipient": "0x1111111111111111111111111111111111111111",
"managementFeeBps": 25,
"performanceFeeBps": 1000
},
"deadline": 1789088400,
"nonce": "7"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: 'create_vault',
parameters: {
customerVaultNonce: '3',
baseAsset: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238',
name: 'Acme Treasury MicroVault',
symbol: 'acmeUSDC',
feeRecipient: '0x1111111111111111111111111111111111111111',
managementFeeBps: 25,
performanceFeeBps: 1000
},
deadline: 1789088400,
nonce: '7'
})
};
fetch('https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'create_vault',
'parameters' => [
'customerVaultNonce' => '3',
'baseAsset' => '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238',
'name' => 'Acme Treasury MicroVault',
'symbol' => 'acmeUSDC',
'feeRecipient' => '0x1111111111111111111111111111111111111111',
'managementFeeBps' => 25,
'performanceFeeBps' => 1000
],
'deadline' => 1789088400,
'nonce' => '7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations"
payload := strings.NewReader("{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}"
response = http.request(request)
puts response.read_body{
"id": "4f36d486-58c9-441b-8535-6097ad3f1832",
"status": "awaiting_signature",
"signingPayload": {
"action": "set_source_mode",
"chainId": 11155111,
"vault": "0x2222222222222222222222222222222222222222",
"parameters": {
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
},
"signingPayloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"summary": {
"text": "Set Morpho Steakhouse USDC Prime to active"
},
"predictedEffects": [
{
"kind": "source_mode",
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
],
"simulation": {
"ok": true
},
"turnkeyActivityId": null,
"turnkeyStatus": null
}{
"id": "4f36d486-58c9-441b-8535-6097ad3f1832",
"status": "awaiting_signature",
"signingPayload": {
"action": "set_source_mode",
"chainId": 11155111,
"vault": "0x2222222222222222222222222222222222222222",
"parameters": {
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
},
"signingPayloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"summary": {
"text": "Set Morpho Steakhouse USDC Prime to active"
},
"predictedEffects": [
{
"kind": "source_mode",
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
],
"simulation": {
"ok": true
},
"turnkeyActivityId": null,
"turnkeyStatus": null
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "Unauthenticated request",
"message": "Missing or invalid bearer token"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}Authorizations
Create a MicroVault authorization
Validates and simulates a vault action, then returns the payload to authorize.
POST
/
v2
/
microvaults
/
customers
/
{customerRecordId}
/
authorizations
Prepare a MicroVault authorization
curl --request POST \
--url https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"action": "create_vault",
"parameters": {
"customerVaultNonce": "3",
"baseAsset": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"name": "Acme Treasury MicroVault",
"symbol": "acmeUSDC",
"feeRecipient": "0x1111111111111111111111111111111111111111",
"managementFeeBps": 25,
"performanceFeeBps": 1000
},
"deadline": 1789088400,
"nonce": "7"
}
'import requests
url = "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations"
payload = {
"action": "create_vault",
"parameters": {
"customerVaultNonce": "3",
"baseAsset": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
"name": "Acme Treasury MicroVault",
"symbol": "acmeUSDC",
"feeRecipient": "0x1111111111111111111111111111111111111111",
"managementFeeBps": 25,
"performanceFeeBps": 1000
},
"deadline": 1789088400,
"nonce": "7"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: 'create_vault',
parameters: {
customerVaultNonce: '3',
baseAsset: '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238',
name: 'Acme Treasury MicroVault',
symbol: 'acmeUSDC',
feeRecipient: '0x1111111111111111111111111111111111111111',
managementFeeBps: 25,
performanceFeeBps: 1000
},
deadline: 1789088400,
nonce: '7'
})
};
fetch('https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'create_vault',
'parameters' => [
'customerVaultNonce' => '3',
'baseAsset' => '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238',
'name' => 'Acme Treasury MicroVault',
'symbol' => 'acmeUSDC',
'feeRecipient' => '0x1111111111111111111111111111111111111111',
'managementFeeBps' => 25,
'performanceFeeBps' => 1000
],
'deadline' => 1789088400,
'nonce' => '7'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations"
payload := strings.NewReader("{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.groundtech.co/v2/microvaults/customers/{customerRecordId}/authorizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"create_vault\",\n \"parameters\": {\n \"customerVaultNonce\": \"3\",\n \"baseAsset\": \"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238\",\n \"name\": \"Acme Treasury MicroVault\",\n \"symbol\": \"acmeUSDC\",\n \"feeRecipient\": \"0x1111111111111111111111111111111111111111\",\n \"managementFeeBps\": 25,\n \"performanceFeeBps\": 1000\n },\n \"deadline\": 1789088400,\n \"nonce\": \"7\"\n}"
response = http.request(request)
puts response.read_body{
"id": "4f36d486-58c9-441b-8535-6097ad3f1832",
"status": "awaiting_signature",
"signingPayload": {
"action": "set_source_mode",
"chainId": 11155111,
"vault": "0x2222222222222222222222222222222222222222",
"parameters": {
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
},
"signingPayloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"summary": {
"text": "Set Morpho Steakhouse USDC Prime to active"
},
"predictedEffects": [
{
"kind": "source_mode",
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
],
"simulation": {
"ok": true
},
"turnkeyActivityId": null,
"turnkeyStatus": null
}{
"id": "4f36d486-58c9-441b-8535-6097ad3f1832",
"status": "awaiting_signature",
"signingPayload": {
"action": "set_source_mode",
"chainId": 11155111,
"vault": "0x2222222222222222222222222222222222222222",
"parameters": {
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
},
"signingPayloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"summary": {
"text": "Set Morpho Steakhouse USDC Prime to active"
},
"predictedEffects": [
{
"kind": "source_mode",
"sourceId": "0x1111111111111111111111111111111111111111111111111111111111111111",
"mode": "active"
}
],
"simulation": {
"ok": true
},
"turnkeyActivityId": null,
"turnkeyStatus": null
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "Unauthenticated request",
"message": "Missing or invalid bearer token"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}{
"error": "microvaults_not_enabled",
"message": "MicroVaults are not enabled for this organization"
}Validate and simulate an administrative or delegated action, then prepare its exact signing payload.
MicroVaults are in private preview for enabled sandbox organizations on Ethereum Sepolia.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Reuse only when retrying the identical mutation.
Required string length:
1 - 200Path Parameters
Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Example:
"8f4c52d7-62ab-4db9-a964-92f481f6b851"
Body
application/json
- Create vault
- Set shareholder root
- Set fee recipient
- Set management fee
- Set performance fee
- Set source mode
- Set allocations
- Add pause flags
- Remove pause flags
Available options:
create_vault Show child attributes
Show child attributes
Unix timestamp no more than seven days in the future.
Unsigned base-10 integer string. Asset and share amounts use token base units.
Pattern:
^(0|[1-9][0-9]*)$Example:
"1000000"
Required string length:
1 - 64Response
Existing authorization returned for an identical replay.
Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Example:
"8f4c52d7-62ab-4db9-a964-92f481f6b851"
Pattern:
^0x[0-9a-fA-F]{64}$Example:
"0x1111111111111111111111111111111111111111111111111111111111111111"
Show child attributes
Show child attributes
Example:
{ "to": "0x2222222222222222222222222222222222222222", "data": "0x12345678", "value": "0" }