curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/workspace/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jane@acme.com",
"roles": [
"loop_agent"
]
}
'{
"success": true,
"message": "Invitation sent",
"data": {
"email": "jane@acme.com",
"status": "pending",
"code": "2MLE-BWWJ",
"invitation_url": "https://acme.mihu.ai/invitations/aB3…",
"roles": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "loop_agent",
"name": "Loop Agent"
}
],
"scopes": [
"loop.calls.place"
],
"subject": "You are invited to Acme",
"message": "Join our team on mihu.",
"invited_by": {
"name": "Deniz Gokdunek",
"email": "owner@acme.com"
},
"send_count": 1,
"last_sent_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "This e-mail address already belongs to a user.",
"data": []
}Workspace Invitations
Invite a person by e-mail
Sends an invitation e-mail with a link valid for 48 hours. The person sets their own name and password when accepting, and lands in the workspace with exactly the roles and scopes named here — so at least one role or scope is required. The response carries invitation_url for clients that want to hand the link over themselves — treat it as a credential. Inviting an e-mail that already has a pending invitation replaces it with a fresh one.
POST
/
api
/
v1
/
workspace
/
invitations
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/workspace/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jane@acme.com",
"roles": [
"loop_agent"
]
}
'{
"success": true,
"message": "Invitation sent",
"data": {
"email": "jane@acme.com",
"status": "pending",
"code": "2MLE-BWWJ",
"invitation_url": "https://acme.mihu.ai/invitations/aB3…",
"roles": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "loop_agent",
"name": "Loop Agent"
}
],
"scopes": [
"loop.calls.place"
],
"subject": "You are invited to Acme",
"message": "Join our team on mihu.",
"invited_by": {
"name": "Deniz Gokdunek",
"email": "owner@acme.com"
},
"send_count": 1,
"last_sent_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "This e-mail address already belongs to a user.",
"data": []
}Authorizations
Body
application/json