Create or update a user
Creates a user, or updates user details. If a user with this specific user ID exists, then this operation updates their user details. If a user with this specific user ID doesn't yet exist, then it creates a new user with the set details.
Note: To update user details, you only need to send the subset of fields you want to update. In that respect, even though you update a user with an HTTP PUT request method, the user update acts similar to an HTTP PATCH request method.
Remove user data
Currently you can't delete a user. Instead, you can update the user's data to remove any personally identifiable information associated with the user.
To automate the process of removing user data, use the Anonymize user data script from the TalkJS examples GitHub repository.
Request
- Base URLhttps://api.talkjs.com
- Auth
- HTTP bearer
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
A unique identifier of your TalkJS app. You can find your app ID on the Settings page of your dashboard.
A unique identifier of a user.
Request body
Example request
{
"name": "Alice",
"role": "admin",
"custom": {
"country": "Bahrain"
},
"photoUrl": "https://talkjs.com/images/avatar-1.jpg",
"locale": "ar",
"welcomeMessage": "Hi there, how are you? :-)",
"availabilityText": "We're usually online during office hours",
"pushTokens": {
"fcm:TOKEN_ID": true
}
}Response
Empty response
Empty response
Changes
No recorded changes to this operation across all 1 revision of this API.