Invite a user
POST
/v1/users
const url = 'https://api.fromenance.com/v1/users';const options = { method: 'POST', headers: { cookie: 'fromenance.session_token=<fromenance.session_token>', 'Content-Type': 'application/json' }, body: '{"email":"hello@example.com","role":"owner","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.fromenance.com/v1/users \ --header 'Content-Type: application/json' \ --cookie fromenance.session_token=<fromenance.session_token> \ --data '{ "email": "hello@example.com", "role": "owner", "name": "example" }'Creates the membership and emails a sign in link. The invitee signs in with a magic link or passkey.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
email
required
string format: email
role
string
name
string
Responses
Section titled “ Responses ”Invited
Media typeapplication/json
object
id
required
string
email
required
string
name
required
string | null
role
required
string
status
required
string
invited_at
required
string | null
accepted_at
required
string | null
last_seen_at
required
string | null
created_at
required
string
Example
{ "role": "owner"}Already a member
Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
errors
Present on validation problems.
Array<object>
object
path
required
string
message
required
string
request_id
string
Example
{ "type": "https://docs.fromenance.com/api/errors#validation", "title": "Validation failed", "status": 400, "detail": "recipient_hash must start with hmac-sha256:", "instance": "/v1/communications"}