Outpost logoOutpost Docs

Get messages for a specific communication

GET
/v1/communications/{communicationId}/messages
x-api-key<token>

Project-scoped API key. Keys carry either the ADMIN or TENANT role; a route additionally requires that the key's role is listed in its x-required-roles. Machine-to-machine callers should use this.

In: header

Path Parameters

communicationId*string

Query Parameters

limit?string
Default"20"
cursor?string
status?string

Value in

  • "PENDING"
  • "QUEUED"
  • "SENT"
  • "CARRIER_ROUTING"
  • "DELIVERED"
  • "FAILED"
  • "BLOCKED"
direction?string

Value in

  • "INBOUND"
  • "OUTBOUND"
search?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/communications/string/messages"
{  "items": [    {      "messageId": "string",      "tenantId": "string",      "projectId": "string",      "clientPhoneNumber": "string",      "body": "string",      "sentBody": "string",      "complianceFooter": {        "type": "REPLY",        "reasons": [          "SHARED_ROUTE_COVERAGE"        ],        "appendedText": "string"      },      "status": "PENDING",      "direction": "string",      "campaignId": "string",      "outpostPhoneNumber": "string",      "communicationId": "string",      "bypassOptOutCheck": true,      "attemptCount": 0,      "maxAttempts": 0,      "lastAttemptAt": 0,      "lastErrorMessage": "string",      "attemptHistory": [        {          "at": 0,          "status": "SENT",          "errorCode": "string",          "errorMessage": "string",          "providerMessageId": "string",          "providerMessageStatusDescription": "string",          "providerMessagePrice": 0,          "providerMessageCarrierFee": 0,          "providerTotalMessageParts": 0,          "outpostPhoneNumber": "string"        }      ],      "totalMessageParts": 0,      "totalCost": 0,      "createdAt": 0,      "updatedAt": 0,      "isSettled": true,      "metadata": {        "property1": "string",        "property2": "string"      }    }  ],  "cursor": "string",  "hasMore": true}