iMarioiMario
DocumentsAPI reference

Guides

API Overview and QuickstartAuthenticationSandbox and Test KeysAPI ErrorsPaginationIdempotent RequestsRate LimitsAPI VersioningWebhooks

Endpoints

All EndpointsWorkspaceAudiencesPeopleStudiesReportsLibraryFilesAuto StudiesConnectionsMembersAPI KeysWebhook Endpoints
Endpoints

Files

Upload the images, videos and documents a study shows, and the data files an audience is built from.

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.

Upload a file

POST /v1/files

Scope library:write · Role editor or above

Upload one file (editor or above). Returns the file object {filename, content_type, size, kind: image|video|document, purpose, duration_seconds (videos), download_url}. Limits: 50 MB for images and documents, 100 MB and 3 minutes for a video (MP4, MOV, WebM), 100 MB for audience data. A study-material file also appears in the Library.

Request body

Send it as multipart/form-data.

FieldTypeRequiredDescription
filefileYesThe file (multipart/form-data).
purposestringNostudy_material (images, videos, documents a study shows or reads) or audience_data (tables, transcripts). One of study_material, audience_data. Default "study_material".

Example

curl https://api.imario.ai/v1/files \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -F [email protected] \
  -F purpose=study_material

List files, newest first

GET /v1/files

Scope library:read · Role any member

The workspace's files (uploaded here, in the app, or by an agent), without download links: retrieve a file for its download_url.

Parameters

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

Example

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

Response

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

Retrieve a file

GET /v1/files/{file_id}

Scope library:read · Role any member

The file and a download_url, a presigned link valid one hour (expires_at); ask again for a fresh one. A test key's own files keep metadata only (download_url null).

Example

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

Delete a file

DELETE /v1/files/{file_id}

Scope library:write · Role editor or above

Soft, like the Library's delete: the file and its Library item are no longer listed or offered to new studies; a study already set up with it keeps its copy.

Example

curl -X DELETE https://api.imario.ai/v1/files/FILE_ID \
  -H "Authorization: Bearer $IMARIO_API_KEY"
← LibraryAuto Studies →

On this page

Upload a fileList files, newest firstRetrieve a fileDelete a file