> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete template rule

> Delete a template rule for the given id



## OpenAPI

````yaml https://dev.tight.com/v3/api-docs delete /v6/templates/rules/{id}
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.tight.com
    description: Staging Environment
  - url: https://prod.tight.com
    description: Production Environment
security:
  - EmbedToken: []
paths:
  /v6/templates/rules/{id}:
    delete:
      tags:
        - Templates
      summary: Delete template rule
      description: Delete a template rule for the given id
      operationId: deleteTemplateRule
      parameters:
        - name: id
          in: path
          description: The id of the template rule
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponseTemplateRuleGetDto'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: REQUIRED
                    message: Amount is required
                    param: amount
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: INVALID_TOKEN
                    message: Invalid access token
        '403':
          description: Not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: FORBIDDEN
                    message: Expired access token
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: BAD_REQUEST
                    message: Resource not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                result: FAILURE
                error:
                  - type: UNKNOWN_ERROR
                    message: Something went wrong. Please try again later.
      security:
        - PartnerAuth: []
components:
  schemas:
    SuccessResponseTemplateRuleGetDto:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          $ref: '#/components/schemas/TemplateRuleGetDto'
    ErrorResponse:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed.
          enum:
            - SUCCESS
            - FAILURE
        data:
          type: object
          description: The data generated by the action performed.
          nullable: true
        error:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    TemplateRuleGetDto:
      required:
        - filter
        - id
        - status
        - update
      type: object
      properties:
        id:
          type: string
          description: Id of the template rule
          example: ttrl_12345678
        status:
          type: string
          description: Status of the template rule
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
            - REMOVED
        filter:
          $ref: '#/components/schemas/Filter'
        update:
          $ref: '#/components/schemas/Update'
        customData:
          $ref: '#/components/schemas/JsonNode'
      description: The data generated by the action performed.
    ErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the error. Safe for programmatic use.
          enum:
            - UNKNOWN_ERROR
            - INVALID_TOKEN
            - EXPIRED_TOKEN
            - FORBIDDEN
            - BAD_REQUEST
            - JSON_ERROR
            - DUPLICATE
            - REQUIRED
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - INVALID_FORMAT
            - NOT_FOUND
        message:
          type: string
          description: >-
            A human-readable message providing more details about the error.
            Safe for displaying to a user.
        param:
          type: string
          description: >-
            If the error is parameter-specific, the parameter related to the
            error. This can be used to display a message near the correct form
            field.
      description: Errors associated with the action performed, if applicable.
    Filter:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/AmountCondition'
        description:
          $ref: '#/components/schemas/DescriptionCondition'
        businessType:
          $ref: '#/components/schemas/BusinessTypeCondition'
        templateGlAccount:
          $ref: '#/components/schemas/TemplateGlAccountCondition'
        vendorName:
          $ref: '#/components/schemas/TemplateVendorCondition'
      description: Filter criteria defining which transactions this rule matches
      nullable: false
    Update:
      type: object
      properties:
        reviewStatus:
          type: string
          description: Review status to assign to matched transactions
          nullable: false
          example: RECONCILED
          enum:
            - RECONCILIATION_DISCREPANCY
            - USER_REVIEW_REQUIRED
            - ACCOUNTANT_REVIEW_REQUIRED
            - PARTNER_REVIEW_REQUIRED
            - AWAITING_MATCH
            - STAGED
            - RECONCILED
        templateGlAccountId:
          type: string
          description: Id of the template GL account to assign to matched transactions
          nullable: false
          example: tgla_324231
        vendorName:
          type: string
          description: Vendor name to assign to matched transactions
          nullable: false
          example: Office Depot
      description: Updates to apply to matched transactions
      nullable: false
    JsonNode:
      type: object
      properties:
        empty:
          type: boolean
        array:
          type: boolean
        'null':
          type: boolean
        object:
          type: boolean
        float:
          type: boolean
        string:
          type: boolean
        number:
          type: boolean
        missingNode:
          type: boolean
        valueNode:
          type: boolean
        nodeType:
          type: string
          enum:
            - ARRAY
            - BINARY
            - BOOLEAN
            - MISSING
            - 'NULL'
            - NUMBER
            - OBJECT
            - POJO
            - STRING
        pojo:
          type: boolean
        integralNumber:
          type: boolean
        floatingPointNumber:
          type: boolean
        short:
          type: boolean
        int:
          type: boolean
        long:
          type: boolean
        double:
          type: boolean
        bigDecimal:
          type: boolean
        bigInteger:
          type: boolean
        textual:
          type: boolean
          deprecated: true
        boolean:
          type: boolean
        binary:
          type: boolean
        container:
          type: boolean
        embeddedValue:
          type: boolean
      description: >-
        Custom JSON in which you can store any data with max length of 2000
        characters
      nullable: true
      example:
        internal_key: some_internal_key
        some_other_field: 23434
    AmountCondition:
      type: object
      properties:
        equal:
          type: integer
          description: Exact amount match
          format: int32
        greaterThan:
          type: integer
          description: Amount greater than
          format: int32
        greaterThanEqual:
          type: integer
          description: Amount greater than or equal
          format: int32
        lessThan:
          type: integer
          description: Amount less than
          format: int32
        lessThanEqual:
          type: integer
          description: Amount less than or equal
          format: int32
      description: Filter by transaction amount
      nullable: false
    DescriptionCondition:
      type: object
      properties:
        equal:
          type: string
          description: Exact match on transaction description
          example: Office Supplies
        contain:
          type: string
          description: Contains match on transaction description
          example: Supplies
      description: Filter by transaction description
      nullable: false
    BusinessTypeCondition:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IdCondition'
      description: Filter affected users by business type
      nullable: false
    TemplateGlAccountCondition:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/IdCondition'
      description: Filter by template GL account
      nullable: false
    TemplateVendorCondition:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: Exact match on vendor name
          example: Office Depot
      description: Filter by vendor name
      nullable: false
    IdCondition:
      type: object
      properties:
        equal:
          type: string
          description: Exact match on template GL account id
          example: tgla_324231
      description: Filter by template GL account id
  securitySchemes:
    EmbedToken:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, see
        [Authentication for more
        detail](/api-reference/authentication#partner-level-authentication).
      scheme: bearer
    PartnerAuth:
      type: http
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is a [partner-level
        token](/api-reference/authentication#partner-level-authentication).
      scheme: bearer

````