Code Examples

Alert API integration examples in multiple programming languages

← Back to Home

Alert API Examples

Getting Started: Each example includes configuration variables at the top. Update API_URL and API_KEY with your values before running.

Quick Start

1. Get an API Key

Open your project in Web of Facts, go to Project Settings → API Keys, and create a new key.

2. Create Entities

Alerts must link to existing entities. Create the entities you want to monitor in your project.

3. Download and Configure

Download an example file and update the configuration:

API_URL = "https://your-domain.com/api/external/alerts"
API_KEY = "wof_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
TARGET_ENTITY = "your-entity-name"

4. Run

# Python
pip install requests
python python_alerts.py

# Bash
chmod +x bash_alerts.sh
./bash_alerts.sh

# Node.js
node nodejs_alerts.js

# Go
go run go_alerts.go

# PowerShell
.\powershell_alerts.ps1

# PHP
php php_alerts.php

Documentation

For complete API documentation including all parameters, response formats, and error handling:

View Full Alert API Documentation →