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

# Sync Alerts

> Sync a batch of alerts from your security platform to Rilevera.

Sync a batch of alerts from your security platform to Rilevera.

**Key Features**

* Batch processing - Send multiple alerts in a single request
* Idempotent - Uses `platform_alert_id` to identify alerts; re-syncing updates rather than duplicates
* Metrics - Response includes counts of new, updated, and unchanged alerts

**Authentication** - Requires `X-Api-Key` header


## OpenAPI

````yaml /api-reference/openapi.json post /v1/alert-sync
openapi: 3.1.0
info:
  title: Rilevera Customer Alert API
  description: >-
    Programmatically sync alert data from your security platforms into Rilevera
    for comprehensive security monitoring and analysis.


    **Base URL:** `https://api.rilevera.com`
  version: 1.0.0
  contact:
    name: Rilevera Support
    email: support@rilevera.com
servers:
  - url: https://api.rilevera.com
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Alerts
    description: Alert synchronization endpoints
  - name: Health
    description: Service health monitoring
paths:
  /v1/alert-sync:
    post:
      tags:
        - Alerts
      summary: Sync Alerts
      description: >-
        Sync a batch of alerts from your security platform to Rilevera.


        **Key Features**

        - Batch processing - Send multiple alerts in a single request

        - Idempotent - Uses `platform_alert_id` to identify alerts; re-syncing
        updates rather than duplicates

        - Metrics - Response includes counts of new, updated, and unchanged
        alerts


        **Authentication** - Requires `X-Api-Key` header
      operationId: syncAlerts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertSyncRequest'
            example:
              alerts:
                - platform_alert_id: sumo-alert-12345
                  platform_rule_id:
                    - rule-9876
                  source_platform: sumologic
                  alert_title: Suspicious Login Activity Detected
                  alert_description: Multiple failed login attempts from IP 192.168.1.100
                  severity: high
                  status: open
                  detected_at: '2024-01-15T10:30:00Z'
                  first_observed_at: '2024-01-15T10:25:00Z'
                  last_observed_at: '2024-01-15T10:30:00Z'
                  tags:
                    - authentication
                    - brute-force
                    - external-ip
                  assigned_to: null
                  assigned_at: null
                  resolved_by: null
                  resolved_at: null
                  resolution_summary: null
                  final_disposition: null
      responses:
        '200':
          description: Sync completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertSyncResponse'
              example:
                total_new_alerts: 5
                total_updated_alerts: 10
                total_unchanged_alerts: 85
                error_count: 0
                failed_alerts: []
                response_metadata:
                  type: AlertSyncResponse
        '400':
          description: Bad Request - Invalid alert data, such as timestamps in the future
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing, invalid, or expired API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - The API key lacks the required permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity - The request body failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal Server Error - Sync operation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AlertSyncRequest:
      type: object
      required:
        - alerts
      properties:
        alerts:
          type: array
          description: List of alerts to sync
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/Alert'
    AlertSyncResponse:
      type: object
      properties:
        total_new_alerts:
          type: integer
          description: Number of new alerts inserted
        total_updated_alerts:
          type: integer
          description: Number of existing alerts updated
        total_unchanged_alerts:
          type: integer
          description: Number of alerts with no changes
        error_count:
          type: integer
          description: Number of alerts that failed to process
        failed_alerts:
          type: array
          items:
            type: string
          description: Platform IDs of failed alerts
        response_metadata:
          $ref: '#/components/schemas/ResponseMetadata'
    ErrorResponse:
      type: object
      required:
        - userMessage
        - errorType
        - requestId
      properties:
        userMessage:
          type: string
          description: Description of the error
        errorType:
          type: string
          description: Error type identifier
        requestId:
          type:
            - string
            - 'null'
          description: Request ID. Include it when you contact support.
        title:
          type: string
          description: Short error title, when available
        additionalContext:
          type: string
          description: Additional detail about the error, when available
    ValidationErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            validationErrors:
              type: array
              description: Fields that failed validation
              items:
                type: object
                properties:
                  loc:
                    type: array
                    items:
                      type:
                        - string
                        - integer
                    description: Location of the invalid field
                  msg:
                    type: string
                    description: Validation message
                  type:
                    type: string
                    description: Validation error type
    Alert:
      type: object
      required:
        - platform_alert_id
        - platform_rule_id
        - source_platform
        - alert_title
        - status
        - detected_at
      properties:
        platform_alert_id:
          type: string
          description: Unique alert ID from your platform (e.g., SumoLogic alert ID)
        platform_rule_id:
          type: array
          items:
            type: string
          description: Rule ID(s) that triggered this alert in your platform
        source_platform:
          type: string
          description: >-
            Platform where the alert originated (e.g., 'sumologic', 'datadog',
            'panther')
        alert_title:
          type: string
          description: Human-readable alert title
        alert_description:
          type:
            - string
            - 'null'
          description: Detailed description of the alert
        severity:
          type:
            - string
            - 'null'
          description: Severity level (e.g., 'low', 'medium', 'high', 'critical')
          enum:
            - info
            - low
            - medium
            - high
            - critical
            - null
        status:
          type: string
          description: Current status of the alert
          enum:
            - new
            - open
            - under_review
            - closed
        detected_at:
          type: string
          format: date-time
          description: When the rule detected and triggered this alert (ISO 8601)
        first_observed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: First time the underlying condition was observed
        last_observed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Most recent time the condition was seen
        tags:
          type: array
          items:
            type: string
          default: []
          description: Tags associated with the alert
        assigned_to:
          type:
            - string
            - 'null'
          description: User assigned to investigate the alert
        assigned_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the alert was assigned
        resolved_by:
          type:
            - string
            - 'null'
          description: User who resolved or closed the alert
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the alert was resolved
        resolution_summary:
          type:
            - string
            - 'null'
          description: Summary of findings or resolution
        final_disposition:
          type:
            - string
            - 'null'
          description: Final classification of the alert
          enum:
            - closed_without_reason
            - duplicate
            - informational
            - false_positive
            - benign_positive
            - true_positive
            - other
            - null
    ResponseMetadata:
      type: object
      properties:
        type:
          type: string
          description: Response type identifier
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Your Rilevera API key. Contact your administrator to obtain one.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.