What Guardrails restrict
Your project owns some wallets outright: wallets created through the REST API, and pregenerated wallets that no user has claimed. Your backend can already sign anything with them. A Guardrail is a policy that takes cases away, so a bug or a bad input cannot make your backend sign something you never intended. Each Guardrail rule has one of these effects:
Any other
allow rule fails with guardrail_effect_invalid, because the wallet can already sign. Requests that no Guardrail blocks sign as usual. When several active Guardrails match a request, they all apply: deny wins over require_approval, so a block in any of them stops the request.
For EVM transactions and Para-managed sponsored transfers, an execution gas limit caps the maximum gas cost with one condition, independently of transfer or contract argument limits.
Guardrails apply only while a wallet belongs to your project. When a user claims a pregenerated wallet, it becomes user-owned, and Requests govern it instead. See How permissions work.
Permissions supports EVM, Solana, Cosmos, Stellar and Sui wallets. Each policy targets one wallet type, so create a separate policy for each wallet type you want rules for. A policy covers every network of its wallet type unless you list specific networks.
Before you start
You need:- A Development API key. Policies are written and tested on Development keys, which use Para’s beta environment. Production keys are read-only in the Developer Portal.
- App-owned wallets created with that key, and a server that signs with them.
- For
require_approvalrules only: each wallet must be bound to an authorization scope. A request that needs approval from an unbound wallet returns403 FORBIDDEN.
What your backend receives
Guardrails change only what the signing and transfer routes return. You call the same routes with the same secret key, and each response tells you which of the outcomes below applied. Para checks every request to the signing routes (sign-transaction, sign-message, sign-typed-data, sign-authorization and sign-raw) and to transfer against the wallet’s active Guardrails before it signs. Each response has one of four outcomes:
Send every signing and transfer request with an
Idempotency-Key taken from your own records, such as a payment ID. Para ties an approval to that key, and after a request succeeds it returns the stored response for repeats of the same key and body for 24 hours.
ParaRestError carries the HTTP status, the code and the parsed response on body.
Signed
A request that no Guardrail stops signs as usual and returns the route’s normal response. Repeating it with the sameIdempotency-Key and body returns the stored response instead of signing again.
While Permissions is on, raw signatures follow the same defaults as other signing requests: an app-owned wallet signs them, and a user-owned wallet sends them to the user for review. Rules that name the
raw_signature action, and rules with "actions": "all", can change that. Raw signatures are sign-raw requests, messages from Solana, Stellar and Sui wallets, and REST sign-message requests from a Cosmos wallet that do not pass walletType: "EVM". The SDKs sign messages from Cosmos wallets as EVM sign_message requests. Raw signatures carry no network a selector can name, so only a policy without chainId governs them. A rule that names raw_signature can read only para.wallet.* facts. The Developer Portal forms cannot create one, so write it in policy JSON, with Edit JSON in the Developer Portal or with the CLI.Denied
Para refuses to sign and returns403. Nothing is signed or broadcast.
403 POLICY_DENIED
deniedBy holds one entry. policyId and ruleId appear when a rule decided the outcome. Common reason values:
Approval required
When the deciding rule is arequire_approval rule with an approval requirement, Para opens an approval case instead of signing and returns 403:
403 POLICY_REVIEW_REQUIRED
The approval case for this request. Read its progress with
getApprovalCase(approvalCaseId) or GET /v1/permissions-v2/approval-cases/{caseId}.pending for a new case. When you resend a request whose case has ended, it can hold that case’s final status: completed, rejected, expired, invalidated or cancelled.The ID of the policy decision Para recorded for this request. Include it when you contact Para about a decision.
require_approval rule without an approvalRequirement opens an ordinary review instead, which your backend approves or rejects.
Name the user behind a request
When your backend signs on behalf of one of your users, addinitiatorUserId with that user’s Para user ID to the signing or transfer request. Para records the user as the requester of any approval case the request opens, and that user cannot approve or reject the case, even if the approval requirement names them.
400 INVALID_REQUEST and the message user is not linked to this app. Send the same initiatorUserId every time you resend the request.
Continue after approval
For a response withapprovalCaseId, Para ties the case to the request’s Idempotency-Key, or to a hash of the request body when you send no key. The case stays open for up to 7 days.
1
Store the case with the request
Save
approvalCaseId next to the Idempotency-Key and the request body.2
Wait for the approvers
Poll
getApprovalCase(approvalCaseId) until status is completed.3
Resend the identical request
Send the same body with the same
Idempotency-Key. Para evaluates it again, finds the completed case and signs. A completed case can be used for one signature.POLICY_REVIEW_REQUIRED response that carries approvalCaseId, sending a different body or a different initiatorUserId with the same Idempotency-Key returns 409 CONFLICT with the message request already has a different conditional approval case.
Cancel a pending case
If you no longer need the request, cancel its case so approvers cannot approve it. CallcancelApprovalCase(approvalCaseId) in the REST SDK, or send POST /v1/permissions-v2/approval-cases/{caseId}/cancel.
Only a pending case can be cancelled. The case ends with status cancelled and terminalReason case_cancelled. When a pending transaction from a user’s wallet is waiting on the case, Para discards it, so that request never signs. A request that should still go ahead needs a new attempt, which opens a new case.
The new attempt needs a new Idempotency-Key. Cancelling a case that is no longer pending returns 409 CONFLICT with the message conditional approval case is not pending.
Ordinary review
When the decidingrequire_approval rule has no approval requirement, Para opens an ordinary review that your backend decides with your secret key. The 403 carries reviewId and no approval case fields:
403 POLICY_REVIEW_REQUIRED
1
Store the review with the request
In the REST SDK, the request throws
ParaRestError, and reviewId is a field of error.body. Save reviewId next to the Idempotency-Key and the request body.2
Approve within 5 minutes
Call
approveReview(reviewId), or send POST /v1/permissions-v2/reviews/{reviewId}/approve. Check that the returned status is approved.3
Resend the identical request
Send the same body with the same
Idempotency-Key. You can also add reviewId to the body. Para evaluates the request again and signs. The review then becomes consumed, so it covers one signature.200 with the review’s current status, even when the review has already ended. Para re-evaluates the resend, so the request and the active policy must still match the review.
If your backend decides against the request, call rejectReview(reviewId) or send POST /v1/permissions-v2/reviews/{reviewId}/reject. A resend then returns 403 POLICY_DENIED, and deniedBy[0].reason is review-rejected.
Sponsored transfers handle reviews differently. A rule with an approval requirement is not supported there, and the tracked transfer fails with failureCode SPONSORSHIP_CONDITIONAL_APPROVAL_UNSUPPORTED. An ordinary review pauses the tracked transfer at stage requires_action with its reviewId. After you approve it, call resumeRestTransaction(walletId, transactionId, { reviewId }) as Gas sponsorship describes.
The approveReview and rejectReview references list every response and error.
Spend accounting failed
Para could not record spend against a spending limit, for a reason other than the limit itself. It returns500 with code SPEND_ACCOUNTING_FAILED and the message Windowed spend accounting failed, and nothing is signed. Retry with backoff, using the same Idempotency-Key and body.
A request that would exceed a limit is a denial with the reason windowed-spend-limit-exceeded, not this error.
Add a Guardrail
Build the policy on a Development key, test every rule against beta, then request a production review. Start in the Developer Portal, and switch to JSON when the forms cannot express a rule.A Guardrail you activate on a Development key changes signing on beta only. Your production backend is unaffected until Para reviews the policy and publishes it to your Production key.