Users
Preference center

Create preference center signed URL

Changed on

Generates a signed preference center URL and token for the given user in the current environment.

post/v1/users/{user_id}/preference_center/signed_url

Request

  • Base URL: https://api.knock.app
  • URL: https://api.knock.app/v1/users/{user_id}/preference_center/signed_url
  • Auth: HTTP bearer

Path parameters

user_idstring required

The unique identifier of the user.

Response

OK

tokenstring required

The signed JWT token for the preference center, usable as the /p/{token} path segment.

urlstring required

The full URL to the preference center for the user.

Example response

{
  "token": "eyJhbGciOiJIUzI1NiJ9...",
  "url": "https://p.knock.app/p/eyJhbGciOiJIUzI1NiJ9..."
}

Changes