iMarioiMario
DocumentsAPI reference

Guides

API Overview and QuickstartAuthenticationSandbox and Test KeysAPI ErrorsPaginationIdempotent RequestsRate LimitsAPI VersioningWebhooks

Endpoints

All EndpointsWorkspaceAudiencesPeopleStudiesReportsLibraryFilesAuto StudiesConnectionsMembersAPI KeysWebhook Endpoints
Endpoints

People

The people of an audience, one person's profile, and a direct conversation with them.

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 an audience's people

GET /v1/audiences/{id}/people

Scope audiences:read · Role any member

The people a study on this audience would seat in this workspace, newest first. An audience whose people are still being found lists those found so far; a market or official audience this workspace never used has none until a study asks for them.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoHow many objects to return (1-100). Default 20.
cursorquerystringNoThe next_cursor of the previous page. Up to 200 characters.

Example

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

Response

The person object

  • id, object: "person", livemode, created_at
  • name, age, gender, country, location, description (a line about their situation), avatar_url, audience_id (the audience they were built in, when it is one you can open)

GET /people/{id} adds: occupation, attributes ([{key, label, value}]: gender, age band, education, employment, marital status, income... in plain words), profile (other facts about them, {field: value}), based_on (your_data: a real respondent of your file, or imario), and for people of your own data answers ([{question, answer}]) and quotes ([{question, text}]).

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

Retrieve a person

GET /v1/people/{id}

Scope audiences:read · Role any member

Example

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

Response

The person object

  • id, object: "person", livemode, created_at
  • name, age, gender, country, location, description (a line about their situation), avatar_url, audience_id (the audience they were built in, when it is one you can open)

GET /people/{id} adds: occupation, attributes ([{key, label, value}]: gender, age band, education, employment, marital status, income... in plain words), profile (other facts about them, {field: value}), based_on (your_data: a real respondent of your file, or imario), and for people of your own data answers ([{question, answer}]) and quotes ([{question, text}]).

Send a person a message

POST /v1/people/{id}/messages

Scope chat:write · Role any member

The person answers in the same response, in character, from who they are (and, with study_id, knowing what they answered in that study). 1 credit per message, from the workspace's API daily budget too; nothing is charged when they give no answer (503 reply_failed). Viewers may chat. Returns their reply with in_reply_to (your message's id) and credits_charged.

Request body

FieldTypeRequiredDescription
contentstringYesWhat you say to the person. Up to 4,000 characters.
study_idstringNoA study this person answered in: they then know what they said there (asking why they answered as they did). Up to 64 characters.

Example

curl https://api.imario.ai/v1/people/PERSON_ID/messages \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "What would make you switch to another bank?"
  }'

Response

The person message object

  • id, object: "person_message", livemode, created_at, person_id
  • role: user (what you sent) or person (their answer); content

This key's conversation with a person

GET /v1/people/{id}/messages

Scope audiences:read · Role any member

Your messages and their answers, newest first. Each key has its own conversation with each person.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoHow many objects to return (1-100). Default 20.
cursorquerystringNoThe next_cursor of the previous page. Up to 200 characters.

Example

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

Response

The person message object

  • id, object: "person_message", livemode, created_at, person_id
  • role: user (what you sent) or person (their answer); content

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

← AudiencesStudies →

On this page

List an audience's peopleRetrieve a personSend a person a messageThis key's conversation with a person