Event types
A comment that tags your account arrives as
instagram.comment.received with data.mentionsChannel: true. Your account’s own replies are not sent.
Events
instagram.message.received
instagram.comment.received
occurredAt is null when Instagram sends no time for the event. mediaId is null for comments on a live video.
Create a subscription
201 with subscriptionId (sub_...) and secret. The secret is shown only once: store it. To change the URL or rotate the secret, delete the subscription and create a new one.
url: a publichttps://address.events: at least one event type the channel supports.label: optional, up to 120 characters, shown in your delivery log.- Up to 25 subscriptions per channel.
- Facebook Page channels do not support event subscriptions yet.
List and delete
GET /channels/{ch}/subscriptionslists a channel’s subscriptions, without secrets.DELETE /channels/{ch}/subscriptions/{sub}removes one. Deleting it again is harmless. A delivery already in progress may still arrive once.
Verify the signature
Every delivery carriesX-HookMyApp-Signature-256: sha256=<hex>: an HMAC-SHA256 of the raw request body, keyed with the subscription’s secret. It works exactly like your main webhook’s signature.
Delivery and retries
- Events usually arrive within seconds.
- Answer with any
2xxwithin 10 seconds. - Any other answer, a redirect or a timeout is retried with growing delays for about 3 hours. After that the event is dropped for that subscription.
- While one subscription’s endpoint keeps failing, deliveries to other subscriptions can be briefly delayed.
- An event can arrive more than once, and events can arrive out of order. Drop duplicates by
id; order byoccurredAt. - Every attempt shows in your delivery log with the subscription’s label.
- Your main webhook destination does not change. It keeps receiving what it receives today, and a failing subscription never affects it.
Sample events
GET /channels/{ch}/events?types=whatsapp.message.received&limit=3 returns recent events in the same shape, one per id, with raw set to null and rawOmitted set to true. It returns up to limit of the most recent events, newest first, and it looks through a bounded number of recent deliveries, so it can return fewer than limit events when the type you asked for is rare. Use it as sample data when you set up an automation, not as a history feed.
For automation platform builders
If you build a trigger for an automation platform on top of HookMyApp:- Subscribe (a user turns the trigger on):
POST /channels/{ch}/subscriptionswith the event type the trigger listens for and your platform’s target URL. Store the returnedsubscriptionId(and thesecret, to verify deliveries). - Unsubscribe (the trigger is turned off or deleted):
DELETE /channels/{ch}/subscriptions/{subscriptionId}. - Sample data (while the user sets up the trigger):
GET /channels/{ch}/events?types=<event type>&limit=3. - Deduplication: use the event
id. The same event always has the sameid, including when it is delivered more than once.