1POST https://api.june.so/sdk/identify
1POST https://api.june.so/sdk/identify
This action is used to track the identification of a user or an anonymous user.
Returns a JSON response with a status of 200
and a success
key set to true
.
1{ 2"status": 200, 3"success": true 4}
Parameter | Type | Description | Required |
---|---|---|---|
userId | String | The ID for this user in your database. Note: At least one of `userId` or `anonymousId` must be included in any identify call. | Optional |
anonymousId | String | An ID associated with the user when you don’t know who they are (for example, the `anonymousId` generated by analytics.js). Note: You must include at least one of `userId` or `anonymousId` in all identify calls. | Optional |
traits | Object | A dictionary of traits you know about the user. Things like: email, name, or friends. | Optional |
timestamp | Date | A JavaScript date object representing when the identify took place. If the identify just happened, leave it out as Segment uses the server’s time. If you’re importing data from the past, make sure to send a timestamp. | Optional |
context | Object | A dictionary of extra context to attach to the call. Note: `context` differs from `traits` because it is not attributes of the user itself. | Optional |
1POST https://api.june.so/sdk/identify 2 3{ 4"userId": "u123456", 5"email": "user@example.com", 6"traits": { 7"username": "user123", 8"firstName": "John", 9"lastName": "Doe" 10} 11}
It's important to note that this API will first check for an email
key in the main payload
object, and if not found, it will check for an email
key within the traits
object.