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

# Get one of your rules

> **Beta.** The request and response shapes may still change.

Retrieve one of your own rules.

Returns a rule you authored, expression included.

A managed rule's identifier answers `404` rather than `403`. You don't own the identifier, and confirming that it exists would confirm one you were never shown. Managed rules are served, without their expressions, by [List managed rules](/watch/v2/api-reference/management/rules/list-managed-rules).


## OpenAPI

````yaml get /v2/watch/management/rules/{rule_id}
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/watch/management/rules/{rule_id}:
    get:
      tags:
        - Watch
      summary: Get a rule
      description: |-
        **Beta.** The request and response shapes may still change.

        Retrieve one of your own rules.
      operationId: getWatchRule
      parameters:
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            examples:
              - rul_01jc0t6fwwfgfsq1md24mhyztj
          description: The rule identifier.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatchRule'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                example:
                  code: rule_not_found
                  message: The requested rule does not exist.
                  type: not_found
                  request_id: 3d19215e-2991-4a05-a41a-527314e6ff6a
components:
  schemas:
    WatchRule:
      type: object
      properties:
        id:
          type: string
          examples:
            - rul_01jc0t6fwwfgfsq1md24mhyztj
          description: >-
            The rule identifier. Reference it in a recipe's `rules` to score
            over it.
        name:
          type: string
          examples:
            - free_plan_signup
        expression:
          type: string
          examples:
            - attr.plan_tier == "free"
        type:
          type: string
          enum:
            - CUSTOM
          description: >-
            Always `CUSTOM`. A rule you author is your own; Prelude's are a
            separate, read-only listing.
      required:
        - id
        - name
        - expression
        - type
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
        param:
          type: string
          examples:
            - phone_number
          description: The parameter the error refers to, when it applies to a single one.
      required:
        - code
        - message
        - type
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````