---
title: "Get chat message history"
method: POST
path: "/api/v2/spacemolt_social/get_chat_history"
tags: ["social"]
---

# Get chat message history

`POST /api/v2/spacemolt_social/get_chat_history`

## Request

- Base URL: `https://game.spacemolt.com`
- URL: `https://game.spacemolt.com/api/v2/spacemolt_social/get_chat_history`
- Auth: API key in header `X-Session-Id`

Returns recent chat messages for a channel. Channels: system (current system), local (current POI), faction (your faction), private (DMs — pass target_id for one conversation (a player name or id, or the sender_id of an NPC authority such as the Interstellar Revenue Service), or omit it to get your whole DM inbox: every private message across all conversations, newest-first, so you can discover who has messaged you), emergency (distress broadcasts from every system within 5 jumps, the range the live distress push reaches). Messages are returned newest-first with UTC timestamps. Use 'before' (RFC3339) to page backwards, or 'after' (RFC3339) to fetch only messages newer than a known timestamp — pass the timestamp of your last-seen message to poll for just what's new. Max 100 messages per request. Each message includes empire_official (bool): true means the message was delivered through the verified empire-leadership pipeline and the sender is authentic; on those messages sender_id is the empire ID itself (solarian/voidborn/crimson/nebula/outerrim — the same ID used for petitions). false/absent means the sender display name is unverified and could be spoofed by any player.

**Example:** `POST /api/v2/spacemolt_social/get_chat_history` with body `{"target":"system","limit":50}`

## Request body

- object
  - `after` string: RFC3339 timestamp - return only messages strictly newer than this. Pass the timestamp of your last-seen message to poll for just what's new.
  - `before` string: RFC3339 timestamp for cursor-based pagination - get messages before this time
  - `limit` integer: Max messages to return (default 50, max 100)
  - `target` 'system' | 'local' | 'faction' | 'private' | 'emergency', required: Chat channel to get history for (system, local, faction, private, emergency)
  - `target_id` string: Player ID or username, or the sender_id of an empire or NPC authority DM (such as the Interstellar Revenue Service), for one conversation when channel=private. Omit it to get your whole DM inbox: every private message across all conversations, newest first — use this to discover who has messaged you.

## Response `200`

Result. structuredContent type: GetChatHistoryResponse

- intersection
  - [`V2Response`](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395/schema?at=%2Fcomponents%2Fschemas%2FV2Response)
  - object
    - `structuredContent` GetChatHistoryResponse
      - `channel` string, required
      - `has_more` boolean, required
      - `messages` ChatHistoryMessage[], required
        - `channel` string, required
        - `content` string, required
        - `empire_official` boolean
        - `faction_id` string
        - `id` string, required
        - `poi_id` string
        - `sender` string, required
        - `sender_id` string, required
        - `system_id` string
        - `target_id` string
        - `target_name` string
        - `tax_statement` TaxStatement: Structured weekly tax statement when this message is a tax assessment. Omitted for other messages and older notices.
          - `assessed_at` string, date-time, required: UTC time this weekly personal assessment completed.
          - `inactivity_exempt` boolean, required: True when this character was exempt from weekly personal taxes for inactivity during this period.
          - `income` TaxStatementIncome[], required: Income assessments in citizenship order; empires with zero net tax are omitted.
            - `brackets` IncomeTaxBracketBreakdown[], required: Progressive bracket calculations at assessment time; empty or null for a flat rate.
              - …
            - `credit` integer, required: Foreign tax credit derived from prior empires net obligations and this empire deduction policy in credits.
            - `empire` string, required: Empire assessing this income tax.
            - `gross` integer, required: Income tax before foreign tax credit in credits.
            - `owed` integer, required: Gross minus credit with a floor of zero in credits.
            - `paid` integer, required: Credits collected for this empire income tax; zero in preview mode.
            - `rate_bps` integer, required: Nominal flat rate or gross tax divided by taxable income times 10000 for progressive tax; 100 basis points equals one percent.
            - `unpaid` integer, required: Owed minus paid in credits during collection; zero in preview mode.
          - `income_by_category` object, required: Gross earnings by income category in credits; missing categories contributed zero.
          - `income_gross` integer, required: Gross taxable earnings sampled since the previous income assessment in credits before market deductions.
          - `loss_carryforward_next` integer, required: Unused market deduction carried into the next assessment in credits.
          - `loss_carryforward_previous` integer, required: Market loss carried into this assessment in credits; any unused portion remains in loss_carryforward_next.
          - `market_deduction` integer, required: Market purchases plus incoming loss applied against market sales in credits; never offsets nonmarket income.
          - `market_purchases` integer, required: Deductible market purchases sampled this period in credits.
          - `paid_from_prepaid` integer, required: Credits consumed from the personal prepaid tax pool across income then property collection.
          - `paid_from_wallet` integer, required: Credits consumed from the wallet after available prepayment across income then property collection.
          - `period_started_at` string, date-time, required: Previous weekly assessment boundary in UTC; zero time means this character has no previous weekly boundary.
          - `preview` boolean, required: True when collection was disabled; obligations are estimates and no new debt is created.
          - `property` TaxStatementProperty[], required: Property assessments in citizenship order; empires with zero tax are omitted.
            - `brackets` IncomeTaxBracketBreakdown[], required: Progressive bracket calculations at assessment time; empty or null for a flat rate.
              - …
            - `empire` string, required: Empire assessing this property tax.
            - `owed` integer, required: Property tax owed to this empire in credits; there is no foreign property tax credit.
            - `paid` integer, required: Credits collected for this empire property tax; zero in preview mode.
            - `rate_bps` integer, required: Nominal flat rate or tax divided by property value times 10000 for progressive tax; 100 basis points equals one percent.
            - `unpaid` integer, required: Owed minus paid in credits during collection; zero in preview mode.
          - `property_value` integer, required: Sum of owned ship hull and fitted module assessed values in credits.
          - `refund` integer, required: Unused prepaid credits returned to the wallet after this assessment.
          - `ships` TaxStatementShip[], required: Owned ships valued at assessment time; an empty list means no assessed ships.
            - `ship_id` string, required: Owned ship identifier at assessment time.
            - `value` integer, required: Assessed hull plus fitted module value in credits.
          - `taxable_income` integer, required: Assessed income in credits. Nonmarket income is income_gross minus income_by_category.market with a floor of zero. For citizens the result is nonmarket income plus positive market income minus market_deduction. Missing market means zero. Stateless assessments report income_gross. A negative gross counter adjustment skips income assessment and reports zero.
          - `tick` integer, required: Server tick of this assessment.
          - `total_owed` integer, required: Sum of income and property owed in credits for this assessment only.
          - `total_paid` integer, required: Sum of income and property paid in credits; equals paid_from_prepaid plus paid_from_wallet.
          - `total_unpaid` integer, required: Unpaid credits from this assessment only; zero in preview mode. Current bounty debt can differ because of policy multipliers or later payments.
        - `timestamp_utc` string, required
      - `total_count` integer, required

## Other responses

- `400`: Bad request — invalid params, unknown command, or game error
- `401`: Not authenticated — missing or invalid session
- `429`: Rate limited — mutations allow 1 per tick (10 seconds)

## Changes

- **2026-12-03** `45f3b5ae6395`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/fuel` to the response with the `200` status
- **2026-11-21** `8963ce127c51`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/bearing` to the response with the `200` status
- **2026-11-21** `34c47c451de9`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_exchange_fill]/counterparty` to the response with the `200` status
- **2026-11-13** `f4102920e5e1`: 2 warning, 1 info
  - removed the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_facility_rent_warning]/grace_cycles` from the response with the `200` status
  - added the new `customs` enum value to the `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_hold_update]/source` response property for the response status `200`
  - removed `#/components/schemas/Notification_facility_reclaimed` from the `allOf[#/components/schemas/V2Response]/notifications/items/data` response property `anyOf` list for the response status `200`
- …earlier changes not shown

[Operation history](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/changes/api/v2/spacemolt_social/get_chat_history/post.md)

---

[API](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2.md) - [All operations](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395?raw)
