{ "opencollection": "1.0.0", "info": { "name": "Stytch B2B Authentication Application Magic Links API", "version": "2.0.0" }, "items": [ { "info": { "name": "Magic Links", "type": "folder" }, "items": [ { "info": { "name": "Authenticate", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links/authenticate", "body": { "type": "json", "data": "{}" } }, "docs": "Authenticate a User given a Magic Link. This endpoint verifies that the Magic Link token is valid, hasn't expired or been previously used, and any optional security settings such as IP match or user agent match are satisfied." }, { "info": { "name": "Create", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links", "body": { "type": "json", "data": "{}" } }, "docs": "Create an Embeddable Magic Link token for a User.\n\n### Important usage notes\n\nCarefully review the following notes before using Embeddable Magic Links:\n\n* Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely.\n* Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone number) as verified, since we cannot confirm how the token was sent to the user.\n* Embeddable Magic Links are only available in " }, { "info": { "name": "Send", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links/email/send", "body": { "type": "json", "data": "{}" } }, "docs": "Send a magic link to an existing Stytch user using their email address. If you'd like to create a user and send them a magic link by email with one request, use our [log in or create endpoint](https://stytch.com/docs/api/log-in-or-create-user-by-email).\n\n### Add an email to an existing user\nThis endpoint also allows you to add a new email address to an existing Stytch User. Including a `user_id`, `session_token`, or `session_jwt` in your Send Magic Link by email request will add the new, unverif" }, { "info": { "name": "Loginorcreate", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links/email/login_or_create", "body": { "type": "json", "data": "{}" } }, "docs": "Send either a login or signup Magic Link to the User based on if the email is associated with a User already. A new or pending User will receive a signup Magic Link. An active User will receive a login Magic Link. For more information on how to control the status your Users are created in see the `create_user_as_pending` flag.\n\n### Next steps\nThe User is emailed a Magic Link which redirects them to the provided [redirect URL](https://stytch.com/docs/guides/magic-links/email-magic-links/redirect-" }, { "info": { "name": "Invite", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links/email/invite", "body": { "type": "json", "data": "{}" } }, "docs": "Create a User and send an invite Magic Link to the provided `email`. The User will be created with a `pending` status until they click the Magic Link in the invite email.\n\n### Next steps\nThe User is emailed a Magic Link which redirects them to the provided [redirect URL](https://stytch.com/docs/guides/magic-links/email-magic-links/redirect-routing). Collect the `token` from the URL query parameters and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) to complet" }, { "info": { "name": "Revokeinvite", "type": "http" }, "http": { "method": "POST", "url": "https://api.stytch.com/v1/magic_links/email/revoke_invite", "body": { "type": "json", "data": "{}" } }, "docs": "Revoke a pending invite based on the `email` provided." } ] } ], "bundled": true }