인증
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 | 예 | — |
요청 본문
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
kind | string<wordpress, headless_rest, git_static> | 예 | — |
preset | string<, payload, strapi, directus, ghost, shopify, webflow, custom> | 아니요 | — |
base_url | string | 아니요 | — |
collection | string | 아니요 | — |
auth_scheme | string<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header> | 아니요 | — |
auth_header | string | 아니요 | — |
field_map | object | 아니요 | — |
enabled | boolean | 아니요 | — |
secret | string | 아니요 | 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_id | string | 예 | — |
kind | string<, 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, becau… |
preset | string<, payload, strapi, directus, ghost, shopify, webflow, custom> | 예 | — |
base_url | string | 예 | The CMS's API root. Empty for a target whose address is derived from the site (fleet WordPress, a connected Git repository). |
collection | string | 예 | The 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_scheme | string<, bearer, payload_api_key, ghost_admin_jwt, shopify_token, header> | 예 | — |
auth_header | string | 예 | For the `header` auth scheme — which header the key is sent in. |
field_map | object | 예 | Renames, 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… |
enabled | boolean | 예 | A 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_credential | boolean | 예 | — |
capabilities | string[] | 예 | — |
detected_identity | string | 예 | What the destination said it was, last time it answered. |
last_probe_at | string | 예 | — |
last_probe_reachable | boolean | 예 | ⛔ `null` 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_code | string | 예 | — |
last_probe_detail | string | 예 | — |
이 엔드포인트가 반환할 수 있는 오류
401 · 403 · 404 · 422