"Best analytics tool I've used in 14 years"

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 with identify:write. Pass websiteId as a query parameter.

Body parameters

FieldTypeRequiredDescription
user_idstringYesStable user ID. Non-empty, max 255 characters.
datafast_visitor_idstringYesDataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey.
Any other top-level fieldanyNoStored 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

FieldTypeDescription
statusstringsuccess.
data.messagestringHuman-readable confirmation or status message for the operation.
data.profileIdstringObjectId 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.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X POST "https://datafa.st/api/v1/identify" \
  -H "Authorization: Bearer df_xxx" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"user_123","datafast_visitor_id":"a3ab2331-989f-4cfa-91c6-2461c9e3c6bd","email":"jane@example.com","plan":"pro"}'
Success response
{
  "status": "success",
  "data": { "message": "User profile created successfully", "profileId": "665f0b3c4d2e1a0012345678" }
}