Channel data
Objects

Set channel data

Sets the channel data for the specified object and channel. If no object exists in the current environment for the given collection and object_id, Knock will create the object as part of this request.

put/v1/objects/{collection}/{object_id}/channel_data/{channel_id}

Path parameters

object_idstring required

Unique identifier for the object.

collectionstring required

The collection this object belongs to.

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"
    ]
  }
}

Changes

Changed in 3 of the 30 revisions of this API.314

    • added PushChannelDataDevicesOnly AWSSNSPushChannelDataDevicesOnly to the data request property oneOf list

      request-property-one-of-added

  • 40ca41599f5722See the full diff
    • removed PushChannelData OneSignalChannelData AwsSnsPushChannelData from the data request property oneOf list

      request-property-one-of-removed

    • added PushChannelDataFull AWSSNSPushChannelDataFull OneSignalChannelDataPlayerIdsOnly to the data response property oneOf list for the response status 200

      response-property-one-of-added

    • added PushChannelDataTokensOnly AWSSNSPushChannelDataTargetARNsOnly OneSignalChannelDataPlayerIdsOnly to the data request property oneOf list

      request-property-one-of-added

    • removed PushChannelData OneSignalChannelData AwsSnsPushChannelData from the data response property oneOf list for the response status 200

      response-property-one-of-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 2d3aac5f3ddf111See the full diff
    • added AwsSnsPushChannelData to the data response property oneOf list for the response status 200

      response-property-one-of-added

    • added the new push_aws_sns enum value to the provider response property for the response status 200

      response-property-enum-value-added

    • added AwsSnsPushChannelData to the data request property oneOf list

      request-property-one-of-added