> This page is for JM Care Plan.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.jewelersmutual.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.jewelersmutual.com/_mcp/server.

# List messages for a claim

GET //jmcpclaimsapi.jewelersmutual.com/careplan/claims/{claimId}/messages

Retrieves the message history associated with a specific claim. Supports filtering by date range (before, after, from, to) and pagination via offset and limit. The `headers` header parameter is required for authentication context.


Reference: https://docs.jewelersmutual.com/jm-care-plan/api-reference/jm-care-plan-claims/claims/get-messages-by-claim-id-using-get

## Request

### Path parameters

- `claimId` (string, required) — claimId

### Query parameters

- `after` (datetime, optional) — after
- `before` (datetime, optional) — before
- `from` (datetime, optional) — from
- `offset` (long, optional)
- `paged` (boolean, optional)
- `pageNumber` (integer, optional)
- `pageSize` (integer, optional)
- `sort.sorted` (boolean, optional)
- `sort.unsorted` (boolean, optional)
- `to` (datetime, optional) — to
- `unpaged` (boolean, optional)
- `withNames` (boolean, optional) — withNames

### Headers

- `headers` (string, required) — headers

## Response

### 200

OK

- `list of MessageDto`

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 403 Forbidden Error

Forbidden

- `any`

### 404 Not Found Error

Not Found

- `any`

## Types

### MessageDto

Message from the conversation to be retrieved

- `content` (string, optional) — The content of the message
- `createdAt` (datetime, optional) — The timestamp when the message was created
- `messageType` (enum, optional) — The type of the message
  - Allowed values: `ASSET`, `EMAIL`, `FILE`, `PARTICIPANTS`, `POLICY`, `SYSTEM`, `USER`, `USER_RICH_TEXT`
- `sentBy` (string, optional) — Indicates who is the sender

## Examples

**Response**

```json
[
  {
    "content": "Claim has been created and is now under review.",
    "createdAt": "2024-05-10T14:22:00.000Z",
    "messageType": "SYSTEM",
    "sentBy": "Jewelers Mutual Admin"
  },
  {
    "content": "Please provide additional photos of the damaged item.",
    "createdAt": "2024-05-12T09:15:30.000Z",
    "messageType": "USER",
    "sentBy": "Claims Adjuster - Sarah Johnson"
  },
  {
    "content": "Photos received and added to the claim file.",
    "createdAt": "2024-05-13T11:45:00.000Z",
    "messageType": "SYSTEM",
    "sentBy": "Jewelers Mutual Admin"
  },
  {
    "content": "Email sent to customer confirming receipt of documents.",
    "createdAt": "2024-05-14T08:00:00.000Z",
    "messageType": "EMAIL",
    "sentBy": "Claims Department"
  }
]
```

**SDK Code**

```python
import requests

url = "https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages"

querystring = {"after":"2024-05-01T00:00:00Z","before":"2024-05-31T23:59:59Z","from":"2024-05-01T00:00:00Z","offset":"0","pageNumber":"1","pageSize":"20","paged":"true","sort.sorted":"true","sort.unsorted":"false","to":"2024-05-31T23:59:59Z","unpaged":"false","withNames":"true"}

headers = {"headers": "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true';
const options = {
  method: 'GET',
  headers: {headers: 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("headers", "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["headers"] = 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true")
  .header("headers", "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true', [
  'headers' => [
    'headers' => 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true");
var request = new RestRequest(Method.GET);
request.AddHeader("headers", "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["headers": "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"]

let request = NSMutableURLRequest(url: NSURL(string: "https://jmcpclaimsapi.jewelersmutual.com/careplan/claims/CLM-20240615-987654/messages?after=2024-05-01T00%3A00%3A00Z&before=2024-05-31T23%3A59%3A59Z&from=2024-05-01T00%3A00%3A00Z&offset=0&pageNumber=1&pageSize=20&paged=true&sort.sorted=true&sort.unsorted=false&to=2024-05-31T23%3A59%3A59Z&unpaged=false&withNames=true")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```