action journy_link { label: "Link web activity to user" description: "💡 You don't need to use this endpoint if you use our JavaScript snippet in your application.\n\nThis endpoint is used to link web activity to a user in your application. This will help you discover which channels and campaigns work best.\n\nWhen our JavaScript snippet is embedded on your website, blog or landing pages, a cookie named \"__journey\" will be set.\n\nThis will only work if your website and application are under the same top level domain.\n\nWebsite, blog or landing pages\n* www.my-domain.tld\n* blog.my-domain.tld\n* landing-page.my-domain.tld\n\nApplication\n* app.my-domain.tld\n\nThe cookie on my-domain.tld will also be send to your app domain.\n\nYou should call this endpoint after the user succesfully logged in (so that you know the user's ID). Use the value of the cookie as device ID." provider: journy method: POST path: "/link" encoding: json input: { type: "object" description: "Link web activity to user" required: ["deviceId", "identification"] properties: { deviceId: { type: "string" format: "non-empty-string" } identification: { type: "object" description: "User identification requires a userId, email or both" properties: { email: { type: "string" format: "email" description: "Email address of the user" } userId: { type: "string" format: "user-id" description: "Unique identifier for the user in your database" } } } } } output: { type: "object" } }