Skip to main content
Search

Get Message

Requires the `messages:read` permission.

GET /api/v1/conversations/{cuuid}/messages/{uuid}

Requires the messages:read permission.

Authentication

Use an agent API key and secret.

Parameters

Name Location Type Required Description
cuuid path string Yes Conversation UUID
uuid path string Yes Message UUID

Responses

200

Message sent successfully

Content type: application/json.

Field Type Required Description
status string No example: "success"
data object No
data.id integer No
data.created_at string (date-time) No
data.updated_at string (date-time) No
data.uuid string No
data.type string (enum) No enum: ["incoming", "outgoing", "activity"]
data.status string (enum) No enum: ["pending", "sent", "received", "failed"]
data.conversation_id integer No
data.conversation_uuid string No
data.content string No
data.text_content string No
data.content_type string (enum) No enum: ["html", "text"]
data.private boolean No
data.sender_id integer No
data.sender_type string (enum) No enum: ["agent", "contact"]
data.meta object No nullable: true
data.meta.to array of string No
data.meta.to[] string
data.meta.cc array of string No
data.meta.cc[] string
data.meta.bcc array of string No
data.meta.bcc[] string
data.meta.from array of string No
data.meta.from[] string
data.meta.subject string No
data.attachments array of object No
data.attachments[].name string No
data.attachments[].size integer No
data.attachments[].content string (byte) No nullable: true
data.attachments[].content_id string No
data.attachments[].content_type string No
data.attachments[].disposition string (enum) No enum: ["inline", "attachment"]
data.attachments[].uuid string No
data.attachments[].url string No
data.attachments[].thumbnail_url string No
data.author object No
data.author.id integer No
data.author.first_name string No
data.author.last_name string No
data.author.email string (email) No nullable: true
data.author.avatar_url string No nullable: true
data.author.availability_status string No
data.author.type string (enum) No enum: ["agent", "contact", "visitor", "ai_assistant"]
data.author.last_active_at string (date-time) No nullable: true

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/conversations/{cuuid}/messages/{uuid}:
    get:
      tags:
        - Conversations
      summary: Get Message
      description: Requires the `messages:read` permission.
      operationId: handleGetMessage
      parameters:
        - name: cuuid
          in: path
          required: true
          schema:
            type: string
          description: Conversation UUID
        - name: uuid
          in: path
          required: true
          schema:
            type: string
          description: Message UUID
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '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:
    MessageResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/Message'
    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
    Message:
      type: object
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        uuid:
          type: string
        type:
          type: string
          enum:
            - incoming
            - outgoing
            - activity
        status:
          type: string
          enum:
            - pending
            - sent
            - received
            - failed
        conversation_id:
          type: integer
        conversation_uuid:
          type: string
        content:
          type: string
        text_content:
          type: string
        content_type:
          type: string
          enum:
            - html
            - text
        private:
          type: boolean
        sender_id:
          type: integer
        sender_type:
          type: string
          enum:
            - agent
            - contact
        meta:
          type: object
          properties:
            to:
              type: array
              items:
                type: string
            cc:
              type: array
              items:
                type: string
            bcc:
              type: array
              items:
                type: string
            from:
              type: array
              items:
                type: string
            subject:
              type: string
          nullable: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
        author:
          $ref: '#/components/schemas/MessageAuthor'
    Attachment:
      type: object
      properties:
        name:
          type: string
        size:
          type: integer
        content:
          type: string
          format: byte
          nullable: true
        content_id:
          type: string
        content_type:
          type: string
        disposition:
          type: string
          enum:
            - inline
            - attachment
        uuid:
          type: string
        url:
          type: string
        thumbnail_url:
          type: string
    MessageAuthor:
      type: object
      properties:
        id:
          type: integer
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
          nullable: true
        avatar_url:
          type: string
          nullable: true
        availability_status:
          type: string
        type:
          type: string
          enum:
            - agent
            - contact
            - visitor
            - ai_assistant
        last_active_at:
          type: string
          format: date-time
          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?