Dynamic Yield Developer Documentation

Browse Dynamic Yield's latest developer documentation including API references, articles, and sample code for optimizing, personalizing, and creating consistent digital customer experiences across touchpoints.


Creating API Keys

Server-side and Client-side Keys

When creating new keys, you need to choose between a server-side and a client-side key. Each type can only be used with its designated endpoint (see Basic Concepts).

For example, for the US data center, the server-side endpoint is https://dy-api.com/v2/ and the client-side endpoint is https://direct.dy-api.com/v2/.

Permissions (ACL)

Currently, available permissions are:

  • Personalization - perform all API actions related to choosing a variation and reporting data. This does not include calling the Unified Customer Profile API, as you may not want any component able to run campaigns to also be allowed to fetch a specific user's profile. Additionally, this permission type does not include updating the product feed via API, which is typically handled by a dedicated component on the customer side.

  • Unified Customer Profile - get a user's full profile. To enable this feature, contact your Customer Success Manager.

  • Feed - update the product feed via API, passing incremental changes only. To enable this feature, contact your Customer Success Manager.

Creating a New Key in the Admin UI

  1. Go to Settings › API Keys, and click on New Key.
  2. Enter a name for the key, optionally adding notes.
  3. Choose whether you will use this key on the server-side or client-side
  4. In the ACL section, select one or more permissions for the key. You will only see options that are enabled for your site.

You can now use the "Copy" button at any time to get the key as plain-text. This key should be passed as an HTTP header with any API call you make.

POST https://dy-api.com/v2/serve/user/choose
DY-API-Key: baadc6ba740a352c9106dc7857a7eb9c
Content-Type: application/json
   // JSON-formatted request body...

Updated about a year ago

Creating API Keys

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.