v30

latestOpenAPI 3.0.0raw.githubusercontent.com2026-04-22116135580.0 KB
Channel data
Users

Set channel data

Updates or creates channel data for a specific user and channel ID. If no user exists in the current environment for the given user_id, Knock will create the user entry as part of this request.

put/v1/users/{user_id}/channel_data/{channel_id}

Path parameters

user_idstring required

The unique identifier of the user.

channel_idstring uuid required

The unique identifier for the channel.

Request body

Example request

{
  "data": {
    "tokens": [
      "push_token_1"
    ]
  }
}

Response

OK

__typenamestring required

The typename of the schema.

channel_idstring uuid required

The unique identifier for the channel.

provider'push_fcm' | 'push_apns' | 'push_aws_sns' | 'push_expo' | 'push_one_signal' | 'chat_slack' | 'chat_ms_teams' | 'chat_discord' | 'http_knock_webhook'

The type of provider.

Example response

{
  "__typename": "ChannelData",
  "channel_id": "123e4567-e89b-12d3-a456-426614174000",
  "data": {
    "devices": [
      {
        "locale": null,
        "timezone": null,
        "token": "device_1"
      }
    ],
    "tokens": [
      "push_token_1"
    ]
  }
}