latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Outbound Messages

Get a single message

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Messages%3A%20Send%0A/getOutboundMessage" target="_blank">Try in sandbox</a><br>Get a single outgoing message.

get/api/v2/messages/{id}

Path parameters

idinteger required

Response

Returned when successful.

idinteger required

Message ID.

senderstring nullable

Message sender (phone number or alphanumeric Sender ID).

receiverstring

Recipient`s phone number.

textstring required
status'q' | 's' | 'e' | 'r' | 'a' | 'd' | 'b' | 'f' | 'u' | 'j' | 'i' | 'p' | 'h' required

Delivery status of the message. See message delivery statuses for details.

rejectReason'a' | 'f' | 'l' | 'c' | 'u' | 'b' | 's' | 'm' | 'n' | 'i' | 'if' | 'd' | 't' | 'e' | 'h' | 'k' | 'r' | 'g' | 'j' | 'w' | 'v' | 'q' | 'x' | 'o' | 'p'

Rejection reason.

contactIdinteger nullable required

Recipient contact ID.

sessionIdinteger nullable required

Message Session ID of a message.

messageTimestring date-time required

Sending time.

avatarstring nullable required
deletedboolean

Indicates that the message has been deleted.

deliveredAtstring date-time nullable

Time when message was delivered.

charsetstring nullable required

Message charset. Could be:

  • ISO-8859-1 for plaintext SMS;
  • UTF-16BE for Unicode SMS.
charsetLabelstring nullable required

Human-readable message charset label. Could be:

  • ISO-8859-1 for plaintext SMS;
  • UTF-16BE for Unicode SMS;
  • Voice for voice services (Text-to-Speech or Voice Broadcast) messages.
firstNamestring nullable required

Contact first name. Could be substituted from your Contacts (even if you submitted the phone number instead of the contact ID).

lastNamestring nullable required

Contact last name.

countrystring nullable required

The 2-letter ISO country code of the recipient's phone number.

phonestring nullable

Receipent`s phone number.

pricenumber float nullable

Message price.

partsCountinteger nullable required

Message parts (multiples of 160 characters) count.

fromEmailstring nullable

The user email which this message came from. For Email2SMS and Distribution Lists the messages, it is an original email address - in other cases, it is an account email address.

fromNumberstring nullable

The Phone number used to send the SMS.

Example response

{
  "id": 4991,
  "text": "I love Textmagic!",
  "status": "d",
  "rejectReason": "a",
  "contactId": 2764,
  "sessionId": 3122,
  "messageTime": "2019-08-12T11:43:37+0000",
  "avatar": "avatars/dummy_avatar.png",
  "deliveredAt": "2026-05-18T19:25:45+0000",
  "charset": "ISO-8859-1",
  "charsetLabel": "ISO-8859-1",
  "firstName": "John",
  "lastName": "Conway",
  "country": "US",
  "phone": "447624800500",
  "price": 0.025,
  "partsCount": 6,
  "fromEmail": "test@email.com",
  "fromNumber": "447624800500"
}