List messages
client.message.list(MessageListParams { limit, offset } query?, RequestOptionsoptions?): MessageListResponse { data, object, totalCount }
GET/v1/messages
Returns a paginated list of messages. Results are sorted by when the record was created in Lightfield (createdAt), newest first. This is not the time the message was sent. Use offset and limit to paginate through results. Each message is filtered per caller to those whose channel they may see, and includes a read-only accessLevel. See List endpoints for more information about pagination.
Required scope: messages:read
Rate limit category: Search
List messages
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const messageListResponse = await client.message.list();
console.log(messageListResponse.data);{
"data": [
{
"id": "msg_cm0abc456def789",
"accessLevel": "FULL",
"createdAt": "2026-05-01T09:00:00.000Z",
"fields": {
"$text": {
"value": "Thanks — pushed the fix, should be live shortly.",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-05-01T08:59:30.000Z",
"valueType": "DATETIME"
},
"$provider": {
"value": "SLACK",
"valueType": "TEXT"
},
"$providerThreadId": {
"value": "1714553970.123456",
"valueType": "TEXT"
},
"$editedAt": {
"value": "string",
"valueType": "DATETIME"
}
},
"httpLink": null,
"objectType": "message",
"relationships": {
"$channel": {
"cardinality": "has_one",
"objectType": "channel",
"values": [
"chn_cm2def456ghi789"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$attachment": {
"cardinality": "has_many",
"objectType": "file",
"values": [
"fil_cm3attach789xyz012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-05-01T09:00:00.000Z",
"externalId": "externalId"
},
{
"id": "msg_cm1xyz123uvw456",
"accessLevel": "FULL",
"createdAt": "2026-04-29T15:12:00.000Z",
"fields": {
"$text": {
"value": "Can we sync on pricing tomorrow?",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-04-29T15:11:30.000Z",
"valueType": "DATETIME"
},
"$provider": {
"value": "SLACK",
"valueType": "TEXT"
},
"$providerThreadId": {
"value": "string",
"valueType": "TEXT"
},
"$editedAt": {
"value": "string",
"valueType": "DATETIME"
}
},
"httpLink": null,
"objectType": "message",
"relationships": {
"$channel": {
"cardinality": "has_one",
"objectType": "channel",
"values": [
"chn_cm2def456ghi789"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$attachment": {
"cardinality": "has_many",
"objectType": "file",
"values": [
"fil_cm3attach789xyz012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-04-29T15:12:00.000Z",
"externalId": "externalId"
}
],
"object": "list",
"totalCount": 2
}Returns Examples
{
"data": [
{
"id": "msg_cm0abc456def789",
"accessLevel": "FULL",
"createdAt": "2026-05-01T09:00:00.000Z",
"fields": {
"$text": {
"value": "Thanks — pushed the fix, should be live shortly.",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-05-01T08:59:30.000Z",
"valueType": "DATETIME"
},
"$provider": {
"value": "SLACK",
"valueType": "TEXT"
},
"$providerThreadId": {
"value": "1714553970.123456",
"valueType": "TEXT"
},
"$editedAt": {
"value": "string",
"valueType": "DATETIME"
}
},
"httpLink": null,
"objectType": "message",
"relationships": {
"$channel": {
"cardinality": "has_one",
"objectType": "channel",
"values": [
"chn_cm2def456ghi789"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$attachment": {
"cardinality": "has_many",
"objectType": "file",
"values": [
"fil_cm3attach789xyz012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-05-01T09:00:00.000Z",
"externalId": "externalId"
},
{
"id": "msg_cm1xyz123uvw456",
"accessLevel": "FULL",
"createdAt": "2026-04-29T15:12:00.000Z",
"fields": {
"$text": {
"value": "Can we sync on pricing tomorrow?",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-04-29T15:11:30.000Z",
"valueType": "DATETIME"
},
"$provider": {
"value": "SLACK",
"valueType": "TEXT"
},
"$providerThreadId": {
"value": "string",
"valueType": "TEXT"
},
"$editedAt": {
"value": "string",
"valueType": "DATETIME"
}
},
"httpLink": null,
"objectType": "message",
"relationships": {
"$channel": {
"cardinality": "has_one",
"objectType": "channel",
"values": [
"chn_cm2def456ghi789"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$attachment": {
"cardinality": "has_many",
"objectType": "file",
"values": [
"fil_cm3attach789xyz012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-04-29T15:12:00.000Z",
"externalId": "externalId"
}
],
"object": "list",
"totalCount": 2
}