Connect your own API
For a CMS or in-house system Lyntcast has no connector for: describe its REST API once, and agents edit it through your rules like any other site.
Add it from Sites → Custom API. Beta: tested against a simulated API, not yet against a live account. Every configuration is checked before it’s saved (Lyntcast lists the first content type to prove the paths, pointers and credential work).
How drafts and publishing work
- With a publish path (and a status pointer): every write is assumed to save a draft that leaves the live record alone. Publishing writes the draft, then POSTs to the publish path.
- With a status pointer only: Lyntcast writes the status as the draft or published value. Because the system keeps a single version, saving a draft of a live record would take it offline, so Lyntcast refuses that and asks for a publishing change instead (your rules still hold it for review).
- With neither: the system has no drafts. Every change goes live when approved, and changes proposed as drafts are refused.
An update always sends the complete next field set, so a field removed in a change is removed in your system. Before every write Lyntcast keeps a snapshot of the record, which is what undo puts back.
Settings
| Setting | Default | Meaning |
|---|---|---|
| Base URL | required | https only, no credentials, query or fragment. Every path below is appended to it and must stay on its origin and under its path. |
| Auth header name | Authorization | One header carries the credential. Letters, digits and dashes; Host, Cookie, Content-Type and other headers Lyntcast manages are refused. |
| Auth header value | required | Stored encrypted. Printable characters only, so it can't add other headers. |
| Content types | required | Comma-separated, e.g. articles, pages. They fill {type} in paths and are the first half of every ID. |
| List / Get / Create / Update path | /{type}, /{type}/{id}, /{type}, /{type}/{id} | Path templates. The only placeholders are {type} and {id}; values are URL-encoded and may not contain slashes, so they can't add path segments. No . or .. segments. |
| Update method | PUT | PUT (the body replaces the record) or PATCH. With PATCH, fields the record has but the change leaves out are sent as null. |
| Delete path | none | Leave empty to refuse deletes. Deletes are permanent; undo recreates the record from Lyntcast’s snapshot (your system may give it a new ID). |
| Publish path | none | POST endpoint that makes a record’s draft live. With it, writes are drafts and Lyntcast calls it only to publish. Needs a status pointer. |
| Items pointer | empty | JSON pointer (RFC 6901) to the array in the list response. Empty: the response is the array. |
| Record pointer | empty | Where the record is in get, create and update responses, e.g. /data. |
| ID pointer | /id | Where the record’s ID is, inside the record. |
| Title pointer | title, name or headline field | Where the title is, inside the record. |
| Fields pointer | empty | Where the editable fields are inside the record, e.g. /attributes. Empty: the whole record, minus the ID and status. |
| Write body pointer | empty | Where Lyntcast wraps the record in a write, e.g. /data sends {"data": {…}}. |
| Status pointer, published value, draft value | none, published, draft | Where the record’s status is. Records whose status equals the published value are live. |
| Unpublished-edits pointer | none | A boolean that is true when a live record has unpublished edits. Lyntcast then refuses to publish over someone else’s pending edits. |
Worked example
Say your product-content service answers like this:
GET https://content.example.com/api/v2/pages
Authorization: Bearer <token>
{ "data": [ { "id": 41, "status": "published", "hasDraft": false,
"attributes": { "title": "Spring sale", "body": "<p>20% off</p>", "price": 80 } } ] }
GET /api/v2/pages/41 → { "data": { "id": 41, … } }
POST /api/v2/pages ← { "data": { "attributes": {…}, "status": "draft" } }
PUT /api/v2/pages/41 ← { "data": { "attributes": {…} } } (saves a draft)
POST /api/v2/pages/41/publish → makes the draft live
DELETE /api/v2/pages/41
Connect it with:
| Base URL | https://content.example.com/api/v2 |
| Auth header name / value | Authorization / Bearer <token> |
| Content types | pages |
| Paths | leave the defaults; Publish path /{type}/{id}/publish; Delete path /{type}/{id} |
| Items pointer | /data |
| Record pointer | /data |
| ID pointer | /id |
| Title pointer | /attributes/title |
| Fields pointer | /attributes |
| Write body pointer | /data |
| Status pointer | /status (published value published, draft value draft) |
| Unpublished-edits pointer | /hasDraft |
Agents then see the content type pages and IDs like pages:41, with fields title, body and price. A price rule on price works exactly as it does for Shopify.
What Lyntcast refuses
- Plain http, base URLs with credentials, and any address on a private network (checked on every request and every redirect).
- Paths that start with
//, contain.., encoded slashes or a fragment, or use placeholders other than {type} and {id}. - IDs and types with slashes or other characters that would change the path, and content types you didn’t list.
- Auth headers with line breaks, and headers Lyntcast sets itself.
Give Lyntcast a credential that can only read and write the content it should govern, and keep other write credentials away from agents.
Reporting edits made outside Lyntcast
Have your system POST to the site’s webhook URL (under Sites → Catch edits that skip Lyntcast) whenever a record changes:
POST https://<your-lyntcast>/api/webhooks/<siteId>?token=<secret>
Content-Type: application/json
{ "type": "pages", "id": 41, "event": "update" }
Edits Lyntcast made itself are recognised and not reported.