User imports
Apply, or with dry_run (default true) plan, a batch of at most 100 organizations and 1,000 member entries under an import run, after their users (pontive-spec 46 §5.3). external_id is each row's key. A member names its user by exactly one of user_id, user_external_id or legacy_subject (the run's source), with roles of the org type; one that names no user fails as a warning on the row, not the organization. A new organization needs at least one resolved member with owner (owners_required). An existing one (same external_id) takes new members and, with on_existing update, its name, metadata and changed roles; its owners change by transfer, never by import (owner_requires_transfer). An organization larger than one batch is sent again with its next members. A b2c instance refuses the call (tenancy_mode_b2c). Needs sys:org:create on the instance root, and sys:member:manage on each existing organization the batch changes.
x-pontive-instance-id<token>Instance ID for the request
Batch
application/json- body
Batch
dry_run?booleanorganizations?array<>user_import_id?stringOK
application/json- response
batch?integerBatch is the batch's number in the run; absent in a dry run.
counts?dry_run?booleanobject?stringrecords?array<>user_import_id?stringcurl -X POST 'https://api.us.pontive.com/v1/organizations/import' \ -H 'Content-Type: application/json' \ -d '{}'{ "batch": 0, "counts": { "created": 0, "failed": 0, "skipped": 0, "updated": 0 }, "dry_run": true, "object": "string", "records": [ { "errors": [ { "code": "string", "field": "string", "message": "string" } ], "index": 0, "key": "string", "organization_id": "string", "outcome": "created", "user_id": "string", "warnings": [ { "code": "string", "field": "string", "message": "string" } ] } ], "user_import_id": "string"}The instance's import runs, newest first. Needs sys:user:read on the instance root.
x-pontive-instance-id<token>Instance ID for the request
status?stringOnly runs in this status
"open""reverting""reverted"migration_source_id?stringOnly runs from this migration source (msrc_)
created_after?stringCreated at or after this time (RFC 3339)
created_before?stringCreated before this time (RFC 3339)
page?integerPage number
limit?integerItems per page, 1 to 100
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/user-imports'{ "data": [ { "counts": { "batches": 0, "memberships_written": 0, "organizations_created": 0, "organizations_failed": 0, "organizations_updated": 0, "users_created": 0, "users_failed": 0, "users_skipped": 0, "users_updated": 0 }, "created_at": "string", "id": "string", "last_batch_at": "string", "migration_source_id": "string", "name": "string", "object": "string", "options": { "emit_events": true, "identity_connections": [ { "app_id": "string", "connection_slug": "string", "connection_type": "google" } ], "on_existing": "skip", "password_policy_violation": "require_change", "totp_app_ids": [ "string" ], "totp_apps": [ { "app_id": "string", "issuer": "string" } ] }, "reverted_at": "string", "status": "open", "updated_at": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Start an import run (pontive-spec 46 §5.1): a migration's batches of users and organizations, its counters, a record per applied row, and revert. migration_source_id is optional; without one, rows match existing users by external_id only and carry no legacy_subject or firebase_scrypt hash. options are checked now and fixed: on_existing (skip, default, or update), password_policy_violation (require_change, default, or allow), identity_connections (at most 20; each app must have that connection, of that type), totp_app_ids (at most 20; each app must have TOTP on with an issuer) and emit_events (default true: pontive.user.created for each user the run creates). Needs sys:user:manage on the instance root.
x-pontive-instance-id<token>Instance ID for the request
Run
application/json- body
Run
migration_source_id?stringname?stringoptions?Created
application/json- response
counts?created_at?stringid?stringlast_batch_at?stringmigration_source_id?stringname?stringobject?stringoptions?reverted_at?stringstatus?string"open""reverting""reverted"updated_at?stringcurl -X POST 'https://api.us.pontive.com/v1/user-imports' \ -H 'Content-Type: application/json' \ -d '{}'{ "counts": { "batches": 0, "memberships_written": 0, "organizations_created": 0, "organizations_failed": 0, "organizations_updated": 0, "users_created": 0, "users_failed": 0, "users_skipped": 0, "users_updated": 0 }, "created_at": "string", "id": "string", "last_batch_at": "string", "migration_source_id": "string", "name": "string", "object": "string", "options": { "emit_events": true, "identity_connections": [ { "app_id": "string", "connection_slug": "string", "connection_type": "google" } ], "on_existing": "skip", "password_policy_violation": "require_change", "totp_app_ids": [ "string" ], "totp_apps": [ { "app_id": "string", "issuer": "string" } ] }, "reverted_at": "string", "status": "open", "updated_at": "string"}The run with its options and counters. Needs sys:user:read on the instance root.
x-pontive-instance-id<token>Instance ID for the request
user_import_id*stringUser import ID (uimp_)
OK
application/json- response
counts?created_at?stringid?stringlast_batch_at?stringmigration_source_id?stringname?stringobject?stringoptions?reverted_at?stringstatus?string"open""reverting""reverted"updated_at?stringcurl -X GET 'https://api.us.pontive.com/v1/user-imports/string'{ "counts": { "batches": 0, "memberships_written": 0, "organizations_created": 0, "organizations_failed": 0, "organizations_updated": 0, "users_created": 0, "users_failed": 0, "users_skipped": 0, "users_updated": 0 }, "created_at": "string", "id": "string", "last_batch_at": "string", "migration_source_id": "string", "name": "string", "object": "string", "options": { "emit_events": true, "identity_connections": [ { "app_id": "string", "connection_slug": "string", "connection_type": "google" } ], "on_existing": "skip", "password_policy_violation": "require_change", "totp_app_ids": [ "string" ], "totp_apps": [ { "app_id": "string", "issuer": "string" } ] }, "reverted_at": "string", "status": "open", "updated_at": "string"}The run's records, one per applied row, in the order applied: what matched the row (key), what happened (outcome) and why a row failed (errors, never a value from the row). Records are kept 90 days after the run's last batch. Needs sys:user:read on the instance root.
x-pontive-instance-id<token>Instance ID for the request
user_import_id*stringUser import ID (uimp_)
kind?stringOnly records of this kind
"user""organization"outcome?stringOnly records with this outcome
"created""updated""skipped""failed"page?integerPage number
limit?integerItems per page, 1 to 100
OK
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://api.us.pontive.com/v1/user-imports/string/records'{ "data": [ { "batch": 0, "created_at": "string", "errors": [ { "code": "string", "field": "string", "message": "string" } ], "id": "string", "index": 0, "key": "string", "kind": "user", "object": "string", "organization_id": "string", "outcome": "created", "reverted": true, "user_id": "string", "user_import_id": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}Undo, or with dry_run (default true) plan undoing, up to 1,000 of what the run created (pontive-spec 46 §5.5): the organizations it created whose every member is a user it created who has not signed in, then those users, deleted outright so their identifiers are free for a re-import. Users who signed in, organizations with other members and everything the run updated are kept; kept lists them with why. The run takes no more batches; call again while remaining is above 0, and the run is reverted once a call finds nothing left. Needs sys:user:manage on the instance root, and sys:org:delete on each organization it deletes.
x-pontive-instance-id<token>Instance ID for the request
user_import_id*stringUser import ID (uimp_)
Revert
application/json- body
Revert
dry_run?booleanDryRun (default true) answers what would go and deletes nothing.
OK
application/json- response
dry_run?booleankept?array<>object?stringorganizations_deleted?integerremaining?integerRemaining is what is left for the next call; 0 when the run is reverted.
users_deleted?integercurl -X POST 'https://api.us.pontive.com/v1/user-imports/string/revert' \ -H 'Content-Type: application/json' \ -d '{}'{ "dry_run": true, "kept": [ { "organization_id": "string", "reason": "signed_in", "user_id": "string" } ], "object": "string", "organizations_deleted": 0, "remaining": 0, "users_deleted": 0}Apply, or with dry_run (default true) plan, a batch of at most 100 users under an import run (pontive-spec 46 §5.2). Each row is POST /v1/users's fields plus legacy_subject (the user's id in the run's migration source), created_at (in the past), status (active or deactivated), and one of password (plaintext, hashed now) or password_hash: bcrypt, argon2, scrypt, firebase_scrypt, pbkdf2, django, werkzeug, aspnet_identity, wordpress, ldap or digest (§6.1). Hashes under OWASP's minimum are wrapped in argon2id; every imported hash is replaced by a native one at the user's first sign-in, when the password is also checked against the password policy (a change is required on failure unless the run allows it). totp (base32 secret, SHA1, 6 digits, 30 seconds, with up to 16 recovery codes) is stored for the run's totp_app_ids; external_identities are written to the run's identity_connections of their type (google, github, apple, oidc; microsoft and entra are identity_not_portable). A row matches an existing user by its legacy subject, else external_id, never by email: a match is skipped or, with on_existing update, updated; an email, phone or username held by a user it does not match fails identifier_conflict. Each row stands alone and answers a record: created, updated, skipped or failed with errors, never a value from the row. Nothing is sent to the users. Without user_import_id an applied batch starts a run with the default options. The call answers 200 whatever its rows' outcomes. Needs sys:user:manage on the instance root, and sys:user:credentials when a row carries password, password_hash, totp or external_identities (never a token acting for a user).
x-pontive-instance-id<token>Instance ID for the request
Batch
application/json- body
Batch
dry_run?booleanDryRun (default true) answers the plan and writes nothing.
user_import_id?stringUserImportID names the run; omitted, an applied batch starts a run with the default options and no source.
users?array<>OK
application/json- response
batch?integerBatch is the batch's number in the run; absent in a dry run.
counts?dry_run?booleanobject?stringrecords?array<>user_import_id?stringcurl -X POST 'https://api.us.pontive.com/v1/users/import' \ -H 'Content-Type: application/json' \ -d '{}'{ "batch": 0, "counts": { "created": 0, "failed": 0, "skipped": 0, "updated": 0 }, "dry_run": true, "object": "string", "records": [ { "errors": [ { "code": "string", "field": "string", "message": "string" } ], "index": 0, "key": "string", "organization_id": "string", "outcome": "created", "user_id": "string", "warnings": [ { "code": "string", "field": "string", "message": "string" } ] } ], "user_import_id": "string"}