iMarioiMario
DocumentsAPI reference

Guides

API Overview and QuickstartAuthenticationSandbox and Test KeysAPI ErrorsPaginationIdempotent RequestsRate LimitsAPI VersioningWebhooks

Endpoints

All EndpointsWorkspaceAudiencesPeopleStudiesReportsLibraryFilesAuto StudiesConnectionsMembersAPI KeysWebhook Endpoints
Endpoints

Connections

The workspace's connected data sources, what each offers now, and a new sync.

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 the workspace's connections

GET /v1/connections

Scope connections:read · Role any member

Newest first. A connection object: id, livemode, created_at, provider (its key, e.g. hubspot), provider_name, account_label, status (active | syncing | expired | revoked), error_message, last_sync_at, stale (a sync that stopped reporting).

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/connections \
  -H "Authorization: Bearer $IMARIO_API_KEY"

Response

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

What a connection offers now

GET /v1/connections/{id}/items

Scope connections:read · Role any member

The provider's items (fields, surveys, recordings...) read from the provider right now, as the web's confirm screen shows them, with notes and a summary. For a stream provider (recordings, threads), watch (JSON) previews what a standing scope takes in. Not paged: has_more is always false.

Parameters

NameInTypeRequiredDescription
watchquerystringNoA stream provider's scope, as JSON. Up to 2,000 characters.

Example

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

Sync a connection

POST /v1/connections/{id}/sync

Scope connections:write · Role editor or above · Live keys only

Queues a pull and returns the connection at once (status: syncing). Send no items or watch to repeat the last sync's selection. 409 sync_in_progress while one runs. Live keys only; needs the editor role. A connection object: id, livemode, created_at, provider (its key, e.g. hubspot), provider_name, account_label, status (active | syncing | expired | revoked), error_message, last_sync_at, stale (a sync that stopped reporting).

Request body

FieldTypeRequiredDescription
itemsstring[]NoItem ids to pull (from /items). Default: what the last sync pulled. Up to 1,000 items.
fieldsstring[]NoUp to 1,000 items.
optionsobjectNo
watchobjectNoA stream provider's standing scope.
audience_idstringNoThe from-data audience the synced files feed. Default: the one the last sync fed. Up to 36 characters.

Example

curl https://api.imario.ai/v1/connections/CONNECTION_ID/sync \
  -H "Authorization: Bearer $IMARIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
← Auto StudiesMembers →

On this page

List the workspace's connectionsWhat a connection offers nowSync a connection