Skip to main content
GET
/
messages
/
{messageId}
/
content
JavaScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});

const messageContent = await client.messages.content.retrieve('imsg_01kabn43yqyxn2bx4ve84mczd3');

console.log(messageContent.html);
{
  "data": {
    "text": {
      "downloadUrl": "<string>",
      "size": 123,
      "expiresAt": "<string>"
    },
    "html": {
      "downloadUrl": "<string>",
      "size": 123,
      "expiresAt": "<string>"
    },
    "mime": {
      "downloadUrl": "<string>",
      "size": 123,
      "expiresAt": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Path Parameters

messageId
string
required

The id of the message

Example:

"imsg_01kabn43yqyxn2bx4ve84mczd3"

Query Parameters

format
enum<string>[]

Content formats to retrieve. Defaults to html only.

Available options:
html,
text,
mime

Response

Successful response.

data
object
required