Skip to content
POST /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

emailstring · email

Lowercased before storage.

role_idsstring[]

Exactly one role (role_…), granted on acceptance.

team_idsstring[]

Teams (team_…) to join. Defaults to none.

Response Body

created_atstring · date-time
emailstring · email

Lowercased at creation.

email_sentboolean

False when the invite email could not be delivered (the token still works).

expires_atstring · date-time

Seven days after creation.

idstring

Invite id (inv_…).

invited_bystring,null

User id (usr_…) of the inviter.

role_idsstring[]

The single role (role_…) the invitee receives on acceptance.

statusstring

Lifecycle state; only pending invites can still be accepted.

team_idsstring[]

Teams (team_…) they are added to.

tokenstring

Raw invite token — returned once, never retrievable again.

updated_atstring · date-time
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())