---
title: "GET /activity/latest-messages"
method: GET
path: "/activity/latest-messages"
tags: ["activity"]
---

# GET /activity/latest-messages

`GET /activity/latest-messages`

各チャンネルの最新のメッセージ１件をメッセージ作成日時の降順で取得します。

## Query parameters

- `limit` integer
- `subscribe` boolean

## Response `200`

正常に取得ができました

- Message[]
  - `messageId` string, uuid — メッセージUUID
  - `userId` string, uuid — 投稿者UUID
  - `parentChannelId` string — 投稿先チャンネルUUID
  - `content` string — メッセージ本体
  - `createdAt` string, date-time — メッセージ投稿日時
  - `updatedAt` string, date-time — メッセージ更新日時
  - `pin` boolean — ピン留めされているかどうか
  - `reported` boolean — 自分が通報しているかどうか
  - `stampList` MessageStamp[] — メッセージスタンプ配列
    - `userId` string, uuid — ユーザーUUID
    - `stampId` string, uuid — スタンプUUID
    - `count` integer — 押された個数
    - `createdAt` string, date-time — 最初に押した日時
    - `updatedAt` string, date-time — 最後に押した日時

## Other responses

- `400` — リクエスト内容が不正です

## Changes

- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `getActivities` was added
- **2019-07-05** `6956f2622a20` — 8 info
  - api operation id `getActivities` removed and replaced with ``
  - the endpoint scheme security `traqOAuth2` was added to the API
  - endpoint reactivated
  - added the new optional `query` request parameter `limit`
  - …4 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/activity/latest-messages/get.md)

---

[API](https://skmtc.dev/traptitech/apis/traq-api.md) · [All operations](https://skmtc.dev/traptitech/apis/traq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/traptitech/traq-api/revisions/78d32137c921/schema)
