Messages
List a message's attachments
List every file carried on a sent or received message — metadata only; fetch each file’s content with messages.attachment.
GET
/
messages
/
{id}
/
attachments
import { createClient } from "@norbelys/sdk";
const norbelys = createClient({ apiKey: process.env.NORBELYS_API_KEY });
const { data, error } = await norbelys.messages.attachments("msg_a2qzmfyrdj0e");
if (error) {
throw new Error(error.error.message);
}
console.log(data);{
"data": [
{
"contentType": "application/pdf",
"filename": "invoice.pdf",
"id": "<string>",
"size": 13264,
"contentId": "<string>",
"disposition": "<string>"
}
],
"hasMore": true,
"object": "list"
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}Authorizations
Org-scoped Norbelys API key. Create one in Settings → API keys and send it as Authorization: Bearer ak_….
Path Parameters
The resource id (path).
Was this page helpful?
⌘I
import { createClient } from "@norbelys/sdk";
const norbelys = createClient({ apiKey: process.env.NORBELYS_API_KEY });
const { data, error } = await norbelys.messages.attachments("msg_a2qzmfyrdj0e");
if (error) {
throw new Error(error.error.message);
}
console.log(data);{
"data": [
{
"contentType": "application/pdf",
"filename": "invoice.pdf",
"id": "<string>",
"size": 13264,
"contentId": "<string>",
"disposition": "<string>"
}
],
"hasMore": true,
"object": "list"
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}{
"error": {
"code": "invalid_param",
"message": "<string>",
"type": "invalid_request",
"doc_url": "<string>",
"hint": "<string>"
}
}