---
title: "Add/Update channel data"
method: PATCH
path: "/{WSID}/{version}/profiles/{distinct_id}/channel"
tags: ["Manage User Profiles"]
---

# Add/Update channel data

`PATCH /{WSID}/{version}/profiles/{distinct_id}/channel`

This API enables you to update existing data for `sms`, `whatsapp`, `email`, `slack`, `discord`, and `teams` channels, and add new tokens for `push` and `inapp` channels. It works like an update for channels that can hold a single destination only and like an insert for channels that can hold multiple destinations/tokens.

## Path parameters

- `WSID` string, required
- `version` 'live' | 'test', required
- `distinct_id` string, required

## Request body

- DistinctIdChannelBody
  - `channel` WSIDversionprofilesdistinctIdchannelChannel, required
    - `discord` string — Enter the new discord ID of the user. If you do not wish to change this value, remove this key from the payload.
    - `email` string — Enter the new email address of the user. If you do not wish to change this value, remove this key from the payload.
    - `inapp` WSIDversionprofilesdistinctIdchannelChannelInapp[]
      - `integration_id` string — (Optional) Enter the integration ID that was used to generate the above token. This is helpful in identifying which integration to use when an account has multiple InApp integrations. If this value is null, then the above token is used for all InApp integrations. The integration ID can be obtained from Fyno's integrations page.
      - `status` 1 | 0 — (Optional) Enter 1 to specify that this token must be active and should receive notifications. Enter 0 to specify that this token must be inactive and should not receive any notifications. If null, the default value is 1.
      - `token` string, required — Enter the new distinct ID or the generated token to add for the user. Note: This value would get added (and not updated) to the channel data.
    - `push` WSIDversionprofilesdistinctIdchannelChannelPush[]
      - `integration_id` string — (Optional) Enter the integration ID that was used to generate the above token. This is helpful in identifying which integration to use when an account has multiple push integrations. If this value is null, then the above token is used for all push integrations. The integration ID can be obtained from Fyno's integrations page.
      - `status` 1 | 0 — (Optional) Enter 1 to specify that this token must be active and should receive notifications. Enter 0 to specify that this token must be inactive and should not receive any notifications. If null, the default value is 1.
      - `token` string, required — Enter the new push token that to add for the user. If you use OneSignal, you must add the following prefix to the token: For OneSignal playerId: `onesignal_player_id:`<enter_playerid> For OneSignal externalId: `onesignal_external_id:`<enter_externalid> Note: This value would get added (and not updated) to the channel data.
    - `slack` string — Enter the new channel ID, user ID, or email address of the user. If you do not wish to change this value, remove this key from the payload.
    - `sms` string — Enter the new mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX. If you do not wish to change this value, remove this key from the payload.
    - `teams` string — Enter the new channel name. For teams, we currently support sending to one channel only. If you wish to send to multiple channels, do get in touch and we can share a workaround. If you do not wish to change this value, remove this key from the payload.
    - `voice` string — Enter the new mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX. If you do not wish to change this value, remove this key from the payload.
    - `whatsapp` string — Enter the new WhatsApp mobile number of the user. The number must start with the country code (preferably in E.164 format). For example: +919879XXXXXX. If you do not wish to change this value, remove this key from the payload.

## Response `200`

Profile updated successfully

- object
  - `_message` string, required
  - `status` string, required

## Other responses

- `400` — Distinct ID does not exist
- `401` — API Key or Workspace ID is invalid. User is unauthorised.

---

[API](https://skmtc.net/fynoio/apis/fyno-rest-api.md) · [All operations](https://skmtc.net/fynoio/apis/fyno-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fynoio/fyno-rest-api/revisions/021088e9cb30/schema)
