identity.org-invitation.accept ​
Accept an organization invitation by token
Accept an organization invitation by one-time token.
Inputs:
- token: Invitation token (required)
- actor: Cognito sub or user UUID of the accepting user (required)
Outputs (terminal state_data):
- accepted: bool
- reason: str or None (why accepted=False, or "already_member" for idempotent)
- organization_uuid: str or None
- membership_uuid: str or None
- role: str or None
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
token | string | Yes | — | One-time invitation bearer token authorizing membership creation. |
actor | string | Yes | — | Cognito subject or user UUID of the accepting user. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
accepted | boolean | Yes | — | Whether the invitation produced or confirmed a membership. |
reason | string | No | — | Stable outcome reason for idempotent or rejected cases. |
message | string | No | — | Human-readable outcome detail. |
organization_uuid | uuid | No | — | Organization joined by the accepting user. |
membership_uuid | uuid | No | — | Created or existing organization membership UUID. |
role | string | No | — | Organization role granted by the invitation. |
actor | string | No | — | Authenticated principal that accepted the invitation. |
failure_reason | string | No | — | Human-readable explanation when invitation acceptance fails. |
failure_type | string | No | — | Stable category for an invitation-acceptance failure. |
failed_action | string | No | — | Action that failed during invitation acceptance. |
failed_at_state | string | No | — | Workflow state in which invitation acceptance failed. |
failed_step | string | No | — | DAG step that failed, when applicable. |
failed_layer | string | No | — | DAG layer that failed, when applicable. |
error | string | No | — | Underlying error message exposed by the workflow engine. |
error_type | string | No | — | Underlying error category exposed by the workflow engine. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | validate | — |
joining | No | No | — | complete | — |
validating | No | No | — | join | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | validate | validating | — |
validating | join | joining | — |
joining | complete | completed | — |
initiated | fail | failed | — |
validating | fail | failed | — |
joining | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "identity.org-invitation.accept",
"initial_data": {
"token": "value",
"actor": "value"
}
}