Skip to main content
POST
Import conversation history without generating a Fini reply or sending a message to the source provider. Use Generate answer when you want Fini to respond instead. The API key needs write scope. The workspace is derived from the key; do not supply a workspace ID.

Request

string
required
Bearer fini_your_api_key.
string
required
Source shared by every conversation in the batch. Accepted values: ui, widget, standalone, testsuite, replay, api, voice, jira, intercom, zendesk, salesforce, gorgias, front, hubspot, livechat, slack, discord, freshdesk, freshchat, deskpro, microsoft365, facebook, instagram, whatsapp, email.
array
required
Between 1 and 50 conversations. Each agent/external-ID pair must be unique within the batch. Across all conversations, include at most 500 events. The serialized JSON payload must not exceed 2 MiB.

Matching and retries

Conversations match by workspace, source, agent ID, and conversation external ID. The same external ID can be used for different agents. Events match by external ID within the matched conversation. New events are inserted; existing events are not overwritten. A retry must keep the event’s role, type, and sanitized content unchanged. Any supplied optional event details or external timestamp must match the stored value; optional details can be omitted on retry. A mismatch fails the request. New event tags can still be added. Conversation fields are updated separately from immutable event content. Sync refreshes conversation summaries and marks imported conversations as Fini-touched. Event createdAt and message summaries use Fini ingestion time, not externalCreatedAt. See List conversations for export timestamp filters.
Sync is not transactional. A failed request can leave conversations, events, or tags already written, including writes from other conversations in the batch. Retry with the same external IDs and unchanged event data to complete missing writes. Do not assume failure means nothing was imported, or send overlapping sync requests for the same conversation concurrently.

Response

Returns HTTP 200 with a results array in request order. This is a completed sync response, not a queued job ID. Failed requests do not return per-item success/error results.
array
One result per conversation on success.

Errors

Invalid request fields, duplicate IDs within a batch, and more than 500 total events are rejected with HTTP 400. The sync service rejects serialized payloads larger than 2 MiB with HTTP 413. All agents and referenced tags must be accessible to the authenticated workspace.
Currently, unavailable agents/tags, invalid status tags, blank message content after sanitization, and immutable-event conflicts surface as HTTP 500 rather than typed 400 or 409 responses. Correct the input when one of these conditions is reported; do not repeatedly retry an unchanged conflicting payload. An error response is not a rollback guarantee.
Replace the example botId with an agent UUID from your workspace. IDs and content below are synthetic.