---
title: "Set a non-custodial Autopilot staking policy"
method: POST
path: "/api/v1/autopilot/policy"
tags: ["Autopilot"]
---

# Set a non-custodial Autopilot staking policy

`POST /api/v1/autopilot/policy`

## Request

- Base URL: `https://solentic.theblueprint.xyz`
- URL: `https://solentic.theblueprint.xyz/api/v1/autopilot/policy`
- Auth: none required

Registers a non-custodial Autopilot policy for a wallet. You sign the canonical policy message ONCE with the wallet's key, proving you authorize the rule — Solentic never receives or holds the secret key. The policy says: keep `keepLiquidSol` SOL liquid in the wallet, and whenever idle SOL above that buffer exceeds `minSweepSol`, build a stake transaction. When that threshold is crossed, Solentic builds an UNSIGNED stake transaction and POSTs an `autopilot_stake_intent` payload to your `callbackUrl`; the agent signs and submits it client-side, so custody never leaves the agent. The canonical message that must be signed (Ed25519, returned base58) is exactly: "solentic-autopilot-policy:v1\nwallet=<walletAddress>\nkeepLiquidLamports=<round(keepLiquidSol*1e9)>\nminSweepLamports=<round(minSweepSol*1e9)>\ncallbackUrl=<callbackUrl>\npaused=<true|false>\nnonce=<nonce>".

## Request body

- object
  - `walletAddress` string, required: Solana wallet address (base58 public key) the policy governs and that signs the canonical message
  - `keepLiquidSol` number, required: Amount of SOL to always keep liquid in the wallet — never swept into staking
  - `minSweepSol` number, required: Minimum idle SOL above keepLiquidSol before Solentic builds a stake transaction
  - `callbackUrl` string, uri, required: HTTPS URL that receives the autopilot_stake_intent payload (unsigned stake transaction) for the agent to sign and submit
  - `paused` boolean: Optional — set true to keep the policy registered but inactive (no stake intents are produced)
  - `nonce` integer, required: Monotonic counter — must increase on every policy update to prevent replay; included in the signed canonical message
  - `signature` string, required: Base58 Ed25519 signature by walletAddress over the canonical policy message (see canonicalMessageFormat / description)

## Response `200`

Autopilot policy stored

- object
  - `policy` object: The stored policy
    - `walletAddress` string
    - `keepLiquidSol` number
    - `minSweepSol` number
    - `callbackUrl` string
    - `paused` boolean
    - `nonce` integer
  - `message` string
  - `canonicalMessageFormat` string: The exact canonical message template that was signed
  - `_meta` Meta (unresolved $ref)

## Other responses

- `400`: Validation error, bad nonce, or invalid signature
- `503`: Autopilot service not available

---

[API](https://skmtc.dev/theblueprint/apis/blueprint-staking-api.md) · [All operations](https://skmtc.dev/theblueprint/apis/blueprint-staking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/theblueprint/apis/blueprint-staking-api/revisions/326d6015b851?raw)
