List the messages of a campaign
Changed onRetrieve a paginated list of the messages of a campaign, one per recipient and per step, ordered by step. Messages to deleted contacts are listed with recipient.contact: null.<br/><Warning>This endpoint is currently in open beta. The API surface may change as we iterate based on feedback.</Warning>
Request
- Base URLhttps://api.folk.app
- URLhttps://api.folk.app/v1/campaigns/{campaignId}/messages
- AuthHTTP bearer
Path parameters
The ID of the campaign.
Query parameters
The number of items to return.
A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the pagination.nextLink value returned in a previous response to request subsequent results.
Only list the messages of the step at this position.
Only list the messages to this person or company. Messages to deleted contacts match no recipient.
Only list the messages with this status. One of: draft, sent, not_sent.
Response
A page of messages of the campaign.
Example response
{
"data": {
"items": [
{
"id": "msg_1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"campaignId": "cmp_9b2f1c1e-2b8a-4d1e-8f5a-3c2d1e0f9a8b",
"step": 1,
"recipient": {
"contact": {
"id": "per_55175e81-9a52-4ac3-930e-82792c23499b",
"entityType": "person"
},
"name": "John Doe",
"email": "john.doe@example.com"
},
"sender": {
"id": "snd_4c3b2a19-8f7e-4d6c-9b5a-1e2f3d4c5b6a",
"email": "john.doe@example.com",
"displayName": "John Doe"
},
"subject": "Quick question, John",
"body": "<p>Hi John,</p><p>{{signature}}</p>",
"cc": [],
"bcc": [],
"status": "draft",
"notSentReason": null,
"unsubscribed": false
}
],
"pagination": {
"nextLink": "https://api.folk.app/v1/campaigns/cmp_9b2f1c1e-2b8a-4d1e-8f5a-3c2d1e0f9a8b/messages?limit=20&cursor=eyJvZmZzZXQiOjIwfQ%3D%3D"
}
},
"deprecations": [
"This field is deprecated"
]
}Changes
- info
endpoint added
- info