identity.org-invitation.create ​
Send an organization invitation by email
Send an organization invitation to an email address.
Inputs:
- organization_uuid: Target organization ID (required)
- email: Invitee email (required)
- actor: Cognito sub or user UUID of the inviter (required)
- role: Role to grant on acceptance — member | admin | owner (optional; default member)
- message: Optional personal message
- expires_in_days: Override default 7-day expiry (optional)
Outputs (terminal state_data):
- invitation_uuid
- role
- expires_at
- persisted: true if newly created, false if an existing pending row was reused
- email_dispatched: bool (best-effort — false does not fail the workflow)
- email_workflow_ref: child workflow id when dispatch was started
- dispatch_error: best-effort dispatch error when the child could not be started
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
email | Yes | — | — | |
actor | string | Yes | — | — |
role | string | No | — | — |
message | string | No | — | — |
expires_in_days | integer | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
invitation_uuid | uuid | No | — | — |
email | No | — | — | |
role | string | No | — | — |
expires_at | datetime | No | — | — |
persisted | boolean | Yes | — | — |
email_dispatched | boolean | Yes | — | — |
email_workflow_ref | string | No | — | — |
dispatch_error | string | No | — | — |
organization_uuid | uuid | No | — | — |
actor | string | No | — | — |
message | string | No | — | — |
expires_in_days | integer | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | validate | — |
dispatching | No | No | — | complete | — |
persisting | No | No | — | dispatch | — |
validating | No | No | — | persist | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | validate | validating | — |
validating | persist | persisting | — |
persisting | dispatch | dispatching | — |
dispatching | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.org-invitation.create",
"initial_data": {
"organization_uuid": "value",
"email": "value",
"actor": "value"
}
}