Insights Company

Stimuli

Upload images and videos to a STIMULI project and assign them to interview questions.

Stimuli are media assets — images or videos — shown to participants alongside specific interview questions. They are only available on projects created with type: "STIMULI".

All stimuli endpoints accept a project_id. The project_id is returned when you create a project.

To inspect uploaded assets at any time, use GET /v1/stimuli — it returns every stimuli record for a project including its ID, image/video URL, caption, display order, and current question assignments.

The upload workflow is:

  1. Presign — request a short-lived S3 upload URL for each file.
  2. Upload — POST the file directly to S3 using the presigned URL.
  3. Confirm — register the uploaded file with Persona to create the stimuli record.
  4. List — call GET /v1/stimuli to retrieve stimuli_id values for your uploaded assets.
  5. Assign — link each asset to the questions it should appear alongside.

All stimuli must have at least one question assigned before the project can be launched.


List stimuli

Returns all uploaded stimuli for a project, ordered by display position. Use this to retrieve stimuli_id values for the assign endpoint.

Returns all uploaded stimuli for a project, ordered by display order.

Authentication

x-api-key header

Query Parameters

NameTypeDescription
project_id*stringThe project UUID.

Headers

NameTypeDescription
x-api-keystring

Responses

FieldTypeDescription
itemsrequired
object[]
stimuli_idrequired
stringStimuli Id
display_orderrequired
integerDisplay Order
image_urlrequired
stringImage Url
video_urlrequired
stringVideo Url
captionrequired
string
question_itemsrequired
string[]Question Items
totalrequired
integer

Example request

GET /v1/stimuli
curl "https://external-api.prod.insightscompany.io/v1/stimuli?project_id=<project_id>" \
-H "x-api-key: <api_key>"

Query parameters

ParameterTypeRequiredDescription
project_idUUIDYesThe project UUID

Example response

{
  "items": [
    {
      "stimuli_id": "a1b2c3d4-...",
      "display_order": 1,
      "image_url": "https://cdn.example.com/stimuli/...",
      "video_url": null,
      "caption": "Homepage redesign concept",
      "question_items": ["What do you notice first?", "How does this make you feel?"]
    }
  ],
  "total": 1
}
FieldDescription
stimuli_idUse this in the Assign endpoint
display_orderThe order assets are shown to participants
question_itemsQuestion texts this asset is currently assigned to

Presign an upload

Returns a presigned S3 POST URL and form fields for a direct upload. Call Confirm after the upload completes.

Returns a presigned S3 POST URL and form fields. POST a multipart/form-data request with the fields followed by the file, then call /stimuli/confirm to create the stimuli record.

Authentication

x-api-key header

Headers

NameTypeDescription
x-api-keystring

Request Bodyrequired

FieldTypeDescription
project_idrequired
stringThe project UUID.
filenamerequired
stringOriginal filename including extension.
content_typerequired
stringMIME type of the file.
file_size_bytes
integerFile size in bytes, used for pre-validation.
file_id
stringOptional pre-assigned UUID for the stimuli asset.

Responses

FieldTypeDescription
upload_urlrequired
stringUpload Url
upload_fieldsrequired
objectUpload Fields
file_idrequired
stringFile Id
s3_keyrequired
stringS3 Key
media_urlrequired
stringMedia Url
expires_inrequired
integerExpires In
content_typerequired
stringContent Type

Example request

POST /v1/stimuli/presign
curl -X POST "https://external-api.prod.insightscompany.io/v1/stimuli/presign" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
  "project_id": "<project_id>",
  "filename": "homepage-concept.png",
  "content_type": "image/png"
}'

Request body

FieldTypeRequiredDescription
project_idUUIDYesThe project UUID
filenamestringYesOriginal filename including extension
content_typestringYesMIME type of the file (e.g. image/png, video/mp4)
file_size_bytesintegerNoFile size in bytes — used for pre-validation before the upload
file_idUUIDNoPre-assigned UUID for the stimuli asset. A new UUID is generated if omitted

Example response

{
  "upload_url": "https://s3.amazonaws.com/...",
  "upload_fields": {
    "Content-Type": "image/png",
    "key": "stimuli/prod/<interview_id>/<file_id>.png",
    "...": "..."
  },
  "file_id": "a1b2c3d4-...",
  "s3_key": "stimuli/prod/<interview_id>/<file_id>.png",
  "media_url": "https://cdn.example.com/stimuli/...",
  "expires_in": 3600,
  "content_type": "image/png"
}
FieldDescription
upload_urlThe S3 endpoint to POST the file to
upload_fieldsForm fields that must be included in the multipart upload, before the file
file_idSave this — required in the Confirm call
expires_inSeconds until the presigned URL expires

Uploading to S3

POST the file to upload_url as multipart/form-data. Include all upload_fields first, then the file:

curl -X POST "<upload_url>" \
  -F "Content-Type=image/png" \
  -F "key=<s3_key>" \
  -F "<...other upload_fields...>" \
  -F "file=@homepage-concept.png"

A successful upload returns HTTP 204 No Content. Then call Confirm.


Confirm an upload

Verifies the file exists in storage and creates the stimuli record.

Call after uploading the file to the presigned URL. Creates a Stimuli record attached to the interview.

Authentication

x-api-key header

Headers

NameTypeDescription
x-api-keystring

Request Bodyrequired

FieldTypeDescription
project_idrequired
stringThe project UUID.
file_idrequired
stringThe file_id returned from the presign step.
file_extrequired
stringThe file extension (e.g. .webp, .mp4).
caption
stringOptional caption shown below the media.

Responses

FieldTypeDescription
messagerequired
string
file_idrequired
stringFile Id
media_urlrequired
stringMedia Url

Example request

POST /v1/stimuli/confirm
curl -X POST "https://external-api.prod.insightscompany.io/v1/stimuli/confirm" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
  "project_id": "<project_id>",
  "file_id": "<file_id>",
  "file_ext": ".png",
  "caption": "Homepage redesign concept"
}'

Request body

FieldTypeRequiredDescription
project_idUUIDYesThe project UUID
file_idUUIDYesThe file_id returned from the presign step
file_extstringYesFile extension including the leading dot (e.g. .png, .mp4)
captionstringNoCaption shown below the media. Can also be set or updated later via the Assign endpoint

Example response

{
  "message": "Upload finalized",
  "file_id": "a1b2c3d4-...",
  "media_url": "https://cdn.example.com/stimuli/..."
}

Assign stimuli to questions

Sets which questions a stimuli asset appears alongside during the interview. Pass an empty question_items list to clear all assignments.

Sets which questions a stimuli asset appears alongside during the interview. Pass an empty list to clear all assignments. All stimuli must have at least one question assigned before the project can be launched.

Authentication

x-api-key header

Headers

NameTypeDescription
x-api-keystring

Request Bodyrequired

FieldTypeDescription
project_idrequired
stringThe project UUID.
stimuli_idrequired
stringThe stimuli UUID to assign.
question_itemsrequired
string[]Question texts this stimuli should appear alongside. Use exact strings from the interview.
caption
stringOptional caption shown below the media. Send null to clear an existing caption.

Responses

FieldTypeDescription
stimuli_idrequired
stringStimuli Id
question_itemsrequired
string[]Question Items
captionrequired
string

Example request

POST /v1/stimuli/assign
curl -X POST "https://external-api.prod.insightscompany.io/v1/stimuli/assign" \
-H "x-api-key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
  "project_id": "<project_id>",
  "stimuli_id": "<stimuli_id>",
  "question_items": [
    "What do you notice first?",
    "How does this make you feel?"
  ],
  "caption": "Homepage redesign concept"
}'

Request body

FieldTypeRequiredDescription
project_idUUIDYesThe project UUID
stimuli_idUUIDYesThe stimuli UUID — from the confirm response or the list endpoint
question_itemsstring[]YesExact question texts this asset should appear alongside. Pass an empty array to clear all assignments
captionstringNoCaption shown below the media. Omit to leave the existing caption unchanged

Example response

{
  "stimuli_id": "a1b2c3d4-...",
  "question_items": ["What do you notice first?", "How does this make you feel?"],
  "caption": "Homepage redesign concept"
}

Notes

  • Supported image formats: PNG, JPEG, GIF, WebP, HEIC, HEIF, AVIF, SVG. Maximum 10 MB.
  • Supported video formats: MP4, MOV, WebM, AVI, MKV. Maximum 100 MB.
  • The project_id is the id field returned when you create a project.

On this page