Unpublish a skill from the global catalog
Transitions a skill in the caller's account from global to private visibility, removing it from the public catalog.
Subscriber side effects (locked decision from #1446):
- Subscriber library rows are NOT deleted. Each subscriber keeps their current copy of the skill on disk.
- Future bulk syncs naturally exclude the now-private skill (per the existing visibility filter); subscribers stop receiving future updates unless the publisher re-publishes.
- Each affected subscriber account's owner-role member(s) receive an unpublish-notification email, subject to a 24h debounce per (skill, account). The publisher's own account is excluded from notifications. The notifiedSubscriberCount field reports the number of subscriber accounts notified after debounce + suspension filtering.
Idempotent. Calling unpublish on an already-private skill returns 200 with action: "unchanged" rather than a 409. No subscriber emails are scheduled on the unchanged path (no transition happened).
Permission gate. Same as /publish — admin+ by default, plus the per-member canPublish entitlement. The canPublish capability gates BOTH publish AND unpublish symmetrically.
Idempotency. Optional Idempotency-Key header: retries with the same key + same body return the cached response with Idempotent-Replayed: true; retries with a different body return 422 idempotency_key_reused.
Rate-limit bucket: cli-crud (60/min per key).
Request
- Base URL: https://skillrepo.dev
- URL: https://skillrepo.dev/api/v1/library/{owner}/{name}/unpublish
- Auth: HTTP bearer
Path parameters
Headers
Client-supplied idempotency key (max 255 chars). Retries with the same key + same request body return the cached response (with Idempotent-Replayed: true) instead of re-executing the handler. Retries with the same key + a different body return 422 idempotency_key_reused. Concurrent retries while the original is in-flight return 409 idempotency_key_in_progress. Cached responses live for 24 hours.
Response
Either the skill was unpublished (action: "unpublished", with notifiedSubscriberCount reflecting the number of subscriber accounts that received an email after debounce + suspension filtering, and excluding the publisher's own account) or it was already private (action: "unchanged", notifiedSubscriberCount: 0). skill carries the full post-transition SyncSkill so the client can update its local cache. On Idempotency-Key replay the same body is returned with Idempotent-Replayed: true.
Example response
{
"skill": {
"files": [
{
"contentType": "text/markdown"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.