Streams

Get incoming messages

Changed on

List incoming (inbound) messages for your account, newest first. Supports pagination and filtering by stream, sender phone number, and date range.

Pagination. page (1-based, default 1) and itemsPerPage (default 30). The response is { "items": [ ... ], "total": N }, but total is not reliable here: page until items comes back shorter than itemsPerPage.

Authentication: TextPeak API key in the Authorization header (see Authentication in the API Overview).

get/streams/incoming_messages

Request

  • Base URL
    https://api.commpeak.com/textpeak
  • URL
    https://api.commpeak.com/textpeak/streams/incoming_messages
  • Auth
    API key in header Authorization

Query parameters

pageinteger nullable

Page number (1-based).

itemsPerPageinteger nullable

Items per page.

streamIdinteger nullable

Only messages received on this stream ID.

phonestring nullable

Sender's phone number contains this text.

startDatestring nullable

Received at or after this time (UTC).

endDatestring nullable

Received at or before this time (UTC).

Response

Successful Response

totalunknown

Example response

{
  "items": [
    {
      "contact_name": "John Doe",
      "content": {
        "body": "STOP",
        "type": "text"
      },
      "conversation": {
        "uuid": "e2a489db-bb8a-4f51-9692-726153599c57"
      },
      "country_code": 230,
      "country_iso2": "US",
      "country_name": "USA",
      "from": "12125551234",
      "message_type": "text",
      "message_uuid": "c4fff8ff-086a-4498-885f-760af8714eeb",
      "received_at": "2026-03-19 10:20:04",
      "stream": {
        "name": "Marketing US",
        "type": "TWO_WAY",
        "uuid": "9f1c2d3e4b5a6789c0d1e2f3a4b5c6d7"
      },
      "to": "CommPeak",
      "type": "SMS"
    }
  ],
  "total": 128
}

Changes

    • breaking

      for the query request parameter itemsPerPage, default value 30 was added

    • breaking

      for the query request parameter page, default value 1 was added

    • breaking

      response property items/items/contact_name list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/country_code list-of-types was widened by adding types integer and null to media type application/json of response 200

    • breaking

      response property items/items/country_iso2 list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/country_name list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/from list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/message_uuid list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/received_at list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property items/items/to list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      the // response's property type changed from string to no type for status

    • breaking

      the // response's property type changed from string to no type for status

    • breaking

      the response's property type changed from integer to no type for status

    • warning

      deleted the query request parameter destination

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      api operation id getIncomingMessages removed and replaced with list_incoming_messages

    • info

      the endpoint scheme security APIKeyHeader was added to the API

    • info

      query request parameter endDate list-of-types was widened by adding types null

    • info

      query request parameter itemsPerPage list-of-types was widened by adding types null

    • info

      query request parameter page list-of-types was widened by adding types null

    • info

      query request parameter phone list-of-types was widened by adding types null

    • info

      query request parameter startDate list-of-types was widened by adding types null

    • info

      query request parameter streamId list-of-types was widened by adding types null

    • info

      for the query request parameter endDate, the type was generalized from string to no type

    • info

      for the query request parameter itemsPerPage, the type was generalized from integer to no type

    • info

      for the query request parameter page, the type was generalized from integer to no type

    • info

      for the query request parameter phone, the type was generalized from string to no type

    • info

      for the query request parameter startDate, the type was generalized from string to no type

    • info

      for the query request parameter streamId, the type was generalized from integer to no type

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      added subschema #1 subschema #2 to the response property anyOf list for the response status

    • info

      the response property became required for the status