Skip to main content
POST
/
v2
/
farcaster
/
webhook
Create a webhook
curl --request POST \
  --url https://api.neynar.com/v2/farcaster/webhook/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "url": "<string>",
  "subscription": {
    "cast.created": {
      "exclude_author_fids": [
        123
      ],
      "author_fids": [
        123
      ],
      "mentioned_fids": [
        123
      ],
      "parent_urls": [
        "<string>"
      ],
      "root_parent_urls": [
        "<string>"
      ],
      "parent_hashes": [
        "<string>"
      ],
      "parent_author_fids": [
        123
      ],
      "text": "(?i)\\$degen",
      "embeds": "\b(farcaster|neynar)\b",
      "minimum_author_score": 0,
      "embedded_cast_author_fids": [
        123
      ],
      "embedded_cast_hashes": [
        "<string>"
      ]
    },
    "cast.deleted": {
      "exclude_author_fids": [
        123
      ],
      "author_fids": [
        123
      ],
      "mentioned_fids": [
        123
      ],
      "parent_urls": [
        "<string>"
      ],
      "root_parent_urls": [
        "<string>"
      ],
      "parent_hashes": [
        "<string>"
      ],
      "parent_author_fids": [
        123
      ],
      "text": "(?i)\\$degen",
      "embeds": "\b(farcaster|neynar)\b",
      "minimum_author_score": 0,
      "embedded_cast_author_fids": [
        123
      ],
      "embedded_cast_hashes": [
        "<string>"
      ]
    },
    "user.created": {},
    "user.updated": {
      "fids": [
        123
      ]
    },
    "follow.created": {
      "fids": [
        123
      ],
      "target_fids": [
        123
      ]
    },
    "follow.deleted": {
      "fids": [
        123
      ],
      "target_fids": [
        123
      ]
    },
    "reaction.created": {
      "fids": [
        123
      ],
      "target_fids": [
        123
      ],
      "target_cast_hashes": [
        "0x71d5225f77e0164388b1d4c120825f3a2c1f131c"
      ]
    },
    "reaction.deleted": {
      "fids": [
        123
      ],
      "target_fids": [
        123
      ],
      "target_cast_hashes": [
        "0x71d5225f77e0164388b1d4c120825f3a2c1f131c"
      ]
    },
    "trade.created": {
      "fids": [
        123
      ],
      "minimum_trader_neynar_score": 0.5,
      "minimum_token_amount_usdc": 1
    }
  }
}
'
{
  "message": "<string>",
  "success": true
}

Node.js SDK

🔗 SDK Method: publishWebhook Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Body

application/json
name
string
required
url
string
required
subscription
WebhookSubscriptionFilters · object

Response

Success

message
string
success
boolean
webhook
Webhook · object