---
title: "Import conversation"
method: POST
path: "/beta/conversations/import"
tags: ["Conversations", "Chatbots"]
---

# Import conversation

`POST /beta/conversations/import`

Import a previously created conversation into Dixa. For inbound messages the author is assumed to be the requester of the conversation (end user), unless the specific channel supports overriding the message author through its attributes. For outbound messages the author is specified using the agentId field.

## Request body

- GenericConversationImport
  - `genericChannelName` string, required — The conversation channel. Currently supported values are 'email' and 'genericapimessaging'. See payload examples for each case.
  - `requesterId` string, uuid, required
  - `requesterConnectionStatus` string — values: [Connected, Disconnected]
  - `direction` string, required — values: [Inbound, Outbound]
  - `messages` ImportMessageInput[]
    - union
      - InboundImport
        - `content` union, required
          - Html
            - `value` string, required
          - Markdown
            - `value` string, required
          - Text
            - `value` string, required
        - `attachments` File[]
          - `url` string, required — url
          - `prettyName` string
        - `externalId` string
        - `createdAt` string, date-time, required
        - `attributes` unknown
      - OutboundImport
        - `content` union, required
          - Html
            - `value` string, required
          - Markdown
            - `value` string, required
          - Text
            - `value` string, required
        - `agentId` string, uuid, required
        - `attachments` File[]
          - `url` string, required — url
          - `prettyName` string
        - `externalId` string
        - `createdAt` string, date-time, required
        - `attributes` unknown
  - `createdAt` string, date-time, required
  - `assignment` Assignment
    - `agentId` string, uuid, required
    - `assignedAt` string, date-time, required
  - `externalId` string
  - `closing` Closing — Triggers the closing of the conversation
    - `closedAt` string, date-time, required
    - `closedBy` string, uuid, required
  - `attributes` unknown

## Response `201`

The id of the imported conversation

- ImportConversationOutput
  - `data` ImportConversationResponse, required
    - `id` integer, required — The id of the newly imported conversation
    - `partialErrors` PartialError[] — List of errors that do not prevent the conversation from being created
      - `message` string, required

## Other responses

- `400` — Invalid value extracted from request context, Invalid value for: body, Invalid input for Message, Failure to download attachment, Unsupported ConversationChannel, Requester does not exist, Agent does not exist
- `404` — An entity in this request could not be found
- `500` — Internal failure during request processing

---

[API](https://skmtc.net/dixa/apis/dixa-api.md) · [All operations](https://skmtc.net/dixa/apis/dixa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dixa/dixa-api/versions/041e058483f0/schema)
