# Returns a list of conversations.

URL: https://docs.dixa.io/openapi/exports-api/get-v1-conversation-export

## GET /v1/conversation_export

- Server: https://exports.dixa.io
- Auth: `Authorization: Bearer <API token>` header

### Request example

```bash
curl -X GET 'https://exports.dixa.io/v1/conversation_export?closed_after=2022-01-01&closed_before=1646151737080&csids=123,456' \
  -H 'Authorization: Bearer <API token>'
```

### Response examples

#### 200 Array of conversations

_Generated from the schema; the spec has no example._

```json
[
  {
    "id": 0,
    "created_at": 0,
    "initial_channel": "email",
    "requester_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "requester_name": "string",
    "requester_email": "string",
    "requester_additional_emails": [
      "string"
    ],
    "requester_phone_number": "string",
    "requester_additional_phone_numbers": [
      "string"
    ],
    "queued_at": 0,
    "queue_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "queue_name": "string",
    "closed_at": 0,
    "rating_score": 0,
    "rating_message": "string",
    "ratings": [
      {
        "rating_score": 0,
        "rating_message": "string",
        "rating_type": "CSAT",
        "rating_created_timestamp": 0,
        "rating_offered_timestamp": 0,
        "rating_status": "Rated",
        "rating_language": "en",
        "rating_modified_timestamp": 0,
        "rating_rated_timestamp": 0,
        "rating_scheduled_timestamp": 0,
        "rating_scheduled_for_timestamp": 0,
        "rating_unscheduled_timestamp": 0,
        "rating_cancelled_timestamp": 0
      }
    ],
    "direction": "inbound",
    "assigned_at": 0,
    "assignee_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "assignee_name": "string",
    "assignee_email": "string",
    "assignee_phone_number": "string",
    "to_provisioned_phone_number_id": "string",
    "to_provisioned_phone_number_name": "string",
    "total_duration": 0,
    "handling_duration": 0,
    "dixa_email_integration_id": "string",
    "dixa_email_integration_sender_name": "string",
    "forwarding_email": "string",
    "facebook_page_id": "string",
    "facebook_page_name": "string",
    "widget_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "widget_name": "string",
    "tags": [
      "string"
    ],
    "tags_info": [
      "string"
    ],
    "conversation_wrapup_notes": [
      "string"
    ],
    "transferee_name": "string",
    "transfer_time": 0,
    "originating_country": "string",
    "updated_at": 0,
    "last_message_created_at": 0,
    "status": "open",
    "transferee_number": "string",
    "from_provisioned_phone_number_id": "string",
    "from_provisioned_phone_number_name": "string",
    "subject": "string",
    "anonymized_at": 0,
    "custom_fields": [
      {
        "attribute_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "identifier": "string",
        "value": "string",
        "data_type": "string",
        "archived": true
      }
    ],
    "exports_handling_duration": 0,
    "link_type": "side",
    "linked_at": 1762787749131,
    "linked_to": 14665
  }
]
```

#### 400 Invalid query parameters

No body.

#### 401 Invalid or missing credentials

No body.

#### 429 API limit has been reached

No body.

#### 5XX Internal error

No body.

## OpenAPI definition

The operation and the schemas used, from the full spec at https://docs.dixa.io/openapi-specs/exports.yaml. Request and response examples are above.

```yaml
openapi: 3.0.0
info:
  title: Exports API
  version: 1.0.0
servers:
  - url: https://exports.dixa.io
security:
  - BearerAuth: []
paths:
  /v1/conversation_export:
    get:
      summary: Returns a list of conversations.
      parameters:
        - name: closed_after
          in: query
          description: Filter for conversations closed after this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
          example: 2022-01-01
        - name: closed_before
          in: query
          description: Filter for conversations closed before this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
          example: "1646151737080"
        - name: created_after
          in: query
          description: Filter for conversations created after this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: created_before
          in: query
          description: Filter for conversations created before this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: updated_after
          in: query
          description: Filter for conversations updated after this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: updated_before
          in: query
          description: Filter for conversations updated before this date. Format should be
            yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: last_message_created_after
          in: query
          description: Filter for conversations where the last message was created after
            this date. Format should be yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: last_message_created_before
          in: query
          description: Filter for conversations where the last message was created before
            this date. Format should be yyyy-mm-dd or Unix timestamp in ms
          required: false
          schema:
            type: string
            format: date
        - name: csids
          in: query
          description: Filter for this list of conversation IDs, comma separated
          required: false
          schema:
            type: array
            items:
              type: integer
              format: int32
          example: 123,456
      responses:
        "200":
          description: Array of conversations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ConversationInfo"
        "400":
          description: Invalid query parameters
        "401":
          description: Invalid or missing credentials
        "429":
          description: API limit has been reached
        5XX:
          description: Internal error
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
  schemas:
    ConversationInfo:
      type: object
      properties:
        id:
          type: integer
          format: int32
          description: Id of the conversation
        created_at:
          type: integer
          format: int64
          description: Timestamp of when the conversation was created
        initial_channel:
          type: string
          description: The channel through which the communication was established
          example: email
        requester_id:
          type: string
          format: uuid
          description: Id of the enduser who requested the conversation
        requester_name:
          type: string
          description: Name of the enduser who requested the conversation
        requester_email:
          type: string
          description: Email of the enduser who requested the conversation
        requester_additional_emails:
          type: array
          items:
            type: string
          description: Additional email addresses of the enduser who requested the
            conversation
        requester_phone_number:
          type: string
          description: Phone number of the enduser who requested the conversation
        requester_additional_phone_numbers:
          type: array
          items:
            type: string
          description: Additional phone numbers of the enduser who requested the
            conversation
        queued_at:
          type: number
          format: int64
          description: Timestamp of when the conversation was queued
        queue_id:
          type: string
          format: uuid
          description: Id of the last queue where the conversation was placed
        queue_name:
          type: string
          description: Name of the last queue where the conversation was placed
        closed_at:
          type: number
          format: int64
          description: Timestamp of when the conversation was closed
        rating_score:
          type: integer
          format: int32
          enum:
            - 0
            - 1
          description: Rating score. This field is only relevant if you have set up the
            thumbs up/down ratings
          deprecated: true
        rating_message:
          type: string
          description: Rating message associated with the rating score. This field is only
            relevant if you have set up the thumbs up/down ratings
          deprecated: true
        ratings:
          type: array
          description: >-
            The conversation's ratings and surveys. A conversation can have
            several entries, and they are not sorted.


            Each survey has one entry with its status and timestamps. Depending
            on how the survey is set up, the score and comment are stored on
            that entry, or each answered question is a separate entry. An answer
            entry has the score, comment, type, and the rated and modified
            timestamps, but no status and no other timestamps.


            Ratings and survey offers created through the API also appear as
            entries.
          items:
            $ref: "#/components/schemas/Rating"
        direction:
          type: string
          enum:
            - inbound
            - outbound
          description: Direction of the conversation
        assigned_at:
          type: integer
          format: int64
          description: Timestamp of when the conversation was assigned to an agent
        assignee_id:
          type: string
          format: uuid
          description: Id of the agent that the conversation was assigned to
        assignee_name:
          type: string
          description: Name of the agent that the conversation was assigned to
        assignee_email:
          type: string
          description: Email of the agent that the conversation was assigned to
        assignee_phone_number:
          type: string
          description: Phone number of the agent that the conversation was assigned to
        to_provisioned_phone_number_id:
          type: string
          description: Called phone number id (for inbound calls), which is the phone
            number itself
        to_provisioned_phone_number_name:
          type: string
          description: Name of the called phone number provided
        total_duration:
          type: number
          format: int64
          description: Call duration in seconds if it exists. This is a derived value
            `closed_at` - `created_at`. For advanced analytics, take a look at
            our [Analytics
            API](https://docs.dixa.io/openapi/dixa-api/v1/tag/Analytics/).
          deprecated: true
        handling_duration:
          type: number
          format: int64
          description: Handling duration in seconds. This is a derived value `closed_at` -
            `assigned_at`. For advanced analytics, take a look at our [Analytics
            API](https://docs.dixa.io/openapi/dixa-api/v1/tag/Analytics/).
          deprecated: true
        dixa_email_integration_id:
          type: string
          description: Id of the email integration, which is the email address itself
        dixa_email_integration_sender_name:
          type: string
          description: Sender name of the email integration, if it exists
        forwarding_email:
          type: string
          description: Forwarding email address
        facebook_page_id:
          type: string
          description: Page id coming from facebook
        facebook_page_name:
          type: string
          description: Page name coming from facebook
        widget_id:
          type: string
          format: uuid
          description: Id of the widget that was used
        widget_name:
          type: string
          description: Name of the widget that was used
        tags:
          type: array
          items:
            type: string
          description: All tags associated with the conversation
        tags_info:
          type: array
          items:
            type: string
          description: All tags info associated with the conversation
        conversation_wrapup_notes:
          type: array
          items:
            type: string
          description: All notes associated with the conversation
        transferee_name:
          type: string
          description: Target entity name of the transfer, which is either a queue or a user
        transfer_time:
          type: number
          format: int64
          description: Timestamp of the latest transfer
        originating_country:
          type: string
          description: Country the conversation originates from
        updated_at:
          type: number
          format: int64
          description: Timestamp of when the conversation was last time updated
        last_message_created_at:
          type: number
          format: int64
          description: Timestamp of when the last associated message was created
        status:
          type: string
          enum:
            - open
            - closed
            - pending
            - awaitingpending
          description: Status of the conversation
        transferee_number:
          type: string
          description: Phone number of the agent to whom the conversation was transferred
        from_provisioned_phone_number_id:
          type: string
          description: Calling phone number id (for outbound calls), which is the phone
            number itself
        from_provisioned_phone_number_name:
          type: string
          description: Name of the calling phone number provided
        subject:
          type: string
          description: Subject field (for email and contact form)
        anonymized_at:
          type: number
          format: int64
          description: Timestamp of when the conversation was anonymized
        custom_fields:
          type: array
          items:
            $ref: "#/components/schemas/CustomAttribute"
        exports_handling_duration:
          type: number
          format: int64
          description: Cumulative assignment time across all agents that handled the
            conversation (in seconds). Can be different from
            `handling_duration`. This value corresponds to the handling_duration
            field in the "Integrations -> Export Conversations" CSV file.
        link_type:
          type: string
          enum:
            - email_forward
            - follow_up
            - side
            - related
          description: Type of link associated with the conversation
          example: side
        linked_at:
          type: integer
          format: int64
          description: Timestamp of when the conversation was linked
          example: 1762787749131
        linked_to:
          type: integer
          format: int32
          description: ID of the conversation this conversation is linked to
          example: 14665
      required:
        - id
        - created_at
        - initial_channel
        - requester_id
    Rating:
      type: object
      properties:
        rating_score:
          type: integer
          format: int32
          description: Rating score. 1 to 5 for CSAT, 0 to 10 for NPS, and 0 or 1 for
            thumbs up or down
        rating_message:
          type: string
          description: Rating message associated with the rating score
        rating_type:
          type: string
          description: Type of rating. One of CSAT, NPS or THUMBSUPORDOWN
          example: CSAT
        rating_created_timestamp:
          type: integer
          format: int64
          description: When the entry was created. For a scheduled survey, this is when it
            was first scheduled.
        rating_offered_timestamp:
          type: integer
          format: int64
          description: When the survey was sent or shown to the customer
        rating_status:
          type: string
          description: Current status of the survey. One of Scheduled, Unscheduled,
            Offered, Rated or Cancelled. Empty on answer entries, see `ratings`.
          example: Rated
        rating_language:
          type: string
          description: Language set for the conversation
          example: en
        rating_modified_timestamp:
          type: integer
          format: int64
          description: When the entry was last changed
        rating_rated_timestamp:
          type: integer
          format: int64
          description: When the customer last answered the survey. On an answer entry,
            when that question was last answered.
        rating_scheduled_timestamp:
          type: integer
          format: int64
          description: The last time the survey was scheduled. A survey is scheduled when
            the conversation is closed, and again each time the conversation is
            closed before the survey is sent, if the conversation still
            qualifies for a survey.
        rating_scheduled_for_timestamp:
          type: integer
          format: int64
          description: When the survey is due to be sent, based on the last schedule. This
            is `rating_scheduled_timestamp` plus the delay set for the survey.
        rating_unscheduled_timestamp:
          type: integer
          format: int64
          description: The last time a scheduled survey was put on hold because the
            conversation was reopened or set to pending before the survey was
            sent. It is kept when the survey is scheduled again, so a value
            earlier than `rating_scheduled_timestamp` means the survey was
            rescheduled afterwards. `rating_status` has the current state.
        rating_cancelled_timestamp:
          type: integer
          format: int64
          description: When an agent cancelled the survey, from the conversation or with a
            bulk action. A cancelled survey is not sent.
    CustomAttribute:
      type: object
      properties:
        attribute_id:
          type: string
          format: uuid
          description: Custom attribute UUID
        identifier:
          type: string
          description: Custom attribute identifier
        value:
          type: string
          description: The custom attribute value set for the conversation
        data_type:
          type: string
          description: Custom attribute type
        archived:
          type: boolean
          description: Whether the custom attribute has been archived
```
