provider B2B Magic Links POST
/v1/b2b/magic_links/email/invite @utdk/stytch
/v1/b2b/magic_links/email/invite Invite
Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
The magic link invite will be valid for 1 week.
## Revoke an invite
To revoke an existing invite, use the [Delete Member](https://stytch.com/docs/b2b/api/delete-member) endpoint. This will both delete the invited Member from the target Organization and revoke all existing invite emails.
- X-Stytch-Member-Session header
- A Stytch session that can be used to run the request with the given member's permissions.
- string
- X-Stytch-Member-SessionJWT header
- A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions.
- string
Try it
Authentication
Configure credentials for Stytch API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import stytch from '@utdk/stytch';
await stytch.apiB2bMagicV1B2bMagicLinksEmailInvite()