Skip to main content
To know more about Surveys, you can visit our product documentation.
With the Chameleon Microsurveys API, you can:
  • List all Microsurveys that follow your indicated parameters.
  • Retrieve a single Microsurvey using its id.

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
namestringThe name given by an administrator of Chameleon
positionnumberThe order that these appear in lists (starting from 0)
segment_idIDThe Chameleon ID of the configured Segment
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
last_dropdown_itemsarray<String>For a dropdown Microsurvey, all of the dropdown_items that have been selected by any User
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 Microsurveys

List all Microsurveys that follow your indicated parameters.

HTTP Request

GET https://api.chameleon.io/v3/edit/surveys
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

{
  "surveys": [
    {
      "id": "5f3c4232c712de665632a6d5",
      "name": "Task #2 completion CES",
      "position": 1,
      "published_at": "2029-04-07T12:18:00Z",
       ...
    },
    {
      "id": "5f3c4232c712de665632a2a3",
      "name": "Admin account setup #1 completion question",
      "position": 0,
      "published_at": "2029-04-07T12:38:00Z",
       ...
    },
    ...
  ],
  "cursor": {
    "limit": 50,
    "before": "5f3c4232c712de665632a2a3"
  }
}

Update a Microsurvey

Update a single Microsurvey to change the Environments or to Publish it.

HTTP Request

PATCH https://api.chameleon.io/v3/edit/surveys/:id
param-description
idrequiredA Microsurvey ID to update
url_group_idoptionalAn Environments ID prefixed with + to add or or - to remove the Environment
tag_idoptionalA Tag ID prefixed with + to add or or - to remove the Tag
published_atoptionalThe published time of this Microsurvey (set to now to trigger a publish)
To Publish the Microsurvey
{
  "published_at": "2029-04-07T12:18:00Z"
}
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.

Retrieve a Microsurvey

Retrieve a single Microsurvey.

HTTP Request

GET https://api.chameleon.io/v3/edit/surveys/:id
param-description
idrequiredA Microsurvey ID to lookup
{
  "survey": {
    "id": "5f3c4232c712de665632a2a1",
    "name": "Admin Self-serve menu",
    "position": 0,
    "published_at": "2029-04-07T12:38:00Z",
    ...
  }
}