Skip to main content
POST
/
newsletters
curl -X POST "https://api.tktchurch.com/v1/newsletters" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "January Church Updates",
    "content": "Welcome to our first newsletter of 2024...",
    "imageId": "file-123",
    "pdfId": "file-456",
    "status": "draft",
    "publishDate": "2024-01-01T12:00:00Z"
  }'
{
  "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": "draft",
  "publishDate": "2024-01-01T12:00:00Z",
  "recipientCount": 0,
  "createdAt": "2023-12-30T15:00:00Z",
  "updatedAt": "2023-12-30T15:00:00Z",
  "createdBy": "user-123e4567-e89b-12d3-a456-426614174000"
}
This endpoint requires authentication and the createNewsletter permission.

Request Body

title
string
required
Newsletter title
content
string
required
Newsletter content
imageId
string
ID of the uploaded image file
imageUrl
string
External image URL if not using uploaded file
pdfId
string
ID of the uploaded PDF file
pdfUrl
string
External PDF URL if not using uploaded file
status
string
default:"draft"
Newsletter status. One of: draft, scheduled, published, archived
publishDate
string
Scheduled publication date (ISO 8601)

Response

id
string
Unique identifier for the newsletter (UUID)
title
string
Newsletter title
content
string
Newsletter content
image
object
Uploaded image file information
imageUrl
string
External image URL if not using uploaded file
pdf
object
Uploaded PDF file information
pdfUrl
string
External PDF URL if not using uploaded file
hasPdf
boolean
Whether the newsletter has an associated PDF
status
string
Newsletter status. One of: draft, scheduled, published, archived
publishDate
string
Scheduled or actual publication date (ISO 8601)
recipientCount
integer
Number of times the newsletter has been viewed/received (starts at 0)
createdAt
string
Creation timestamp (ISO 8601)
updatedAt
string
Last update timestamp (ISO 8601)
createdBy
string
UUID of the user who created the newsletter

Error Responses

error
object
Error details when the request fails
Common error cases:
  • 400 Bad Request: Invalid request body or validation error
  • 401 Unauthorized: Missing or invalid access token
  • 403 Forbidden: Missing required permission
curl -X POST "https://api.tktchurch.com/v1/newsletters" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "January Church Updates",
    "content": "Welcome to our first newsletter of 2024...",
    "imageId": "file-123",
    "pdfId": "file-456",
    "status": "draft",
    "publishDate": "2024-01-01T12:00:00Z"
  }'
{
  "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": "draft",
  "publishDate": "2024-01-01T12:00:00Z",
  "recipientCount": 0,
  "createdAt": "2023-12-30T15:00:00Z",
  "updatedAt": "2023-12-30T15:00:00Z",
  "createdBy": "user-123e4567-e89b-12d3-a456-426614174000"
}