Messages

Retrieve a message

Note: This API endpoint can only retrieve messages that are no older than 10 days since their creation. If you require messages older than this, please generate an MDR report.

get/messages/{id}

Path parameters

idstring uuid required

The id of the message

Response

Successful response with details of a message.

Example response

{
  "data": {
    "record_type": "message",
    "direction": "outbound",
    "id": "40385f64-5717-4562-b3fc-2c963f66afa6",
    "type": "MMS",
    "messaging_profile_id": "4000eba1-a0c0-4563-9925-b25e842a7cb6",
    "organization_id": "b448f9cc-a842-4784-98e9-03c1a5872950",
    "from": {
      "phone_number": "+18445550001",
      "carrier": "TELNYX LLC",
      "line_type": "VoIP"
    },
    "to": [
      {
        "phone_number": "+18665550001",
        "status": "queued",
        "carrier": "T-MOBILE USA, INC.",
        "line_type": "Wireless"
      }
    ],
    "cc": [],
    "text": "Hello, World!",
    "num_chars": 13,
    "subject": "From Telnyx!",
    "media": [
      {
        "url": "https://pbs.twimg.com/profile_images/1142168442042118144/AW3F4fFD_400x400.png",
        "content_type": null,
        "sha256": null,
        "size": null
      }
    ],
    "webhook_url": "https://www.example.com/hooks",
    "webhook_failover_url": "https://backup.example.com/hooks",
    "encoding": "GSM-7",
    "parts": 1,
    "tags": [
      "Greetings"
    ],
    "cost": {
      "amount": "0.0051",
      "currency": "USD"
    },
    "cost_breakdown": {
      "carrier_fee": {
        "amount": "0.00305",
        "currency": "USD"
      },
      "rate": {
        "amount": "0.00205",
        "currency": "USD"
      }
    },
    "tcr_campaign_id": "TCPA3X7",
    "tcr_campaign_billable": true,
    "tcr_campaign_registered": "REGISTERED",
    "received_at": "2019-01-23T18:10:02.574Z",
    "sent_at": null,
    "completed_at": null,
    "valid_until": null,
    "errors": [],
    "wait_seconds": 0.5
  }
}

Changes

Changed in 5 of the 99 revisions of this API.1214

    • ○

      added the optional property ///// to the response with the status

      response-optional-property-added

  • d18924181c6e11See the full diff
    • ▲

      added to the response property oneOf list for the response status

      response-property-one-of-added

    • ○

      removed from the response property oneOf list for the response status

      response-property-one-of-removed

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • a6a61a29ecdd311See the full diff
    • ▲

      the response property ////// became nullable for the status

      response-property-became-nullable

    • ▲

      the response property ////// became nullable for the status

      response-property-became-nullable

    • ▲

      response property data/oneOf[messaging_InboundMessagePayload]/to list-of-types was widened by adding types string to media type application/json of response 200

      response-property-list-of-types-widened

    • ●

      added the new WHATSAPP enum value to the ///// response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property ///// to the response with the status

      response-optional-property-added

    This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ▲

      the response's body type changed from object to no type for status

      response-body-type-changed

    • ▲

      the / response's property type changed from object to no type for status

      response-property-type-changed

    • ▲

      the // response's property type changed from integer to string, and format from int32 to no format for status

      response-property-type-changed

    This revision also has 64 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ▲

      the response's body type changed from no type to object for status

      response-body-type-changed

    • ▲

      added to the response property oneOf list for the response status

      response-property-one-of-added

    • ▲

      the / response's property type changed from no type to object for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the /// response's property format changed from json-pointer to no format for status

      response-property-type-changed

    • ○

      removed from the response property oneOf list for the response status

      response-property-one-of-removed

    This revision also has 41 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 99 revisions, 1 has no diff computed.