/v1/apps/{app_id}/end-users/exportAuthStream this app's end-user directory as NDJSON or CSV, applying the list's `?status=` / `?search=` / `?provider=` filters. Audited as `users.exported`.
Streamed in keyset batches — neither the service nor the client holds the whole directory. Ordered oldest-first by `(created_at, id)` so a re-run is stable. Gated on `auth.user.export`, which is escalation class: this hands over every address in the directory in one call, where `auth.list` pages it. Hard cap of 1,000,000 rows; a wider request is refused with 413 before any body is written.
Path parameters
app_id*stringId of the app.
Query parameters
formatenum (2)File format. Defaults to `ndjson`.
statusenum (3)Only users with this status.
searchstringCase-insensitive substring of the username or of any contact (email or phone).
providerstringOnly users who sign in with this provider: `google`, `github`, `apple`, `microsoft`, an OpenID Connect provider id (`oidc-<key>`), or `password` (has a password).
Response · 200
Streamed export. `Content-Disposition` names the file.
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/end-users/export
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const response = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").endUsers.export();
const text = await response.text();auth.admin.app(…).endUsers.export(params?, options?): Response