Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Approval policy

2 operations under approval-policy. Examples read $API and $KEY from your shell.

GET /v1/approval-policy

Responses

200 Default Response

object

  • version integer required
  • rules array required

    Each item:

    • action string required
    • currency string required
    • min_amount decimal string required
    • approvers_required number required
  • created_at string required (nullable)

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/approval-policy" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/approval-policy");
Copied

PUT /v1/approval-policy

Request body

application/json, required

object

  • expected_version integer required
  • rules array required

    Each item:

    • action string required
    • currency string required
    • min_amount decimal string required
    • approvers_required number required

Responses

200 Default Response

object

  • version integer required
  • rules array required

    Each item:

    • action string required
    • currency string required
    • min_amount decimal string required
    • approvers_required number required
  • created_at string required (nullable)

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  -X PUT \
  "$API/v1/approval-policy" \
  -H "authorization: Bearer $KEY" \
  -H "content-type: application/json" \
  -d '{"expected_version":1,"rules":[{"action":"<action>","currency":"<currency>","min_amount":"10.00","approvers_required":1}]}'
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.PUT("/v1/approval-policy", {
  body: {
    "expected_version": 1,
    "rules": [
      {
        "action": "<action>",
        "currency": "<currency>",
        "min_amount": "10.00",
        "approvers_required": 1
      }
    ]
  },
});
Copied

Edit on GitHub