Skip to main content
POST
/
compile-and-save-instruction
curl -X POST http://localhost:8081/compile-and-save-instruction \
  -H "Content-Type: application/json" \
  -d '{
    "script": "rule HighValueTransaction {\n    description \"Review any transaction above $10,000\"\n    when amount > 10000\n    then review\n         score   0.5\n         reason  \"Amount exceeds threshold\"\n}"
  }'
{
  "id": 1,
  "name": "HighValueTransaction",
  "text": "rule HighValueTransaction {\n    description \"Review any transaction above $10,000\"\n    when amount > 10000\n    then review\n         score   0.5\n         reason  \"Amount exceeds threshold\"\n}",
  "description": "Review any transaction above $10,000",
  "dsl_json": "{\"name\":\"HighValueTransaction\",\"when\":[...],\"then\":{...}}",
  "created_at": "2026-03-16T10:00:00Z",
  "updated_at": "2026-03-16T10:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt

Use this file to discover all available pages before exploring further.

Blnk Watch is currently in beta. Send us a message
Use this endpoint to compile a Watch DSL script and save it as an instruction. Once saved, Watch evaluates incoming transactions against the compiled rule. For DSL syntax and examples, see Watch rule examples.

Body

script
string
required
The Watch DSL script to compile. The rule name is extracted from the script and must be unique across instructions.
curl -X POST http://localhost:8081/compile-and-save-instruction \
  -H "Content-Type: application/json" \
  -d '{
    "script": "rule HighValueTransaction {\n    description \"Review any transaction above $10,000\"\n    when amount > 10000\n    then review\n         score   0.5\n         reason  \"Amount exceeds threshold\"\n}"
  }'
{
  "id": 1,
  "name": "HighValueTransaction",
  "text": "rule HighValueTransaction {\n    description \"Review any transaction above $10,000\"\n    when amount > 10000\n    then review\n         score   0.5\n         reason  \"Amount exceeds threshold\"\n}",
  "description": "Review any transaction above $10,000",
  "dsl_json": "{\"name\":\"HighValueTransaction\",\"when\":[...],\"then\":{...}}",
  "created_at": "2026-03-16T10:00:00Z",
  "updated_at": "2026-03-16T10:00:00Z"
}

Response fields

id
integer
Auto-generated instruction ID. Use this with get instruction and delete instruction.
name
string
Unique rule name extracted from the DSL script.
text
string
Original Watch DSL script text.
description
string
Rule description from the DSL script, if provided.
dsl_json
string
Compiled rule JSON used during transaction evaluation.
created_at
string
ISO 8601 timestamp of when the instruction was created.
updated_at
string
ISO 8601 timestamp of when the instruction was last updated.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.