/users/import/confirm - Execute validated user import

POST /users/import/confirm

Confirm and execute a validated user import. Creates users using the same logic as single user creation (Logto sync, welcome emails, RBAC validation). Non-atomic: partial failures are reported per-row.

application/json

Body Required

  • import_id string(uuid) Required

    Import session ID from the validate response

  • skip_rows array[integer]

    Row numbers to skip during import

Responses

  • 200 application/json

    Import results

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • created integer
      • skipped integer
      • failed integer
      • results array[object]
        Hide results attributes Show results attributes object
        • row_number integer
        • status string

          Values are created, skipped, or failed.

        • id string

          Created entity ID (only if status is created)

        • error string

          Error message (only if status is failed)

  • 400 application/json

    Bad request - validation error

    Hide response attributes Show response attributes object
    • code integer

      HTTP error code

    • message string

      Error message

    • data object
      Hide data attributes Show data attributes object
      • type string

        Type of error

        Values are validation_error or external_api_error.

      • errors array[object]
        Hide errors attributes Show errors attributes object
        • key string

          Field name that failed validation

        • message string

          Error code or message

        • value string

          Value that failed validation

      • details

        Additional error details

  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 403 application/json

    Forbidden - insufficient permissions

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
POST /users/import/confirm
curl \
 --request POST 'https://api.your-domain.com/api/users/import/confirm' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"import_id":"550e8400-e29b-41d4-a716-446655440000","skip_rows":[3,7]}'
Request examples
{
  "import_id": "550e8400-e29b-41d4-a716-446655440000",
  "skip_rows": [
    3,
    7
  ]
}
Response examples (200)
{
  "code": 200,
  "message": "users imported successfully",
  "data": {
    "created": 45,
    "skipped": 5,
    "failed": 0,
    "results": [
      {
        "row_number": 2,
        "status": "created",
        "id": "string",
        "error": "string"
      }
    ]
  }
}
Response examples (400)
{
  "code": 400,
  "message": "validation failed",
  "data": {
    "type": "validation_error",
    "errors": [
      {
        "key": "username",
        "message": "required",
        "value": "string"
      }
    ]
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}
Response examples (403)
{
  "code": 403,
  "message": "insufficient permissions",
  "data": {}
}