Skip to main content

An Embeddable is displayed when:
  • URL matching - the page must match the configured URL conditions.
  • Segmentation matches - User is the right person (required but can be set to match All Users).
  • Element targeting - Embeddables are rendered relative to a specific element on the page.
To know more about Embeddables, visit our product documentation.
With the Chameleon API for Embeddables, you can:
  • List all the Embeddables that follow a specified set of parameters.
  • Retrieve a single Embeddable based on the id.
  • Update an Embeddable to change Environments or publish/unpublish it.

Schema

PropertyTypeDescription
idIDThe Chameleon ID
created_attimestampWhen this happened or when this was added to the Database
updated_attimestampThe last time any property was updated
archived_attimestampThe time when this was archived
namestringThe name given by an administrator of Chameleon
descriptionstringThe internal description for this Embeddable
stylestringThe display style of this Embeddable: One of banner or card
positionnumberThe order that these appear in lists (starting from 0)
segment_idsarray<ID>The Chameleon IDs of the configured Segments
published_attimestampThe time this was most recently published
tag_idsarray<ID>The Chameleon IDs of the Tags attached to this model
rate_unlimit_attimestampThis item is excluded from Rate limiting
statsobjectAggregated statistics for this model (all-time)
stats.started_countnumberNumber of your end-users who saw this
stats.last_started_attimestampMost recent time any user saw this
stats.completed_countnumberNumber of your end-users who completed/finished this
stats.last_completed_attimestampMost recent time any user completed/finished this
stats.exited_countnumberNumber of your end-users who dismissed/exited this
stats.last_exited_attimestampMost recent time any user dismissed/exited this

List Embeddables

List all the Embeddables that follow a specified set of parameters.

HTTP Request

GET https://api.chameleon.io/v3/edit/embeds
param-description
limitoptionalDefaults to 50 with a maximum of 500
beforeoptionalUsed when paginating, use directly from the cursor object from the previous response
beforeoptionalRead as “created before” and can be given as a timestamp to get only limit items that were created before this time
afteroptionalRead as “created after” and can be given as a timestamp or ID to get only limit items that were created after this time

HTTP Response

{
  "embeds": [
    {
      "id": "5f3c4232c712de665632a6d5",
      "name": "Feature Announcement Banner",
      "style": "banner",
      "position": 1,
      "published_at": "2029-04-07T12:18:00Z",
       ...
    },
    {
      "id": "5f3c4232c712de665632a2a1",
      "name": "Upgrade Prompt Card",
      "style": "card",
      "position": 0,
      "published_at": "2029-04-07T12:38:00Z",
       ...
    },
    ...
  ],
  "cursor": {
    "limit": 50,
    "before": "5f3c4232c712de665632a2a1"
  }
}

Retrieve an Embeddable

Retrieve a single Embeddable.

HTTP Request

GET https://api.chameleon.io/v3/edit/embeds/:id
param-description
idrequiredAn Embeddable ID to lookup
{
  "embed": {
    "id": "5f3c4232c712de665632a2a1",
    "name": "Feature Announcement Banner",
    "style": "banner",
    "position": 0,
    "published_at": "2029-04-07T12:38:00Z",
    ...
  }
}

Update an Embeddable

Update a single Embeddable to change its properties or to Publish it.

HTTP Request

PATCH https://api.chameleon.io/v3/edit/embeds/:id
param-description
idrequiredAn Embeddable ID to update
url_group_idoptionalAn Environments ID prefixed with + to add or - to remove the Environment
tag_idoptionalA Tag ID prefixed with + to add or - to remove the Tag
published_atoptionalThe published time of this Embeddable (set to now to trigger a publish)
To Publish the Embeddable send the current timestamp in iso8601 format
{
  "published_at": "2029-04-07T12:18:00Z"
}
To Unpublish the Embeddable set the published_at to null
{
  "published_at": null
}
To add the 5e3c4232c712de666d55632a Environment use a + prefix
{
  "url_group_id": "+5e3c4232c712de666d55632a"
}
To remove the 5e3c4232c712de666d55632a Environment use a - prefix
{
  "url_group_id": "-5e3c4232c712de666d55632a"
}

Filtering by Segment

See Listing Related models