Needs keys Creates an invite and emails the accept link. Email delivery needs an SMTP server (SMTP_URL). Without it the email is written to the server log instead, and you can share accept_path yourself. Admin only.
Request#
| Field | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Invitee email. Stored lowercased. |
role |
string | No | admin, developer or member. Default member. |
Creating an invite for an email that already has a pending invite replaces the old one. The invite is valid for 14 days. The invitee signs in and opens the link to join.
Example request#
curl -X POST https://api.tried.com.au/workspace/invites \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jordan@harbourdental.com.au",
"role": "member"
}'const res = await fetch("https://api.tried.com.au/workspace/invites", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "jordan@harbourdental.com.au",
"role": "member"
}),
});
const invite = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/workspace/invites",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"email": "jordan@harbourdental.com.au",
"role": "member",
},
)
invite = res.json()Response#
201 Created
{
"invite_id": "invite_4a6c8e0b2d4f6a8c0e2b4d6f",
"email": "jordan@harbourdental.com.au",
"role": "member",
"accept_path": "/invite/Qm3xT9vLr2Kp8sWd5ZyB1nHc7GfJ0aEu",
"token": "Qm3xT9vLr2Kp8sWd5ZyB1nHc7GfJ0aEu",
"status": "pending",
"expires_timestamp": 1762041600000,
"created_timestamp": 1760832000000,
"email_sent": false,
"email_mode": "log"
}Returns the invite (fields as in List invites) plus two delivery fields.
| Field | Type | Description |
|---|---|---|
email_sent |
boolean | true when the SMTP server accepted the email. |
email_mode |
string | smtp when SMTP_URL is set, log when the email was only logged. |
Errors#
| Status | When |
|---|---|
400 |
Validation failed, for example email: Invalid email. |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the admin scope. A dashboard user without the right role gets Requires role: admin. API keys act as admin. |
409 |
<email> is already a member. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.