Ghost Posts API & Newsletters



运行Ghost 5.2.2并使用Admin API发布帖子

除了通过API发布文章外,我还希望它将其发送到指定的时事通讯。

据我所知,从Ghost文档(https://ghost.org/docs/admin-api/#publishing-and-scheduling-posts)我所需要做的就是添加?newsletter={{newsletter-slug}}到查询字符串,当我创建的帖子。然而,它安排了帖子,但不安排/发送电子邮件。

一切似乎都很顺利(在日程安排和发布帖子方面),只是没有发送电子邮件。

我错过了什么?

示例HTTPS请求:

URL:{{网站url}}/鬼/api/admin/文章/?通讯= default-newsletter&源html =

方法:邮报》

身体:{"posts": [{"title"; "status"; " schedule";html"; "Content";published_at"; "2022-06-15T20:07:00.000Z"}]

标题:

  • - type: application/json
  • 授权:Ghost {{token}}

您需要设置邮件服务,这是生产中需要的。

查看这里的文档https://ghost.org/docs/config/#mail

最新更新