Appwrite
  1. teams
Appwrite
  • account
    • Delete Account
      DELETE
    • Get Account
      GET
    • Create Account
      POST
    • Update Account Email
      PATCH
    • Create Account JWT
      POST
    • Get Account Logs
      GET
    • Update Account Name
      PATCH
    • Update Account Password
      PATCH
    • Get Account Preferences
      GET
    • Update Account Preferences
      PATCH
    • Create Password Recovery
      POST
    • Complete Password Recovery
      PUT
    • Delete All Account Sessions
      DELETE
    • Get Account Sessions
      GET
    • Create Account Session
      POST
    • Create Anonymous Session
      POST
    • Create Account Session with OAuth2
      GET
    • Delete Account Session
      DELETE
    • Get Session By ID
      GET
    • Create Email Verification
      POST
    • Complete Email Verification
      PUT
  • avatars
    • Get Browser Icon
    • Get Credit Card Icon
    • Get Favicon
    • Get Country Flag
    • Get Image from URL
    • Get User Initials
    • Get QR Code
  • database
    • List Documents
    • Create Document
    • Delete Document
    • Get Document
    • Update Document
  • functions
    • List Executions
    • Create Execution
    • Get Execution
  • locale
    • Get User Locale
    • List Continents
    • List Countries
    • List EU Countries
    • List Countries Phone Codes
    • List Currencies
    • List Languages
  • storage
    • List Files
    • Create File
    • Delete File
    • Get File
    • Update File
    • Get File for Download
    • Get File Preview
    • Get File for View
  • teams
    • List Teams
      GET
    • Create Team
      POST
    • Delete Team
      DELETE
    • Get Team
      GET
    • Update Team
      PUT
    • Get Team Memberships
      GET
    • Create Team Membership
      POST
    • Delete Team Membership
      DELETE
    • Update Membership Roles
      PATCH
    • Update Team Membership Status
      PATCH
  1. teams

Create Team Membership

POST
/teams/{teamId}/memberships
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.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://appwrite.io/v1/teams//memberships' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "string",
    "name": "string",
    "roles": [
        "string"
    ],
    "url": "string"
}'
Response Response Example
{
    "$id": "string",
    "confirm": true,
    "email": "string",
    "invited": 0,
    "joined": 0,
    "name": "string",
    "roles": [
        "string"
    ],
    "teamId": "string",
    "userId": "string"
}

Request

Path Params

Body Params application/json

Examples

Responses

🟢201Membership
application/json
Body

Modified at 2023-08-16 07:28:14
Previous
Get Team Memberships
Next
Delete Team Membership
Built with