Decision Monitors

Update monitor config

Updates a monitor's configuration. Only the fields provided in the request body will be updated. Set regenerate_signing_secret: true to generate a new webhook signing secret.

Note: You cannot update the decision_context after creation. Create a new monitor if you need different decision parameters.

Authentication required: Pass your API key in the X-API-Key header.

patch/v1/monitors/{id}

Request

  • Base URL: https://api.rateapi.dev
  • URL: https://api.rateapi.dev/v1/monitors/{id}
  • Auth: API key in header X-API-Key

Path parameters

idstring required
Example:mon_abc123xyz

Monitor ID to update

Request body

namestring

Human-readable name for the monitor

status'active' | 'paused' | 'disabled'

Current status of the monitor

subscribed_statesstring[]

States to watch for rate changes

subscribed_product_typesstring[]

Product types to watch

cooldown_hoursinteger

Hours to wait between triggers

webhook_urlstring uri

Webhook URL for notifications. Must use HTTPS.

regenerate_signing_secretboolean

Set to true to generate a new webhook signing secret

Example request

{
  "name": "Updated Monitor Name",
  "status": "active",
  "conditions": [
    {
      "field": "apr",
      "operator": "lt",
      "value": 6.5
    }
  ],
  "subscribed_states": [
    "CA",
    "TX",
    "WA"
  ],
  "subscribed_product_types": [
    "mortgage"
  ],
  "cooldown_hours": 48,
  "webhook_url": "https://your-app.com/webhooks/rate-alerts-v2"
}

Response

Monitor updated successfully

webhook_signing_secretstring

New webhook signing secret. Only present if regenerate_signing_secret was true.

Example response

{
  "monitor": {
    "id": "mon_abc123xyz",
    "name": "California Refinance Alerts",
    "status": "active",
    "decision_context": {
      "credit_score_band": "excellent",
      "income_band": "high",
      "loan_amount_band": "250k_500k",
      "state": "CA",
      "product_type": "mortgage",
      "intent": "refinance",
      "term_months": 360,
      "rate_type": "fixed",
      "prefer_credit_unions": true
    },
    "conditions": [
      {
        "field": "apr",
        "operator": "lt",
        "value": 6.5
      }
    ],
    "subscribed_states": [
      "CA",
      "TX"
    ],
    "subscribed_product_types": [
      "mortgage"
    ],
    "cooldown_hours": 24,
    "webhook_url": "https://your-app.com/webhooks/rate-alerts",
    "webhook_signing_secret_prefix": "whsec_a1b2",
    "last_evaluated_at": "2024-01-15T12:00:00.000Z",
    "last_triggered_at": "2024-01-14T08:30:00.000Z",
    "created_at": "2024-01-10T09:00:00.000Z",
    "updated_at": "2024-01-15T12:00:00.000Z"
  },
  "webhook_signing_secret": "whsec_new123secret456here789abc012def345ghi678jkl901mno"
}

Changes

No recorded changes to this operation across all 1 revision of this API.