latestOpenAPI 3.0.2MIT2026-08-1745267541.8 KB

bdb3e0c48bf7

Messages

List messages by channel identity

Retrieves the last message sent to specified channel identities. In CONVERSATION_SOURCE mode, you can query either by channel_identities or by contact_ids. Note: Use either contact_ids OR channel_identities per request, not both. DISPATCH_SOURCE mode does not support contact_ids.

post/v1/projects/{project_id}/messages:fetch-last-message

Request body

channel_identitiesstring[]

Optional. Filter messages by channel_identity.

contact_idsstring[]

Optional. Resource name (id) of the contact. In case the messages source is set to CONVERSATION_SOURCE: Can list last messages by contact_id. In case the messages source is set to DISPATCH_SOURCE: The field is unsupported and cannot be set.

app_idstring

Optional. Resource name (id) of the app.

messages_source'CONVERSATION_SOURCE' | 'DISPATCH_SOURCE'

Specifies the message source for which the request will be processed. Used for operations on messages in Dispatch Mode. For more information, see Processing Modes.

page_sizeinteger

Optional. Maximum number of messages to fetch. Defaults to 10 and the maximum is 1000.

page_tokenstring

Optional. Next page token previously returned if any.

view'WITH_METADATA' | 'WITHOUT_METADATA'

Optional. Specifies the representation in which messages should be returned. Default to WITH_METADATA.

start_timestring date-time

Optional. Only fetch messages with accept_time after this date.

end_timestring date-time

Optional. Only fetch messages with accept_time before this date.

channel'SMS' | 'RCS' | 'WHATSAPP' | 'MMS' | 'KAKAOTALK' | 'KAKAOTALKCHAT' | 'VIBERBM' | 'LINE' | 'INSTAGRAM' | 'MESSENGER' | 'WECHAT' | 'TELEGRAM' | 'APPLEBC'

The identifier of the channel you want to include. Must be one of the enum values.

direction'TO_APP' | 'TO_CONTACT'

The direction of the message flow, indicating whether the message was sent to or from the Conversation API app.

Example request

{
  "channel": "WHATSAPP",
  "direction": "TO_CONTACT"
}

Response

A successful response.

next_page_tokenstring

Token that should be included in the next request to fetch the next page.