HTTP API
The workspace API: decide an action, read it back, read the policy and ask about an outbound host. Test mode only.
On this page
Base URL https://getverdock.com. Send Authorization: Bearer vk_test_YOUR_KEY with every call. Test mode only.
POST /v1/actions#
Decide an action. The body is read for these members and nothing else, so text in a request cannot change a limit.
curl -X POST https://getverdock.com/v1/actions \
-H "Authorization: Bearer vk_test_YOUR_KEY" -H "Content-Type: application/json" \
-d '{"operation":"payout","amount_minor":1500,"currency":"USD","counterparty_id":"order-4417","idempotency_key":"order-4417-payout-1"}'from verdock import Verdock
vd = Verdock(api_key="vk_test_YOUR_KEY", base_url="https://getverdock.com")
decision = vd.check("payout", 1500, "USD", "order-4417")import { Verdock } from "verdock";
const vd = new Verdock({ apiKey: "vk_test_YOUR_KEY", baseUrl: "https://getverdock.com" });
const decision = await vd.check("payout", 1500, "USD", "order-4417");| Member | Rule |
|---|---|
operation | An operation named in your policy. |
amount_minor | A whole number in minor units. |
currency | Three upper case letters. |
counterparty_id | Your id for the counterparty. It is masked before it is stored. |
idempotency_key | A unique string of 8 to 128 characters. |
The answer is 200 with status executed (and ledger_check checked or reconciled), 200 with status blocked and a reason, or 202 with status held waiting for an approver. Every answer carries receipt_ids and the action id. The same idempotency_key returns the same action and never runs twice.
GET /v1/actions/{id}#
One action with its status, ledger check and receipts.
GET /v1/policy#
The saved policy, its version and hash.
POST /v1/egress#
{"host": "example.com"} asks whether the policy allows an outbound host. Allowed or blocked, it is receipted.
Gateway: /v1/gateway/paypal/...#
Money movements such as payouts (POST /v1/payments/payouts) and capture returns are decided, then forwarded to the PayPal sandbox. Reads pass through. Everything else is refused. See connect an agent.
Errors and limits#
| Status | Meaning |
|---|---|
400 | The request is not valid. |
401 | The key is wrong or revoked. |
402 | The test mode team limit of 3 is reached. |
409 | The idempotency key was used for a different action. |
413 | The request is over 16 KB. |
429 | Too many calls (120 a minute per key) or the test mode daily action limit. |
Test mode limits come back with "pilot": true and a message that names the evaluation request.