Accept an invite
/v1/identity/auth/accept-inviteRequest body
token *stringfirst_namestringRequired for `activate` invites. Ignored for `add_to_app` and `password_reset`.
last_namestringRequired for `activate` invites. Ignored for `add_to_app` and `password_reset`.
password *stringPassword (8-64 chars). No composition rules — NIST SP 800-63B aligned. HaveIBeenPwned breach check runs server-side. For `activate` and `password_reset` this is the new password; for `add_to_app` it is the existing password used to verify the identity.
Code samples
curl -X POST "https://api.canopy.dev/v1/identity/auth/accept-invite" \
-H "Content-Type: application/json" \
-d '{
"token": "string",
"first_name": "string",
"last_name": "string",
"password": "string"
}'const response = await fetch("https://api.canopy.dev/v1/identity/auth/accept-invite", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "string",
"first_name": "string",
"last_name": "string",
"password": "string"
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.canopy.dev/v1/identity/auth/accept-invite",
headers={
"Content-Type": "application/json"
},
json={
"token": "string",
"first_name": "string",
"last_name": "string",
"password": "string",
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"token": "string",
"first_name": "string",
"last_name": "string",
"password": "string",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.canopy.dev/v1/identity/auth/accept-invite", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Invite accepted, user created or updated
{
"message": "string"
}application/json
message *string