Authflows document
The instance's auth flows as one authflows/v1 document (api-route-review D47): its published custom flows, each with its own widgets, and the custom widget definitions they show, so the document is self-contained. Only the published state is exported; drafts stay in the dashboard. Built-in flows and definitions are the same everywhere and never travel, and which app runs a flow is the app's authflow_bindings, not part of the flow. Everything is named by a key, never an id: a view node's widget is a definition's key or flow:, one of the flow's own widgets. authflow_id, repeatable, exports just those flows and the definitions they show (a flow that is not a published custom flow is 404); importing that document touches only them. The output is deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another instance with POST /v1/authn/authflows/document/import. Needs sys:flow:read and sys:widget:read.
x-pontive-instance-id<token>Instance ID for the request
authflow_id?array<string>Export only these flows, by id; repeat it for several
An authflows/v1 document
application/json- response
Document is an authflows/v1 document, passed to identity-svc as the bytes it was sent. At most 5 MB.
authflows?array<>pontive_document?"authflows/v1"PontiveDocument is the document type. An import reads the current and the previous major version.
"authflows/v1"pontkit?stringPontkit is the pontkit release the document was exported against. Informational: an import checks markup against the target's release.
widget_definitions?array<>WidgetDefinitions are the instance's own definitions the flows show, never a built-in. A published definition never changes, so this copy is the branding document's: a key the target lacks is created and published, identical markup is unchanged, other markup is a conflict.
curl -X GET 'https://api.us.pontive.com/v1/authn/authflows/document'{ "authflows": [ { "description": "string", "edges": [ { "from": "string", "id": "string", "to": "string", "trigger": { "event": "string", "kind": "user-event", "outcome": "string" } } ], "entry_node": "string", "id": "string", "intents": [ "signin" ], "metadata": { "viewport": { "x": 0, "y": 0, "zoom": 0 } }, "name": "string", "nodes": [ { "action_type": "string", "expression": "string", "flow_id": "string", "id": "string", "kind": "start", "metadata": { "note": "string", "position": { "x": 0, "y": 0 } }, "name": "string", "outcome": "string", "properties": { "property1": null, "property2": null }, "widget": "string", "widget_overrides": { "property1": "string", "property2": "string" } } ], "role": "entry", "widgets": { "property1": { "key": "string", "markup": "string", "name": "string" }, "property2": { "key": "string", "markup": "string", "name": "string" } } } ], "pontive_document": "authflows/v1", "pontkit": "string", "widget_definitions": [ { "description": "string", "key": "string", "markup": "string", "name": "string" } ]}Plans importing an authflows/v1 document into this instance and, with dry_run false, applies the plan (api-route-review D47). Flows and widget definitions are merged by key: a new key is created, a differing flow replaced whole, and one the document lacks is listed as absent and left alone. Nothing is deleted; delete a flow with DELETE /v1/authn/authflows/{authflow_id}. A definition the instance lacks is created and published; identical markup is unchanged, and different markup is a conflict, since a published definition never changes. A changed flow keeps each of its own widgets whose content matches, and gets a new one where content changed. With publish true (the default) each changed flow is published, its widgets first; with publish false it writes drafts for review in the dashboard. Anything the flow's publish validator refuses, a reference to a key in neither the document nor the instance, and a draft with unpublished changes the import would overwrite (unless discard_unpublished) are conflicts. Re-importing an instance's own export plans every entry unchanged and writes nothing. The dry run's ETag is the revision of the flows it read: send it as If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict, field .., and applies nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs sys:flow:manage, sys:widget:read and sys:widget:manage.
x-pontive-instance-id<token>Instance ID for the request
If-Match?stringThe dry run's ETag: the apply is refused 412 precondition_failed if the instance's flows changed since
X-Idempotency-Key?stringIdempotency key, read on an apply
The document and how to import it
application/json- body
The document and how to import it
discard_unpublished?booleanDiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a conflict.
document?Document is an authflows/v1 document, passed to identity-svc as the bytes it was sent. At most 5 MB.
dry_run?booleanDryRun returns the plan and writes nothing. True when omitted: send false to apply.
publish?booleanPublish publishes what the import changes. True when omitted; false writes drafts for review in the dashboard.
secrets?Secrets are the values of the document's {"$secret": ""} placeholders, by name; never inside the document, and never echoed back. A placeholder with no value here or in the target is a conflict.
OK
application/json- response
absent?array<>changed?array<>conflicts?array<>created?array<>dry_run?booleanDryRun is true when nothing was written.
object?"authflow_import_plan""authflow_import_plan"publish?booleanPublish says whether the changed flows are published, or left as drafts. New widget definitions are published either way.
unchanged?array<>warnings?array<>curl -X POST 'https://api.us.pontive.com/v1/authn/authflows/document/import' \ -H 'Content-Type: application/json' \ -d '{}'{ "absent": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "changed": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "conflicts": [ { "code": "string", "field": "string", "key": "string", "kind": "string", "message": "string" } ], "created": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "dry_run": true, "object": "authflow_import_plan", "publish": true, "unchanged": [ { "fields": [ "string" ], "key": "string", "kind": "string" } ], "warnings": [ { "code": "string", "field": "string", "key": "string", "kind": "string", "message": "string" } ]}