Invite someone
curl --request POST \
--url https://api.peel.sh/v1/team/invites \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"email": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.peel.sh/v1/team/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/team/invites"
payload = { "email": "jsmith@example.com" }
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invite": {
"id": "<string>",
"email": "<string>",
"role": "admin",
"expires_at": "2023-11-07T05:31:56Z"
},
"invite_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Account
Invite someone
Emails a link that works for 7 days, only for that address. Owner or admin, with a session; API keys cannot invite. Inviting an address again replaces its link.
POST
/
v1
/
team
/
invites
Invite someone
curl --request POST \
--url https://api.peel.sh/v1/team/invites \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"email": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.peel.sh/v1/team/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/team/invites"
payload = { "email": "jsmith@example.com" }
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invite": {
"id": "<string>",
"email": "<string>",
"role": "admin",
"expires_at": "2023-11-07T05:31:56Z"
},
"invite_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}⌘I