HomeDocsWebhooks & Alerts

Webhooks & Alerts

Set up webhooks to receive real-time notifications for events. Create price alerts to get notified when tokens hit your target prices.

Webhook Events

price_alert

Triggered when price conditions are met

transaction

Triggered on wallet transactions

balance_change

Triggered on balance changes

Webhook Payload Example

{
  "id": "evt_abc123...",
  "type": "price_alert",
  "timestamp": "2025-12-14T12:00:00.000Z",
  "data": {
    "alertId": "alert_xyz789...",
    "tokenMint": "So11111111111111111111111111111111111111112",
    "tokenSymbol": "SOL",
    "condition": "above",
    "targetPrice": 100,
    "currentPrice": 101.50
  }
}

// Signature Header:
// X-Webhook-Signature: sha256=<hmac_signature>
POST/v1/webhooks

Create a new webhook subscription

Request Body

NameTypeRequiredDescription
urlstringYesHTTPS URL for webhook delivery
eventsarrayYesEvent types: price_alert, transaction, balance_change
secretstringNoSecret for HMAC signature verification

Example Request

curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "example_value",
  "events": [
    "price_alert"
  ]
}' \
  "https://api.acceso.dev/v1/webhooks"

Example Response

{
  "success": true,
  "data": {
    "id": "wh_abc123...",
    "url": "https://your-server.com/webhook",
    "events": ["price_alert", "transaction"],
    "secret": "whsec_...",
    "status": "active",
    "createdAt": "2025-12-14T12:00:00.000Z"
  }
}
GET/v1/webhooks

List all your webhook subscriptions

Example Request

curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  "https://api.acceso.dev/v1/webhooks"

Example Response

{
  "success": true,
  "data": [
    {
      "id": "wh_abc123...",
      "url": "https://your-server.com/webhook",
      "events": ["price_alert"],
      "status": "active"
    }
  ]
}
GET/v1/webhooks/{webhook_id}

Get webhook details by ID

URL Parameters

NameTypeRequiredDescription
webhook_idstringYesWebhook ID

Example Request

curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  "https://api.acceso.dev/v1/webhooks/{webhook_id}"
PUT/v1/webhooks/{webhook_id}

Update a webhook subscription

URL Parameters

NameTypeRequiredDescription
webhook_idstringYesWebhook ID

Request Body

NameTypeRequiredDescription
urlstringNoNew webhook URL
eventsarrayNoNew event types
statusstringNoactive or paused

Example Request

curl -X PUT \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://api.acceso.dev/v1/webhooks/{webhook_id}"
DELETE/v1/webhooks/{webhook_id}

Delete a webhook subscription

URL Parameters

NameTypeRequiredDescription
webhook_idstringYesWebhook ID

Example Request

curl -X DELETE \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  "https://api.acceso.dev/v1/webhooks/{webhook_id}"
POST/v1/webhooks/{webhook_id}/test

Send a test event to your webhook

URL Parameters

NameTypeRequiredDescription
webhook_idstringYesWebhook ID

Request Body

NameTypeRequiredDescription
eventTypestringNoEvent type to test (default: test)

Example Request

curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://api.acceso.dev/v1/webhooks/{webhook_id}/test"
POST/v1/alerts

Create a price alert

Request Body

NameTypeRequiredDescription
tokenMintstringYesToken mint address
conditionstringYesabove or below
pricenumberYesTarget price in USD
webhookIdstringNoWebhook to notify (uses default if not set)

Example Request

curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "tokenMint": "example_value",
  "condition": "example_value",
  "price": 100
}' \
  "https://api.acceso.dev/v1/alerts"

Example Response

{
  "success": true,
  "data": {
    "id": "alert_xyz789...",
    "tokenMint": "So11111111111111111111111111111111111111112",
    "condition": "above",
    "price": 100,
    "status": "active"
  }
}
GET/v1/alerts

List all your price alerts

Example Request

curl -X GET \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  "https://api.acceso.dev/v1/alerts"
DELETE/v1/alerts/{alert_id}

Delete a price alert

URL Parameters

NameTypeRequiredDescription
alert_idstringYesAlert ID

Example Request

curl -X DELETE \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  "https://api.acceso.dev/v1/alerts/{alert_id}"