Skip to main content
GET
/
messages
/
{messageId}
/
attachments
/
{attachmentId}
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 messageAttachment = await client.messages.attachments.retrieve(
  'iatt_01kabn43yqyxn2bx4ve84mczd3',
  { messageId: 'imsg_01kabn43yqyxn2bx4ve84mczd3' },
);

console.log(messageAttachment.id);
{
  "data": {
    "id": "<string>",
    "createdAt": "<string>",
    "filename": "<string>",
    "contentType": "<string>",
    "size": 123,
    "contentDisposition": "<string>",
    "contentId": "<string>",
    "url": "<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"

attachmentId
string
required

The id of the attachment

Example:

"iatt_01kabn43yqyxn2bx4ve84mczd3"

Response

Successful response.

data
object
required