data.identity.organization.persist ​
Create or restore an Organization row
Idempotently create or restore an Organization row.
Input: creator_uuid, name, email, optional address/billing fields. Output in state_data: organization_uuid, persisted, restored, persisted_at.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
creator_uuid | uuid | Yes | — | UUID of the user creating the organization |
name | string | Yes | — | Organization name |
email | Yes | — | Organization contact email (idempotency key) | |
region | string | No | — | — |
billing_currency | string | No | — | — |
phone | string | No | — | — |
address | string | No | — | — |
city | string | No | — | — |
state | string | No | — | — |
zip | string | No | — | — |
country | string | No | — | — |
website | string | No | — | — |
domain | string | No | — | — |
description | string | No | — | — |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
persisted | boolean | Yes | — | — |
restored | boolean | Yes | — | — |
persisted_at | string | Yes | — | — |
creator_uuid | uuid | No | — | — |
name | string | No | — | — |
email | No | — | — | |
region | string | No | — | — |
billing_currency | string | No | — | — |
phone | string | No | — | — |
address | string | No | — | — |
city | string | No | — | — |
state | string | No | — | — |
zip | string | No | — | — |
country | string | No | — | — |
website | string | No | — | — |
domain | string | No | — | — |
description | string | No | — | — |
actor | string | 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 |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Persist organization |
completed | No | Yes | Yes | — | Persisted |
failed | No | Yes | No | — | Persist failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.identity.organization.persist",
"initial_data": {
"creator_uuid": "value",
"name": "value",
"email": "value"
}
}