Create invite
/invite
Emails the invitee an accept link and returns the raw `token` once so a console can also show a copy-paste link — it is stored only as a hash and cannot be read back. Valid for seven days. An invite is a deferred role assignment, so the same no-escalation rule as `PATCH /member/{userId}` applies: you may only invite with roles whose permissions you already hold. Requires `member:manage`. Inviting someone who is already a member answers 409. A BROWSER SESSION must additionally carry a fresh step-up reauthentication (`X-Step-Up-Token`, obtained from `/auth/step-up`); without one the call answers `428 step_up_required` and `error.details` names the action and resource to prove. An organization API token is not challenged: step-up re-proves the person behind a session, and a token has no person behind it. Minting a redeemable credential for an address the caller chose is why this one is in the CREDENTIAL class: the ten-minute freshness window never satisfies it.
Request Body
Lowercased before storage.
Exactly one role (role_…), granted on acceptance.
Teams (team_…) to join. Defaults to none.
Response Body
Lowercased at creation.
False when the invite email could not be delivered (the token still works).
Seven days after creation.
Invite id (inv_…).
User id (usr_…) of the inviter.
The single role (role_…) the invitee receives on acceptance.
Lifecycle state; only pending invites can still be accepted.
Teams (team_…) they are added to.
Raw invite token — returned once, never retrievable again.
curl -X POST 'https://api.elaichi.ai/invite' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"email":"your_email","role_ids":[],"team_ids":[]}'const body = {
"email": "your_email",
"role_ids": [],
"team_ids": []
};
const response = await fetch('https://api.elaichi.ai/invite', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/invite"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"email": "your_email",
"role_ids": [],
"team_ids": []
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())