Update user profile

This API enables you to update an existing user profile. You can modify any supported profile attribute, including the user's `distinct_id` (if specified). **Note:** - Fields included in the request overwrite the existing values. - Fields omitted from the request remain unchanged. - If you change any value within the `channel` object, the entire `channel` data for that request is replaced (not merged), except for `inapp`, `push`, and `webpush`, whose tokens are appended as new device registrations. You only need to include the fields that require changes in the request body: ```json { "distinct_id": "user_12345", "name": "John Doe", "timezone": "Asia/Kolkata", "status": 1, "channel": { "email": "john@example.com", "sms": "+919876543210", "whatsapp": "+919876543210", "push": [ { "token": "device_token", "integration_id": "push_integration", "status": 1 } ] } } ``` The `channel` object can contain one or more of the following channels: `email`, `sms`, `rcs`, `whatsapp`, `voice`, `slack`, `discord`, `teams`, `inapp`, `push`, and `webpush`. The `inapp` and `push` arrays each contain device registrations with a required `token` and `status` (`1`=Active, `0`=Inactive), and an optional `integration_id`. The `webpush` array contains Web Push subscriptions. The `token` field for a `webpush` entry may be either a non-empty string or a Push Subscription object containing `endpoint` (required), `expirationTime` (optional, nullable), and `keys` with `p256dh` and `auth` (both required when `token` is an object).

Authentication

AuthorizationBearer
Enter your API Key. If you don't have it already, you can create one from the API Keys page within your Fyno account

Path parameters

WSIDstringRequired
Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.
versionenumRequiredDefaults to live

Specify the version for which you would like to manage the user profile. Supported values are live and tested.

Allowed values:
distinct_idstringRequired
Enter the current distinct ID that uniquely identifies the user profile you want to update.

Request

This endpoint expects an object.
channelobjectOptional

(Optional) If you do not wish to change any channel values, remove this key from the payload. Note: If you change any value in the channel key, the entire channel data is replaced.

distinct_idstringOptional1-128 characters

(Optional) Enter the new distinct ID that you wish to use to identify the user. If provided, it replaces the existing distinct ID. If you do not wish to change this value, remove this key from the payload.

namestringOptional3-128 characters

(Optional) Enter the new full name of the user. If you do not wish to change this value, remove this key from the payload.

statusenumOptional

(Optional) Enter 1 to change the user’s status to active so that the user can receive notifications. Enter 0 to change the user’s status to inactive so that the user does not receive any notification. If you do not wish to change this value, remove this key from the payload. If null, the default value is 1.

timezoneenumOptional

(Optional) Enter the new timezone of the user. Must be a valid IANA timezone. For a list of possible values, please click here.

Response

Profile updated successfully
_messagestring
statusstring

Errors

400
Bad Request Error
401
Unauthorized Error