Founding churches get 50% off for 12 monthsFounding churches: 50% offApply as a founding churchApply

Requests and responses

Every response has the same shape, every request has an id, and the same few headers behave the same way on every route.

The envelope#

Successful responses are JSON objects with four fields:

FieldMeaning
statustrue when the request succeeded.
messageok on success.
dataThe thing you asked for: an object, or an array on list routes.
metaMetadata about the request. meta.request_id is always present. Lists add meta.total and meta.has_next when they have a value.
{
  "status": true,
  "message": "ok",
  "data": [
    {
      "id": "tch_01m4h8h1jvebqa45vpxtet0ame",
      "title": "YouTube aqz-KE-bpKQ",
      "duration_s": 0,
      "status": "awaiting_transcript",
      "progress_pct": 10,
      "visibility": "church",
      "branch": {
        "id": "brn_01m4h7y09deqtamqgs56j3gmb5",
        "name": "Grace Community Church",
        "slug": "hq",
        "address": {}
      },
      "kind": "teaching",
      "standing": {
        "state": "current"
      }
    },
    {
      "id": "tch_01m4h7yekxfnbbnw5gp570b9gy",
      "title": "YouTube dQw4w9WgXcQ",
      "duration_s": 0,
      "status": "awaiting_transcript",
      "progress_pct": 10,
      "visibility": "church",
      "branch": {
        "id": "brn_01m4h7y09deqtamqgs56j3gmb5",
        "name": "Grace Community Church",
        "slug": "hq",
        "address": {}
      },
      "kind": "teaching",
      "standing": {
        "state": "current"
      }
    },
    {
      "id": "tch_01m4h7zbsve4ybxjarahd3fpkh",
      "title": "Forgiveness that frees",
      "recorded_at": "2026-09-27T00:00:00Z",
      "duration_s": 242,
      "status": "done",
      "progress_pct": 100,
      "visibility": "church",
      "branch": {
        "id": "brn_01m4h7y09deqtamqgs56j3gmb5",
        "name": "Grace Community Church",
        "slug": "hq",
        "address": {}
      },
      "kind": "teaching",
      "standing": {
        "state": "current"
      }
    }
  ],
  "meta": {
    "request_id": "req_01m4h8nry7eq2bfwf822ry0vwm",
    "total": 3
  }
}

meta.total and meta.has_next are left out when they are zero or false, so treat a missing value as zero or false.

Request ids#

Every response, success or error, carries an X-Request-Id header, and successful bodies repeat it as meta.request_id. Log it with your own request log. It is the one thing support needs to find what happened.

Sending requests#

  • Send Content-Type: application/json on requests with a body. Form-encoded bodies (application/x-www-form-urlencoded) are refused with 415.
  • Send Accept: application/json, or nothing. Transcripts also come as text/vtt and application/x-subrip when you ask for format=vtt or format=srt.
  • Send Idempotency-Key on routes that start work. See Idempotency.
  • Send Accept-Encoding: gzip. Responses are compressed when the client allows it, which matters for transcripts. Most HTTP clients do this for you.
  • Use UTF-8. Names, titles and transcripts contain accents and non-Latin scripts.

Ids and times#

KindPrefixExample
Teachingtch_tch_01m4h7zbsve4ybxjarahd3fpkh
Notente_nte_01m4h83v9rejdvxnkpsh0wjxzk
Conversationcnv_cnv_01m4h87fpyerrr62f654bpj1dc
Messagemsg_msg_01m4h87fqjf0h8g1xqg16mvsh9
Uploadupl_upl_01m4h8mp8teepr7edaphqggw14
Webhook endpointwhk_whk_01m4h8mp75fw3vegabgcc7ad7k
Webhook deliverywhd_whd_01m4h8mq29f2va9jxhxnd07w72
Webhook eventevt_evt_01m4h8mq26ebwtb83nc7wnrhah
Branch (campus)brn_brn_01m4h7y09deqtamqgs56j3gmb5
Series, teachersrs_, spk_srs_..., spk_...

Ids are strings. Treat them as opaque, and compare them exactly. A malformed id answers 400 invalid_id. Timestamps are UTC in RFC 3339 (2026-09-27T00:00:00Z). Durations and transcript times are whole seconds.

Headers you will see#

HeaderWhereMeaning
X-Request-IdEvery responseThe request id.
RateLimit-Limit, RateLimit-Remaining, RateLimit-ResetEvery authenticated responseYour allowance. See Rate limits.
Retry-After429 responsesSeconds to wait before retrying.
Location201 responsesThe path of the thing you created.
WWW-Authenticate401 responsesBearer realm="lectern"

Browsers and CORS#

The API answers cross-origin preflight requests so that tools can read it, but it is designed to be called from a server. The key is a secret, and a key in browser code is visible to everyone who opens the page. Build a small endpoint on your own server that calls Lectern and returns only what your page needs.

Uploading from the browser

File bytes go straight from the browser to storage, never through the API. The key still stays on your server. See Uploads.

What an error looks like#

{
  "title": "Not Found",
  "status": 404,
  "detail": "That teaching is not in this church.",
  "code": "not_found"
}

Errors are covered in full in Errors.

Next steps