Users

users

Methods

Delete User -> string
delete/v1/users/{user_id}

Delete user

Get User ->
get/v1/users/{user_id}

Get user

Get Channel Data ->
get/v1/users/{user_id}/channel_data/{channel_id}

Get channel data

Get Preference Set ->
get/v1/users/{user_id}/preferences/{preference_set_id}

Get preference set

List Users -> EntriesCursor<>
get/v1/users

List users

Parameters
after: string
Optional

The cursor to fetch entries after

before: string
Optional

The cursor to fetch entries before

page_size: number
Optional

The page size to fetch

Response fields
entries: Array<>
Optional

The list of users

page_info: { __typename, page_size, after, 1 more... }
Optional

The information about a paginated result

Request example
200Example
List Messages -> EntriesCursor<>
get/v1/users/{user_id}/messages

List messages

Parameters
user_id: string
after: string
Optional

The cursor to fetch entries after

before: string
Optional

The cursor to fetch entries before

channel_id: string
Optional

The channel ID

engagement_status: Array<
Optional

The engagement status of the message

"seen"
"read"
"interacted"
"link_clicked"
"archived"
>
message_ids: Array<string>
Optional

The message IDs to filter messages by

page_size: number
Optional

The page size to fetch

source: string
Optional

The source of the message (workflow key)

status: Array<
Optional

The status of the message

"queued"
"sent"
"delivered"
"delivery_attempted"
"undelivered"
"not_sent"
"bounced"
>
tenant: string
Optional

The tenant ID

trigger_data: string
Optional

The trigger data to filter messages by. Must be a valid JSON object.

workflow_categories: Array<string>
Optional

The workflow categories to filter messages by

workflow_recipient_run_id: string
Optional
(format: uuid)

The workflow recipient run ID to filter messages by

workflow_run_id: string
Optional
(format: uuid)

The workflow run ID to filter messages by

Response fields
entries: Array<>

The list of messages

page_info: { __typename, page_size, after, 1 more... }

The information about a paginated result

Request example
200Example
List Preference Sets -> Array<>
get/v1/users/{user_id}/preferences

List preference sets

List Schedules -> EntriesCursor<>
get/v1/users/{user_id}/schedules

List schedules

List Subscriptions -> EntriesCursor<>
get/v1/users/{user_id}/subscriptions

List subscriptions

Merge Users ->
post/v1/users/{user_id}/merge

Merge two users together, where the user specified with the from_user_id param will be merged into the user specified by user_id.

Set Channel Data ->
put/v1/users/{user_id}/channel_data/{channel_id}

Set channel data

Update Preference Set ->
put/v1/users/{user_id}/preferences/{preference_set_id}

Updates a complete preference set for a user. This is a destructive operation that will replace the existing preference set for the user.

Unset Channel Data -> string
delete/v1/users/{user_id}/channel_data/{channel_id}

Unset channel data

Identify User ->
put/v1/users/{user_id}

Identify user

Domain types

IdentifyUserRequest = { channel_data, created_at, preferences }

A set of parameters to identify a user with. Does not include the user ID, as that's specified elsewhere in the request. You can supply any additional properties you'd like to upsert against the user.

InlineIdentifyUserRequest = { id, channel_data, created_at, 1 more... }

A set of parameters to inline-identify a user with. Inline identifying the user will ensure that the user is available before the request is executed in Knock. It will perform an upsert against the user you're supplying, replacing any properties specified.

User = { id, __typename, updated_at, 6 more... }

A user object

Users

Bulk

users.bulk

Methods

Bulk Delete Users ->
post/v1/users/bulk/delete

Bulk delete users

Bulk Identifies Users ->
post/v1/users/bulk/identify

Bulk identifies users

Bulk Set Preferences ->
post/v1/users/bulk/preferences

Bulk set preferences

Users

Feeds

users.feeds

Methods

Get Feed Settings -> { features }
get/v1/users/{user_id}/feeds/{channel_id}/settings

Returns the feed settings for a user.

List Feed Items -> EntriesCursor<{ id, __typename, activities, 15 more... }>
get/v1/users/{user_id}/feeds/{channel_id}

Returns a paginated list of feed items for a user, including metadata about the feed.