curl -X GET "https://api.tktchurch.com/v1/newsletters?page=1&per=10" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "January Church Updates",
"content": "Welcome to our first newsletter of 2024...",
"image": {
"id": "file-123",
"url": "https://cdn.tktchurch.com/files/newsletter-image.jpg"
},
"imageUrl": null,
"pdf": {
"id": "file-456",
"url": "https://cdn.tktchurch.com/files/newsletter.pdf"
},
"pdfUrl": null,
"hasPdf": true,
"status": "published",
"publishDate": "2024-01-01T12:00:00Z",
"recipientCount": 150,
"createdAt": "2023-12-30T15:00:00Z",
"updatedAt": "2024-01-01T12:00:00Z",
"createdBy": "user-123e4567-e89b-12d3-a456-426614174000"
}
],
"metadata": {
"page": 1,
"per": 10,
"total": 45
}
}
Newsletters
List Newsletters
Returns a paginated list of newsletters
GET
/
newsletters
curl -X GET "https://api.tktchurch.com/v1/newsletters?page=1&per=10" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "January Church Updates",
"content": "Welcome to our first newsletter of 2024...",
"image": {
"id": "file-123",
"url": "https://cdn.tktchurch.com/files/newsletter-image.jpg"
},
"imageUrl": null,
"pdf": {
"id": "file-456",
"url": "https://cdn.tktchurch.com/files/newsletter.pdf"
},
"pdfUrl": null,
"hasPdf": true,
"status": "published",
"publishDate": "2024-01-01T12:00:00Z",
"recipientCount": 150,
"createdAt": "2023-12-30T15:00:00Z",
"updatedAt": "2024-01-01T12:00:00Z",
"createdBy": "user-123e4567-e89b-12d3-a456-426614174000"
}
],
"metadata": {
"page": 1,
"per": 10,
"total": 45
}
}
This endpoint requires authentication and the
readNewsletter permission.Query Parameters
Page number for pagination
Number of newsletters per page
Response
Array of newsletter objects
Show Newsletter Object
Show Newsletter Object
Unique identifier for the newsletter (UUID)
Newsletter title
Newsletter content
External image URL if not using uploaded file
External PDF URL if not using uploaded file
Whether the newsletter has an associated PDF
Newsletter status. One of:
draft, scheduled, published, archivedScheduled or actual publication date (ISO 8601)
Number of times the newsletter has been viewed/received
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
UUID of the user who created the newsletter
Error Responses
Common error cases:
- 401 Unauthorized: Missing or invalid access token
- 403 Forbidden: Missing required permission
curl -X GET "https://api.tktchurch.com/v1/newsletters?page=1&per=10" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "January Church Updates",
"content": "Welcome to our first newsletter of 2024...",
"image": {
"id": "file-123",
"url": "https://cdn.tktchurch.com/files/newsletter-image.jpg"
},
"imageUrl": null,
"pdf": {
"id": "file-456",
"url": "https://cdn.tktchurch.com/files/newsletter.pdf"
},
"pdfUrl": null,
"hasPdf": true,
"status": "published",
"publishDate": "2024-01-01T12:00:00Z",
"recipientCount": 150,
"createdAt": "2023-12-30T15:00:00Z",
"updatedAt": "2024-01-01T12:00:00Z",
"createdBy": "user-123e4567-e89b-12d3-a456-426614174000"
}
],
"metadata": {
"page": 1,
"per": 10,
"total": 45
}
}
⌘I
