Authentik Policies API
Policies and policy bindings — expression, event matcher, GeoIP, password, password expiry, reputation and unique-password types.
Operations 76
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which policies of any type exist in my authentik instance?”
“Can I find policies that are not bound to anything yet?”
Tell an agent
List all policies across every policy type.
Show policies of any type where unbound is {bindings__isnull}.
Ask an LLM
“What is a policy when I only know its UUID and not its type?”
“Can I look up a policy generically regardless of its kind?”
Tell an agent
Show policy {policy_uuid} whatever its type.
Look up the generic policy record {policy_uuid}.
Ask an LLM
“Can I delete a policy by UUID without knowing which type it is?”
“Is there one endpoint that removes any kind of policy?”
Tell an agent destructive · confirm first
Delete policy {policy_uuid} regardless of its type.
Remove the generic policy {policy_uuid}.
Ask an LLM
“How do I check whether a policy would pass or fail for a particular user?”
“Can I dry-run a policy with extra context before binding it?”
Tell an agent
Test policy {policy_uuid} against user {user}.
Evaluate policy {policy_uuid} for user {user} with context {context}.
GET
/policies/all/{policy_uuid}/used_by/
See what uses a policy of any type · Policies all used by list
#
Ask an LLM
“Which flows, stages or apps reference a policy I only know by UUID?”
“What would break if I deleted this policy, whatever its type?”
Tell an agent
List objects that use policy {policy_uuid} of any type.
Show generic dependents of policy {policy_uuid}.
Ask an LLM
“How do I flush cached policy results so changes take effect immediately?”
“Can I reset authentik's policy evaluation cache?”
Tell an agent destructive · confirm first
Clear the policy cache.
Flush all cached policy results.
Ask an LLM
“How many policy results are currently cached?”
“What does the policy cache hold right now?”
Tell an agent
Show info about cached policies.
Report how many policy results are in the cache.
Ask an LLM
“What kinds of policies can I create in authentik?”
“Which policy types are available to add?”
Tell an agent
List all creatable policy types.
Show the policy types I can create.
Ask an LLM
“Which policies, users or groups are bound to a given flow or application?”
“Can I list only disabled policy bindings?”
Tell an agent
List all policy bindings.
Show bindings attached to target {target}.
Ask an LLM
“How do I attach a policy to a flow or application?”
“Can I bind a group directly to a target instead of a policy?”
Tell an agent
Bind policy {policy} to target {target} at order {order}.
Bind group {group} to target {target} with order {order}.
Ask an LLM
“What does a specific policy binding link together?”
“How do I see the order and timeout of one binding?”
Tell an agent
Show policy binding {policy_binding_uuid}.
Get the settings of binding {policy_binding_uuid}.
Ask an LLM
“Can I fully redefine an existing binding with a new target and order?”
“Is there a full-replace call for a policy binding?”
Tell an agent
Replace binding {policy_binding_uuid} with target {target} and order {order}.
Overwrite binding {policy_binding_uuid}: policy {policy}, target {target}, order {order}.
PATCH
/policies/bindings/{policy_binding_uuid}/
Change individual fields of a binding · Policies bindings partial update
#
Ask an LLM
“Can I just disable a policy binding without redefining it?”
“Is it possible to change only a binding's order or timeout?”
Tell an agent
Set enabled to {enabled} on binding {policy_binding_uuid}.
Move binding {policy_binding_uuid} to order {order}.
DELETE
/policies/bindings/{policy_binding_uuid}/
Delete a policy binding · Policies bindings destroy
#
Ask an LLM
“How do I unbind a policy from a flow or application?”
“Can I delete a binding without deleting the policy itself?”
Tell an agent destructive · confirm first
Delete policy binding {policy_binding_uuid}.
Unbind by removing binding {policy_binding_uuid}.
GET
/policies/bindings/{policy_binding_uuid}/used_by/
See what uses a policy binding · Policies bindings used by list
#
Ask an LLM
“Which objects reference a particular policy binding?”
“What depends on this binding before I remove it?”
Tell an agent
List objects that use binding {policy_binding_uuid}.
Show dependents of policy binding {policy_binding_uuid}.
Ask an LLM
“Which dummy policies have I set up for testing flows?”
“Can I filter dummy policies by the result they return?”
Tell an agent
List all dummy policies.
Show dummy policies that return result {result}.
Ask an LLM
“How do I create a placeholder policy that always passes or fails for testing?”
“Can a dummy policy wait a random time before returning?”
Tell an agent
Create a dummy policy {name} that returns {result}.
Create dummy policy {name} waiting between {wait_min} and {wait_max} seconds.
Ask an LLM
“What result and wait times does a specific dummy policy use?”
“Can I view one dummy policy's settings by UUID?”
Tell an agent
Show dummy policy {policy_uuid}.
Get the result and wait range of dummy policy {policy_uuid}.
Ask an LLM
“Can I fully overwrite a dummy policy's configuration?”
“Is there a full-update call for dummy test policies?”
Tell an agent
Replace dummy policy {policy_uuid} with name {name} and result {result}.
Fully update dummy policy {policy_uuid}, naming it {name}.
PATCH
/policies/dummy/{policy_uuid}/
Change fields of a dummy policy · Policies dummy partial update
#
Ask an LLM
“Can I flip only the result of a dummy policy?”
“Is it possible to adjust just the wait range on a dummy policy?”
Tell an agent
Change dummy policy {policy_uuid} to return {result}.
Set dummy policy {policy_uuid} maximum wait to {wait_max} seconds.
Ask an LLM
“How do I remove a dummy test policy once testing is done?”
“Can I delete a dummy policy by UUID?”
Tell an agent destructive · confirm first
Delete dummy policy {policy_uuid}.
Remove the dummy test policy {policy_uuid}.
GET
/policies/dummy/{policy_uuid}/used_by/
See what uses a dummy policy · Policies dummy used by list
#
Ask an LLM
“Which bindings or objects still reference a dummy policy?”
“What depends on this dummy test policy?”
Tell an agent
List objects that use dummy policy {policy_uuid}.
Show dependents of dummy test policy {policy_uuid}.
Ask an LLM
“Which event matcher policies are configured for notifications?”
“Can I find event matcher policies that match a given action or client IP?”
Tell an agent
List all event matcher policies.
Show event matcher policies for action {action}.
Ask an LLM
“How do I create a policy that matches specific events for alerts?”
“Can an event matcher policy match on app, model and client IP together?”
Tell an agent
Create event matcher policy {name} for action {action}.
Create event matcher {name} matching app {app}, model {model} and client IP {client_ip}.
GET
/policies/event_matcher/{policy_uuid}/
Get one event matcher policy · Policies event matcher retrieve
#
Ask an LLM
“What events does a specific event matcher policy match?”
“Can I view one event matcher policy's criteria?”
Tell an agent
Show event matcher policy {policy_uuid}.
Get the match criteria of event matcher {policy_uuid}.
PUT
/policies/event_matcher/{policy_uuid}/
Replace an event matcher policy · Policies event matcher update
#
Ask an LLM
“Can I fully redefine an event matcher policy's criteria?”
“Is there a full-replace call for event matcher policies?”
Tell an agent
Replace event matcher {policy_uuid} with name {name} and action {action}.
Fully update event matcher policy {policy_uuid}, named {name}, for app {app}.
PATCH
/policies/event_matcher/{policy_uuid}/
Change fields of an event matcher policy · Policies event matcher partial update
#
Ask an LLM
“Can I change only the client IP an event matcher policy matches?”
“Is it possible to update just the query of an event matcher?”
Tell an agent
Change event matcher {policy_uuid} to match client IP {client_ip}.
Set the query on event matcher policy {policy_uuid} to {query}.
DELETE
/policies/event_matcher/{policy_uuid}/
Delete an event matcher policy · Policies event matcher destroy
#
Ask an LLM
“How do I remove an event matcher policy I no longer alert on?”
“Can I delete an event matcher policy by UUID?”
Tell an agent destructive · confirm first
Delete event matcher policy {policy_uuid}.
Remove the event matcher {policy_uuid}.
GET
/policies/event_matcher/{policy_uuid}/used_by/
See what uses an event matcher policy · Policies event matcher used by list
#
Ask an LLM
“Which notification rules or bindings reference an event matcher policy?”
“What depends on this event matcher?”
Tell an agent
List objects that use event matcher policy {policy_uuid}.
Show dependents of event matcher {policy_uuid}.
Ask an LLM
“Which Python expression policies exist in authentik?”
“Can I search expression policies by the code they contain?”
Tell an agent
List all expression policies.
Find expression policies whose expression contains {expression}.
Ask an LLM
“How do I write a custom Python policy for access decisions?”
“Can I turn on execution logging for a new expression policy?”
Tell an agent
Create expression policy {name} with code {expression}.
Add expression policy {name} running {expression} with execution logging {execution_logging}.
Ask an LLM
“What Python code does a specific expression policy run?”
“Can I view one expression policy by UUID?”
Tell an agent
Show expression policy {policy_uuid}.
Get the Python code of expression policy {policy_uuid}.
Ask an LLM
“Can I fully overwrite an expression policy's name and code?”
“Is there a full-replace call for expression policies?”
Tell an agent
Replace expression policy {policy_uuid} with name {name} and code {expression}.
Fully update expression policy {policy_uuid} to {name} running {expression}.
PATCH
/policies/expression/{policy_uuid}/
Edit an expression policy's code · Policies expression partial update
#
Ask an LLM
“Can I change just the Python code of an expression policy?”
“Is it possible to toggle execution logging on an existing expression policy?”
Tell an agent
Change the code of expression policy {policy_uuid} to {expression}.
Set execution logging to {execution_logging} on expression policy {policy_uuid}.
DELETE
/policies/expression/{policy_uuid}/
Delete an expression policy · Policies expression destroy
#
Ask an LLM
“How do I remove a custom Python expression policy?”
“Can I delete an expression policy by UUID?”
Tell an agent destructive · confirm first
Delete expression policy {policy_uuid}.
Remove the Python expression policy {policy_uuid}.
GET
/policies/expression/{policy_uuid}/used_by/
See what uses an expression policy · Policies expression used by list
#
Ask an LLM
“Which flows or bindings reference a given expression policy?”
“What depends on this Python expression policy?”
Tell an agent
List objects that use expression policy {policy_uuid}.
Show dependents of Python expression policy {policy_uuid}.
Ask an LLM
“Which GeoIP policies restrict logins by location?”
“Can I search GeoIP policies by name?”
Tell an agent
List all GeoIP policies.
Find GeoIP policies named {name}.
Ask an LLM
“How do I restrict sign-ins to certain countries?”
“Can a GeoIP policy block impossible travel between logins?”
Tell an agent
Create GeoIP policy {name} allowing countries {countries}.
Create GeoIP policy {name} for countries {countries} with impossible travel check {check_impossible_travel}.
Ask an LLM
“Which countries and ASNs does a specific GeoIP policy cover?”
“Can I view one GeoIP policy's travel distance settings?”
Tell an agent
Show GeoIP policy {policy_uuid}.
Get the countries and distance settings of GeoIP policy {policy_uuid}.
Ask an LLM
“Can I fully redefine a GeoIP policy's name and countries?”
“Is there a full-replace call for GeoIP policies?”
Tell an agent
Replace GeoIP policy {policy_uuid} with name {name} and countries {countries}.
Fully update GeoIP policy {policy_uuid}: {name}, countries {countries}, ASNs {asns}.
PATCH
/policies/geoip/{policy_uuid}/
Change fields of a GeoIP policy · Policies geoip partial update
#
Ask an LLM
“Can I add countries to a GeoIP policy without redefining the rest?”
“Is it possible to change only the maximum travel distance on a GeoIP policy?”
Tell an agent
Set the allowed countries of GeoIP policy {policy_uuid} to {countries}.
Change GeoIP policy {policy_uuid} max history distance to {history_max_distance_km} km.
Ask an LLM
“How do I remove a location-based GeoIP restriction?”
“Can I delete a GeoIP policy by UUID?”
Tell an agent destructive · confirm first
Delete GeoIP policy {policy_uuid}.
Remove the location restriction GeoIP policy {policy_uuid}.
GET
/policies/geoip/{policy_uuid}/used_by/
See what uses a GeoIP policy · Policies geoip used by list
#
Ask an LLM
“Which flows or bindings reference a GeoIP policy?”
“What depends on this location policy?”
Tell an agent
List objects that use GeoIP policy {policy_uuid}.
Show dependents of location policy {policy_uuid}.
Ask an LLM
“Which country codes can I use in a GeoIP policy?”
“What is the list of ISO-3166-1 countries authentik recognizes?”
Tell an agent
List all ISO-3166-1 countries.
Show the country codes available for GeoIP rules.
Ask an LLM
“Which password complexity policies are configured?”
“Can I find password policies that check against Have I Been Pwned?”
Tell an agent
List all password strength policies.
Show password policies with HIBP check {check_have_i_been_pwned}.
Ask an LLM
“How do I enforce a minimum password length and required symbols?”
“Can a password policy reject passwords found in breach databases?”
Tell an agent
Create password policy {name} with minimum length {length_min}.
Create password policy {name} requiring {amount_digits} digits and {amount_symbols} symbols.
GET
/policies/password/{policy_uuid}/
Get one password strength policy · Policies password retrieve
#
Ask an LLM
“What complexity rules does a specific password policy enforce?”
“Can I view one password policy's error message and checks?”
Tell an agent
Show password policy {policy_uuid}.
Get the complexity rules of password policy {policy_uuid}.
PUT
/policies/password/{policy_uuid}/
Replace a password strength policy · Policies password update
#
Ask an LLM
“Can I fully redefine all the rules of a password complexity policy?”
“Is there a full-replace call for password strength policies?”
Tell an agent
Replace password policy {policy_uuid} with name {name} and minimum length {length_min}.
Fully update password policy {policy_uuid} named {name}, requiring {amount_uppercase} uppercase letters.
PATCH
/policies/password/{policy_uuid}/
Tweak rules of a password strength policy · Policies password partial update
#
Ask an LLM
“Can I raise only the minimum length on an existing password policy?”
“Is it possible to change just the error message users see on a weak password?”
Tell an agent
Raise the minimum length of password policy {policy_uuid} to {length_min}.
Set the error message of password policy {policy_uuid} to {error_message}.
DELETE
/policies/password/{policy_uuid}/
Delete a password strength policy · Policies password destroy
#
Ask an LLM
“How do I remove a password complexity policy?”
“Can I delete a password strength policy by UUID?”
Tell an agent destructive · confirm first
Delete password policy {policy_uuid}.
Remove the password complexity policy {policy_uuid}.
GET
/policies/password/{policy_uuid}/used_by/
See what uses a password strength policy · Policies password used by list
#
Ask an LLM
“Which prompt stages or bindings reference a password complexity policy?”
“What depends on this password strength policy?”
Tell an agent
List objects that use password policy {policy_uuid}.
Show dependents of password complexity policy {policy_uuid}.
Ask an LLM
“Which password expiry policies force users to rotate passwords?”
“Can I filter expiry policies by the number of days?”
Tell an agent
List all password expiry policies.
Show password expiry policies with a {days}-day limit.
Ask an LLM
“How do I make passwords expire after a set number of days?”
“Can an expiry policy only deny access instead of forcing a reset?”
Tell an agent
Create password expiry policy {name} expiring after {days} days.
Create expiry policy {name} for {days} days with deny only {deny_only}.
GET
/policies/password_expiry/{policy_uuid}/
Get one password expiry policy · Policies password expiry retrieve
#
Ask an LLM
“After how many days does a specific expiry policy expire passwords?”
“Can I view one password expiry policy by UUID?”
Tell an agent
Show password expiry policy {policy_uuid}.
Get the day limit of expiry policy {policy_uuid}.
PUT
/policies/password_expiry/{policy_uuid}/
Replace a password expiry policy · Policies password expiry update
#
Ask an LLM
“Can I fully redefine a password expiry policy's name and days?”
“Is there a full-replace call for expiry policies?”
Tell an agent
Replace expiry policy {policy_uuid} with name {name} and {days} days.
Fully update password expiry policy {policy_uuid}: {name}, {days} days, deny only {deny_only}.
PATCH
/policies/password_expiry/{policy_uuid}/
Change a password expiry period · Policies password expiry partial update
#
Ask an LLM
“Can I change only the number of days before passwords expire?”
“Is it possible to switch an existing expiry policy to deny only?”
Tell an agent
Change expiry policy {policy_uuid} to {days} days.
Set deny only to {deny_only} on password expiry policy {policy_uuid}.
DELETE
/policies/password_expiry/{policy_uuid}/
Delete a password expiry policy · Policies password expiry destroy
#
Ask an LLM
“How do I stop forcing password rotation by removing an expiry policy?”
“Can I delete a password expiry policy by UUID?”
Tell an agent destructive · confirm first
Delete password expiry policy {policy_uuid}.
Remove the password rotation policy {policy_uuid}.
GET
/policies/password_expiry/{policy_uuid}/used_by/
See what uses a password expiry policy · Policies password expiry used by list
#
Ask an LLM
“Which flows or bindings reference a password expiry policy?”
“What depends on this rotation policy?”
Tell an agent
List the bindings still referencing expiry rule {policy_uuid}.
Show dependents of rotation policy {policy_uuid}.
Ask an LLM
“Which reputation policies block suspicious IPs or usernames?”
“Can I filter reputation policies by their score threshold?”
Tell an agent
List all reputation policies.
Show reputation policies with threshold {threshold}.
Ask an LLM
“How do I block logins from IPs with a bad reputation score?”
“Can a reputation policy check usernames as well as IPs?”
Tell an agent
Create reputation policy {name} with threshold {threshold}.
Create reputation policy {name} checking IP {check_ip} and username {check_username}.
Ask an LLM
“What threshold does a specific reputation policy use?”
“Can I view one reputation policy's IP and username checks?”
Tell an agent
Show reputation policy {policy_uuid}.
Get the threshold and checks of reputation policy {policy_uuid}.
Ask an LLM
“Can I fully redefine a reputation policy?”
“Is there a full-replace call for reputation policies?”
Tell an agent
Replace reputation policy {policy_uuid} with name {name} and threshold {threshold}.
Fully update reputation policy {policy_uuid}, naming it {name}.
PATCH
/policies/reputation/{policy_uuid}/
Change a reputation policy's threshold · Policies reputation partial update
#
Ask an LLM
“Can I adjust only the score threshold of a reputation policy?”
“Is it possible to stop a reputation policy checking usernames?”
Tell an agent
Change reputation policy {policy_uuid} threshold to {threshold}.
Set username checking to {check_username} on reputation policy {policy_uuid}.
DELETE
/policies/reputation/{policy_uuid}/
Delete a reputation policy · Policies reputation destroy
#
Ask an LLM
“How do I remove a reputation-based blocking policy?”
“Can I delete a reputation policy by UUID?”
Tell an agent destructive · confirm first
Delete reputation policy {policy_uuid}.
Remove the reputation blocking policy {policy_uuid}.
GET
/policies/reputation/{policy_uuid}/used_by/
See what uses a reputation policy · Policies reputation used by list
#
Ask an LLM
“Which flows or bindings reference a reputation policy?”
“What depends on this reputation blocking policy?”
Tell an agent
List objects that use reputation policy {policy_uuid}.
Show dependents of reputation blocking policy {policy_uuid}.
Ask an LLM
“Which IPs or usernames have accumulated bad reputation scores?”
“Can I look up the reputation score for a specific IP address?”
Tell an agent
List all recorded reputation scores.
Show the reputation score for IP {ip}.
GET
/policies/reputation/scores/{reputation_uuid}/
Get one reputation score record · Policies reputation scores retrieve
#
Ask an LLM
“What is the detail of one reputation score entry?”
“Can I view a single IP or username score record by UUID?”
Tell an agent
Show reputation score record {reputation_uuid}.
Get the score entry {reputation_uuid}.
DELETE
/policies/reputation/scores/{reputation_uuid}/
Reset a reputation score · Policies reputation scores destroy
#
Ask an LLM
“How do I clear a bad reputation score so a user or IP can log in again?”
“Can I delete a single reputation score entry?”
Tell an agent destructive · confirm first
Delete reputation score {reputation_uuid}.
Reset the reputation of score entry {reputation_uuid}.
GET
/policies/reputation/scores/{reputation_uuid}/used_by/
See what uses a reputation score · Policies reputation scores used by list
#
Ask an LLM
“Which objects reference a given reputation score record?”
“What depends on this score entry?”
Tell an agent
List objects that use reputation score {reputation_uuid}.
Show dependents of score entry {reputation_uuid}.
Ask an LLM
“Which policies stop users from reusing old passwords?”
“Can I filter password uniqueness policies by how many past passwords they remember?”
Tell an agent
List all password uniqueness policies.
Show uniqueness policies remembering {num_historical_passwords} past passwords.
POST
/policies/unique_password/
Create a password uniqueness policy · Policies unique password create
#
Ask an LLM
“How do I prevent users from reusing their recent passwords?”
“Can I set how many previous passwords are checked for reuse?”
Tell an agent
Create password uniqueness policy {name}.
Create uniqueness policy {name} blocking reuse of the last {num_historical_passwords} passwords.
GET
/policies/unique_password/{policy_uuid}/
Get one password uniqueness policy · Policies unique password retrieve
#
Ask an LLM
“How many past passwords does a specific uniqueness policy remember?”
“Can I view one password reuse policy by UUID?”
Tell an agent
Show password uniqueness policy {policy_uuid}.
Get the history depth of reuse policy {policy_uuid}.
PUT
/policies/unique_password/{policy_uuid}/
Replace a password uniqueness policy · Policies unique password update
#
Ask an LLM
“Can I fully redefine a password reuse policy?”
“Is there a full-replace call for password uniqueness policies?”
Tell an agent
Replace uniqueness policy {policy_uuid} with name {name}.
Fully update reuse policy {policy_uuid}: {name}, remembering {num_historical_passwords} passwords.
PATCH
/policies/unique_password/{policy_uuid}/
Change password history depth · Policies unique password partial update
#
Ask an LLM
“Can I change only how many previous passwords a reuse policy checks?”
“Is it possible to point a uniqueness policy at a different password field?”
Tell an agent
Set reuse policy {policy_uuid} to remember {num_historical_passwords} passwords.
Change the password field of uniqueness policy {policy_uuid} to {password_field}.
DELETE
/policies/unique_password/{policy_uuid}/
Delete a password uniqueness policy · Policies unique password destroy
#
Ask an LLM
“How do I allow password reuse again by removing a uniqueness policy?”
“Can I delete a password reuse policy by UUID?”
Tell an agent destructive · confirm first
Delete password uniqueness policy {policy_uuid}.
Remove the password reuse policy {policy_uuid}.
GET
/policies/unique_password/{policy_uuid}/used_by/
See what uses a password uniqueness policy · Policies unique password used by list
#
Ask an LLM
“Which prompt stages or bindings reference a password reuse policy?”
“What depends on this uniqueness policy?”
Tell an agent
Find every binding tied to the no-reuse rule {policy_uuid}.
Show dependents of reuse policy {policy_uuid}.
Documentation
📖
Documentation
https://docs.goauthentik.io/developer-docs/api/
📖
APIReference
https://api.goauthentik.io/
📖
Documentation
https://docs.goauthentik.io