Skip to main content
POST
Create Authzen Policy

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Path Parameters

app_id
string
required

App identifier.

Body

application/json

AuthzenServerServiceCreateAuthzenPolicyRequest creates a new CEL policy revision for an app.

This message contains a oneof named engine. Only a single field of the following list may be set at a time:

  • cel
cel
Authzen Cel Policy · object | null

AuthzenCelPolicy holds the CEL source for a policy revision.

description
string

Free-text description of what this revision changes or is for.

displayName
string

Display name for the policy revision.

Response

200 - application/json

AuthzenServerServiceCreateAuthzenPolicyResponse returns the newly created policy revision.

AuthzenServerServiceCreateAuthzenPolicyResponse returns the newly created policy revision.

authzenPolicy
Authzen Policy · object | null

AuthzenPolicy is one immutable CEL policy revision scoped to an app. A revision is never edited in place; activate it by setting a server's active_policy_id.

This message contains a oneof named engine. Only a single field of the following list may be set at a time:

  • cel