ai

PATCH /v1/ai/recipes/{recipeId}

Edit an AI posting recipe.

所有 ai 端点

身份验证

请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 links.edit 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。

您的组织 ID 应填在此处

此端点接受 org_id 作为 JSON 正文中的一个字段。

您的组织ID位于控制面板的API密钥屏幕上,就在密钥本身的旁边。这是您在每次调用时使用的相同ID。

免费试用

将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。

curl -X PATCH https://api.zinndigital.com/v1/ai/recipes/{recipeId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点

详细信息

Partial update. The schedule is recomputed on every write rather than by a nightly job — a recipe saved with a cadence and no next run is a recipe that never runs and shows no error anywhere. Requires `links.edit`.

参数

名称类型必填内容简介
recipeId (path)Uuid

请求正文

名称类型必填内容简介
namestring
is_enabledboolean
briefstring
tonestring
word_countinteger
languagestring
posts_per_runinteger
providerstring
model_idstring
model_familystring
anchorsAiAnchor[]
anchor_policystring<none, every_post, rotate>
link_set_idstringThe reusable link set this recipe draws its links from, or `null` to use the recipe's own `anchors`. When set it **replaces** `anchors` rather than adding to them — two sources…
cadencestring<manual, daily, weekly, monthly>
cadence_hour_utcinteger
cadence_dowinteger
cadence_dominteger
target_kindstring<none, sites, site_group, cms_targets>
target_sitesstring[]
target_site_group_idobject
target_cms_target_idsstring[]
target_categorystring
requires_capabilitiesstring[]
capability_policystring<refuse, degrade, ask>
image_providerstring
image_modelstring
featured_imageboolean
inline_image_countinteger
inline_placementstring<after_intro, between_sections, end>
image_stylestring
publish_modestring<draft, schedule, publish>
schedule_offset_hoursinteger
schedule_stagger_minutesinteger
org_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).

响应

名称类型必填内容简介
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestring
is_enabledboolean
briefstring
tonestring
word_countinteger
languagestringBCP-47, or empty for "the language the brief is written in".
posts_per_runinteger⛔ Capped at 10. Two hundred articles from one brief are two hundred near-identical articles, which is a **footprint** — the exact thing the Footprint-Free line is sold to avoid.
providerstringBlank = whatever the funding route resolves to.
model_idstringBlank = the newest verified model in the family.
model_familystring
anchorsAiAnchor[]
anchor_policystring<none, every_post, rotate>
link_set_idstringThe reusable link set this recipe draws its links from, or `null` to use the recipe's own `anchors`. When set it **replaces** `anchors` rather than adding to them — two sources…
cadencestring<manual, daily, weekly, monthly>
cadence_hour_utcinteger
cadence_dowinteger0 = Monday.
cadence_dominteger⛔ Never 29-31: a monthly recipe set to the 31st would skip February silently, and a schedule that stops without an error is the failure this feature prevents.
next_run_atobject
last_run_atobject
target_kindstring<none, sites, site_group, cms_targets>
target_sitesstring[]
target_site_group_idobject
target_cms_target_idsstring[]
target_categorystring
requires_capabilitiesstring[]Capability ids the target must support, e.g. `cms_target:featured_image`. Enforced on every run: each site's capabilities are read from its CMS target and any shortfall is handl…
capability_policystring<refuse, degrade, ask>What to do when a target cannot do something the recipe requires. Default `refuse` — silently dropping a requested field is the failure this exists to stop. `refuse` skips that…
image_providerstring
image_modelstring
featured_imageboolean
inline_image_countinteger
inline_placementstring<after_intro, between_sections, end>
image_stylestring
publish_modestring<draft, schedule, publish>⚖️ Owner ruling 2026-08-20: a **per-recipe** switch defaulting to `draft`. `draft` writes into the library and schedules nothing; `schedule` queues placements the customer can s…
schedule_offset_hoursinteger
schedule_stagger_minutesintegerMinutes between consecutive posts in one run. ⛔ Not cosmetic: a network whose articles all appear in the same minute is a footprint.
blocking_providersstring[]Providers this recipe needs a working key for and does not have. Empty means it can run now. ⚖️ A recipe naming no provider is never blocked — credits are the default route and…
created_atstring
updated_atstring

此端点可能返回的错误

401 · 403 · 404 · 422 · 429