Skip to main content
POST
Create policy
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.

Authorizations

Authorization
string
header
required

The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default local mode with no token accepts requests without one.

Body

application/json
name
string
required

Ends in .py, such as guard.py.

source
string
required

Python policy source code, up to 64 KiB.

Response

201 - application/json

Created

name
string
required
source
string
required