Skip to main content
Version: Next

Integration using Web-Hooks

Ory Kratos supports integration with other systems (e.g. ERP, Marketing, etc) using Web-Hooks.


To send marketing email using Mailchimp upon registration, add the following to your Ory Kratos config:

selfservice:  flows:    registration:      after:        password:          hooks:            - hook: web_hook              config:                url:                method: POST                body: /path/to/my/mandrillapp.jsonnet

And create a JsonNet file. Please be aware that Mailchimps' authentication mechanism currently requires to save the Mailchimp key in the JsonNet. For other systems you would be using the web_hook's auth config.

function(ctx) {  key: "<Your-Api-Key>",  message: {    from_email: "",    subject: "Hello from Ory Kratos",    text: "Welcome to Ory Kratos",    to: [      {        email: ctx.identity.verifiable_addresses[0].value,        type: "to"      }    ]  }}