- watch a channel - get events for any new casts on a specific channel
- watch a user - get events for any new casts from a specific user
- watch a mention - get events when a specific user gets @ mentioned in a cast
It’s not possible to use webhooks on frontend-only apps
1. Create a webhook
Create a REST API route with the POST method on your backend to handle the webhook events. It should be able to handle incoming data withContent-Type
set to application/json
format.
To test that your webhook is set up correctly, try this curl
2. Register the webhook details on the Neynar Dev Portal
Set this outgoing webhook URL on the Neynar developer portal. See How to Use Neynar Webhooks for how.https://api.your-farcaster-app.com/webhooks/neynar
A webhook should be configured with at least 1 valid event subscription. Each webhook can support multiple event types and/or multiple subscriptions for the same type. Some subscriptions require one or more parameters to be configured before you can start receiving the relevant events.
Event types supported
-
cast.created
Subscriptions supported- Authors - Get events for new casts & replies by a specific user
- Root Parent Url - Get events for new casts & replies in a specific channel
- Parent Url - Get events for new casts (but not replies) in a specific channel
- Mentions - Get events when a specific user gets @ mentioned in a cast
-
user.updated
Subscriptions supported- User - Get profile update events for specific users