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

# Retrieve a Message

> Fetch a message detail record by message UUID

Retrieves a Message Detail Record (MDR).

#### API Endpoint

```text GET theme={null}
https://api.plivo.com/v1/Account/{auth_id}/Message/{message_uuid}/
```

### Arguments

<Note>
  No arguments need to be passed.
</Note>

### Returns

This API call returns the Message Detail Record for the message identified by the **message\_uuid** specified in the request URL.

<RequestExample>
  ```py Python theme={null}
  import plivo

  client = plivo.RestClient(auth_id="<auth_id>", auth_token="auth_token")

  # Get MDR
  response = client.messages.get(message_uuid='d6d17dd2-b9fe-4cf8-acfd-c6a8b959ea38')
  print(response)
  ```

  ```ruby Ruby theme={null}
  require 'rubygems'
  require 'plivo'

  include Plivo
  include Plivo::Exceptions

  # Environment
  api = RestClient.new("<auth_id>", "<auth_token>")

  # GET MDR
  begin
  response = api.messages.get("c9d8f08d-4f1f-4765-b7e4-83e0d35a36c5")
  puts response
  rescue PlivoRESTError => e
      puts 'Exception: ' + e.message
  end
  ```

  ```js Node theme={null}
  let plivo = require('plivo')

  let client = new plivo.Client('<auth_id>','<auth_token>');

  // Get MDR
  client.messages.get("62085fe8-9b8a-4c9d-9527-5996e94333ab")
  .then(function(response) {
      console.log(response);
  }).catch(function(error) {
      console.log(error);
  });
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';
  use Plivo\RestClient;

  // ENVIORNMENT
  $client = new RestClient("<auth_id>", "<auth_token>");

  // Get MDR
  try {
      $response = $client->messages->get('c9d8f08d-4f1f-4765-b7e4-83e0d35a36c5');
      print_r($response);
  }
  catch (PlivoRestException $ex) {
      print_r($ex);
  }
  ```

  ```java Java theme={null}
  package com.plivo.examples;
  import java.io.IOException;

  import com.plivo.api.Plivo;
  import com.plivo.api.models.message.Message;
  import com.plivo.api.exceptions.PlivoRestException;
  import com.plivo.api.exceptions.PlivoValidationException;

  public class Sample {

  	public static void main(String[] args) throws PlivoValidationException {
          Plivo.init("<auth_id>", "<auth_token>");

          // Get MDR
  		try {
  		Message response = Message.getter("62085fe8-9b8a-4c9d-9527-5996e94333ab").get();		
  		System.out.println(response);
  		} catch (PlivoRestException | IOException e) {
  			e.printStackTrace();
  		}
      }
  }
  ```

  ```csharp .NET theme={null}
  using System;
  using System.Collections.Generic;
  using Plivo;
  using Plivo.Exception;

  namespace dotnet_sdk
  {
      class Sms
      {
          static void Main(string[] args)
          {
              // ENVIRONMENT
              var api = new PlivoApi("<auth_id>","<auth_token>");

              // Get MDR
              try
              {   
                  Console.WriteLine("Get MDR");
                  var response = api.Message.Get(
                  messageUuid: "d6af1134-ab76-11ed-bf27-0242ac110003"
              );
                  Console.WriteLine(response);
              }
              catch (PlivoRestException e)
              {
                  Console.WriteLine("Exception: " + e.Message);
              }

          }
      }
  }
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"

  	plivo "github.com/plivo/plivo-go"
  )

  func main() {

  	// ENVIRONMENT
  	client, err := plivo.NewClient("<auth_id>", "<auth_token>",
  		&plivo.ClientOptions{})
  	if err != nil {
  		panic(err)
  	}

  	// GET MDR
  	response, err := client.Messages.Get("e0f9ab26-bec2-4f21-b1f0-47014e15e268")
  	if err != nil {
  		panic(err)
  	}
  	fmt.Printf("Response: %#v\n", response)

  }
  ```

  ```sh cURL theme={null}
  curl -i --user auth_id:auth_token \
      https://api.plivo.com/v1/Account/{auth_id}/Message/{message_uuid}/
  ```
</RequestExample>

### Response

```json theme={null}
{
    "api_id": "85a704c8-e47a-11eb-9a69-0242ac110004",
    "carrier_fees": "0.04",
    "carrier_fees_rate": "0.04",
    "error_code": "000",
    "from_number": "17087654321",
    "is_domestic": "false",
    "mcc": "312",
    "message_direction": "outbound",
    "message_state": "delivered",
    "message_time": "2021-07-13 13:04:06.799021+05:30",
    "message_type": "sms",
    "message_uuid": "b48d95dc-e3ac-11eb-a9c2-0242ac110005",
    "mnc": "650",
    "powerpack_id": "1d5f3dd8-b207-4738-b59f-3c2ac7d3461c",
    "resource_uri": "/v1/Account/{auth_id}/Message/b48d95dc-e3ac-11eb-a9c2-0242ac110005/",
    "to_number": "12401234567",
    "total_amount": "0.00140",
    "total_rate": "0.00140",
    "tendlc_campaign_id": "CD4WJJD",
    "tendlc_registration_status": "registered",
    "destination_country_iso2": "US",
    "units": 1,
    "replaced_sender": "17087654321",
    "is_domestic": false,
    "dlt_entity_id": "",
    "dlt_template_id": "",
    "dlt_template_category": "",
    "requester_ip": "192.168.0.1",
    "destination_network": "verizon",
    "conversation_id": "2b89d38b573b5ca0a1e85ba3b8d159fc",
    "conversation_origin": "authentication",
    "conversation_expiration_timestamp": "2024-02-13 01:21:00-08:00",
    "log": "number_only"

}
```
