Configure webhooks that trigger on Discourse events to integrate with external services

Is it possible to write our own webhook triggers ? I looked around couldn’t find anything similar.