{
  "name": "OTP Giriş Doğrulama Akışı (Başlıklı SMS)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "otp-start",
        "responseMode": "responseNode"
      },
      "id": "otp-webhook",
      "name": "OTP İsteği Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [220, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://basliklisms.com/api/v1/otp/send",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "X-API-Key", "value": "={{ $env.BASLIKLISMS_API_KEY }}" },
            { "name": "Idempotency-Key", "value": "={{ 'otp-' + $json.body.requestId }}" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ phone: $json.body.phone, brand: 'Uygulamam', ttlSeconds: 180 }) }}"
      },
      "id": "otp-send",
      "name": "Başlıklı SMS OTP Gönder",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [470, 300]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ id: $json.data.id, expiresAt: $json.data.expiresAt }) }}"
      },
      "id": "otp-respond",
      "name": "Yanıt Dön",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [720, 300]
    }
  ],
  "connections": {
    "OTP İsteği Webhook": {
      "main": [[{ "node": "Başlıklı SMS OTP Gönder", "type": "main", "index": 0 }]]
    },
    "Başlıklı SMS OTP Gönder": {
      "main": [[{ "node": "Yanıt Dön", "type": "main", "index": 0 }]]
    }
  },
  "active": false,
  "settings": { "executionOrder": "v1" }
}
