iMarioiMario
DocumentsAPI reference

Guides

API Overview and QuickstartAuthenticationSandbox and Test KeysAPI ErrorsPaginationIdempotent RequestsRate LimitsAPI VersioningWebhooks

Endpoints

All EndpointsWorkspaceAudiencesPeopleStudiesReportsLibraryFilesAuto StudiesConnectionsMembersAPI KeysWebhook Endpoints
Endpoints

Library

Surveys, discussion guides and announcements saved in the Library, which a study can run by id.

Base URL https://api.imario.ai/v1. Each call needs a key that holds the scope shown and acts with at least the role shown (Authentication). Errors are described in API errors.

List surveys

GET /v1/surveys

Scope library:read · Role any member

The workspace's surveys, newest first: {title, status, questions, question_count, audience_ids}.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoHow many objects to return (1-100). Default 20.
cursorquerystringNoThe next_cursor of the previous page. Up to 200 characters.
statusquerystringNoOnly draft or only ready items. One of draft, ready.

Example

curl https://api.imario.ai/v1/surveys \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Response

Returns a list: {"object": "list", "data": [...], "has_more": false, "next_cursor": null}. See Pagination.

Create a survey

POST /v1/surveys

Scope library:write · Role editor or above

A survey in the Library. Questions are closed_question, open_question, ranking, media_stimulus or url_task; a ready survey can be run by id (POST /studies with kind survey and instrument_id).

Request body

FieldTypeRequiredDescription
titlestringNoNamed from the first question when left out. Up to 200 characters.
statusstringNoready (can be run) or draft. One of draft, ready. Default "ready".
questionsobject[]NoUp to 100 items.
questions[].typestringYesclosed_question, open_question, ranking, media_stimulus, url_task, or instruction (discussion guides only). One of closed_question, open_question, ranking, media_stimulus, url_task, instruction.
questions[].questionstringNoThe question's text. Up to 4,000 characters.
questions[].textstringNoAn instruction's text. Up to 4,000 characters.
questions[].optionsstring[]Noclosed_question: 2 to 30 answers. Up to 30 items.
questions[].multi_selectbooleanNoclosed_question: people may pick several.
questions[].randomize_optionsbooleanNoclosed_question: shuffle the order per person.
questions[].itemsstring[]Noranking: 2 to 30 items to order. Up to 30 items.
questions[].mediastring[]Nomedia_stimulus: up to 6 file ids (images or videos from /files) or https links to pictures. Up to 6 items.
questions[].urlstringNourl_task: the page (http or https). Up to 2,048 characters.
questions[].task_descriptionstringNourl_task: what to do on it. Up to 2,000 characters.
questions[].probesstring[]NoDiscussion guides: follow-up questions the interviewer asks. Up to 10 items.
questions[].requiredbooleanNoWhether the question must be answered. Default true.
audience_idsstring[]NoAudiences the survey is meant for (a suggestion). Up to 20 items.

Example

curl https://api.imario.ai/v1/surveys \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Breakfast habits",
    "questions": [
      {
        "type": "closed_question",
        "question": "How often do you eat breakfast at home?",
        "options": ["Every day", "A few times a week", "Rarely", "Never"]
      },
      {
        "type": "open_question",
        "question": "What would make breakfast at home easier?"
      }
    ]
  }'

Retrieve a survey

GET /v1/surveys/{survey_id}

Scope library:read · Role any member

One survey of this workspace's Library with its full content. A test key also reads its own sandbox surveys.

Example

curl https://api.imario.ai/v1/surveys/SURVEY_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Update a survey

PATCH /v1/surveys/{survey_id}

Scope library:write · Role editor or above

Fields left out are kept; questions, when sent, replaces the list.

Request body

FieldTypeRequiredDescription
titlestringNoUp to 200 characters.
statusstringNoOne of draft, ready.
questionsobject[]NoUp to 100 items.
questions[].typestringYesclosed_question, open_question, ranking, media_stimulus, url_task, or instruction (discussion guides only). One of closed_question, open_question, ranking, media_stimulus, url_task, instruction.
questions[].questionstringNoThe question's text. Up to 4,000 characters.
questions[].textstringNoAn instruction's text. Up to 4,000 characters.
questions[].optionsstring[]Noclosed_question: 2 to 30 answers. Up to 30 items.
questions[].multi_selectbooleanNoclosed_question: people may pick several.
questions[].randomize_optionsbooleanNoclosed_question: shuffle the order per person.
questions[].itemsstring[]Noranking: 2 to 30 items to order. Up to 30 items.
questions[].mediastring[]Nomedia_stimulus: up to 6 file ids (images or videos from /files) or https links to pictures. Up to 6 items.
questions[].urlstringNourl_task: the page (http or https). Up to 2,048 characters.
questions[].task_descriptionstringNourl_task: what to do on it. Up to 2,000 characters.
questions[].probesstring[]NoDiscussion guides: follow-up questions the interviewer asks. Up to 10 items.
questions[].requiredbooleanNoWhether the question must be answered. Default true.
audience_idsstring[]NoUp to 20 items.

Example

curl -X PATCH https://api.imario.ai/v1/surveys/SURVEY_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Breakfast habits, wave 2",
    "status": "ready"
  }'

Delete a survey

DELETE /v1/surveys/{survey_id}

Scope library:write · Role editor or above

Soft: the item leaves the Library and every picker, and is no longer offered to new studies. Studies that ran with it, a study already submitted with it and their reports keep working. usage says how many finished studies used it and how many are still running.

Example

curl -X DELETE https://api.imario.ai/v1/surveys/SURVEY_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"

List discussion guides

GET /v1/discussion-guides

Scope library:read · Role any member

The workspace's interview guides, newest first: {title, status, opening_message, sections: [{title, description, questions}], question_count, audience_ids}.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoHow many objects to return (1-100). Default 20.
cursorquerystringNoThe next_cursor of the previous page. Up to 200 characters.
statusquerystringNoOnly draft or only ready items. One of draft, ready.

Example

curl https://api.imario.ai/v1/discussion-guides \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Response

Returns a list: {"object": "list", "data": [...], "has_more": false, "next_cursor": null}. See Pagination.

Create a discussion guide

POST /v1/discussion-guides

Scope library:write · Role editor or above

An interview guide in sections. Questions may carry follow-up probes; instruction blocks are said to the respondent before the next question. A ready guide can be run by id (POST /studies with kind interview).

Request body

FieldTypeRequiredDescription
titlestringNoUp to 200 characters.
statusstringNoOne of draft, ready. Default "ready".
opening_messagestringNoWhat the interviewer says first. Up to 4,000 characters.
sectionsobject[]NoUp to 30 items.
sections[].titlestringNoUp to 200 characters.
sections[].descriptionstringNoUp to 2,000 characters.
sections[].questionsobject[]NoUp to 100 items.
sections[].questions[].typestringYesclosed_question, open_question, ranking, media_stimulus, url_task, or instruction (discussion guides only). One of closed_question, open_question, ranking, media_stimulus, url_task, instruction.
sections[].questions[].questionstringNoThe question's text. Up to 4,000 characters.
sections[].questions[].textstringNoAn instruction's text. Up to 4,000 characters.
sections[].questions[].optionsstring[]Noclosed_question: 2 to 30 answers. Up to 30 items.
sections[].questions[].multi_selectbooleanNoclosed_question: people may pick several.
sections[].questions[].randomize_optionsbooleanNoclosed_question: shuffle the order per person.
sections[].questions[].itemsstring[]Noranking: 2 to 30 items to order. Up to 30 items.
sections[].questions[].mediastring[]Nomedia_stimulus: up to 6 file ids (images or videos from /files) or https links to pictures. Up to 6 items.
sections[].questions[].urlstringNourl_task: the page (http or https). Up to 2,048 characters.
sections[].questions[].task_descriptionstringNourl_task: what to do on it. Up to 2,000 characters.
sections[].questions[].probesstring[]NoDiscussion guides: follow-up questions the interviewer asks. Up to 10 items.
sections[].questions[].requiredbooleanNoWhether the question must be answered. Default true.
audience_idsstring[]NoUp to 20 items.

Example

curl https://api.imario.ai/v1/discussion-guides \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Switching banks",
    "opening_message": "Thanks for joining. This conversation is about how you choose a bank.",
    "sections": [
      {
        "title": "Your current bank",
        "questions": [
          {
            "type": "open_question",
            "question": "How did you choose your current bank?",
            "probes": ["What almost made you choose another one?"]
          }
        ]
      }
    ]
  }'

Retrieve a discussion guide

GET /v1/discussion-guides/{guide_id}

Scope library:read · Role any member

One discussion guide of this workspace's Library with its full content. A test key also reads its own sandbox discussion guides.

Example

curl https://api.imario.ai/v1/discussion-guides/GUIDE_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Update a discussion guide

PATCH /v1/discussion-guides/{guide_id}

Scope library:write · Role editor or above

Fields left out are kept; sections, when sent, replaces them all.

Request body

FieldTypeRequiredDescription
titlestringNoUp to 200 characters.
statusstringNoOne of draft, ready.
opening_messagestringNoUp to 4,000 characters.
sectionsobject[]NoUp to 30 items.
sections[].titlestringNoUp to 200 characters.
sections[].descriptionstringNoUp to 2,000 characters.
sections[].questionsobject[]NoUp to 100 items.
sections[].questions[].typestringYesclosed_question, open_question, ranking, media_stimulus, url_task, or instruction (discussion guides only). One of closed_question, open_question, ranking, media_stimulus, url_task, instruction.
sections[].questions[].questionstringNoThe question's text. Up to 4,000 characters.
sections[].questions[].textstringNoAn instruction's text. Up to 4,000 characters.
sections[].questions[].optionsstring[]Noclosed_question: 2 to 30 answers. Up to 30 items.
sections[].questions[].multi_selectbooleanNoclosed_question: people may pick several.
sections[].questions[].randomize_optionsbooleanNoclosed_question: shuffle the order per person.
sections[].questions[].itemsstring[]Noranking: 2 to 30 items to order. Up to 30 items.
sections[].questions[].mediastring[]Nomedia_stimulus: up to 6 file ids (images or videos from /files) or https links to pictures. Up to 6 items.
sections[].questions[].urlstringNourl_task: the page (http or https). Up to 2,048 characters.
sections[].questions[].task_descriptionstringNourl_task: what to do on it. Up to 2,000 characters.
sections[].questions[].probesstring[]NoDiscussion guides: follow-up questions the interviewer asks. Up to 10 items.
sections[].questions[].requiredbooleanNoWhether the question must be answered. Default true.
audience_idsstring[]NoUp to 20 items.

Example

curl -X PATCH https://api.imario.ai/v1/discussion-guides/GUIDE_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "opening_message": "Thanks for joining. We will talk about banks for about ten minutes."
  }'

Delete a discussion guide

DELETE /v1/discussion-guides/{guide_id}

Scope library:write · Role editor or above

Soft: the item leaves the Library and every picker, and is no longer offered to new studies. Studies that ran with it, a study already submitted with it and their reports keep working. usage says how many finished studies used it and how many are still running.

Example

curl -X DELETE https://api.imario.ai/v1/discussion-guides/GUIDE_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"

List announcements

GET /v1/announcements

Scope library:read · Role any member

The workspace's announcements (what a PR test runs on): {title, status, versions}.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoHow many objects to return (1-100). Default 20.
cursorquerystringNoThe next_cursor of the previous page. Up to 200 characters.
statusquerystringNoOnly draft or only ready items. One of draft, ready.

Example

curl https://api.imario.ai/v1/announcements \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Response

Returns a list: {"object": "list", "data": [...], "has_more": false, "next_cursor": null}. See Pagination.

Create an announcement

POST /v1/announcements

Scope library:write · Role editor or above

The announcement (version A) and up to four other wordings of it.

Request body

FieldTypeRequiredDescription
titlestringNoUp to 200 characters.
statusstringNoOne of draft, ready. Default "ready".
versionsstring[]NoThe announcement (A) and up to four other wordings; a PR test ranks them by how they move opinion. Up to 5 items.

Example

curl https://api.imario.ai/v1/announcements \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Basic plan price change",
    "versions": [
      "From 1 March the Basic plan costs $9 a month instead of $7. Everything in it stays the same.",
      "From 1 March the Basic plan costs $9 a month. It now includes priority support."
    ]
  }'

Retrieve an announcement

GET /v1/announcements/{announcement_id}

Scope library:read · Role any member

One announcement of this workspace's Library with its full content. A test key also reads its own sandbox announcements.

Example

curl https://api.imario.ai/v1/announcements/ANNOUNCEMENT_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Update an announcement

PATCH /v1/announcements/{announcement_id}

Scope library:write · Role editor or above

Fields left out are kept; versions, when sent, replaces them.

Request body

FieldTypeRequiredDescription
titlestringNoUp to 200 characters.
statusstringNoOne of draft, ready.
versionsstring[]NoUp to 5 items.

Example

curl -X PATCH https://api.imario.ai/v1/announcements/ANNOUNCEMENT_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "draft"
  }'

Delete an announcement

DELETE /v1/announcements/{announcement_id}

Scope library:write · Role editor or above

Soft: the item leaves the Library and every picker, and is no longer offered to new studies. Studies that ran with it, a study already submitted with it and their reports keep working. usage says how many finished studies used it and how many are still running.

Example

curl -X DELETE https://api.imario.ai/v1/announcements/ANNOUNCEMENT_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"
← ReportsFiles →

On this page

List surveysCreate a surveyRetrieve a surveyUpdate a surveyDelete a surveyList discussion guidesCreate a discussion guideRetrieve a discussion guideUpdate a discussion guideDelete a discussion guideList announcementsCreate an announcementRetrieve an announcementUpdate an announcementDelete an announcement