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

# Create Alert

> Manually raise a compliance alert

<Info>
  Manual alert creation for suspicious activity observed by agents or support staff.
</Info>

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx`
</ParamField>

### Body Parameters

<ParamField body="subscriber_id" type="string" required>
  Subscriber UUID involved
</ParamField>

<ParamField body="alert_type" type="string" required>
  e.g., `SUSPICIOUS_BEHAVIOR`, `AGENT_REPORT`
</ParamField>

<ParamField body="details" type="string" required>
  Description of the incident
</ParamField>

<ParamField body="rule_id" type="integer">
  Optional ID of rule violated
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Creation status
</ResponseField>

<ResponseField name="alert_id" type="integer">
  ID of created alert
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://demo.api.vultlocal.com/api/v1/compliance/alerts" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "subscriber_id": "sub_abc123",
      "alert_type": "SUSPICIOUS_BEHAVIOR",
      "details": "User attempted multiple PIN guesses at agent location"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "success": true,
    "message": "Alert created",
    "alert_id": 101
  }
  ```
</ResponseExample>


## OpenAPI

````yaml olive-openapi.json POST /compliance/alerts
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /compliance/alerts:
    post:
      tags:
        - Compliance Alerts
      summary: Create a compliance alert
      description: Manually create a compliance alert (compliance and admin only)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.CreateComplianceAlertRequest'
        description: Alert details
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    handler.CreateComplianceAlertRequest:
      type: object
      required:
        - alert_type
        - details
        - subscriber_id
      properties:
        alert_type:
          type: string
        details:
          type: string
        rule_id:
          type: integer
        subscriber_id:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header

````