Analytics API - User
Create/update your Users in Vitally using the /user API endpoint
Replace {subdomain}
in the endpoint below with your Vitally subdomain.
You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io
Create/update a user
POST
https://{subdomain}.api.vitally.io/analytics/v1/user
This endpoint will create or update a user in Vitally based on the userId
parameter.
Headers
Name | Type | Description |
---|---|---|
Content-Type* | string | Set to |
Authorization* | string | Set to |
Request Body
Name | Type | Description |
---|---|---|
userId* | string | The unique ID of this user in your system |
accountId | string | Required if This should match the |
traits* | object | Required, but can be passed as an empty object A JSON object containing the traits of this user. Some traits, called "reserved" traits, have special meaning to Vitally. A list of "reserved" traits can be found below. |
timestamp | string | Required if |
messageId | string | Required if |
organizationId | string | Required if If you have organizations enabled, you may associate the user with an organization by setting |
Expand the POST box above for full specs
Example
An example curl request describing a Vitally user would look like:
Special traits
Vitally has special logic to handle the following User traits:
name
: defines the user's name in Vitallyavatar
: defines the user's avatar in Vitallyemail
: defines the user's email in VitallycreatedAt
: defines the user's 'join date' in Vitally
Last updated