links

GET /v1/content/targets

Which of your sites can receive a post, and why the rest cannot.

Todos os endpoints de links

Autenticação

Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.

Onde vai o ID da sua organização

Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.

O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

curl -X GET https://api.zinndigital.com/v1/content/targets \
  -H "Authorization: Bearer zdk_live_…"

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

Every live site in scope with its **suitability**: can it take an article, and — when it cannot — whose fact that is. Gated on `links.view`. ⛔⛔ `suitability` has five values and the difference between two of them is the whole point of this endpoint. `unsuitable` is **measured**: every adapter was asked which sites it claims and each one declined, so this kind of site genuinely has nowhere to put an article. `unknown` means **we could not determine it** — the box was unreachable, the credential has never been tested, or nothing has checked this site yet. A client MUST NOT render `unknown` as a refusal, MUST NOT silently exclude it from a selection, and SHOULD count it separately in any confirmation ("9 ready, 3 unchecked"). Treating "we could not look" as "no" is the defect this endpoint exists to prevent. ⛔ This endpoint makes **no outbound calls**. Suitability is served from the last stored probe with `checkedAt` beside it, because probing every row of a 500-site page would be an uncached external call in an interactive path. `checkedAt: null` means never checked and MUST be shown as such, not as a fresh result. Use `probeContentTargets` to refresh. ⭐ `requires` takes capability ids a recipe needs; each row then carries `missingCapabilities`, so an editor can grey a site out and say what it cannot do. A site whose capabilities are not established reports **nothing** missing rather than everything missing — for the same reason `unknown` is not `unsuitable`.

Parâmetros

NomeTipoObrigatórioO que é
org_id (query)stringNãoNarrow to one organisation in a reseller subtree. Can never widen scope.
q (query)stringNãoMatch on domain or site name.
suitability (query)string<ready, needs_setup, unknown, unsuitable, blocked>Não
product_line (query)stringNão
stack_type (query)stringNão
group_id (query)stringNãoOnly sites in this site group.
cms (query)string<wordpress, headless_rest, git_static>NãoOnly sites whose target is this kind.
requires (query)stringNãoComma-separated capability ids a recipe requires, e.g. `cms_target:featured_image,cms_target:category`.
limit (query)integerNão
offset (query)integerNão

Resposta

NomeTipoObrigatórioO que é
itemsSiteTarget[]Sim
totalintegerSimEvery site matching the filters, not the page. This is the number a select-all-matching control shows.
offsetintegerSim
limitintegerSim
has_morebooleanSim

Erros que este endpoint pode retornar

401 · 403 · 422