This API connects a content management system (CMS) with Tribune Desk, a newsroom tool that writes articles. Your CMS receives the articles editors send, tells Tribune Desk where they were published, and can keep its media library in sync. Any CMS can be a client; nothing here assumes a particular product. The Tribune Desk plugin for WordPress is one implementation of it; you do not need it to build your own.
Reference: interactive API reference · OpenAPI document (base URL https://api.tribunedesk.com).
Working in Claude? Tribune Desk in Claude explains how to add the Tribune Desk connector.
The guide, the examples and the OpenAPI document live in the public repository tribunedesk/tribunedesk-cms-api. A Polish version is in its pl folder.
For media, the API lets the CMS keep the metadata of its media files (title, alt text, caption, description) in sync with Tribune Desk, in both directions. The CMS is the client: it asks Tribune Desk for changes and sends its own. Tribune Desk never calls your API (the one call it makes is the article delivery webhook), but it does fetch the file URLs you send, so they must be publicly fetchable (no login, no IP restriction).
Each level works without the higher ones. Start with level 1, which is a day of work, and add the others when you need them. Level 3 adds fields to the same deliveries as level 1; it does not need new routes.
| Level | What your CMS does | What it uses | What the newsroom gets |
|---|---|---|---|
| 1. Article delivery | exposes an endpoint and makes a draft post from the title, HTML, excerpt and main image | the article.delivered webhook, or read mode |
“Send to CMS” |
| 2. Link back | reports the address and date of publication | POST /v3/cms/articles/published |
the link in Tribune Desk; the article becomes a link target |
| 3. Full content | resolves internal links, keeps the “read more” box, SEO, author, language, AI label | the level 3 fields of the delivery | full publishing quality |
| 4. Media library | syncs files and their descriptions both ways | the media, settings, held, resync and backfill routes | one library |
| 5. Archive | sends older articles | not available yet: ask your Tribune Desk contact | links to the archive |
Once the levels you chose work, A complete integration in any CMS lists what a production integration adds around them: background jobs, the HTML filter, what each new send changes in a post, and the edge cases of images, the link back and categories. It is what the WordPress plugin does, written for any CMS.
The contract is described by the OpenAPI document (also served at https://api.tribunedesk.com/v3/cms/openapi.json). How versions change: Versioning. What changed: CHANGELOG. Working clients in Python: level 1 and level 2.
An open-source plugin for Claude Code builds and tests an integration for your CMS, at the levels you choose. It reads this guide at a tagged version, asks what you need, tells you what to ask Tribune Desk for, writes the code and checks it against a local mock of Tribune Desk before any real delivery. When the contract changes, it lists what your integration must change and updates it.
/plugin marketplace add tribunedesk/tribunedesk-cms-kit
/plugin install tribunedesk-integration@tribunedesk
Then ask: “Build me an integration with Tribune Desk.” The plugin does not order tokens and does not deploy: the setup on the Tribune Desk side stays with your contact (see What to ask Tribune Desk for). The same repository, tribunedesk/tribunedesk-cms-kit, has tdkit: the local mock and the conformance checks, which you can run without Claude. A CMS written in PHP can use the protocol rules from tribunedesk/tribunedesk-cms-php.
GET /v3/cms/status and GET /v3/cms/changes (need media:read or articles:read), GET /v3/cms/held (needs media:read), GET /v3/cms/articles/{article_id} and GET /v3/cms/articles/awaiting (need articles:read), POST /v3/cms/articles/{article_id}/result and POST /v3/cms/articles/published (need articles:write),POST /v3/cms/media, POST /v3/cms/media/fields, POST /v3/cms/media/{asset_id}/link, POST /v3/cms/media/push-existing, POST /v3/cms/media/deletions, POST /v3/cms/resync and POST /v3/cms/held/{held_id}/decision (need media:write), GET /v3/cms/settings and PUT /v3/cms/settings (need settings:read and settings:write), GET /v3/cms/backfill/requests and POST /v3/cms/backfill/requests/{request_id}/pages (need backfill:write), POST /v3/cms/taxonomy/terms (needs articles:write) and GET /v3/cms/openapi.json (no token). A super admin enables the integration for your organization; the first poll does not enable it, but it does switch your organization to this API (see Switching to this API). Until then state in /status is disabled and GET /changes, /settings and POST /resync answer 409 with state_conflict. Once enabled, state is active, or stalled when there has been no poll for 24 hours. last_changes_poll_at and pending_changes are null while disabled. held_batches counts the batches waiting for a decision (null while disabled). recent_errors is always empty today: nothing fills it yet, so an empty list does not mean there were no errors, and a file that failed to import does not show up there. Today the feed carries changes of kind="fields", kind="new_asset", kind="settings", with td_deletion_marks_in_cms, kind="deleted" and kind="restored", and, in read mode for tokens with articles:read, article_sent. The organization has one acknowledged position in the feed, whichever token passes the cursor, and only polls of a token with media:read move it and count for stalled and pending_changes; a token with only article scopes reads with the same kind of cursor without moving them. In read mode without a media client, stalled means a send has waited more than 24 hours for your CMS to read it. New files, field changes and deletions sent by the CMS are accepted now.x-status: planned in the OpenAPI document; it checks your token and scope, then answers 501 with error code not_implemented. Order of checks on such a route: 401 (token), 403 (scope), 429 (rate limit), 409 (frozen organization, for writes), 422 (request shape), then 501. A malformed JSON body is rejected with 422 before the token check, so it never reaches authentication.Tokens are issued by Tribune Desk; there is no self-service sign-up. Ask your Tribune Desk contact. A token belongs to one organization and carries a set of scopes. Send it on every request:
Authorization: Bearer tdcms_...
Keep it secret, store it outside source control, and ask for a new one if it leaks. A token does not expire; only a super admin revokes it. An organization can hold several tokens at once, so to rotate one: get a new token, switch your CMS to it, then ask for the old one to be revoked. A missing, unknown or revoked token gives 401. A valid token without the scope of the route gives 403.
| Scope | Allows |
|---|---|
media:read |
read changes, status and held batches |
media:write |
send new files, field changes, deletions and links; decide held batches; start a resync; push existing files |
settings:read |
read the sync settings |
settings:write |
change the sync settings |
backfill:write |
take part in the one-time import of historical files |
articles:read |
read status, and in read mode the article_sent changes and the sent articles |
articles:write |
report where articles were published (link back) and the result of a delivery in read mode |
Check what your token can do:
curl -sS https://api.tribunedesk.com/v3/cms/status \
-H "Authorization: Bearer $TD_CMS_TOKEN"
{"org_code":"example-org","contract_version":"3.9.1-draft","scopes":["media:read"],"state":"active", ...}
Tribune Desk sets up each integration by hand. Pick the levels you build, then ask your Tribune Desk contact for what their rows list.
| Level | Ask for | Why |
|---|---|---|
| 1, webhook | a signing secret (whsec_, shown once) and your webhook address set for your organization (https:// on a public host); a newsroom user can also set it in Tribune Desk Settings, Integrations |
Without an active signing secret or a webhook address, “Send to CMS” sends nothing. The integration does not need to be enabled. |
| 1, webhook, image hosts | a token with articles:read, or the list of Tribune Desk storage hosts |
With the token, GET /v3/cms/status lists image_hosts, the hosts you may download images from. |
| 1, read mode | read mode switched on for your organization, the integration enabled, and a token with articles:read and articles:write |
Read mode works only while the integration is enabled; you read sent articles and report the result with these scopes. |
| 2 | a token with articles:write (a read mode token already has it) |
The link back needs only this scope; the integration does not need to be enabled. |
| 3 | nothing for links, SEO, author and the AI label; for the “read more” box, ask Tribune Desk to switch it on for your organization | Until it is switched on, deliveries leave out backlink_sources. |
| 4 | the integration and the media library enabled for your organization; a token with media:read, media:write and settings:read, plus settings:write if your CMS changes the sync settings and backfill:write for the historical import; the extra hosts that serve your files (a CDN, a media subdomain) |
The media routes answer 409 until both are switched on; Tribune Desk fetches your files only from allowed hosts. |
One token may carry every scope you need; ask for one token per organization. Everything else is in this guide: you can build your integration and test it before you get any of these.
| Route | Scope | Purpose |
|---|---|---|
GET /v3/cms/status |
media:read or articles:read |
Integration state and counters (working today) |
GET /v3/cms/changes |
media:read or articles:read |
Pull changes since a cursor (working today); each token sees only the kinds of its scopes |
POST /v3/cms/media |
media:write |
Send files that are new in the CMS (working today) |
POST /v3/cms/media/{asset_id}/link |
media:write |
Confirm the CMS took a file from Tribune Desk (working today) |
POST /v3/cms/media/fields |
media:write |
Send field changes (working today) |
POST /v3/cms/media/deletions |
media:write |
Report files deleted in the CMS (working today) |
POST /v3/cms/media/push-existing |
media:write |
Queue existing Tribune Desk files for the CMS (working today) |
GET /v3/cms/settings |
settings:read |
Read the sync settings and limits (working today) |
PUT /v3/cms/settings |
settings:write |
Save the sync settings (working today) |
POST /v3/cms/resync |
media:write |
Compare fields after an outage or an expired cursor (working today) |
GET /v3/cms/held |
media:read |
List held batches (working today) |
POST /v3/cms/held/{held_id}/decision |
media:write |
Send or discard a held batch (working today) |
GET /v3/cms/backfill/requests |
backfill:write |
Export requests for the historical import |
POST /v3/cms/backfill/requests/{request_id}/pages |
backfill:write |
Upload one page of export results (up to 1000 candidates) |
POST /v3/cms/taxonomy/terms |
articles:write |
Send categories and tags, up to 1000 per request |
GET /v3/cms/articles/awaiting |
articles:read |
List sends waiting for a result (read mode) |
GET /v3/cms/articles/{article_id} |
articles:read |
Read a sent article (read mode) |
POST /v3/cms/articles/{article_id}/result |
articles:write |
Report the outcome of a sent article (read mode) |
POST /v3/cms/articles/published |
articles:write |
Report where delivered articles were published (level 2, link back) |
429, 500, 503, network errors and the 502 and 504 a gateway may answer without our JSON body: wait at least retry_after seconds, then back off exponentially with jitter. Our Retry-After header holds the same whole number of seconds as retry_after; a gateway may send it as a date.4xx errors unchanged: fix the request or the state first.cms_media_id), so that repeating a batch does not create duplicates. A repeated file answers known (or rejected when its import refused it) and a repeated field change unchanged.Every route is safe to repeat after a lost answer. What a repeat gives:
| Route | Repeat answers |
|---|---|
POST /media |
known, or rejected with the reason of the import for a file it refused. |
POST /media/fields |
unchanged for values applied; waiting values stay in their batch. |
POST /media/{asset_id}/link |
known. |
POST /media/deletions |
known. |
POST /media/push-existing |
Queues nothing twice: files with an unread change are skipped. A lost next_after is harmless; repeat the same call. |
POST /resync, a preview page |
Replaces that page. A first page repeated without resync_id starts a second session; drop the first. A last page repeated gives 409: start a new preview. |
POST /resync, a confirmation |
The same answer and cursor. |
POST /held/{held_id}/decision |
409: read GET /held and compare state. |
PUT /settings |
The same settings. |
POST /backfill/requests/{request_id}/pages |
The same results. After a lost answer to a last page: 409, which means done. |
Every error produced by the application on these routes has the same JSON body (errors from a gateway or proxy in front of it may not): {"code": "...", "message": "...", "retry_after": 5}. retry_after is present only when waiting helps. Messages are for people; match on code. The body never echoes values you sent; a validation error can still name an unknown field.
| Code | HTTP | Meaning and what to do |
|---|---|---|
unauthorized |
401 | Token missing, unknown or revoked. Check the header; ask for a new token. |
forbidden |
403 | The token lacks the scope of this route. Ask for the scope. |
not_found |
404 | No such object in your organization. Check the id; do not retry. |
project_deactivated |
409 | The organization is frozen and rejects writes (POST, PUT). Reads, including GET /changes and GET /settings, still work and never answer this code. Stop writing and contact Tribune Desk. |
option_locked |
409 | You tried to change a setting locked by Tribune Desk (see locked_options in the settings). Leave it as it is. |
state_conflict |
409 | The object is not in a state that allows this, for example a held batch already decided, or a resync preview that is not ready, has expired or predates a re-enable of the integration, or the integration not being enabled. Re-read the state and act on that. On GET /changes and GET /settings it means only that the integration is not enabled. |
cursor_expired |
410 | Your cursor is older than 90 days, or the integration was disabled and enabled again since you got it. Run a resync and resume from the cursor it returns. |
validation_error |
422 | The request does not match the schema; the message names the fields. Fix the request; do not retry it unchanged. |
rate_limited |
429 | Too many requests. Wait retry_after seconds, then retry. |
internal_error |
500 | Our fault. Retry with back-off; report it if it persists. |
not_implemented |
501 | The route is planned and not available yet. Do not retry. |
unavailable |
503 | Temporary. Wait retry_after seconds, then retry. |
600 requests per minute per token. The window is fixed (one clock minute), not sliding, so a burst around a minute boundary may pass, up to twice the limit within a short time. Do not rely on that. Over the limit you get 429 with rate_limited, retry_after and a Retry-After header. The same 429 with a short wait (about a second) is returned when the limiter is momentarily busy. Handle both the same way: wait, then retry, without a tight loop. There are no headers with the remaining quota; a normal sync stays far below the limit.
The settings response lists the limits that apply to you (batch size, field length, file URL lifetime, requests per minute).
This is the one call Tribune Desk makes to you: when an editor clicks “Send to CMS”, Tribune Desk sends the article to the webhook address set for your organization. The OpenAPI document describes it under webhooks as article.delivered. Your webhook needs no token from this API; it is a separate address on your side.
The webhook address. Your Tribune Desk contact sets it for your organization, or a newsroom user sets it in Tribune Desk Settings, Integrations; no route of this API changes it. It must be https:// on a public host (any port); http://, private addresses and localhost are refused. Redirects are not followed. To try a receiver on your own machine, put a tunnel in front of it (for example cloudflared tunnel or ngrok http 8080) and give the https:// address it prints.
Several organizations at one address. Every body carries org_code, but you need the right signing secret before you trust the body. Prefer one address per organization (for example /td/webhook/{org_code}). With one shared address, read org_code from the raw body, pick that organization's secret, verify the signature on the same raw bytes, and only then act on the body.
The request. A POST with a JSON body (ArticleDelivery) and these headers:
webhook-id, webhook-timestamp, webhook-signature: the signature of the request (see Verifying the signature). Every delivery is signed: an organization without a signing secret gets no deliveries, so a request without these headers is not from Tribune Desk. Check the signature and answer 401 when it does not verify; it is the only proof that a request comes from Tribune Desk.X-Delivery-Id: the same for every attempt of one send, so you can drop duplicates. Equal to webhook-id.X-Delivery-Attempt: the attempt number, starting at 1.User-Agent: ArticleWriter/2. Deliveries come from no fixed IP address, so do not filter by address; the signature proves the sender.Your answer. Any 2xx within 30 seconds means delivered. After a network error, a timeout, 5xx, 408, 425 or 429, Tribune Desk tries again after 2, 10, 30, 120, 360 and 840 minutes (about a day). Any other status (another 4xx, or a 3xx: redirects are not followed) ends the send at once. The same article comes again with the same article_id when an editor sends it again: update the post you created the first time. Answer 401 only for a signature that does not verify: any 4xx ends the send for good, so a receiver whose clock is more than 5 minutes off loses articles. Keep your clock in sync.
Order of sends. A newer send of the same article cancels the pending retries of an older one, and every attempt carries the current state of the article. An attempt of an older send that was already on its way can still arrive after a newer one: keep the sent_at you last applied for each article_id and skip a body whose sent_at is older. sent_at is when the editor made the send and stays the same in every attempt of it; the time of the attempt itself is webhook-timestamp.
Store under a unique key. Two attempts of one send can overlap (Tribune Desk gives up waiting after 30 seconds and tries again later while your first answer is still being made). Keep article_id unique in your database and lock the row while you write, or you get two posts.
Publication mode. An editor can choose how the post is published: the optional publication field carries mode draft (keep it unpublished), publish (publish now) or schedule (publish at at, ISO 8601 in UTC). Without the field, publish as your CMS does today. A scheduled post is not public yet, so a new send of the same article updates it like a draft, and may move it to another time, back to a draft or publish it now. Never unpublish a post that is already published because of this field. A schedule whose at has already passed when it reaches you is published at once; Tribune Desk itself turns a send that is late into a draft before it leaves, so this is rare. Answer with publication (see below), so the editor sees what really happened.
Levels. You do not need every field, and each level works without the ones above it. Level 1 (receive article) makes a draft post from title, html, excerpt and featured_image. Level 2 (link back) tells Tribune Desk where the post was published, so other articles can link to it: answer with permalink. Level 3 (full content) uses the same deliveries with more fields: internal links and the “read more” box, SEO, author, AI provenance. Level 4 (media library) reuses files your CMS already holds. Fields marked optional are editorial extras (social posts, alternative titles, facts) that you may use or ignore. New fields may appear in a minor version, so ignore the ones you do not know.
When your CMS cannot receive requests from the internet, a super admin switches the organization to read mode. “Send to CMS” then makes no request to you. Instead:
GET /v3/cms/changes with a token that has articles:read. A sent article appears as a change of kind article_sent with its article_id. A token sees only the kinds of its scopes: article_sent needs articles:read, every other kind media:read; the cursor still moves past the kinds you do not see. Read mode needs the integration enabled by a super admin.GET /v3/cms/articles/{article_id}. The body is the same ArticleDelivery the webhook carries, built from the current state of the article, with sent_at of the send. The X-Delivery-Id header names that send; keep it. An article that was never sent gives 404.POST /v3/cms/articles/{article_id}/result and a token with articles:write. The body (ArticleResultReport) is what your webhook would answer with, plus delivery_id: the X-Delivery-Id from step 2. With it the result closes exactly that send; if a newer send of the article replaced it you get 409 with state_conflict and nothing is stored, so fetch the article again. Without delivery_id the result closes the newest waiting send. If your CMS could not take the article, send error with a short reason instead: the editor sees the send as failed with that text. Unlike a webhook answer the body is validated: a field of the wrong type gives 422. A field of the right type that Tribune Desk did not store is listed in ignored_fields of the answer. An article that was never sent gives 409 and nothing is stored. Repeating the result is safe: with the delivery_id of a send already delivered it gets the same answer and stores nothing again; with the delivery_id of a webhook send waiting for its retry it gets 409 with state_conflict.410 cursor_expired from GET /changes, a token without media:write cannot run a resync. List the sends still waiting with GET /v3/cms/articles/awaiting (articles:read, oldest first, pages with next_cursor), handle each as in steps 2 and 3, then poll GET /changes again without a cursor. A poll without a cursor starts from now and returns no history, whatever the scopes of the token; a send made between your last page of GET /articles/awaiting and that poll is still listed there, so read it once more after the poll. GET /articles/awaiting pages by the time of the send: a send made while you page appears on a later page, and a send you report a result for drops out without moving the others. Read until next_cursor is null.Tribune Desk signs each delivery following the Standard Webhooks specification, so you can use one of its ready libraries instead of writing the check yourself. A super admin generates the signing secret for your organization; it starts with whsec_ and is shown once. The signing secret is not a credential for any route of this API.
webhook-id, a dot, webhook-timestamp, a dot, the body: {webhook-id}.{webhook-timestamp}.{body}.whsec_. Compute HMAC-SHA256 of the signed content with that key and encode the result in base64.webhook-signature holds one or more signatures separated by spaces, each as v1, followed by the base64 value. The request is valid when any of them equals yours; compare in constant time.webhook-timestamp (Unix seconds) is more than 5 minutes away from your clock, so a recorded request cannot be replayed later.Rotation. An organization can have two signing secrets at once. While both are active every request carries two signatures, one per secret: add the new secret on your side, then the super admin revokes the old one. Each attempt is signed again with the secrets active at that moment and a new timestamp; webhook-id stays the same for every attempt of one send.
Fields marked as omitted are absent from the body, not null, when they do not apply.
| Field | Level | Meaning |
|---|---|---|
article_id |
1 | Tribune Desk id of the article. Repeated sends of the same article carry the same id: update the post you created the first time. |
org_code |
1 | The newsroom's code in Tribune Desk. |
sent_at |
1 | When the editor made this send (ISO 8601); the same in every attempt of it. Skip a body whose sent_at is older than the one you last applied. |
title |
1 | The article's headline. Not repeated in html. |
html |
1 | The article body as HTML, without the headline. Internal links are already resolved (see internal_links). |
excerpt |
1 | A short summary of the article for the post excerpt (the chosen meta description); null when there is none. |
featured_image |
1 | The main image: the same object as the first entry of generated_images; null when the article has no images. |
metadata |
1 | Where the article comes from. |
language |
1 | The newsroom's writing language, a BCP 47 tag of up to 16 characters (today pl or en). Omitted when not set. |
internal_links |
3 | Links to other articles of the newsroom placed in html. |
link_placeholder_prefix |
3 | Every link in html to an article that has no address in your CMS yet is link_placeholder_prefix followed by that article’s article_id. Replace it with your address of that article, or keep only the link text. Do not hard-code the prefix. |
evergreen |
3 | True when the article stays current (not tied to news). |
generated_images |
3 | Images made for the article; the first one is the main image. |
seo_title |
3 | The chosen SEO title. |
meta_description |
3 | The chosen meta description. |
focus_keyphrase |
3 | The focus keyphrase for SEO. |
ai_provenance |
3 | AI provenance statement, also embedded in html; null when the newsroom turned marking off. |
sent_by |
3 | Who clicked "Send to CMS"; null for automatic sends. |
author |
3 | Who ordered the article. Use it as the post author when sent_by cannot be matched. |
backlink_sources |
3 | Older articles that should link to this one. Omitted = leave existing links alone; an empty list = no article should link here. |
topic |
optional | The topic the article was written on. |
alternative_titles |
optional | Other headline proposals; may be empty. |
twitter_posts |
optional | Proposed posts for X. |
reel_captions |
optional | Proposed captions for reels. |
custom_content |
optional | Extra text blocks defined by the newsroom. |
facebook_title |
optional | The chosen title for Facebook. Use it only on Facebook, not as the post title. |
facebook_titles |
optional | All title proposals for Facebook. |
facebook_teaser |
optional | The chosen teaser for Facebook. |
facebook_teasers |
optional | All teaser proposals for Facebook. |
raw_facts |
optional | Facts the article was written from, one per line. |
related_topics |
optional | Follow-up topics. |
html is the article body as the writer and the editor left it. Tribune Desk does not reduce it to a fixed set of elements: an editor can edit the raw HTML. Treat it as content from a trusted editor and pass it through the filter your CMS applies to editor content.
h2, h3, p, strong, b, em, i, br, ul, ol, li, blockquote and a. The headline is not in html: it is title.<a href="…">; when the newsroom opens links in a new tab, target="_blank" rel="noopener"; a sponsored link carries rel="sponsored". Links to other articles of the newsroom are described in level 3.html may hold a figure that usually has one <img src alt> and an optional figcaption; src is a public address, and the figure may carry one of the classes alignleft, alignright, aligncenter and alignwide. An image from the media library has data-td-asset-id on the img (the file id of level 4) and, when the file comes from your CMS, data-td-cms-media-id (your id of the file, the same as cms_media_id). Keep figure and img through your content filter, including the data-td-* attributes on img: a sanitizer that drops unknown data-* attributes breaks level 4. Use them to insert your CMS's native image instead of downloading the file, so that a new send of the same article makes no second copy of it; without them, keep the figure as it is, or download the file only from image_hosts. Tribune Desk puts no iframe in html, but an editor may paste an embed by hand. The full filter, with samples to test it: A complete integration.iframe only when its src starts with the address of a video or social player you trust (the WordPress plugin keeps players from YouTube, Vimeo, X, Instagram, TikTok and Facebook), and keep only its src, width, height, frameborder, allowfullscreen, allow and title. Remove every other iframe, and every other script together with its content (the AI label block below is the one script you may keep). A delivery arrives with no editor logged in: if your CMS filters content by the rights of the current user, check that this filter keeps the embeds you trust.html ends with <script type="application/ld+json" data-hf-provenance>…</script>, the same statement as ai_provenance (see level 3). Keep it if your CMS allows it, or drop it and render ai_provenance in the page head instead.The body of your answer (ArticleDeliveryResult) is optional: a 2xx alone means delivered. Send it as application/json, up to 64 KB. Tribune Desk reads each field on its own and ignores one that does not match its type. A field you leave out keeps the value Tribune Desk stored before: an answer with only edit_url does not erase the cms_post_id from an earlier answer.
| Field | Level | Meaning |
|---|---|---|
cms_post_id |
1 | Your identifier of the post, as text. Tribune Desk stores it with the article. |
status |
1 | created, updated, or skipped_already_published when you left an already published post alone. Informational: Tribune Desk does not act on it today. |
edit_url |
1 | An http(s) address where the editor edits the post; shown as "Edit in CMS". Other schemes are ignored. The delivery is a server-to-server call with no editor logged in, so build the address without checking the current user's permissions: a CMS helper that returns the edit link for the current user (in WordPress get_edit_post_link()) returns nothing there. |
permalink |
2 | The public address of the post. Tribune Desk uses it to link to this article from other articles. |
featured_image |
4 | The attachment made from the featured image, so Tribune Desk can reuse it next time. |
social_queue_exclude |
2 | true keeps the post off the Tribune Desk Facebook queue, false puts it back; the same flag as in the link back. Send it together with permalink when you publish at once, so a flagged post never enters the queue. Leave it out to keep the stored value. |
publication |
optional | The state of the post after this delivery: status draft, scheduled or published, and at, when it is or was published (UTC; null for a draft). Tribune Desk shows it to the editor. Leave it out for any other state (for example a private post). |
post_id |
– | Deprecated: the same as cms_post_id, read only when that is absent. |
Image URLs in deliveries come from the Tribune Desk file storage or from your own CMS (an image your CMS already holds). Download images only from these hosts and refuse any other address. GET /v3/cms/status (with articles:read or media:read) and GET /v3/cms/settings list them as image_hosts; the list is never empty, so treat an empty one as an error and download nothing. Without a token, allow the Tribune Desk storage hosts your contact gives you, the domain of your organization and the host of your webhook. Download in the background if you can: the answer must come within 30 seconds, image or not.
A working receiver in Python, with no dependencies, is in examples/python/level1_receiver.py. It verifies the signature, makes or updates a draft and answers with the result. Prefer an official Standard Webhooks library in your own code; the example shows what such a library checks. A complete sample body is in examples/payloads/article-delivered.json.
title, html, excerpt and featured_image.cms_post_id, status and edit_url, so the editor gets an “Edit in CMS” link.webhook-timestamp is more than 5 minutes off, gets 401 and changes nothing.webhook-id makes no second draft, and a new send of the same article_id updates the post you made the first time.image_hosts; an image on any other host is not fetched.script in html other than the AI label block is removed with its content; an iframe of a YouTube player is kept and an iframe from a host you do not trust is removed.publication makes a draft, a post scheduled for at, or a published post; a scheduled post takes a new send like a draft, and a published one is never unpublished. Your answer carries publication with the resulting state.In read mode, also:
delivery_id of the send it answers, or error when your CMS could not take the article.409 state_conflict from the result, the article is fetched again and the newer send is answered.410 cursor_expired, the sends listed by GET /v3/cms/articles/awaiting are handled before polling GET /v3/cms/changes again without a cursor.When a post made from a delivered article goes public, call POST /v3/cms/articles/published with a token that has articles:write. Send items, 1 to 100 per request, each with article_id (from the delivery), url (the public http(s) address) and, optionally, published_at (ISO 8601 with a time zone; a time without one fails the whole request with 422). The answer has one result per item, in order: ok, not_found (no such article in the organization of the token) or invalid_url. Older clients may still expect forbidden; it is no longer returned. A bad item does not fail the others. The route shares the limit of the token (600 requests per minute).
Answering a delivery with permalink (and social_queue_exclude, below) does the same for a post published at once; use this route for posts published later. When a post is unpublished, Tribune Desk keeps the last address: no route takes it back today, so send the new address when the post comes back or moves.
When a report fails. A report that ends with a network error, 429 or a 5xx is sent again later (after Retry-After when there is one, else after about 5 minutes), at least once and better with more tries at growing gaps; the same holds for reports queued by bulk publishing. When to report and how to retry: A complete integration. Posts that were public before your integration had its token are reported once it has one, up to 100 per request.
If your CMS has a setting that keeps a post off Facebook, send it in each item as social_queue_exclude. With true, Tribune Desk does not add the article to its Facebook queue, and an article already waiting there is taken off every queue; posts already published stay. With false, the post may go to Facebook again: an article that never reached the queue and was published at most 48 hours ago joins it as a new article, anything else only when an editor adds it. An editor can still add an excluded article by hand. Leaving the field out keeps the stored value, so a client that does not know the field never clears it. Once your CMS has the setting, send the field every time, also as false; otherwise clearing the setting never reaches Tribune Desk. Send the item again when the setting changes on a published post; the same address changes nothing else.
A working client in Python is in examples/python/level2_link_back.py.
permalink in the delivery answer or by POST /v3/cms/articles/published.not_found or invalid_url is logged, not retried unchanged.429 or 5xx is sent again later, not dropped.tdcms_ token with articles:write, not the webhook secret.social_queue_exclude, false included.Level 3 uses the same deliveries as level 1 and reads more of their fields. The one new route is POST /v3/cms/taxonomy/terms, which syncs your categories and tags (see Categories and tags).
Links in html to other articles of your organization point either to your address of that article (when Tribune Desk knows it, from permalink or the link back) or to a placeholder: link_placeholder_prefix followed by the target's article_id. Do not hard-code the prefix; read it from each delivery. When you publish, replace each placeholder with your address of the article with that article_id; when you have none, leave the text of the link and drop the link itself. Later, when the target is published, you may go back to earlier posts and replace the placeholder there. internal_links lists every such link with its kind (cms or placeholder).
Each entry of internal_links has:
href: the address the link points to in html, your address or the placeholder;article_id: the Tribune Desk id of the linked article, the key to find your post;kind: cms when the linked article has an address in your CMS, placeholder otherwise; null, together with a null article_id, for a link to a page outside Tribune Desk: leave such a link as it is;anchor_text, url and headline: the text of the link, the current address of the linked article and its headline.Step by step, when a delivery arrives:
kind = placeholder, look up your post made from article_id.href in html with the post's address.backlink_sources lists older articles that should link to this one, each with article_id and distance (lower means closer in topic). Use it to show this article in a “read more” box on those older posts. The rules:
null means the same as a missing key.How the box looks and where it goes is up to your CMS. Tribune Desk only says which articles belong together.
seo_title, meta_description and focus_keyphrase are the editor's choice for search engines. author is who ordered the article; use it as the post author when sent_by, who clicked “Send to CMS”, cannot be matched to a user of your CMS. Match a person first by id in your own mapping of Tribune Desk users to CMS users, then by email; name is for display only. Without a match use your default author. language is the newsroom's writing language, a BCP 47 tag (for example pl), when it is set. evergreen is informational: the article stays current, so you may keep it out of date-based archives. Text fields have no length limit on the Tribune Desk side: cut them to the limits of your CMS.
Under the EU AI Act (art. 50(2)) text produced with AI must be marked in a machine-readable way. ai_provenance is that mark and the source of truth: claims (what is stated: article_id, generated_at, content_sha256, generator, v (the version of this claims format), models, digital_source_type) and jws, the claims signed as a compact JWS. It is null when the newsroom turned marking off.
Show it in the <head> of the public page as JSON-LD, for example:
<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "NewsArticle",
"identifier": "<claims.article_id>", "dateCreated": "<claims.generated_at>",
"digitalSourceType": "<claims.digital_source_type>", "hfProvenanceJws": "<jws>"}
</script>
The end of html carries the same statement as a <script type="application/ld+json" data-hf-provenance> block. It is a copy kept for integrations that publish html as it is; when you put the JSON-LD in <head>, you may remove the block from the body.
Anyone can check the mark without a token, at https://api.tribunedesk.com:
GET /.well-known/hf-provenance.json returns the public key (a JWK Set) to verify jws, and who the producer is;POST /v2/verify with {"text": "..."} answers whether the text came from Tribune Desk (generated) and the date it first did (generated_at). It never says which organization produced it. Send the article body: html as delivered or its plain text, without the headline (title is not part of html). Before the check Tribune Desk drops tags and <script> blocks, lowercases the text and collapses whitespace, so markup and the provenance block make no difference, but any change to the words does: an edited article answers generated: false. The route allows 30 requests per minute from one IP address and answers 429 above that; 503 means the registry is unavailable for a moment, so try again later.If your CMS has categories and tags, send them to Tribune Desk, so the editor can pick from them and the writer can choose among them. Tribune Desk never creates a term in your CMS.
Send the terms with POST /v3/cms/taxonomy/terms (needs articles:write), up to 1000 per request. Each item has taxonomy (category or tag), cms_term_id (your identifier, as text), name, and optionally slug, parent_id, post_count and deleted. Page through your terms in order of their id and send them once a day as a full run: the same run_id (a UUID you make up) on every page, and is_last: true on the last one. After that page Tribune Desk removes the terms of the organization that this run did not send. A run that never reaches its last page removes nothing (the last page may have no items, when your CMS has no terms left); a run left open for 24 hours is refused (409). Run one full run at a time; a page with a new run_id abandons the previous run, and a later page of the abandoned run answers 409 state_conflict and stores nothing: start a new run then, do not continue the old one. Send single changes as they happen without run_id: a new or renamed term as an item, a removed term with deleted: true. GET /v3/cms/status shows taxonomy (terms and last_full_sync_at).
A delivery may carry taxonomy with categories and tags, each a list of {cms_term_id, name}. A key that is present means: set exactly these terms (an empty list removes all of them; your CMS then falls back to its default category); a missing key means: leave that taxonomy alone; a missing taxonomy means the same for both. Find a term by cms_term_id, and when your CMS does not know the id, by name, ignoring letter case. Never create a term. Change the terms only of a post that is new, a draft, pending or scheduled; leave a published post alone.
Answer with taxonomy: the categories and tags now on the post, and ignored, the terms you did not set, each with name and reason (unknown_term when no such term exists, wrong_taxonomy when it exists in the other taxonomy; new reasons may be added, so Tribune Desk accepts any non-empty text).
backlink_sources, including the missing-key and empty-list rules.<head> of every public page made from a delivery whose ai_provenance is not null.POST /v3/cms/taxonomy/terms, sets the terms of taxonomy on a new or unpublished post, never creates a term, and answers with taxonomy.GET /v3/cms/changes with the cursor you stored. You get changes oldest first (limit is 1 to 500, default 100), a next_cursor and has_more. While has_more is true, keep pulling with the new cursor. Today the feed carries field changes (kind="fields"), new files (kind="new_asset") settings changes (kind="settings") and, with td_deletion_marks_in_cms, files trashed or restored in Tribune Desk (kind="deleted", kind="restored"); skip kinds you do not know. A kind="settings" change has no asset_id and no values: when you see one, read GET /v3/cms/settings again.file_url (it expires, see file_url_expires_at), then call POST /v3/cms/media/{asset_id}/link with your own media id so Tribune Desk knows the two are the same file (see Taking files from Tribune Desk).next_cursor only after you applied the changes. Passing a cursor in the next poll acknowledges everything up to and including that change; repeating an older cursor delivers the later changes again, without side effects. Each change also has its own cursor, with the same meaning, so you can stop in the middle of a page: store the cursor of the last change you applied, or nothing if it was the first (see below).POST /v3/cms/media for new files, POST /v3/cms/media/fields for field edits and POST /v3/cms/media/deletions for deletions; see their sections below. Batches hold up to 100 items; field values are plain text up to 5000 characters, at most one write per field per item. POST /v3/cms/media/{asset_id}/link requires cms_media_id and file_url and takes an optional reencoded (true if your CMS re-encoded the file, so Tribune Desk checks that the URL serves an image instead of comparing sha256).backfill:write, read GET /v3/cms/backfill/requests in the same cycle and answer each listed request (see Historical import): nothing else tells you one is waiting, and an unanswered request stays open.# first poll: no cursor means "start from now": no history, an empty list and a cursor
curl -sS "https://api.tribunedesk.com/v3/cms/changes" \
-H "Authorization: Bearer $TD_CMS_TOKEN"
# later polls
curl -sS "https://api.tribunedesk.com/v3/cms/changes?cursor=$CURSOR&limit=100" \
-H "Authorization: Bearer $TD_CMS_TOKEN"
A change you cannot apply. The feed is a single position, not a list of acknowledgements, so you cannot skip one change and acknowledge the next: a later cursor acknowledges everything before it. To retry a change, stop there and keep the cursor before it. It is your decision when to give up on a change you can never apply, so that it does not block the feed forever: move past it after some attempts, for example a handful spread over a day. The server does not count them, so keep the counter next to your cursor. For a new_asset that is safe, because a new push-existing run offers the file again.
A field edited on both sides. If a change from the feed touches a field you edited and have not sent yet, do not apply it and do not take its version. Send your edit with the base_version you held; the server decides as in Conflicts and base_version. On conflict adopt winning_value; on ok your value stands. The same holds for a value repeated by a td_to_cms resync, which is why you send your edits before running one.
One client per organization. A cursor is not tied to a token and the server keeps one acknowledged position per organization, the highest cursor anyone passed, so pending_changes and push-existing read it. Two clients polling the same organization each see every change but muddle that position. Run one.
The first poll returns no history. It does not start the integration: a super admin does that, and before it GET /changes answers 409 with state_conflict. The first poll after it is enabled does switch your organization to this API (see Switching to this API). A poll without a cursor always restarts from now and the server cannot tell a first poll from a lost cursor, so keep your cursor and send it every time. If you lost it, changes since then are skipped: poll without a cursor only the very first time; after a loss, run a resync and resume from the cursor it returns. Files that already exist are brought across with POST /v3/cms/media/push-existing or by a historical import (see below) run with Tribune Desk.
What arrives and in which order. A fields change exists only for a paired file and always carries its cms_media_id, so it never precedes the link of a new_asset file. It may name a file you do not hold, one paired by an article delivery or before the switch: ignore it. Apply by version: skip a change only when its version is lower than yours, because a repeated current value (after a link and after a td_to_cms resync) has the same version as before and a new value. A field whose version you do not hold yet takes any version. changed_by in the feed is editor or model; such a repeat says editor, whoever wrote the text. Changes from the CMS and from imports do not enter the feed, so cms and import do not appear today; treat every value the same way.
A cursor is opaque: store and return it, never parse it. Every 200 from /changes carries a next_cursor, even when there are no changes. Changes are kept 90 days, acknowledged or not. If you stop polling for 24 hours, /status shows stalled; polling again clears it. If your cursor is older than 90 days (the integration was down for a long time), you get 410 with cursor_expired. Recover by resync. The same 410 follows when a super admin disables the integration and enables it again: changes made while it was off are not in the feed, so re-enabling invalidates the cursors from before the break. Run a resync and resume from the cursor it returns.
POST /v3/cms/resync with direction (cms_to_td or td_to_cms: which side wins) and your current field values, in pages of up to 100 items. Set is_last on the final page; send the returned resync_id with the next pages. Nothing changes yet; the answer reports the number of differences, counted in fields, not files. An empty items with is_last is valid. Repeating a page replaces it and does not double the count. status is collecting until the last page and ready on it; a page after that answers 409, so if you lost the answer to the last page, start a new preview. Items you send are matched on cms_media_id; unpaired ids are ignored silently. A field you leave out is not compared and does not change. An empty value is compared like any other: with cms_to_td it clears the field in Tribune Desk, with td_to_cms it brings the Tribune Desk value to you. So for cms_to_td leave out empty fields unless you mean to clear them. The integration must be enabled, otherwise you get 409 with state_conflict. So does a page sent to a closed or expired session, or with a different direction than the first page, or to a session started before the integration was re-enabled. A preview may hold up to 50 000 differences; a page that would go over that cap is refused and stores nothing.ready, confirm within 24 hours with {"resync_id": "...", "confirm": true}. The response has a cursor; resume /changes from it. If the answer was lost, confirm again: a resync already applied or held changes nothing more and gives the same answer, with the same cursor.Which side to choose after a long outage. The API cannot choose for you, and the choice discards one side's edits from the gap. A sound order: first send your unsent edits with POST /media/fields (it works with an expired cursor and applies the conflict rule field by field), then run td_to_cms. Show the preview to a person before confirming.
How td_to_cms reaches you. On confirmation each differing value becomes a kind="fields" change after the returned cursor, with the version unchanged and changed_by editor; apply it even though you already know that version.
That cursor is the feed position when the preview started, so changes made meanwhile come through the feed and some may repeat: apply changes idempotently, using field versions. With cms_to_td, a field changed in Tribune Desk after the preview started is not overwritten; that newer value reaches you through the feed. This includes a model-generated text filled into an empty field.
Resync covers only files already paired: linked with /link, imported from POST /media or a historical import, or paired by an article delivery. A file only accepted by POST /media is not paired yet. Only the fields enabled in the settings for the direction are compared and applied. It does not restore new files or deletions; use POST /v3/cms/media/push-existing for those. Confirming a preview that is not ready or has expired, or any resync started before the integration was re-enabled, gives 409 with state_conflict; run a new resync.
A preview with more than mass_change_threshold differences (500 by default, and 500 is also the maximum you can set) is not applied on confirmation: the answer has status held, a held_batch_id and the cursor, and nothing changes until you decide the batch (see Held batches).
Each field has a version number. It grows only for a change the CMS knows about: one that goes into the feed, or one that came from the CMS. A change that is not in the feed (a field switched off for Tribune Desk to CMS, or an import) leaves the version as it is. Tribune Desk also keeps, per field, the time of its last change; from your side that is the changed_at of the field change in the feed, and your write is compared against it. For a field Tribune Desk has never changed, that time is the moment the integration was enabled.
When you send a field change (POST /v3/cms/media/fields) include changed_at, the time of the edit in your CMS, and base_version, the version you last saw. Our guidance: always send base_version, and send 1 when you do not know it. For a file you sent yourself, 1 is right until you see another version: an import does not move the version, so a field Tribune Desk has never changed takes your write whatever you send (step 4). A write without it skips the version check, so it can overwrite a change in Tribune Desk that you never saw (step 5). For each field the server decides in this order:
rejected with reason field_disabled.unchanged. It does not count towards the threshold.keep_nonempty_cms_to_td is on: rejected with reason keep_nonempty.base_version, and it equals the current version or Tribune Desk has never changed the field: the write applies.base_version and changed_at is not older than the last change in Tribune Desk: the write applies, under every conflict rule. A changed_at in the future counts as now.last_change, cms or td, set in the settings). cms: the write applies. td: the result is conflict, with the current version and the winning_value. last_change: the write applies when its changed_at is not older than the last change in Tribune Desk, otherwise conflict. A tie goes to the CMS.On conflict adopt winning_value in your CMS and do not resend. A field result can also be ok, unchanged, rejected (see reason) or held, and carries the current version of the field. Keep that version after ok, unchanged and conflict. After rejected and held keep the one you had: you have not seen that value. After rejected (field_disabled, keep_nonempty) there is no winning_value: your value stays in your CMS and the two sides differ until the next edit or a resync; do not resend it unchanged. A change applied this way does not come back to you in the feed.
What values and times may hold. A value is plain text of up to 5000 Unicode characters, counted as characters, not bytes. It is stored as sent: nothing cleans markup or normalizes Unicode, so do not send markup. An empty string is allowed and clears the field. A NUL character fails the whole request with 422. changed_at is ISO 8601 with a time zone and any precision; a time without a zone gives 422. A future time counts as now, and there is no other allowance for clock skew, so keep your clock in sync: a slow clock loses under last_change.
Item status in ItemResult: ok applied; known the file was already known; unknown the file is not paired yet (see Sending new files), not known to Tribune Desk or in its trash; conflict, rejected (see reason) and held as above. A file or a field change you repeat answers known or unchanged.
curl -sS -X POST https://api.tribunedesk.com/v3/cms/media/fields \
-H "Authorization: Bearer $TD_CMS_TOKEN" -H "Content-Type: application/json" \
-d '{"items":[{"cms_media_id":"doc-42","fields":[
{"field":"alt","value":"A fire engine at night","base_version":3,
"changed_at":"2026-10-31T10:00:00Z"}]}]}'
A file is matched by cms_media_id. One that is unknown, trashed or belongs to another organization answers unknown. If the integration is not enabled, the route answers 409 with state_conflict.
POST /v3/cms/media takes up to 100 items. Each needs cms_media_id, a publicly fetchable file_url, width, height and mime_type; the schema marks the last three optional, but an item without them is rejected with reason missing_metadata. Optional are sha256 (accepted, not used: the import computes its own), created_at, credit, post_title, iptc_caption, iptc_title and initial fields. Any other property gives 422. Tribune Desk downloads the file later, at its own pace, up to a daily limit on describing new files.
Send only files added after you turned level 4 on. Files that were already in your library reach Tribune Desk through a historical import (see Historical import), not as new files: a whole library sent at once would use up the daily limit on describing new files.
cms_media_id is any text of 1 to 255 characters, here and on every route. Unique within your organization.ok accepted, known already received, or rejected with a reason: missing_metadata; new_files_disabled; before_since and below_min_width (the filters below; before_since needs created_at); host (see Allowed file hosts); too_small (under 800 pixels wide; height does not count); mime (other than image/jpeg, image/png, image/webp); or excluded_agency (credit, or the caption field when credit is empty, names an agency excluded under the agreement of your organization; there is no public list, and most organizations have no such rule); or, for a file Tribune Desk already received, the reason its import refused it: collage, screenshot or graphic (judged not to be a photo) or import_failed (the download or the import failed).kind="settings" change is the moment to retry; retrying sooner is harmless and useless.new_files_cms_to_td and its filters (new_files_cms_to_td_since, new_files_cms_to_td_min_width) decide what is accepted.mass_change_threshold: they only add files, and downloading has its own pace.409 with state_conflict.An accepted item has no file yet. The pair (your cms_media_id and a Tribune Desk file) appears only after the import has downloaded, judged and saved it, at its own pace. Until then:
POST /media/fields answers unknown for it: keep the edit and send it again later.POST /media/deletions answers unknown: report it again later, because the import may still save the file.POST /resync ignores it.To check, send the same item to POST /media again: it is safe. ok, known and rejected carry asset_id once a live file with this id exists (a refusal by the settings does not remove a file Tribune Desk already holds), and null until then. Keep that asset_id: you need it to call /link, for example when a deleted file comes back. There is no route that lists import results. When the import refuses the file, sending the item again answers rejected with the reason: collage, screenshot or graphic for a file judged not to be a photo, import_failed for a failed download (a host problem, 404, not an image), a file over 25 MB or another failure of the import. This refusal is final: Tribune Desk does not try again and answers the same way every time, so do not send the item again. A file whose bytes Tribune Desk already holds under another record answers known and its asset_id stays null: that record is not paired with your id, and the file does not come back as a new_asset to you. So stop checking after a reasonable time, and stop repeating a deletion answered unknown with it. The server gives no figure, because the pace depends on the daily limit; a few days is a sound default.
Initial fields are context, not values. They help describe the file: their base_version and changed_at are ignored (the schema still requires changed_at, so send the time of the edit), they do not count towards the threshold, and they are not written to the fields. The texts of the imported file come from the description made by Tribune Desk, and the caption from credit (or your caption). To put your texts on the file, send them to POST /media/fields once it is paired, with base_version 1. Those writes count towards the threshold.
A file URL must be https, on port 443, without login data, and on one of: the domain of your organization, the host of the article-delivery webhook configured for it in Tribune Desk (nothing here calls it) or a host a super admin added for you. A leading www. does not matter, but other subdomains and CDN hosts do: ask your Tribune Desk contact to add them. image_hosts in GET /v3/cms/status and GET /v3/cms/settings lists them together with the Tribune Desk storage hosts; a host missing there shows as host or 422. The rest of the URL is yours: it needs no file extension, and Tribune Desk does not parse it for an id.
Images that appear in Tribune Desk after the integration was enabled reach you as kind="new_asset" changes, when the settings allow it: new_files_td_to_cms together with td_to_cms_editor_files for editor uploads or td_to_cms_graphics for generated graphics. Reels stay in Tribune Desk.
file_url, file_url_expires_at (24 hours), mime_type, filename, sha256, width, height and in fields the current texts the settings allow. sha256, width and height can be null for an older file; the others are there. The URL is a signed link to storage: a plain GET with no extra headers (do not send your token there), up to 25 MB. If you already have the file, for example from an article delivery, recognize it by sha256 among your files not paired yet (a file paired with another asset_id stays as it is), skip the download and use it, then link it. Link it rather than sending it to POST /media: the import would drop the same bytes as a duplicate and leave your id unpaired.sha256 when it is present. An empty or failed download is not a new file: stop at this change, keep the cursor before it and retry; see A change you cannot apply in The sync cycle.POST /v3/cms/media/{asset_id}/link with cms_media_id (any id of yours) and file_url (see Allowed file hosts). ok means recorded, known means this cms_media_id, URL and reencoded were already recorded. After a change, a fields change with the current texts follows in the feed, so a text changed after you read new_asset is not lost.file_url. If the 24 hours passed before you downloaded the file, pull again from the cursor before that change and use the new address.sha256, send reencoded: true. Tribune Desk then checks that your URL answers with an image instead of comparing sha256, and keeps its original unless a super admin turned on removing such originals.file_url with a GET. Without reencoded it compares the checksum; with it, the answer must have an image/* type and a body. When the setting keep_copies_in_td is off and the check passes, it drops its copy and from then on relies on your URL. A different checksum leaves the copy in place and marks the file; 404 or 410 marks it missing and it is no longer suggested to editors. None of this is reported through the API, and there is nothing to retry: serve the same bytes at the same URL, or send reencoded: true.A file that was trashed, deleted or linked meanwhile is left out of the answer, and so is one the settings no longer allow; the cursor still moves on past it. Errors of /link: 404 for an unknown or trashed file, 422 for a URL on a host that is not allowed, 409 with state_conflict when the integration is not enabled, the cms_media_id belongs to another file, the file already has another one, or Tribune Desk keeps no copy of the file and the URL differs from the one recorded for it: your URL is then the only source of the file, so it cannot be replaced by an address nobody checked. None of these clears by repeating the same call, so do not call again until something on your side changed. The file stays usable on your side, just unpaired.
Older files. POST /v3/cms/media/push-existing with an optional since queues up to 1000 files as new_asset changes, oldest first, under the same settings, and answers with queued and next_after. Send next_after back as after, with the same since, until it is null; that ends the run, not queued. Poll GET /v3/cms/changes at least once first, or you get 409 with state_conflict; one poll since the integration was enabled is enough. since compares with the original date of the file, or its creation date in Tribune Desk when it has none. The settings in force at the call decide what is queued. A run skips files already linked and files whose change you have not acknowledged yet, so it does not duplicate. A file you acknowledged without linking it is not offered again within a run, so a file you cannot download does not block the rest; a new run, without after, offers it again. An invalid after gives 422. Keep polling with your cursor: a poll without a cursor starts from now and skips what was queued. Files only add, so mass_change_threshold does not apply and held_batch_id stays null.
By default a deletion stays in the system where it happened; nothing is ever deleted permanently in the other one.
Deleted in the CMS. Send POST /v3/cms/media/deletions with up to 100 items of cms_media_id and deleted_at, each id once (a repeated id fails the whole request with 422). The file is marked as missing and no longer suggested to editors, whatever the settings say. With cms_deletion_trashes_in_td it also goes to the trash. Moves to the trash count towards mass_change_threshold in the same 60 minutes as field changes; past it the file only gets the mark, and the item answers ok with reason threshold. Past the threshold is final: nothing moves it to the trash later, and repeating the report answers known; an editor can trash the file by hand. Per item: ok, known (already recorded, safe to repeat) or unknown (no such file). unknown is final for a file Tribune Desk never had, but a file accepted by POST /media and not imported yet answers the same: report it again later (see When a file you sent becomes paired).
Back in the CMS. When the file is back in your library, call POST /v3/cms/media/{asset_id}/link again with the same cms_media_id; that clears the mark. For a file that came from Tribune Desk you hold asset_id. For one you sent, POST /media with the same id answers known (or rejected, when the settings now refuse new files) with asset_id; that call alone does not clear the mark. A file in the trash has no asset_id there and /link gives 404, until an editor restores it. Keep the same URL when Tribune Desk may hold no copy (see the errors of /link).
Trashed in Tribune Desk. With td_deletion_marks_in_cms the feed carries kind="deleted" when a paired file goes to the trash and kind="restored" when it comes back. Both have cms_media_id, asset_id and changed_at, and an empty fields. Do what suits your CMS, such as a hidden mark; do not delete a file used in published content. A permanent deletion in Tribune Desk is not reported. A trash caused by your own deletion report can come back as kind="deleted"; ignore it for a file you no longer have, and for one whose record you keep it only sets the same mark.
Before the switch, Tribune Desk sends no metadata edits to the CMS. An organization is switched at the first GET /v3/cms/changes after the integration is enabled (with or without a cursor), not when it is enabled, because only a poll proves that a client is listening.
410.To protect against accidents (a bulk edit, a bad import) the organization has a mass-change threshold, mass_change_threshold in the settings (500 by default, 1 to 500; a higher value is rejected with 422), enforced by the server. It applies to POST /v3/cms/resync: a confirmation with more differences than the threshold changes nothing and answers status: held with held_batch_id. It also applies to POST /v3/cms/media/fields. There a run lasts 60 minutes from the first change counted from the CMS, and the server counts the whole run, not one request, because a client sends batches of 100. A change identical to the current value does not count. Changes over the threshold are not written: their fields answer held, the answer carries held_batch_id, and they wait in one batch for the run, which you decide as below. After 60 minutes a new run starts. New files are not counted. A held batch is not an error: do not retry it, decide it. Take a held field out of your send queue: the value waits in the batch. Later requests of the run add to the same batch until it is decided, and a decision starts a new one. There is no route or field showing how much of the run is used, so you cannot pace yourself against it: send, and react to held. held_batch_id can be null with held fields: a newer value of the same field already waits in a batch you decided, so there is nothing to decide and nothing to resend.
The threshold protects against accidents, so the decision belongs to a person, not to your sync loop: show the batch to an operator. Today every batch has kind fields; files is reserved, because new files are never held. A batch can have direction td_to_cms only from a resync. List batches with GET /v3/cms/held and decide with POST /v3/cms/held/{held_id}/decision and {"decision": "send"} or {"decision": "discard"}. send answers state: sent at once; the changes are then applied in the background, in portions, so the work is finished when the resync has nothing left to apply, not when the answer arrives. The API does not show that moment: a batch stays sent and listed until 24 hours after the end, and its count does not fall. With td_to_cms you see the values arrive in the feed. The cursor from the resync stays valid. discard changes nothing; the two sides stay different until the next edit of a field or a new resync. A batch that is no longer pending gives 409 with state_conflict. So does send on a stale batch, one older than the change history (after the integration was re-enabled, or after 90 days): discard it and run a new resync. The same goes for send on a cms_to_td batch older than 7 days; a td_to_cms batch has no such limit, and discard always works. A sent batch that becomes that old is not applied and turns discarded.
GET /v3/cms/settings returns the sync variant (full, cms_to_td_only, td_to_cms_only or custom), the individual options and the locked ones. PUT /v3/cms/settings needs variant; options is required exactly when the variant is custom, and then every option must be given explicitly. A variant sets four things and leaves every other option as it is: full turns on new_files_cms_to_td, new_files_td_to_cms and all fields both ways; cms_to_td_only turns on the first direction and off the second; td_to_cms_only the reverse. A write that would change an option locked by Tribune Desk gives 409 with option_locked, also when the variant changes it and you did not name it. Every change of the settings, yours or a lock, appears in the feed as kind="settings".
model_texts_to_cms decides whether texts the Tribune Desk model wrote (alt text, caption) reach your CMS: empty_only sends them only to a field that is empty in Tribune Desk, never sends none; texts an editor wrote always go, when that field is on in fields_td_to_cms.
The server applies every option except one: keep_nonempty_td_to_cms is applied by the client, because only the CMS knows the value it holds. When it is on, do not overwrite a non-empty field in the CMS with a value from the feed. A field of only whitespace counts as empty, as it does on the server. Take the version even when you keep your value, and a new file has nothing to keep.
Without settings:read you do not see the options, the limits or what a kind="settings" change means, though the server still enforces all of it except the rule above. Ask for this scope. Without it, skip kind="settings" changes, assume the limits of this guide (100 items, 1000 per historical page) and leave keep_nonempty_td_to_cms off.
To bring existing files across, an operator at Tribune Desk can start an export request with filters. Tribune Desk does not call your API: your CMS polls GET /v3/cms/backfill/requests for requests (with their filters), then answers with pages of candidates, newest first, through POST /v3/cms/backfill/requests/{request_id}/pages, up to 1000 per page, setting is_last on the final page. Requests with no work for you yield an empty list. If you have no candidates, send one page with an empty items and is_last true: silence leaves the request open, and an organization can have only one open.
Filters are yours to apply when you choose candidates: date_from and date_to against the creation date of the file, inclusive; mime_types; min_width; categories matching any of them (ignore it if your CMS has none); only_attached_to_published as far as you can tell. The server re-checks only min_width, which then replaces the default minimum of 800 pixels, and max_files, so you need not cut your list at max_files.
Your position is yours to keep; the server returns neither a cursor nor a count. Keep it in memory or start over: repeating candidates creates no duplicates, and new files moving the order only means some are sent twice.
Each candidate gets a result: ok (held for the request), known (the file or its identifier is already in Tribune Desk) or rejected with a reason: host (the URL is not on a host allowed for your organization), too_small, mime, missing_metadata (send width, height and type), agency (the optional credit, or caption when credit is empty, names an agency excluded for your organization; the same rule as excluded_agency in POST /media, under another name) or max_files (the request is full). cms_media_id takes any text up to 255 characters, as elsewhere. Repeating a page is safe: it creates no duplicates and candidates already held answer ok again.
The optional parent_title, post_title, iptc_caption and caption help describe the file. Send what you have, as plain text.
After ok nothing is left for you to do. Tribune Desk describes and saves the files later, in its own time, and a saved file is paired with your cms_media_id. No change enters the feed for it, because an import is not a change on your side. As with POST /media, the file answers unknown to POST /media/fields until then; POST /media with the same id gives you its asset_id.
A request closes after its last page and also as soon as it reaches max_files; it then leaves the list and further pages answer 409 with state_conflict, so treat that as the end of the request, also when you repeat a last page whose answer you lost.
Paused requests. An operator can pause a request. It then leaves the list until resumed, and a page with candidates or with is_last answers 409 with state_conflict, the same as a closed one, and stores nothing. To tell them apart, send an empty page with is_last false: 200 with accepted: 0 means paused (or open), so keep your position and try when the request is listed again; 409 means it has ended.
GET /v3/cms/changes and stores the cursor only after applying the changes it returned.rejected with collage, screenshot, graphic or import_failed is not sent to POST /media again.conflict (in a 200 answer) is resolved by adopting winning_value, not by sending yours again.410) leads to a resync, not to a fresh start from now.Not available yet, and no date is promised. If your newsroom needs it, ask your Tribune Desk contact.
Today older articles become link targets only through the link back, and only those Tribune Desk wrote. Level 5 would let your CMS send its older articles (title, text, address, date), so new articles could link to them and show them in “read more” boxes. It gets its own chapter if it is built.
The level chapters say what each field and route means. This chapter says what a complete integration does with them in production: what runs in the background, how the HTML is filtered, what each new send of an article changes in a post, and how images, the link back and categories behave around the edges. The Tribune Desk plugin for WordPress follows these rules; with them you can build the same behaviour in any CMS, including one you wrote yourself. Where the plugin is known to fall short of a rule, follow the rule here, not the plugin.
Words used below: a post is not public when it is a draft, waits for review or is scheduled; it is public when it is published. A private post counts as public: leave it alone like a published one.
article_id unique on the post, and serialise the writes of one article (a database lock or a row lock held while you write). Two attempts of one send can overlap.php -S) answers one request at a time, so a test of overlapping attempts passes without proving your lock. Test that case on a server with several workers.| Job | When | What it does | Level |
|---|---|---|---|
| Image retry | 1 minute after a delivery that could not download its images in time | Downloads the missing featured image and body images with a longer limit (60 seconds) and puts them on the post. At least one retry; more with back-off are fine. A refused host is not retried. | 1 |
| Link back retry | After a network error, 429 or 5xx |
Sends the report again after Retry-After, or after 5 minutes. At least one retry; more with growing gaps are better. After the last one, log it: the backfill sends it later. |
2 |
| Bulk publishing | When an editor publishes many posts at once | Queues one report per post instead of calling Tribune Desk inside the editor's request. Queued reports get the same retries as any other. | 2 |
| Scheduled publishing | When your CMS publishes a scheduled post | Runs the same publish steps as a post published by hand. | 2, 3 |
| Image hosts | Once an hour, when you have a token | Reads image_hosts from GET /v3/cms/status; after a failed read, keep the last list and try again in an hour, not on every image. |
1 |
| Category sync | Once a day, and once right after a token is saved | A full run of POST /v3/cms/taxonomy/terms, plus the queue of single changes. See Categories and tags. |
3 |
| Media sync | As often as guide 4 says | Polls GET /v3/cms/changes and sends your changes. |
4 |
A job that writes a post takes the same lock per article as a delivery, and holds it only while it writes: download first, then take the lock, read the post again and write. A job that holds the lock while it downloads blocks the deliveries of that article, and Tribune Desk sees them fail.
Treat html as content from a trusted editor that still must not run code on your pages. Steps, in this order:
<script type="application/ld+json" data-hf-provenance>) out of the raw html. Keep it aside if you publish it in the body; otherwise drop it, since ai_provenance carries the same statement (see Storing the AI label). After this step, the filter may remove every script.p, h2–h6, strong, b, em, i, u, br, hr, ul, ol, li, blockquote, a, figure, figcaption, img, table with its parts, and iframe under the rule below. Remove script, style, object, embed, form, svg and math together with their content; any other tag that is not on the list loses the tag and keeps its text.href, target, rel and title on a; src, alt, width, height and every data-td-* attribute on img; class on figure. Remove every on* attribute and style (unless your sanitizer filters CSS).href and src: only https:, http:, mailto:, relative addresses and # anchors. Remove javascript:, data:, vbscript: and any other scheme, also when it is written with entities, upper case or whitespace inside.iframe only when its src, parsed as a URL, is https, its host is exactly a host you trust and its path starts with the player path (for example www.youtube.com and /embed/). Keep only src, width, height, frameborder, allowfullscreen, allow and title. An iframe with two src attributes, or one your parser cannot read, is removed.The delivery runs with no editor logged in. If your CMS filters content again on save by the rights of the current user, make sure that second filter keeps the same embeds, or they vanish on save. If the sanitizer fails, store nothing and answer 500: Tribune Desk tries again. Never store the unfiltered body.
Use a maintained sanitizer: in PHP symfony/html-sanitizer or HTML Purifier, in Python nh3, in Node sanitize-html or DOMPurify, in Ruby rails-html-sanitizer, in Go bluemonday, in Java the OWASP Java HTML Sanitizer.
These must not reach the post: <img src="x" onerror="alert(1)"> (the attribute is removed), <a href="javascript:alert(1)">, <a href="JaVascript:alert(1)">, <svg onload="alert(1)">, an iframe from www.youtube.com.example.net, an iframe without </iframe>, and an iframe from an untrusted host whose title holds a trusted address. These must survive: a YouTube player iframe, <figure class="alignleft"><img src="…" data-td-asset-id="…" data-td-cms-media-id="…"></figure>, <a href="https://…" target="_blank" rel="noopener">.
401 only when it does not verify.article_id or html answer 400. Ignore fields you do not know.503: Tribune Desk tries again.article_id. A post an editor moved to the trash still counts: restore it as a draft and update it, so the article never gets a second post. If its stored sent_at is newer than the body's, apply nothing and answer 2xx with the post's current state (status updated).sent_at, release the lock and answer with cms_post_id, status, edit_url, publication, and permalink when the post is public. Answer 500 with no internal detail when something failed; keep the detail in your log.| Part of the post | New post | Post not public yet | Public post |
|---|---|---|---|
| Title | title, or topic when there is no title |
replaced | left alone |
| Body | filtered html |
replaced | left alone |
| Author | chosen | chosen again from this send | left alone |
| Excerpt | excerpt |
filled only when the post has none: an excerpt an editor wrote survives | left alone |
| SEO title, meta description, focus keyphrase | set | filled only when empty | filled only when empty |
| Featured image | set | replaced when the delivery's main image differs from the one the last delivery set, unless an editor chose another image by hand | set only when the post has none |
| Body images | converted | converted | left alone |
AI label (ai_provenance) |
stored | replaced, or removed when it is null |
left alone |
| Internal links data | stored | replaced | left alone |
backlink_sources |
stored | stored | stored, and the “read more” rows rebuilt |
| Categories and tags | set | set | left alone |
| Language | set | left alone (an editor may have moved the post) | left alone |
| Publication state | as asked | as asked | left alone |
Answer status |
created |
updated |
skipped_already_published |
The right column is why skipped_already_published still matters: a featured image made after the first send, SEO fields left empty and a new “read more” list reach a published post. Its content, title and author stay as the newsroom left them.
draft: the post stays unpublished and has no publication date of its own.publish: the post is published now and its date is now, also when it was scheduled for later.schedule: the post is scheduled for at, converted from UTC to your site's time zone. An at without a time zone offset, or one you cannot read, is ignored like an unknown field. An at already past is published now.publication: a new post follows your site's own setting (draft by default, or published at once if the site chose so); an existing post keeps its state.Give the site a way to limit this: a setting that keeps Tribune Desk from publishing (off by default, so Tribune Desk may publish). When it is on, treat publish and schedule as if the delivery had no publication: a new post follows the site's own setting, an existing one keeps its state; draft still works. Answer with the state the post really has, so a newsroom whose CMS controls who may publish keeps that control.
Answer publication from the post as it is after the write: a draft or a post waiting for review gives draft with at null; a scheduled post scheduled with its time; a published post published with its time. Leave publication out for a private post or any other state.
Find before you download. For the featured image (generated_images[0]) and for each body figure with data-td-asset-id, look for a file you already have, in this order:
cms_attachment_id or cms_media_id of the image, data-td-cms-media-id of a body image). Use it only when that file exists and your records tie it to this image: it carries the same asset_id, or it carries none and either its address or the address you downloaded it from equals the image's URL, or you sent the file to Tribune Desk yourself (level 4). A file with another asset_id, or one never sent and with another address, is not this image, even when it is an image: ignore the hint and go on.asset_id.Record the asset_id on the file you found or downloaded. A file you already had keeps its title, alt text, caption and description: the newsroom may have corrected them.
Download within budget. Download only https addresses on a host in image_hosts; log a refused host and do not retry it. Inside a delivery give the featured image about 15 seconds and all body images together about 10 seconds, so the answer leaves within 30 seconds. What does not fit is saved without the image and comes from the image retry.
Name and describe new files. Name the file from filename, or from a slug of the title cut to about 60 characters; take the extension from the URL when it is an image type, else jpg. Do not use the last part of the URL: Tribune Desk serves many images under the same file name. Set the title, alt text, caption and description from the image on a file you downloaded now. Mark it as coming from Tribune Desk, so that level 4 does not send it back as a new file.
Body figures. A figure with exactly one img and data-td-asset-id becomes your native image with its alt text, caption and alignment (alignleft, alignright, aligncenter). A figure without data-td-asset-id is converted only when the file already exists in your library; never download a file nobody pointed at. A figure you do not convert stays byte for byte.
Whatever made it public (an editor, your scheduler, bulk publishing, an API call):
internal_links data, so the link can come back when the target is published.internal_links point to this article and resolve their placeholders. Bound the work of one publication (the WordPress plugin repairs up to 50 posts) and log when you hit the bound; the rest are repaired when they are saved.backlink_sources: only sources that are public, never the post itself.Report the address again when a public post's address changes (a new slug or date) and when its keep-off-Facebook setting changes. Other saves of a public post report nothing.
article_id in lower case and skip posts whose article_id is not a UUID: one bad id fails the whole request with 422.published_at is the publication time in UTC with an offset. If your CMS has no UTC time for a post published by the scheduler, convert the local one.429 wait Retry-After and send the same request again.not_found and invalid_url are different faults; do not retry them unchanged.Setting the terms of a delivery (guide 3): look a term up by cms_term_id in the right taxonomy, then by name ignoring letter case, and accents too if your database compares that way. A term found only in the other taxonomy is wrong_taxonomy; one found nowhere is unknown_term. A non-empty list of which no term was found leaves that taxonomy alone: only a genuine empty list clears it (and gives the default category). Terms without a name are dropped. Set the terms before the post is saved and published, because a permalink may contain the category.
Sending your terms:
run_id on every page, is_last: true on the last.run_id: Tribune Desk refuses the last page of a run open for 24 hours.run_id: a new or renamed term with its current name, a deleted one with deleted: true and the name it had. A row leaves the queue only after Tribune Desk accepts it. On 403 (no articles:write) or 501 keep the queue; the next full run carries the terms anyway. If the queue grows too large, drop changes: the full run makes up for them.Try sent_by, then author. For each person, first your own mapping of Tribune Desk ids to users, then a user with the same e-mail. Only a user allowed to write posts counts: a reader account with the same e-mail does not become the author. No match: the site's default author. Remember the people you have seen (id, name, e-mail, last seen), so the settings screen can offer them for the mapping.
meta_description and facebook_title into fields your theme reads, under the same rule.facebook_teaser into the excerpt ahead of excerpt, for a theme that uses the excerpt as the social description.language is set only on a new post. A language your CMS does not have leaves the default and goes to the log.Store ai_provenance (its claims and jws) with the post: it is the source of truth, and the block at the end of html is a copy of it. When the post gets new content, replace the stored label; a send whose ai_provenance is null, or one you cannot read, removes it, because an old signature next to new text looks like a forgery. A public post keeps its label. Print it in the <head> of the post's page as JSON-LD (guide 3) by encoding the JSON yourself, not by printing text from the delivery, so that </script> inside a value cannot end the element. If your SEO layer already describes the article as JSON-LD, add the label fields to that object instead of printing a second one.
A settings screen (or a configuration file) with:
https://api.tribunedesk.com by default; refuse an http address, and never follow a redirect with the token;A delivery log of the last few dozen events (deliveries, link backs, image failures, category runs), with media events kept apart so they do not push the deliveries out. Log the reason in words; never log a secret or a token.
If your integration updates itself, check the signature of each package before you install it.
publish and schedule then count as a missing publication, and the answer reports the post's real state.The contract is a draft (
3.9.1-draft) and may change until it is declared stable. No dates are promised.
The version of the contract is info.version in the OpenAPI document and contract_version in GET /v3/cms/status. It follows semantic versioning:
4.0.0): a breaking change, such as a removed field or route, or a field that changes meaning. It comes only with a new major version, after a transition period in which the old behaviour keeps working.3.4.0): something added, such as a new field, route, scope or kind of change. Ignore fields and kinds you do not know; an upgrade needs nothing from you.3.3.1): descriptions and fixes that change no shape.-draft: the contract may still change before it is declared stable. While it is a draft a breaking change can come in a minor version; the CHANGELOG marks it Breaking with its date.Ignoring what you do not know is part of the contract: schemas of what Tribune Desk sends do not forbid unknown properties, so do not generate a validator that does.
Every change of the contract has an entry in the CHANGELOG.
Every version that reaches main gets a tag; a version overwritten in the docs sync PR before it was merged keeps only its CHANGELOG section, and its changes ship in the next tag (e.g. 3.6.1-draft is carried by v3.7.0-draft).
Changes of the Tribune Desk CMS API contract, newest first. Versions follow Versioning.
image_hosts (a photo from Wikimedia Commons) is sent as a signed address of Tribune Desk's own copy, on a host that is in image_hosts: in generated_images[].url and in the src of <img> in html. The signed address works for 24 hours; every new send carries a fresh one. Before, the source address was sent, and an integration that checks image_hosts dropped the image. No shape changes.Integrators:
L1: download images at the time of the send, as the guide already asks; do not store a signed address as the image's lasting address.409 state_conflict, and guide 1 (read mode) what a repeated result answers; both behave so since 3.8.2-draft.examples/python/level1_receiver.py filters html with an allow list on the standard library's HTML parser (filter_html), as the new chapter asks; it replaces filter_embeds of 3.8.2-draft, which handled only script and iframe.ai_provenance is the source of truth to store and render; the block at the end of html stays as a copy for integrations that publish html as it is.Integrators:
L1: if you copied the filter of examples/python/level1_receiver.py, replace it with filter_html.L1: filter html as Filtering the HTML says (no on* attributes, no javascript: or data: addresses, embeds by parsed host and path) and run the image retry in the background.L1: change a post on a new send as What each send changes says, and let the site keep Tribune Desk from publishing (off by default; on, publish and schedule count as a missing publication).L2: retry a failed link back at least once, bulk publishing and scheduled posts included.L3: run the full category run daily and the queue of single changes, one run at a time, as Sending and setting terms says.POST /v3/cms/taxonomy/terms: a page of a full run that a newer run_id abandoned answers 409 state_conflict and stores nothing. Before, it took the run back, and its last page removed the terms the newer run had just sent.POST /v3/cms/articles/{article_id}/result with the delivery_id of a send already delivered answers as before and stores nothing again (before, the fields were stored a second time); with the delivery_id of a webhook send waiting for its retry it answers 409 state_conflict. A result no longer ends in 500 when the article cannot be expressed in the contract.examples/python/level1_receiver.py: the embed filter parses each iframe tag and its src address (exact host and path), drops an iframe without </iframe>, ignores a src written inside another attribute, rebuilds a kept iframe from the attributes guide 1 allows, and runs until nothing changes, so a split tag such as <scr<script></script>ipt> cannot form a script.Integrators:
L3: when a page of your full run answers 409, start a new run with a new run_id; do not send more pages of the old one.L1: if you copied the embed filter of examples/python/level1_receiver.py, replace it with the new one.POST /v3/cms/taxonomy/terms, added in 3.8.0-draft. Documentation only.Integrators:
POST /v3/cms/taxonomy/terms (articles:write): your CMS sends its categories and tags, up to 1000 per request; a full run (run_id, is_last) also removes the terms your CMS no longer has; run one full run at a time, since a page with a new run_id abandons the previous run. GET /v3/cms/status shows taxonomy.ArticleDelivery has an optional taxonomy (categories and tags, each term with name and, when known, cms_term_id): the terms the editor chose. Without it, nothing changes.ArticleDeliveryResult (and the read-mode result) has an optional taxonomy: the categories and tags of the post after the delivery, and the ignored terms with a reason (unknown_term or wrong_taxonomy; more values may be added).Integrators:
L3: send your categories and tags to POST /v3/cms/taxonomy/terms (a full run daily, single changes as they happen); set the terms a delivery names in taxonomy (by cms_term_id, else by name; never create terms) and answer with taxonomy.examples/python/level1_receiver.py applies publication and answers with it, as guide 1 asks since 3.7.0-draft.examples/payloads/article-delivered.json asks for a draft in publication; its scheduled time had passed, so a receiver tested on the sample published it at once.Integrators:
ArticleDelivery has an optional publication (mode draft, schedule with at, or publish): how the editor wants the post published. Without it, nothing changes.ArticleDeliveryResult (and the read-mode result) has an optional publication (status draft, scheduled or published, and at): the state of the post after the delivery.Integrators:
L1: publish, schedule or keep a draft as publication asks, answer with publication, and update a scheduled post on a new send as you update a draft.html may carry images from the media library as figure with data-td-asset-id and data-td-cms-media-id on the img; the guide used to say there are no media in the body.Integrators:
L1: keep figure/img from html through your content filter, including the data-td-* attributes on img (a sanitizer that drops unknown data-* breaks L4).L4: recommended, not a "Done when" point: turn a figure with your data-td-cms-media-id into your native image instead of downloading the file.POST /v3/cms/media answers rejected with collage, screenshot, graphic or import_failed for a file Tribune Desk already received and its import refused; it used to answer known with asset_id null.Integrators:
L4: do not send a file to POST /media again after rejected with collage, screenshot, graphic or import_failed.examples/python/level1_receiver.py keeps embeds only from trusted players and removes other scripts, as guide 1 asks since 3.5.0-draft.Integrators:
html, and that a delivery arrives with no editor logged in.Integrators:
L1: keep an iframe only from players you trust and remove every script other than the AI label block, with its content; check that your content filter keeps those embeds when no editor is logged in.L2: send a report of the published address again when it fails with a network error, 429 or 5xx.L4: do not send files that were in your library before level 4 as new files.image_hosts and read mode; read mode says where a poll without a cursor starts and how GET /v3/cms/articles/awaiting pages.published_at without a time zone fails the whole request with 422; “Done when” covers social_queue_exclude.examples/python/level1_receiver.py answers an older send with status.Integrators:
examples/vectors/webhook-signature.json: signature test vectors for receivers.ArticleResultReport.Integrators:
additionalProperties); request bodies still do, except ArticleResultReport (POST /v3/cms/articles/{article_id}/result), which lists unknown fields in ignored_fields.sent_at is when the editor made the send, the same in every attempt (retries used to carry the time of the attempt).ArticleDeliveryResult: optional social_queue_exclude, stored before permalink.GET /v3/cms/articles/{article_id} returns the X-Delivery-Id header; POST /v3/cms/articles/{article_id}/result takes ArticleResultReport with optional delivery_id and error and answers with ignored_fields; new GET /v3/cms/articles/awaiting.DeliveryImage.cms_media_id and FeaturedImageResult.cms_media_id: the file identifier as text. cms_attachment_id and attachment_id are deprecated.GET /v3/cms/status lists image_hosts.409 descriptions name only the codes each route returns; POST /result documents state_conflict (it said conflict).429 and 503 declare Retry-After; GET /v3/cms/openapi.json is in paths.404 not_found (it gave 422).POST /v3/cms/articles/published: an article of another organization is not_found; forbidden is no longer returned.Retry-After of your answer, up to one hour.Integrators:
L1: answer 401 to a delivery without a valid signature; every delivery is signed now.L1: do not validate deliveries with a schema that rejects unknown properties.L1: skip a body whose sent_at is older than the one you applied last; sent_at is now the time of the send.L4: read cms_media_id (text) instead of cms_attachment_id, and answer featured_image.cms_media_id instead of attachment_id.L2: send social_queue_exclude together with permalink in the delivery answer when your CMS has such a setting.L2: treat forbidden from POST /v3/cms/articles/published like not_found.L1: without settings:read, take image_hosts from GET /v3/cms/status; a token with articles:read is enough.read: send delivery_id (from X-Delivery-Id) with the result, send error when your CMS could not take the article, and after 410 cursor_expired go through GET /v3/cms/articles/awaiting.read: match state_conflict on a 409 from POST /v3/cms/articles/{article_id}/result; the docs used to say conflict.POST /v3/cms/articles/published: optional social_queue_exclude per item keeps a post off the Tribune Desk Facebook queue. Leaving it out keeps the stored value.X-Webhook-Secret is no longer sent with deliveries. The signature (webhook-id, webhook-timestamp, webhook-signature) is the only authentication of a delivery.POST /v2/cms/published-urls is removed. Use POST /v3/cms/articles/published.Integrators:
L1: verify the signature; X-Webhook-Secret is no longer sent.L2: move from POST /v2/cms/published-urls to POST /v3/cms/articles/published.L2: send social_queue_exclude with each item when your CMS has such a setting.webhook-id, webhook-timestamp, webhook-signature) when the organization has a signing secret. X-Webhook-Secret is deprecated.articles:read and articles:write for tdcms_ tokens.POST /v3/cms/articles/published: the link back with a tdcms_ token. POST /v2/cms/published-urls is deprecated.article_sent, GET /v3/cms/articles/{article_id} and POST /v3/cms/articles/{article_id}/result.link_placeholder_prefix in ArticleDelivery.image_hosts in GET /v3/cms/settings.GET /v3/cms/status and GET /v3/cms/changes accept articles:read.Integrators:
L1: verify the Standard Webhooks signature of deliveries.L2: use a tdcms_ token with articles:write for the link back.L3: read link_placeholder_prefix from each delivery instead of a fixed prefix.L1: download images only from the hosts in image_hosts of GET /v3/cms/settings.read: read mode is available for a CMS without a public endpoint.article.delivered webhook is part of the contract, with ArticleDelivery and ArticleDeliveryResult.excerpt and featured_image next to the existing ones.cms_post_id and edit_url from your answer.Integrators:
L1: answer with cms_post_id and edit_url, and use excerpt and featured_image./v3/cms: media sync (changes feed, new files, field changes, deletions, resync, held batches, settings, historical import).Integrators:
L4: first version of the media sync; build it from the guide.