Objects
Preferences

Get object preference set

Changed on

Returns the preference set for the specified object and preference set id.

get/v1/objects/{collection}/{object_id}/preferences/{id}

Request

  • Base URL: https://api.knock.app
  • URL: https://api.knock.app/v1/objects/{collection}/{object_id}/preferences/{id}
  • Auth: HTTP bearer

Path parameters

object_idstring required

Unique identifier for the object.

collectionstring required

The collection this object belongs to.

idstring required
Example:default

Unique identifier for the preference set.

Response

OK

idstring required

Unique identifier for the preference set.

Example response

{
  "categories": {
    "marketing": false,
    "transactional": {
      "channel_types": {
        "email": false
      }
    }
  },
  "channel_types": {
    "email": true,
    "push": false,
    "sms": {
      "conditions": [
        {
          "argument": "US",
          "operator": "equal_to",
          "variable": "recipient.country_code"
        }
      ]
    }
  },
  "commercial_subscribed": true,
  "id": "default",
  "workflows": null
}

Changes

    • breaking

      the response's property type changed from boolean to no type for status

    • info

      added subschema #1 subschema #3 to the response property anyOf list for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////////// response property for the response status

    • warning

      added the new not_contains_all enum value to the ////// response property for the response status