Propose vault policy update
curl --request POST \
--url https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"reason": "Requested by partner",
"policy": {
"spendLimit": {
"amountAtomic": "500000000"
},
"allowedTokens": [
"USDC"
],
"yield": {
"provider": "none"
}
}
}
'import requests
url = "https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies"
payload = {
"reason": "Requested by partner",
"policy": {
"spendLimit": { "amountAtomic": "500000000" },
"allowedTokens": ["USDC"],
"yield": { "provider": "none" }
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Basic <encoded-value>",
"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: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reason: 'Requested by partner',
policy: {
spendLimit: {amountAtomic: '500000000'},
allowedTokens: ['USDC'],
yield: {provider: 'none'}
}
})
};
fetch('https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies', 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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies",
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([
'reason' => 'Requested by partner',
'policy' => [
'spendLimit' => [
'amountAtomic' => '500000000'
],
'allowedTokens' => [
'USDC'
],
'yield' => [
'provider' => 'none'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies"
payload := strings.NewReader("{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies")
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"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "vault_policy_123",
"vaultId": "vault_123",
"version": 1,
"policySchemaVersion": 1,
"status": "draft",
"ownershipMode": "external",
"allowedTokens": [
{
"symbol": "USDC",
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"decimals": 6
}
],
"spendLimits": {
"spendLimitAtomic": "500000000",
"currency": "USD",
"decimals": 6,
"period": "fixed_30_day",
"periodSeconds": 2592000,
"enforcement": "zodiac_allowance_plus_inflight_database_reservations"
},
"yieldRules": {
"provider": "none",
"mode": "disabled"
},
"authorization": {},
"resourceVersion": 1,
"createdAt": "2026-08-28T10:00:00.000Z",
"updatedAt": "2026-08-28T10:00:00.000Z"
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}Policies
Propose a Vault policy update
Create a pending Vault policy update for the owner to authorize.
POST
/
v2
/
accounts
/
{accountId}
/
vault
/
policies
Propose vault policy update
curl --request POST \
--url https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"reason": "Requested by partner",
"policy": {
"spendLimit": {
"amountAtomic": "500000000"
},
"allowedTokens": [
"USDC"
],
"yield": {
"provider": "none"
}
}
}
'import requests
url = "https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies"
payload = {
"reason": "Requested by partner",
"policy": {
"spendLimit": { "amountAtomic": "500000000" },
"allowedTokens": ["USDC"],
"yield": { "provider": "none" }
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Basic <encoded-value>",
"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: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reason: 'Requested by partner',
policy: {
spendLimit: {amountAtomic: '500000000'},
allowedTokens: ['USDC'],
yield: {provider: 'none'}
}
})
};
fetch('https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies', 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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies",
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([
'reason' => 'Requested by partner',
'policy' => [
'spendLimit' => [
'amountAtomic' => '500000000'
],
'allowedTokens' => [
'USDC'
],
'yield' => [
'provider' => 'none'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies"
payload := strings.NewReader("{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.stableyard.fi/v2/accounts/{accountId}/vault/policies")
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"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Requested by partner\",\n \"policy\": {\n \"spendLimit\": {\n \"amountAtomic\": \"500000000\"\n },\n \"allowedTokens\": [\n \"USDC\"\n ],\n \"yield\": {\n \"provider\": \"none\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "vault_policy_123",
"vaultId": "vault_123",
"version": 1,
"policySchemaVersion": 1,
"status": "draft",
"ownershipMode": "external",
"allowedTokens": [
{
"symbol": "USDC",
"chainId": 42161,
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"decimals": 6
}
],
"spendLimits": {
"spendLimitAtomic": "500000000",
"currency": "USD",
"decimals": 6,
"period": "fixed_30_day",
"periodSeconds": 2592000,
"enforcement": "zodiac_allowance_plus_inflight_database_reservations"
},
"yieldRules": {
"provider": "none",
"mode": "disabled"
},
"authorization": {},
"resourceVersion": 1,
"createdAt": "2026-08-28T10:00:00.000Z",
"updatedAt": "2026-08-28T10:00:00.000Z"
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}{
"error": {
"code": "bad_request",
"message": "The request is invalid",
"details": "example"
}
}Creates a pending policy update. External-signer Vaults return an EIP-712 signing action; managed Vaults send an email approval challenge to the verified managed contact. Complete it with Authorize a Vault policy.
Idempotency-Key is required.Authorizations
HTTP Basic auth. Username is the Stableyard app ID. Password is the app secret. The optional Stableyard-Version request header must match the environment pin.
Headers
Use this for retry-safe payment operations from your backend.
Example:
"payment-request-001"
Optional contract-version assertion. Omit it to use the app environment's pinned version. A different supported version is accepted only after that environment is explicitly migrated.
Available options:
2026-09-09 Path Parameters
Canonical account id returned by the Accounts API.
Example:
"acct_123"
Body
application/json
Response
Pending policy
Example:
"vault_policy_123"
Example:
"vault_123"
Required range:
x >= 1Required range:
x >= 1Available options:
draft, pending_authorization, authorized, installing, active, superseded, revoked, failed Available options:
external, stableyard Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
x >= 1Present on single-policy responses while authorization is pending.
Show child attributes
Show child attributes