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

# Show an automation rule

> Show one automation rule with its events, conditions and actions. Header values of `send_to_api` actions are not returned.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace’s subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetoform.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/automation-rules.yaml GET /forms/{form_id}/automation_rules/{id}
openapi: 3.0.3
info:
  title: NeetoForm APIs
  version: 2.0.0
servers:
  - description: NeetoForm APIs
    url: https://{your-subdomain}.neetoform.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /forms/{form_id}/automation_rules/{id}:
    get:
      tags:
        - Automation Rules
      summary: Show an automation rule
      description: >-
        Show one automation rule with its events, conditions and actions. Header
        values of `send_to_api` actions are not returned.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/form_id_param'
        - $ref: '#/components/parameters/rule_id_param'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/automation_rule_response'
        '404':
          description: Not Found - The form or the automation rule does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: Automation::Rule does not exist.
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    form_id_param:
      in: path
      name: form_id
      description: >-
        Unique ID of the form. Refer to [Getting the Form
        ID](/api/getting-form-id) for detailed instructions.
      required: true
      schema:
        type: string
    rule_id_param:
      in: path
      name: id
      description: Unique ID of the automation rule.
      required: true
      schema:
        type: string
  schemas:
    automation_rule_response:
      type: object
      properties:
        automation_rule:
          $ref: '#/components/schemas/automation_rule'
    error_response:
      type: object
      properties:
        error:
          type: string
    automation_rule:
      allOf:
        - $ref: '#/components/schemas/automation_rule_summary'
        - type: object
          properties:
            events:
              type: array
              items:
                type: string
                enum:
                  - submission_created
                  - custom_field_updated
            conditions:
              type: array
              items:
                $ref: '#/components/schemas/rule_condition'
            actions:
              type: array
              items:
                $ref: '#/components/schemas/rule_action'
    automation_rule_summary:
      type: object
      properties:
        id:
          type: string
          example: 0d4a5b8e-2f61-4b0c-8a3e-5f7c9e2d1a44
        name:
          type: string
          example: Email the sales team
        description:
          type: string
          nullable: true
          example: New leads
        status:
          type: string
          enum:
            - enabled
            - disabled
        performer:
          type: string
          description: '`any`, or the name of an organization role.'
          example: any
        display_order:
          type: integer
          description: Position in the order in which rules run, starting from 1.
        disabled_reason:
          type: string
          nullable: true
        execution_delay:
          $ref: '#/components/schemas/execution_delay'
        created_at:
          $ref: '#/components/schemas/date_time_field'
        updated_at:
          $ref: '#/components/schemas/date_time_field'
    rule_condition:
      type: object
      properties:
        id:
          type: string
        field:
          type: string
          description: ID of a question or a custom field.
        kind:
          type: string
          enum:
            - record
            - custom_field
        verb:
          type: string
          description: >-
            One of `is`, `is_not`, `contains`, `does_not_contain`,
            `contains_any_of`, `contains_all_of`, `contains_none_of`,
            `starts_with`, `ends_with`, `any_of`, `none_of`, `less_than`,
            `greater_than`, `any_time`, `during`, `not_during`, `is_before` or
            `is_after`.
          example: contains
        join_type:
          type: string
          enum:
            - and_operator
            - or_operator
        metadata:
          type: object
          description: >-
            Holds `value`, or `values` (a list) for verbs that take many values.
            For choice questions, use option IDs.
          example:
            value: '@example.com'
    rule_action:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: >-
            One of `email_to_responder`, `email_to_form_creator`,
            `email_to_all_members`, `email_to`, `sms_to_responder`, `sms_to`,
            `send_to_api` or `assign_field_value`.
          example: email_to
        actionable_type:
          type: string
          nullable: true
          description: >-
            `Record` for the `*_to_responder` actions,
            `NeetoFieldsEngine::Field` for `assign_field_value`. Otherwise
            empty.
        actionable_id:
          type: string
          nullable: true
        metadata:
          type: object
          description: >
            Settings of the action.

            - Email actions: `subject`, `body` and, for `email_to`, `emails`.
            The body can use Liquid, for example `{{all-answers}}`.

            - SMS actions: `body` and, for `sms_to`, `phone_numbers`.

            - `*_to_responder` actions: `value` is the ID of the question that
            holds the responder's address or number.

            - `send_to_api`: `endpoint`, `body` (a JSON string),
            `enable_custom_headers` and `custom_headers`. Header values are
            never returned, only the keys.

            - `assign_field_value`: `value`.
          example:
            subject: New lead
            body: '{{all-answers}}'
            emails:
              - sales@example.com
    execution_delay:
      type: object
      nullable: true
      description: How long to wait after the event before the actions run.
      properties:
        value:
          type: integer
          minimum: 1
          maximum: 15
          example: 5
        unit:
          type: string
          enum:
            - minutes
            - hours
            - days
          example: minutes
    date_time_field:
      type: string
      format: date-time

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.