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@0.4.0/src/services/teams.ts";

Create Team Membership

Use this endpoint to invite a new member to join your team. If initiated from Client SDK, an email with a link to join the team will be sent to the new member's email address if the member doesn't exist in the project it will be created automatically. If initiated from server side SDKs, 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. While calling from side SDKs the redirect url can be empty string.

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

Type Parameters

T extends unknown

Parameters

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

Returns

Promise<T>