Skip to main content
POST
/
v0
/
alerts
curl --request POST \
  --url https://api.formo.so/v0/alerts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Mobile swap alert",
  "trigger_type": "event",
  "trigger_filters": [
    {
      "name": "type",
      "value": "swap",
      "operator": "equals"
    },
    {
      "name": "device",
      "value": "mobile",
      "operator": "equals"
    },
    {
      "name": "volume",
      "value": "1000",
      "operator": "greater",
      "numericThreshold": "1000"
    }
  ],
  "recipient": [
    {
      "type": "webhook",
      "value": [
        "https://hooks.myapp.com/formo-alerts"
      ]
    },
    {
      "type": "email",
      "value": [
        "alerts@myapp.com"
      ]
    }
  ],
  "secret": "whsec_mysigningsecret123"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "trigger_type": "event",
  "status": "active",
  "project_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "trigger_filters": [
    {
      "name": "<string>",
      "value": "<string>",
      "operator": "<string>",
      "numericThreshold": "<string>"
    }
  ],
  "recipient": [
    {
      "type": "email",
      "value": [
        "<string>"
      ]
    }
  ],
  "has_secret": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.formo.so/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.

Body

application/json
name
string
required
Minimum string length: 1
trigger_type
enum<string>
required
Available options:
event,
user
trigger_filters
object[]
required
recipient
object[]
secret
string

Webhook signing secret

Response

201 - application/json

Alert created

id
string
required
name
string
required
trigger_type
enum<string>
required
Available options:
event,
user
status
enum<string>
required
Available options:
active,
inactive
project_id
string
required
created_at
string<date-time>
updated_at
string<date-time> | null
trigger_filters
object[]
recipient
object[]
has_secret
boolean