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

# Kayıt oluştur

> Sınır, webhook ve eşik filtreleriyle tahmin alarm kaydı oluşturur.



## OpenAPI

````yaml /open-api/tr/forecast-alarm_version-1.json post /v1/alarms/forecasts/register
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://api.iklim.co
    description: Production server
  - url: https://api-test.iklim.co
    description: Test server
security: []
tags:
  - name: Tahmin Nokta Alarm Kayıtları
    description: Tahmin nokta alarm kayıtları için CRUD ve sorgulama uç noktaları
paths:
  /v1/alarms/forecasts/register:
    post:
      tags:
        - Tahmin Nokta Alarm Kayıtları
      summary: Kayıt oluştur
      description: Sınır, webhook ve eşik filtreleriyle tahmin alarm kaydı oluşturur.
      operationId: register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PointRegistration'
        required: true
      responses:
        '200':
          description: Başarılı
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RegistrationResponse'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
components:
  schemas:
    PointRegistration:
      type: object
      description: Tahmin nokta alarmı kaydı.
      properties:
        registrationId:
          type: string
          format: uuid
          description: Kayıtın UUID değeri (güncelleme işlemleri için zorunludur).
          example: f7587d9e-2481-4b4c-818d-c8d1946851b7
        recipientId:
          type: string
          description: >-
            Bildirim alıcısı için çağrıran tarafın tanımladığı harici referans
            tanımlayıcısı.
          example: customer-system-001
        boundary:
          $ref: '#/components/schemas/BoundarySchemaWrapper'
        forecastDays:
          type: integer
          format: int32
          description: Alarm koşulları değerlendirilecek ileriki tahmin gün sayısı (1–14).
          example: 3
        forecastAlarmDelivery:
          type: array
          description: >-
            Alarm bildirimlerinin gönderildiği zaman dilimleri (MORNING – 04:00
            UTC, EVENING – 16:00 UTC).
          example:
            - MORNING
            - EVENING
          items:
            type: string
            enum:
              - MORNING
              - EVENING
        webhook:
          $ref: '#/components/schemas/Webhook'
          description: Bu kayıt için dışa çağrı (callback) yapılandırması.
        filter:
          $ref: '#/components/schemas/Filter'
          description: >-
            Hangi tahmin koşullarının alarm tetikleyeceğini denetleyen eşik
            filtreleri.
    RegistrationResponse:
      type: object
      properties:
        registrationId:
          type: string
          format: uuid
          description: Kayıtın UUID değeri (güncelleme işlemleri için zorunludur).
          example: f7587d9e-2481-4b4c-818d-c8d1946851b7
        recipientId:
          type: string
          description: >-
            Bildirim alıcısı için çağrıran tarafın tanımladığı harici referans
            tanımlayıcısı.
          example: customer-system-001
        boundary:
          $ref: '#/components/schemas/BoundarySchemaWrapper'
        forecastDays:
          type: integer
          format: int32
          description: Alarm koşulları değerlendirilecek ileriki tahmin gün sayısı (1–14).
          example: 3
        forecastAlarmDelivery:
          type: array
          description: >-
            Alarm bildirimlerinin gönderildiği zaman dilimleri (MORNING – 04:00
            UTC, EVENING – 16:00 UTC).
          example:
            - MORNING
            - EVENING
          items:
            type: string
            enum:
              - MORNING
              - EVENING
        webhook:
          $ref: '#/components/schemas/Webhook'
          description: Bu kayıt için dışa çağrı (callback) yapılandırması.
        filter:
          $ref: '#/components/schemas/Filter'
          description: >-
            Hangi tahmin koşullarının alarm tetikleyeceğini denetleyen eşik
            filtreleri.
        createdAt:
          type: string
          format: date-time
          description: Kaydın ilk oluşturulduğu zaman damgası (ISO-8601).
          example: '2025-01-01T10:15:30Z'
        updatedAt:
          type: string
          format: date-time
          description: Kaydın en son güncellendiği zaman damgası (ISO-8601).
          example: '2025-01-01T11:15:30Z'
        warnings:
          type: array
          description: Kayıt işleme sırasında oluşturulan kritik olmayan uyarılar.
          example:
            - warning-1
            - warning-2
          items:
            type: string
    StandardErrorResponse:
      type: object
      description: Standart API hata cevabı yapısı
      properties:
        timestamp:
          type: string
          format: date-time
          description: Hatanın oluştuğu zaman damgası
          example: YYYY-mm-DDTHH:MM:SS.nnnnnnnnn
        status:
          type: integer
          format: int32
          description: HTTP durum kodu
          example: XXX
        error:
          type: string
          description: Hata adı veya tipi
          example: Error Name
          minLength: 1
        message:
          type: string
          description: Ana hata mesajı
          example: Error Message
          minLength: 1
        messages:
          type: array
          description: Ek detaylı hata mesajları
          items:
            type: string
        path:
          type: string
          description: Hatanın oluştuğu istek yolu
          example: /endpoint/uri/here
          minLength: 1
      required:
        - error
        - message
        - path
        - status
        - timestamp
    BoundarySchemaWrapper:
      description: >-
        <section><h3>Alarm kayıt sınırı</h3><p>Tahmin alarm koşulları için
        izlenecek coğrafi kapsamı tanımlar. Somut sınır türü <code>type</code>
        ayırt edici alanıyla seçilir; yalnızca seçilen alt türe ait alanlar
        gönderilmelidir.</p><ul><li><strong>ADMINISTRATIVE</strong> – il
        (<code>cityId</code>) ve ilçe (<code>districtId</code>) sayısal kimlik
        değerleriyle tanımlanan idari sınır; her iki alan da
        zorunludur.</li><li><strong>POINT</strong> – tek bir boylam/enlem
        koordinatı (<code>point</code>) ile tanımlanan coğrafi nokta sınırı.
        Alarm, o koordinata en yakın tahmin ızgara hücresi için değerlendirme
        yapar.</li></ul></section>
      discriminator:
        propertyName: type
        mapping:
          ADMINISTRATIVE:
            $ref: '#/components/schemas/RegisterAdministrativeBoundary'
          POINT:
            $ref: '#/components/schemas/RegisterPointBoundary'
      oneOf:
        - $ref: '#/components/schemas/RegisterAdministrativeBoundary'
        - $ref: '#/components/schemas/RegisterPointBoundary'
    Webhook:
      type: object
      description: >-
        <section><h3>Tahmin alarmı bildirimleri için dışa çağrı (callback)
        yapılandırması</h3><p>Bir kullanıcı hesabı için ilk tahmin alarmı kaydı
        oluşturulduğunda, istekle birlikte iletilen webhook ilgili hesaba bağlı
        olarak kaydedilir. Her hesap için yalnızca bir webhook tanımlanabilir.
        Webhook’u değiştirmek için <code>update</code> uç noktası
        kullanılmalıdır.</p><p>İkinci ve sonraki alarm kayıtlarında webhook’u
        tekrar göndermek zorunlu değildir; önceden kaydedilmiş webhook otomatik
        olarak kullanılır. <code>accountId</code> alanı isteğe bağlıdır –
        girilmesi halinde belirtilen hesabın webhook’u devreye
        girer.</p></section>
      properties:
        accountId:
          type: string
          format: uuid
          description: >-
            Bu webhook’un ait olduğu hesap UUID’si (isteğe bağlı; varsayılan
            çağrıran hesap).
          example: 2f04f1b5-1c0a-4c4e-b0a7-0ba6e9b7f2e1
        url:
          type: string
          description: >-
            Tahmin alarmı callback payload’larının gönderileceği hedef HTTPS uç
            noktası.
          example: https://api.customer.com/alerts/forecast-callback
        httpMethod:
          type: string
          description: Alarm payload’ları gönderilirken kullanılacak HTTP metodu.
          enum:
            - POST
            - PUT
            - GET
          example: POST
        contentType:
          type: string
          description: Gönderilen payload’ın Content-Type başlık değeri.
          example: application/json
        authentication:
          $ref: '#/components/schemas/AuthWrapper'
          description: >-
            Callback uç noktasına teslimatın güvenliği için kimlik doğrulama
            ayarları.
        requestHeaders:
          $ref: '#/components/schemas/MapTypeSchema'
          description: >-
            Her webhook teslimat isteğine eklenecek özel HTTP başlıkları.
            Format: {"Header-Name":"value","Another-Header":"value"}
          example:
            source: iklim.co
            custom-header: value
        deliveryPolicy:
          $ref: '#/components/schemas/DeliveryPolicy'
          description: >-
            Zaman aşımı ve yeniden deneme davranışını denetleyen teslimat
            politikası.
    Filter:
      type: object
      description: >-
        Tahmin metrik eşik filtreleri; yalnızca belirtilen düzeyi karşılayan
        veya aşan koşullar alarm tetikler.
      properties:
        precipitationThreshold:
          type: string
          description: Alarm tetikleyecek asgari yağış şiddeti kategorisi (mm / 3 sa).
          enum:
            - DRIZZLE
            - LIGHT
            - MODERATE
            - HEAVY
            - VERY_HEAVY
            - EXTREME
          example: MODERATE
        snowFallThreshold:
          type: string
          description: >-
            Alarm tetikleyecek asgari kar yağış derinliği kategorisi (cm / 3
            sa).
          enum:
            - LIGHT
            - MODERATE
            - HEAVY
          example: LIGHT
        windGustThreshold:
          type: string
          description: Alarm tetikleyecek asgari rüzgar esti kategorisi (km/sa).
          enum:
            - STRONG_WIND
            - STORM
            - SEVERE_STORM
            - HURRICANE
          example: STRONG_WIND
        hotTemperatureThreshold:
          type: string
          description: Alarm tetikleyecek asgari sıcağak dalgası kategorisi (°C).
          enum:
            - HOT_SNAP
            - HEAVY_HOT_SNAP
            - EXTREME_HOT_SNAP
          example: HOT_SNAP
        coldTemperatureThreshold:
          type: string
          description: Alarm tetikleyecek asgari soğuk dalgası kategorisi (°C).
          enum:
            - EXTREME_COLD_SNAP
            - HEAVY_COLD_SNAP
            - COLD_SNAP
          example: COLD_SNAP
    RegisterAdministrativeBoundary:
      type: object
      description: Şehir (il) ve ilçe tanımlayıcılarıyla belirlenen idari sınır.
      properties:
        type:
          type: string
          enum:
            - ADMINISTRATIVE
            - POINT
          writeOnly: true
        cityId:
          type: integer
          format: int64
          description: Şehrin (il) sayısal tanımlayıcısı.
          example: 6
        districtId:
          type: integer
          format: int64
          description: İlçenin sayısal tanımlayıcısı.
          example: 557
      required:
        - cityId
        - districtId
    RegisterPointBoundary:
      type: object
      description: Tek bir boylam/enlem koordinatıyla tanımlanan coğrafi nokta sınırı.
      properties:
        type:
          type: string
          enum:
            - ADMINISTRATIVE
            - POINT
          writeOnly: true
        point:
          $ref: '#/components/schemas/GeoPoint'
          description: Alarm izleme noktasının coğrafi koordinatı (boylam, enlem).
    AuthWrapper:
      description: Discriminator alanı "type" olan kimlik doğrulama zarfı.
      discriminator:
        propertyName: type
        mapping:
          BASIC:
            $ref: '#/components/schemas/BasicAuthentication'
          JWT_TOKEN:
            $ref: '#/components/schemas/JwtAuthentication'
          API_KEY:
            $ref: '#/components/schemas/ApiKeyAuthentication'
          HMAC_SIGNATURE:
            $ref: '#/components/schemas/HmacAuthentication'
      oneOf:
        - $ref: '#/components/schemas/BasicAuthentication'
        - $ref: '#/components/schemas/JwtAuthentication'
        - $ref: '#/components/schemas/ApiKeyAuthentication'
        - $ref: '#/components/schemas/HmacAuthentication'
    MapTypeSchema:
      type: object
      example:
        key-1: value-1
        key-2: value-2
      properties:
        key:
          type: string
          example: key-1
        value:
          type: string
          example: value-1
    DeliveryPolicy:
      type: object
      description: Teslimat zaman aşımı ve yeniden deneme davranışı.
      properties:
        timeout:
          type: integer
          format: int64
          description: >-
            Teslimat denemesinden vazgeçilmeden önce beklenen zaman aşımı süresi
            (saniye).
          example: 60
        maxRetries:
          type: integer
          format: int32
          description: >-
            İlk teslimat başarısızlığından sonra yapılacak azami yeniden deneme
            sayısı.
          example: 3
        retryDelay:
          type: integer
          format: int32
          description: Ardışık yeniden denemeler arasındaki bekleme süresi (saniye).
          example: 10
    GeoPoint:
      type: object
      properties:
        lng:
          type: number
          format: double
          description: Boylam koordinatı.
          example: 32.857358
          maximum: 180
          minimum: -180
        lat:
          type: number
          format: double
          description: Enlem koordinatı.
          example: 39.93504
          maximum: 90
          minimum: -90
      required:
        - lat
        - lng
    BasicAuthentication:
      type: object
      description: HTTP Basic kimlik doğrulama.
      properties:
        type:
          type: string
          description: Kimlik doğrulama tipini belirleyen alan.
          enum:
            - BASIC
            - JWT_TOKEN
            - API_KEY
            - HMAC_SIGNATURE
          example: API_KEY
          writeOnly: true
        username:
          type: string
          description: Basic kimlik doğrulama kullanıcı adı.
          example: alert-user
        password:
          type: string
          description: Basic kimlik doğrulama parolası.
          example: '******'
    JwtAuthentication:
      type: object
      description: Bearer JWT belirteci ile kimlik doğrulama.
      properties:
        type:
          type: string
          description: Kimlik doğrulama tipini belirleyen alan.
          enum:
            - BASIC
            - JWT_TOKEN
            - API_KEY
            - HMAC_SIGNATURE
          example: API_KEY
          writeOnly: true
        jwtToken:
          type: string
          description: >-
            Authorization başlığında gönderilecek önceden üretilmiş JWT
            belirteci.
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
    ApiKeyAuthentication:
      type: object
      description: API anahtarı ile kimlik doğrulama (header ve/veya query parametresi).
      properties:
        type:
          type: string
          description: Kimlik doğrulama tipini belirleyen alan.
          enum:
            - BASIC
            - JWT_TOKEN
            - API_KEY
            - HMAC_SIGNATURE
          example: API_KEY
          writeOnly: true
        apiKey:
          type: string
          description: İstekle gönderilecek API anahtarı değeri.
          example: x-1234567890abcdef
        asQueryParameter:
          type: boolean
          description: Doğru ise API anahtarı query parametresi olarak gönderilir.
          example: false
        asHeader:
          type: boolean
          description: Doğru ise API anahtarı istek başlığı olarak gönderilir.
          example: true
    HmacAuthentication:
      type: object
      description: >-
        ClientId/secret çiftiyle HMAC imzalı kimlik doğrulama. Her teslimat
        isteğine şu HTTP başlıkları eklenir: <code>X-Client-Id</code> (istemci
        kimliği), <code>X-Signature</code>
        (<code>clientId|timestamp|nonce|payload</code> dizesi üzerinden
        hesaplanan Base64 HMAC imzası), <code>X-HmacAlgorithm</code> (algoritma
        adı), <code>X-Timestamp</code> (epoch milisaniye), <code>X-Nonce</code>
        (rastgele nonce). Timestamp ve nonce her teslimat denemesinde taze
        üretilir.
      properties:
        type:
          type: string
          description: Kimlik doğrulama tipini belirleyen alan.
          enum:
            - BASIC
            - JWT_TOKEN
            - API_KEY
            - HMAC_SIGNATURE
          example: API_KEY
          writeOnly: true
        clientId:
          type: string
          description: İmza ön-girdisinde kullanılan istemci tanımlayıcısı.
          example: cafbc62f-e79d-4224-aca2-4c10ed4fad3c
        secret:
          type: string
          description: HMAC imzası hesaplamak için paylaşılan gizli anahtar.
          example: '******'
        algorithm:
          type: string
          description: İmza hesaplamasında kullanılacak HMAC algoritması.
          enum:
            - HmacSHA1
            - HmacSHA256
            - HmacSHA384
            - HmacSHA512
            - HmacMD5
          example: HmacSHA256

````