Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/appwrite/src/services/teams.ts>Teams#createMembership

[READ-ONLY] Official Appwrite Deno SDK 🦕
Go to Latest
method Teams.prototype.createMembership
import { Teams } from "https://deno.land/x/appwrite@6.0.0-RC1/src/services/teams.ts";

Create Team Membership

Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.

Use the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the Update Team Membership Status endpoint to allow the user to accept the invitation to the team.

Please note that to avoid a Redirect Attack the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.

Parameters

teamId: string
email: string
roles: string[]
url: string
optional
name: string

Returns

Promise<Models.Membership>