Skip to content

policies_submit

POST
/policies
curl --request POST \
--url https://example.com/policies \
--header 'Content-Type: text/plain' \
--data example

Compile, validate, and store a policy from its source.

The compiled policy is content-addressed by the SHA-256 hash of its compiled bytecode; submitting the same source twice returns the same ID.

Media type text/plain
string

Policy created

Media type application/json

Base58-encoded SHA-256 hash digest (32 bytes)

string
Example generated
example

Compilation error

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}

Internal error

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}