API ReferenceMessages
Get messages for a specific phone number
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
phone*string
Phone number in E.164 format (e.g., +12488778283)
Match
^\+[1-9]\d{1,14}$Query Parameters
limit?string
Default
"20"cursor?string
tenantId?string
projectId?string
status?string
Value in
- "PENDING"
- "QUEUED"
- "SENT"
- "CARRIER_ROUTING"
- "DELIVERED"
- "FAILED"
- "BLOCKED"
direction?string
Value in
- "INBOUND"
- "OUTBOUND"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/phones/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}