⚑
Other integrations
πŸ’Ÿ
Account health scores & metrics
Users

The User object

Attribute
Description
Editable?
id
Vitally's unique ID for the User
No
createdAt
Datetime the User was created
No
updatedAt
Datetime the User was last updated
No
externalId
​Your unique ID for the User
Only on create
name
Name of the User
Yes
email
The email of the User
Yes
avatar
A URL for the User's avatar
Yes
traits
Set of key-value pairs to attach to the account
Yes
firstKnown
Datetime the User was first active in your product
No
lastSeenTimestamp
Datetime the User was last active in your product
No
lastInboundMessageTimestamp
Datetime of the last inbound message from this User
No
lastOutboundMessageTimestamp
Datetime of the last outbound message to this User
No
npsLastScore
Score (0-10) of the last NPS response submitted by the User
No
npsLastFeedback
The text feedback of the last NPS response submitted by the User
No
npsLastRespondedAt
Datetime of last submitted NPS Responses
No
unsubscribedFromConversations
Boolean set to true if the User has chosen to unsubscribe
Yes
deactivatedAt
Datetime of when User was deactivated
No
segments
Array of segments (id,name)
In-app

List Users GET

1
https://rest.vitally.io/resources/users
Copied!
Paginated list of Users, by default ordered by updatedAt.
Params (see Pagination)
Example Request
1
GET https://rest.vitally.io/resources/users?limit=10&from=cursor
Copied!
Example Response
1
{
2
"results": [...],
3
"next": "c29tZWJhc2U2NA=="
4
}
Copied!

List Users For An Account GET

1
https://rest.vitally.io/resources/accounts/:accountId/users
Copied!
Paginated list of NPS Responses for a given Account, by default ordered by updatedAt.
Params (see Pagination)
Example Request
1
GET https://rest.vitally.io/resources/accounts/:accountId/users?limit=10&from=cursor
Copied!
Example Response
1
{
2
"results": [...],
3
"next": "c29tZWJhc2U2NA=="
4
}
Copied!

Get A User GET

1
https://rest.vitally.io/resources/users/:id
Copied!
Request Params
Property
Type
Description
id
string
Accepts both the User ID assigned by Vitally and the externalId if provided when creating the User
Example
1
GET https://rest.vitally.io/resources/users/:id
2
GET https://rest.vitally.io/resources/users/:externalId
Copied!

Search Users GET

Find a User by email or externalId.
1
https://rest.vitally.io/resources/users/search
Copied!
Query Params (exactly one is required)
Param
Type
Description
externalId
number
The unique ID of this User in your system
email
string
The email of the User
Example Request
1
GET https://rest.vitally.io/resources/users/search?externalId=user-id
Copied!
or
1
GET https://rest.vitally.io/resources/users/[email protected]
Copied!
Example Response
1
{
2
"results": [...]
3
}
Copied!

Create A User POST

1
https://rest.vitally.io/resources/users
Copied!
Request Body
Property
Type
Description
externalId
string
Required The unique ID of this User in your system
accountIds
array<string>
Required An array of Account IDs assigned by Vitally
name
string
The name of the User
email
string
The email of the User
avatar
string
The URL of the User's avatar
unsubscribedFromConversations
boolean
Boolean set to true if the User has chosen to unsubscribe
traits
object
A JSON object containing the traits of this user.
Example
1
POST https://rest.vitally.io/resources/users
2
{
3
"externalId": "user-101", // (required)
4
"accountIds": ["xxxx-xxxxx-xxxxxxxx-xxxxxxxx"],
5
"name": "Jane McUser",
6
"email": "[email protected]",
7
"avatar": "https://domain.com/avatar/user-101",
8
"unsubscribedFromConversations": true,
9
"traits": {
10
"favoriteColor": "green",
11
...
12
}
13
}
Copied!

Update A User PUT

1
https://rest.vitally.io/resources/users/:id
Copied!
Request Params
Property
Type
Description
id
string
Accepts both the User ID assigned by Vitally and the externalId if provided when creating the User
Request Body
Property
Type
Description
accountIds
array<string>
An array of Account IDs assigned by Vitally
name
string
The name of the User
email
string
The email of the User
avatar
string
The URL of the User's avatar
traits
object
A JSON object containing the traits of this user.
Example
1
PUT https://rest.vitally.io/resources/users/:id
2
{
3
"name": "Corrected Name",
4
"traits": {
5
"existingTrait": "new value",
6
"newTrait": 100,
7
...
8
}
9
}
Copied!

Delete A User DELETE

1
https://rest.vitally.io/resources/users/:id
Copied!
Delete a User, or schedule a User for delete.
Request Params
Property
Type
Description
id
string
Accepts both the User ID assigned by Vitally and the externalId if provided when creating the User
Query Params
Param
Type
Description
deleteOn
string
(optional) The timestamp when to delete the User
Example
1
DELETE https://rest.vitally.io/resources/users/:id
Copied!
1
DELETE https://rest.vitally.io/resources/users/:id?deleteOn=2021-09-01
Copied!
Last modified 1mo ago