Identify users
POST https://datafa.st/api/v1/identify
Link a DataFast visitor to a known user and store profile metadata.
Request
Authentication
df_website API key for one website.dft_account token withidentify:write. PasswebsiteIdas a query parameter.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | Stable user ID. Non-empty, max 255 characters. |
datafast_visitor_id | string | Yes | DataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey. |
Any other top-level field | any | No | Stored inside profile metadata. Example: send email: "jane@example.com", plan: "pro", company: "Acme", role: "admin", or signup_source: "invite". |
Response
Returns a JSON object with
status and endpoint-specific fields.Response fields
| Field | Type | Description |
|---|---|---|
status | string | success. |
data.message | string | Human-readable confirmation or status message for the operation. |
data.profileId | string | ObjectId of the Identify profile created or found by DataFast. Profile ObjectId when a profile exists or is created. |
Errors
Common errors include
400 for invalid input, 401 for missing or invalid tokens, 403 for missing permission or suspended tracking, 404 for missing resources, and 500 for server errors.