--- layout: api page_title: ACL Binding Rules - HTTP API description: The /acl/binding-rule endpoints manage Consul's ACL Binding Rules. --- # ACL Binding Rule HTTP API -> **1.5.0+:** The binding rule APIs are available in Consul versions 1.5.0 and newer. The `/acl/binding-rule` endpoints [create](#create-a-binding-rule), [read](#read-a-binding-rule), [update](#update-a-binding-rule), [list](#list-binding-rules) and [delete](#delete-a-binding-rule) ACL binding rules in Consul. For more information on how to setup ACLs, refer to the following resources: - [Access control list (ACL) overview](/consul/docs/security/acl) - [ACL tutorial](/consul/tutorials/security/access-control-setup-production) ## Create a Binding Rule This endpoint creates a new ACL binding rule. | Method | Path | Produces | | ------ | ------------------- | ------------------ | | `PUT` | `/acl/binding-rule` | `application/json` | The table below shows this endpoint's support for [blocking queries](/consul/api-docs/features/blocking), [consistency modes](/consul/api-docs/features/consistency), [agent caching](/consul/api-docs/features/caching), and [required ACLs](/consul/api-docs/api-structure#authentication). | Blocking Queries | Consistency Modes | Agent Caching | ACL Required | | ---------------- | ----------------- | ------------- | ------------ | | `NO` | `none` | `none` | `acl:write` | The corresponding CLI command is [`consul acl binding-rule create`](/consul/commands/acl/binding-rule/create). ### Query Parameters - `ns` `(string: "")` - Specifies the namespace of the binding rule you create. You can also [specify the namespace through other methods](#methods-to-specify-namespace). ### JSON Request Body Schema - `Description` `(string: "")` - Free form human readable description of the binding rule. - `AuthMethod` `(string: )` - The name of the auth method that this rule applies to. This field is immutable. - `Selector` `(string: "")` - Specifies the expression used to match this rule against valid identities returned from an auth method validation. If empty this binding rule matches all valid identities returned from the auth method. For example: ```text serviceaccount.namespace==default and serviceaccount.name!=vault ``` - `BindType` `(string: )` - Specifies the way the binding rule affects a token created at login. You can specify one of the following: - `service` - The computed bind name value is used as an `ACLServiceIdentity.ServiceName` field in the token that is created. ```json { "AccessorID": "", "SecretID": "", "ServiceIdentities": [ { "ServiceName": "" } ] } ``` - `node` - The computed bind name value is used as an `ACLNodeIdentity.NodeName` field in the token that is created. ```json { "AccessorID": "", "SecretID": "", "NodeIdentities": [ { "NodeName": "", "Datacenter": "" } ] } ``` - `role` - The computed bind name value is used as a `RoleLink.Name` field in the token that is created. This binding rule will only apply if a role with the given name exists at login-time. If it does not then this rule is ignored. ```json { "AccessorID": "", "SecretID": "", "Roles": [ { "Name": "" } ] } ``` - `templated-policy` - The bind name value is used as an `ACLTemplatedPolicy.TemplateName` field in the token that is created. The computed `BindVars` values are used in the `ACLTemplatedPolicy.TemplateVariables` field. ```json { "AccessorID": "", "SecretID": "", "TemplatedPolicies": [ { "TemplateName": "