hosting

PUT /v1/sites/{siteId}/cms-target

Tell us where this site's posts should go.

모든 hosting 엔드포인트

모든 개발자 문서

인증

Bearer 토큰으로 API 키를 전송하세요. 이 엔드포인트는 명세에 특정 권한을 명시하지 않으므로, 가정하기보다는 키에 필요한 최소한의 권한을 부여하고 응답을 확인하세요.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/cms-target \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": <string<wordpress, headless_rest, git_static>> }'

로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요

상세 정보

Creates or replaces the site's content target. Gated on links.edit. ⛔ secret is write-only, and omitting it keeps the credential you already have rather than clearing it — a customer editing a collection name must not silently delete their key. The secret is written to Vault before the row is saved, and the row is only written if that succeeded: the other order leaves a row that reads as configured on every screen and fails at the first publish.

매개변수

이름유형필수설명
siteId (path)string

요청 본문

이름유형필수설명
kindstring<wordpress, headless_rest, git_static>
presetstring<, payload, strapi, directus, ghost, shopify, webflow, custom>아니요
base_urlstring아니요
collectionstring아니요
auth_schemestring<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header>아니요
auth_headerstring아니요
field_mapobject아니요
enabledboolean아니요
secretstring아니요The API key. ⛔ Write-only, and omitting it keeps the credential you already have rather than clearing it. It is written to Vault before the row is saved, and the row is only…

응답

이름유형필수설명
site_idstring
kindstring<, wordpress, headless_rest, git_static>Empty when nothing claims this site. For a site with no configured row this is the derived target — most WordPress sites on our own fleet need no configuration at all, because…
presetstring<, payload, strapi, directus, ghost, shopify, webflow, custom>
base_urlstringThe CMS's API root. Empty for a target whose address is derived from the site (fleet WordPress, a connected Git repository).
collectionstringThe collection posts are created in — posts on Payload, a blog id on Shopify, a collection id on Webflow, the content directory on a Git target.
auth_schemestring<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header>
auth_headerstringFor the header auth scheme — which header the key is sent in.
field_mapobjectRenames, for a destination that spells our fields differently. ⛔ It renames; it never adds a capability. A field map cannot make a target able to carry a tag it has no field…
enabledbooleanA disabled target is skipped and reads as needs_setup — kept rather than deleted so pausing publishing to a site does not lose its set-up.
has_credentialboolean
capabilitiesstring[]
detected_identitystringWhat the destination said it was, last time it answered.
last_probe_atstring
last_probe_reachablebooleannull means never probed; false means probed and could not be reached. Those are different facts and a client must not render them the same.
last_probe_codestring
last_probe_detailstring

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422