> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automatebusiness.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Message Details

> Retrieves the complete details of a WhatsApp message (including template details) and its associated conversation by WhatsApp Message ID. Enforces strict workspace-level isolation and API key scoping restrictions.

Use this endpoint to retrieve complete details about a WhatsApp message and its associated conversation.
You must provide the unique WhatsApp Message ID as the `waMessageId` query parameter.
This endpoint supports external integrations using your API key.

### Workspace isolation and security

To protect your data, this endpoint enforces strict multi-tenancy.
You can only fetch messages that belong to your workspace.
Access is blocked if the message's WhatsApp Business Account (WABA) ID does not match your workspace.

### API key scoping restrictions

Access is restricted if your API key is scoped to a specific phone number or channel ID.
The system checks if the conversation matches the scoped phone number or channel ID.
Any scope violation returns a `403 Forbidden` response.


## OpenAPI

````yaml GET /api/chat/message/detail
openapi: 3.1.0
info:
  title: Automate Chats API
  description: >-
    API for managing WhatsApp template messages, contacts, custom fields, tags,
    and external integrations.
  version: 1.0.0
servers:
  - url: https://api.automatechats.com
security:
  - apiKeyAuth: []
paths:
  /api/chat/message/detail:
    get:
      summary: Get WhatsApp Message and Conversation Details
      description: >-
        Retrieves the complete details of a WhatsApp message (including template
        details) and its associated conversation by WhatsApp Message ID.
        Enforces strict workspace-level isolation and API key scoping
        restrictions.
      parameters:
        - name: waMessageId
          in: query
          description: >-
            The unique WhatsApp Message ID (e.g.
            `wamid.HBgMOTE5ODc2NTQzMjEw...`)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Message and conversation details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Message details retrieved successfully
                  data:
                    type: object
                    properties:
                      message:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 65f12ab3c9e4f1a2b3c4d5f1
                          wa_message_id:
                            type: string
                            example: >-
                              wamid.HBgMOTE5ODc2NTQzMjEwFQIAERg2REI3QzNCRDM2RUQ0RkU3RjAA
                          direction:
                            type: string
                            example: outbound
                          senderType:
                            type: string
                            example: business
                          senderId:
                            type: string
                            example: '123456'
                          senderName:
                            type: string
                            example: Automate Team
                          status:
                            type: string
                            example: read
                          message_type:
                            type: string
                            example: template
                          content:
                            type: object
                            description: >-
                              Rich content payload depending on the message type
                              (e.g. template component mappings, text, media,
                              etc.)
                          timestamp:
                            type: string
                            format: date-time
                            example: '2026-06-19T14:55:05.000Z'
                          delivered_at:
                            type: string
                            format: date-time
                            example: '2026-06-19T14:55:06.000Z'
                          read_at:
                            type: string
                            format: date-time
                            example: '2026-06-19T14:55:10.000Z'
                      conversation:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 65f12ab3c9e4f1a2b3c4d5f2
                          recipient_id:
                            type: string
                            example: '919876543210'
                          phone_number_id:
                            type: string
                            example: '106294715428491'
                          channel_id:
                            type: string
                            example: b340b1b3-bf45-4a61-be71-853a31830dc5
                          status:
                            type: string
                            example: open
                          priority:
                            type: string
                            example: medium
                          chat_mode:
                            type: string
                            example: user
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-06-19T14:55:15.000Z'
        '400':
          description: Bad Request (e.g. missing WhatsApp Message ID)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: >-
            Forbidden (message does not belong to workspace, or scope
            restriction violated)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                code: 403
                message: Access denied. Message does not belong to your workspace.
                timestamp: '2026-06-19T14:55:15.000Z'
        '404':
          description: Not Found (message or conversation not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                code: 404
                message: Message not found
                timestamp: '2026-06-19T14:55:15.000Z'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        code:
          type: integer
          example: 400
        message:
          type: string
          example: 'Invalid input: field first_name is required.'
        error:
          description: Optional validation error details or raw stack traces.
        timestamp:
          type: string
          format: date-time
          example: '2026-05-18T15:00:00.000Z'
  responses:
    UnauthorizedError:
      description: Unauthorized (missing or invalid API key / JWT token)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            code: 401
            message: >-
              Unauthorized access: Invalid or missing authentication
              credentials.
            timestamp: '2026-05-18T15:00:00.000Z'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````