GET
/
v1
/
messages

Query Parameters

phoneNumberId
string
required

The unique identifier of the OpenPhone number used to send or receive the messages. PhoneNumberID can be retrieved via the Get Phone Numbers endpoint.

userId
string

The unique identifier of the user the message was sent from.

participants
string[]
required

Array of phone numbers involved in the conversation, excluding your OpenPhone number, in E.164 format.

since
string
deprecated

DEPRECATED, use "createdAfter" or "createdBefore" instead. "since" currently behaves as "createdBefore" and will be removed in an upcoming release.

createdAfter
string

Filter results to only include messages created after the specified date and time, in ISO_8601 format.

createdBefore
string

Filter results to only include messages created before the specified date and time, in ISO_8601 format.

maxResults
integer
default: 10required

Maximum number of results to return per page.

Required range: 1 < x < 100
pageToken
string

Response

200 - application/json
data
object[]
required

Array of items

totalItems
integer
required

Total number of items available. ⚠️ Note: totalItems is not accurately returning the total number of items that can be paginated. We are working on fixing this issue.

nextPageToken
string | null
required