Stimuli

Replace stimulus metadata

Replace every attribute on a stimulus in one call. Values may be strings, numbers, booleans, or arrays of strings and numbers — a list may not hold booleans. Nested objects are flattened into dotted keys, so { "pricing": { "tier": "pro" } } is stored as { "pricing.tier": "pro" }. Null values are dropped.

put/api/v1/stimuli/{stimulus_id}/metadata

Request

  • Base URL
    https://app.voicepanel.com
  • URL
    https://app.voicepanel.com/api/v1/stimuli/{stimulus_id}/metadata
  • Auth
    HTTP bearer

Path parameters

stimulus_idstring required
Example:stim_3nK8xQw2PzLr7Y

The stimulus ID

Request body

metadataobject required

Attributes to store on the stimulus. Values may be strings, numbers, booleans, or arrays of strings and numbers — a list may not hold booleans. Nested objects are flattened into dotted keys — { "pricing": { "tier": "pro" } } is stored as { "pricing.tier": "pro" }. Null values are dropped.

Example request

{
  "metadata": {
    "cost": "low",
    "pricing": {
      "tier": "pro"
    },
    "variant": 2
  }
}

Response

Successful response

idstring required

The stimulus ID

study_idstring nullable required

ID of the study the stimulus belongs to

metadataobject required

Flat attributes. A key maps to a string, a number, a boolean, or a list of strings and numbers.

Example response

{
  "id": "stim_3nK8xQw2PzLr7Y",
  "study_id": "stdy_Qm3vR8tLp2XnWz",
  "metadata": {
    "cost": "low",
    "pricing.tier": "pro",
    "variant": 2
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.