Create a policy

Creates a policy in DRAFT with version 1. templateKey must name a
template visible to the caller's tenant; the template is looked up and
a missing one is a 404. content is validated against the context
catalog for content.appliesTo.action before anything is written.

action on the response is taken from content.appliesTo.action.
timeToLive and timeToLiveUnit are combined and stored as a single
string such as "30D".

Body Params
string
required
length between 1 and 255
string
string
required
length between 1 and 30
string
required
length between 1 and 50
^[A-Z][A-Z0-9_]*$

Must name a template visible to the tenant. The template is looked
up on create; content is not copied from it, so content is
required as well.

integer
required
≥ 1

How long an approval request from this policy stays open, in
timeToLiveUnit. Once elapsed, the sweeper moves the request and
its pending tasks to EXPIRED. It runs hourly by default, so an
expiry is observed at the next sweep after expiresAt, not at the
instant itself.

string
enum
required

H hours, D days, W weeks, M months, Y years. Matched
case-insensitively on input and stored upper-cased, so d and D are
both accepted and both come back combined as e.g. "30D".

Allowed:
content
object
required
Headers
string
required
^\d+\.\d+\.\d+$

The version of the Quant Flow API the request follows, as major.minor.patch (for example 1.0.0). The request is interpreted, and the response shaped, according to that version.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json