Data handling and security
A church’s teaching belongs to the church. The API is built so that a key reaches one church, sees only what the church has approved, and can be limited, rotated and revoked.
Whose data it is#
Teachings, transcripts, notes, questions, team access and usage belong to the church that added them. Your church’s private teaching and drafts are used to serve your church, not to train public models. This is the same statement as in the privacy policy and on trust and security, which are the places to read the full terms.
What the API returns#
- Approved content only, for reading. Keys that only read see teachings that have an approved note, and approved notes. Drafts and notes still in review are not returned to them.
- Keys that add content (
teachings:ingest,notes:generate) can also see the teachings and drafts that their own work creates, so that they can follow progress. - Conversations are private to the key that started them. Another key, even in the same church, cannot read them.
- No member directory. The API works with teachings, notes, questions and answers. It has no routes for members or accounts.
Church isolation#
- A key belongs to one church. Every route includes the church slug, and any other slug answers
404, the same as a church that does not exist. - Requests are checked against the church in the database layer as well as in the API, so a mistake in one route cannot return another church’s rows.
- Retrieval for Ask and search only ever covers the key’s own church.
Keys#
- Lectern stores a hash of each key, not the key. The secret is shown once, so a lost key must be rotated.
- Keys carry scopes, an optional expiry, a rate limit, spend caps and an IP allowlist. Revocation takes effect within seconds.
- Keys are accepted only in the
Authorizationheader. A key in the URL is rejected, so it does not end up in logs and browser history.
Webhooks#
- Every delivery is signed with HMAC-SHA256 over a timestamp and the exact body. See Webhooks.
- Endpoints must be public HTTPS addresses. Localhost, private networks and names that resolve to them are refused, and Lectern does not follow redirects.
- Signing secrets are stored encrypted and shown once. Rotation keeps both secrets valid for a grace period.
- Event payloads contain the teaching, note or answer the event is about. Treat them as private to the church and do not log them in places that are widely readable.
What your integration should do#
| Do | Why |
|---|---|
| Keep keys on a server and in a secrets manager. | A leaked key acts as your church within its scopes. |
| Give each integration its own key with the fewest scopes. | You can revoke one without breaking the rest, and spend is reported per key. |
| Verify every webhook signature over the raw body. | Anyone can post to a public address. |
| Show only approved content to your members. | Review is the church’s safeguard. Do not publish drafts. |
| Show support messages from Ask in full. | They exist to help a person in need. See Ask. |
Log X-Request-Id, not secrets or full payloads. | Request ids are enough for support to trace a call. |
If you think you have found a vulnerability, write to the address on the contact page with the request id and the steps to reproduce. Do not include real keys or members’ data.
A church can review, approve, share, export or delete its work in Lectern. For how long data is kept after deletion, read the privacy policy.