Skip to main content
Search

Get View Conversations

Get conversations for a specific view. The view's saved filters are applied. Requires the `conversations:read` permission.

GET /api/v1/views/{id}/conversations

Get conversations for a specific view. The view's saved filters are applied. Requires the conversations:read permission.

Authentication

Use an agent API key and secret.

Parameters

Name Location Type Required Description
id path string Yes Unique ID of the view
page query integer No Page number (defaults to 1) default: 1 minimum: 1
page_size query integer No Number of items per page (defaults to 30, max 500) default: 30 minimum: 1 maximum: 500
order query string (enum) No Sort direction (case-insensitive). Defaults to desc. enum: ["asc", "desc"]
order_by query string (enum) No Field to sort by, as model.field. Defaults to conversations.last_message_at. default: "conversations.last_message_at" enum: ["conversations.status_id", "conversations.priority_id", "conversations.assigned_team_id", "conversations.assigned_user_id", "conversations.inbox_id", "conversations.last_message_at", "conversations.last_interaction_at", "conversations.last_interaction_sender", "conversations.created_at", "conversations.waiting_since", "conversations.next_sla_deadline_at", "conversations.snoozed_until", "conversations.sla_policy_id", "conversation_statuses.id", "conversation_statuses.name", "users.email", "users.external_user_id", "inboxes.channel"]

Responses

200

List of conversations for view

Content type: application/json.

Field Type Required Description
status string No example: "success"
data object No
data.results array of object No
data.results[].id integer No
data.results[].created_at string (date-time) No
data.results[].updated_at string (date-time) No
data.results[].uuid string No
data.results[].reference_number string No
data.results[].waiting_since string (date-time) No nullable: true
data.results[].contact object No
data.results[].contact.created_at string (date-time) No
data.results[].contact.updated_at string (date-time) No
data.results[].contact.first_name string No
data.results[].contact.last_name string No
data.results[].contact.email string (email) No nullable: true
data.results[].contact.avatar_url string No nullable: true
data.results[].inbox_channel string (enum) No enum: ["email", "livechat"]
data.results[].inbox_name string No
data.results[].sla_policy_id integer No nullable: true
data.results[].first_reply_at string (date-time) No nullable: true
data.results[].last_reply_at string (date-time) No nullable: true
data.results[].resolved_at string (date-time) No nullable: true
data.results[].subject string No nullable: true
data.results[].last_message string No nullable: true
data.results[].last_message_at string (date-time) No nullable: true
data.results[].last_message_sender string (enum) No enum: ["contact", "agent"] nullable: true
data.results[].last_interaction string No nullable: true
data.results[].last_interaction_at string (date-time) No nullable: true
data.results[].last_interaction_sender string (enum) No enum: ["contact", "agent"] nullable: true
data.results[].next_sla_deadline_at string (date-time) No nullable: true
data.results[].priority_id integer No nullable: true
data.results[].assigned_user_id integer No nullable: true
data.results[].assigned_team_id integer No nullable: true
data.results[].unread_message_count integer No
data.results[].status string No nullable: true
data.results[].priority string No nullable: true
data.results[].first_response_deadline_at string (date-time) No nullable: true
data.results[].resolution_deadline_at string (date-time) No nullable: true
data.results[].applied_sla_id integer No nullable: true
data.results[].next_response_deadline_at string (date-time) No nullable: true
data.results[].next_response_met_at string (date-time) No nullable: true
data.results[].mentioned_message_uuid string No UUID of the message the current agent was mentioned in, set only for mention lists nullable: true
data.total integer No
data.per_page integer No
data.total_pages integer No
data.page integer No

400

Invalid request

Content type: application/json.

Field Type Required Description
status string No example: "error"
message string No Error message example: "Invalid request"
data unspecified No Additional error data nullable: true
error_type string (enum) No enum: ["GeneralException", "PermissionException", "InputException", "DataException", "NetworkException", "NotFoundException", "ConflictException", "UnauthorizedException", "RateLimitException"]

401

Unauthorized

Content type: application/json.

Field Type Required Description
status string No example: "error"
message string No Error message example: "Invalid request"
data unspecified No Additional error data nullable: true
error_type string (enum) No enum: ["GeneralException", "PermissionException", "InputException", "DataException", "NetworkException", "NotFoundException", "ConflictException", "UnauthorizedException", "RateLimitException"]

403

Forbidden

Content type: application/json.

Field Type Required Description
status string No example: "error"
message string No Error message example: "Invalid request"
data unspecified No Additional error data nullable: true
error_type string (enum) No enum: ["GeneralException", "PermissionException", "InputException", "DataException", "NetworkException", "NotFoundException", "ConflictException", "UnauthorizedException", "RateLimitException"]

404

Not found

Content type: application/json.

Field Type Required Description
status string No example: "error"
message string No Error message example: "Invalid request"
data unspecified No Additional error data nullable: true
error_type string (enum) No enum: ["GeneralException", "PermissionException", "InputException", "DataException", "NetworkException", "NotFoundException", "ConflictException", "UnauthorizedException", "RateLimitException"]

500

Internal server error

Content type: application/json.

Field Type Required Description
status string No example: "error"
message string No Error message example: "Invalid request"
data unspecified No Additional error data nullable: true
error_type string (enum) No enum: ["GeneralException", "PermissionException", "InputException", "DataException", "NetworkException", "NotFoundException", "ConflictException", "UnauthorizedException", "RateLimitException"]

Specification

Download the complete OpenAPI specification.

OpenAPI definition for this endpoint
openapi: 3.0.0
info:
  title: Libredesk API
  description: >-
    REST API documentation for Libredesk helpdesk system.


    ## Authentication


    The Libredesk API supports two authentication methods:


    ### 1. Basic Authentication

    Use your API key and secret with Basic authentication:

    ```

    Authorization: Basic <base64_encoded_api_key:api_secret>

    ```


    ### 2. Token Authentication  

    Use your API key and secret with token authentication:

    ```

    Authorization: token api_key:api_secret

    ```


    To obtain API credentials, generate them from your agent profile in the
    Libredesk dashboard.
  version: 1.0.0
servers:
  - url: http://localhost:8080
    description: Local development server
security:
  - basicAuth: []
  - tokenAuth: []
paths:
  /api/v1/views/{id}/conversations:
    get:
      tags:
        - Conversations
      summary: Get View Conversations
      description: >-
        Get conversations for a specific view. The view's saved filters are
        applied. Requires the `conversations:read` permission.
      operationId: handleGetViewConversations
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Unique ID of the view
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number (defaults to 1)
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 30
          description: Number of items per page (defaults to 30, max 500)
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
          description: Sort direction (case-insensitive). Defaults to `desc`.
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - conversations.status_id
              - conversations.priority_id
              - conversations.assigned_team_id
              - conversations.assigned_user_id
              - conversations.inbox_id
              - conversations.last_message_at
              - conversations.last_interaction_at
              - conversations.last_interaction_sender
              - conversations.created_at
              - conversations.waiting_since
              - conversations.next_sla_deadline_at
              - conversations.snoozed_until
              - conversations.sla_policy_id
              - conversation_statuses.id
              - conversation_statuses.name
              - users.email
              - users.external_user_id
              - inboxes.channel
            default: conversations.last_message_at
          description: >-
            Field to sort by, as `model.field`. Defaults to
            `conversations.last_message_at`.
      responses:
        '200':
          description: List of conversations for view
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationListResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
components:
  schemas:
    ConversationListResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/ConversationListItem'
            total:
              type: integer
            per_page:
              type: integer
            total_pages:
              type: integer
            page:
              type: integer
    ErrorResponse:
      type: object
      description: Error response format
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          description: Error message
          example: Invalid request
        data:
          nullable: true
          description: Additional error data
        error_type:
          type: string
          enum:
            - GeneralException
            - PermissionException
            - InputException
            - DataException
            - NetworkException
            - NotFoundException
            - ConflictException
            - UnauthorizedException
            - RateLimitException
    ConversationListItem:
      type: object
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        uuid:
          type: string
        reference_number:
          type: string
        waiting_since:
          type: string
          format: date-time
          nullable: true
        contact:
          $ref: '#/components/schemas/ContactSummary'
        inbox_channel:
          type: string
          enum:
            - email
            - livechat
        inbox_name:
          type: string
        sla_policy_id:
          type: integer
          nullable: true
        first_reply_at:
          type: string
          format: date-time
          nullable: true
        last_reply_at:
          type: string
          format: date-time
          nullable: true
        resolved_at:
          type: string
          format: date-time
          nullable: true
        subject:
          type: string
          nullable: true
        last_message:
          type: string
          nullable: true
        last_message_at:
          type: string
          format: date-time
          nullable: true
        last_message_sender:
          type: string
          nullable: true
          enum:
            - contact
            - agent
        last_interaction:
          type: string
          nullable: true
        last_interaction_at:
          type: string
          format: date-time
          nullable: true
        last_interaction_sender:
          type: string
          nullable: true
          enum:
            - contact
            - agent
        next_sla_deadline_at:
          type: string
          format: date-time
          nullable: true
        priority_id:
          type: integer
          nullable: true
        assigned_user_id:
          type: integer
          nullable: true
        assigned_team_id:
          type: integer
          nullable: true
        unread_message_count:
          type: integer
        status:
          type: string
          nullable: true
        priority:
          type: string
          nullable: true
        first_response_deadline_at:
          type: string
          format: date-time
          nullable: true
        resolution_deadline_at:
          type: string
          format: date-time
          nullable: true
        applied_sla_id:
          type: integer
          nullable: true
        next_response_deadline_at:
          type: string
          format: date-time
          nullable: true
        next_response_met_at:
          type: string
          format: date-time
          nullable: true
        mentioned_message_uuid:
          type: string
          nullable: true
          description: >-
            UUID of the message the current agent was mentioned in, set only for
            mention lists
    ContactSummary:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
          nullable: true
        avatar_url:
          type: string
          nullable: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication using base64 encoded API key and secret. Format:
        `Authorization: Basic <base64(api_key:api_secret)>`
    tokenAuth:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        Token authentication using API key and secret. Format: `Authorization:
        token api_key:api_secret`

Was this article helpful?