{
  "name": "QuietPass clay HTTP workflow",
  "format": "manual-http-recipe",
  "version": 1,
  "status": "manual_http_setup",
  "origin": "https://quietpass.com",
  "authentication": {
    "type": "saved-header-account",
    "header": "Authorization",
    "value": "Bearer <YOUR_QUIETPASS_SERVER_KEY>",
    "storeInTableOrContactFields": false
  },
  "defaults": {
    "autoRun": false,
    "followRedirects": false,
    "retryOnFailure": false,
    "allowPaid": false,
    "maximumMicros": 0
  },
  "steps": [
    {
      "id": "format",
      "method": "POST",
      "path": "/v1/phone/check",
      "body": {
        "phone": "{{PHONE_TEXT}}",
        "default_country": "{{COUNTRY_ISO2}}",
        "checks": [
          "basic_line_type"
        ]
      },
      "purpose": "Free formatting; skip paid steps if number.valid is not true."
    },
    {
      "id": "settings",
      "method": "GET",
      "path": "/v1/automation/settings",
      "purpose": "Read shared saved-operation limits; stop if available or enabled is not true."
    },
    {
      "id": "prepare",
      "method": "POST",
      "path": "/v1/automation/operations",
      "body": {
        "workflowId": "clay:{{WORKSPACE_ID}}:{{TABLE_ID}}",
        "recordId": "{{IMMUTABLE_RECORD_ID}}",
        "revision": "{{PHONE_SOURCE_REVISION}}",
        "phone": "{{PHONE_TEXT}}",
        "default_country": "{{COUNTRY_ISO2}}",
        "checks": [
          "basic_line_type",
          "enhanced_line_type",
          "current_carrier",
          "mnp",
          "live_status",
          "sms",
          "whatsapp",
          "telegram"
        ],
        "currency": "{{WORKSPACE_CURRENCY}}",
        "maximumMicros": 0
      },
      "purpose": "Save the original operation ID before running. Set a deliberate integer cap only after the owner authorizes spending."
    },
    {
      "id": "run",
      "method": "POST",
      "path": "/v1/automation/operations/{{ORIGINAL_OPERATION_UUID}}/run",
      "body": {
        "allowPaid": false
      },
      "purpose": "Run only the original saved operation, with explicit paid-use permission and shared server-side limits."
    },
    {
      "id": "recover",
      "method": "GET",
      "path": "/v1/automation/operations/{{ORIGINAL_OPERATION_UUID}}",
      "purpose": "Read-only recovery. Never prepare a replacement for a pending, expired, uncertain, or failed destination write."
    }
  ],
  "resultGate": {
    "state": "settled",
    "resultState": "settled",
    "requires": "result.requestId"
  },
  "resultPaths": {
    "request_id": "result.requestId",
    "e164": "result.number.e164",
    "country": "result.number.country",
    "valid": "result.number.valid",
    "line_type": "result.number.type",
    "carrier": "result.number.carrier",
    "sms": "result.contact.sms.supported",
    "sms_basis": "result.contact.sms.basis",
    "whatsapp": "result.contact.whatsapp.registered",
    "telegram": "result.contact.telegram.registered",
    "reachable": "result.network.reachable",
    "checked_at": "result.preparedAt"
  },
  "writePolicy": {
    "keepFalse": true,
    "keepNull": true,
    "overwriteSourcePhone": false,
    "overwriteConsent": false,
    "requireSamePhoneRevisionBeforeWrite": true,
    "retainedResultHours": 24
  },
  "identityPolicy": "Keep workflow namespace, immutable record ID, and phone revision unchanged on retries. Increase the explicit revision only when the source phone changes. Never use a run ID, row position, current time, or a QuietPass result write timestamp."
}
