List messages

Get a paginated list of messages in a conversation.

Get a paginated list of messages in a conversation. Results are ordered newest-first. Use direction to filter to inbound or outbound messages only.

GET/v1/conversations/{id}/messages

Path Parameters

idstring

Query Parameters

direction?string
Value in"inbound" | "outbound"
cursor?string
limit?integer
Default50
Range1 <= value <= 200

Response Body

fetch("https://api.outstand.so/v1/conversations/string/messages?direction=inbound&cursor=string&limit=50", {  method: "GET"})
{
  "success": true,
  "data": [
    {
      "id": "3kPqR",
      "conversationId": "string",
      "platformMessageId": "string",
      "direction": "inbound",
      "senderId": "string",
      "content": "string",
      "mediaUrls": [
        "string"
      ],
      "status": "pending",
      "error": "string",
      "scheduledAt": "2019-08-24T14:15:22Z",
      "platformSentAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": 0,
    "limit": 0
  }
}
{
  "success": false,
  "error": "Conversation not found"
}
{
  "success": false,
  "error": "Internal server error"
}