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": []
}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.
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
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Body
"jane@acme.com"
Workspace role keys or uuids (see GET /api/v1/workspace/roles).
["loop_agent"]
Extra scope keys on top of the roles (see GET /api/v1/workspace/scopes).
["loop.calls.place"]
Invitation e-mail subject. Defaults to the workspace's standard subject.
"You are invited to Acme"
Invitation e-mail body. Defaults to the workspace's standard message.
"Join our support team on mihu."
Which member the invitation is sent on behalf of. Defaults to the workspace owner.
"owner@acme.com"