links
POST /v1/content/campaigns
Schedule a run of articles across a window.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/content/campaigns \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "brief": <string>, "posts": <integer> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Creates one queued article per topic, each targeting every site the campaign resolved to, each with its own moment inside the drip window. Gated on links.edit. Nothing is started by this call. The articles are queued as pending runs and a Temporal sweep starts each when its moment arrives — so the request path carries no long work, generation cost is spread across the window rather than paid upfront, and a campaign created during a Temporal outage is visible and simply starts late. Refused with 422 when the account is not in good standing: we do not spend money on an account that is not being paid for.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
org_id (query) | string | Нет | Narrow to one organisation. A reseller managing several client organisations reads the wrong one without it — and on a footprint-free network, another operator's posting schedule… |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
brief | string | Да | The standing instruction — voice, audience, what the sites are about. |
posts | integer | Да | How many ARTICLES to write. Each is placed on every target site, so the number of publications is this times the site count. |
topics | string[] | Нет | One subject per article, so N articles are N articles rather than N paraphrases. A shorter list cycles; an empty one means the brief alone. |
site_ids | string[] | Нет | — |
site_group_id | string | Нет | A site group, resolved when the campaign is created rather than copied. A recurring schedule pointed at a group re-resolves it on every firing, so sites added later are… |
drip_days | integer | Нет | Spread the articles across this many days. 0 publishes them together. |
drip_jitter_minutes | integer | Нет | Randomise each moment by up to this many minutes either way. Perfectly even spacing is more detectable than posting all at once — nothing a person does is that regular — so this… |
anchors | ContentRunAnchor[] | Нет | — |
category | string | Нет | — |
publish_policy | ContentRunPublishPolicy | Нет | How far a run may go on its own. draft_only is the default and puts nothing live. |
recipe_id | string | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
campaign_id | string | Да | — |
targets | ContentCampaignTargets | Да | — |
posts | ContentCampaignPlannedPost[] | Да | — |
total_articles | integer | Да | Articles written. One per topic. |
total_placements | integer | Да | Individual publications — articles times sites. The number that reads as "how much am I about to do", and the one the spend estimate is built on. |
first_at | string | Нет | — |
last_at | string | Нет | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422