API Explorer
Update visibility for a public API
Toggle a public API between PRIVATE, UNLISTED, and PUBLISHED without
republishing its spec. Visibility controls whether the API and its versions are
readable through the unauthenticated public registry; the spec content itself is
untouched. Callable by any token in the owning org that holds write:apis.
Authorization
BearerAuth AuthorizationBearer <token>
Bearer token. Either a Personal Access Token (pat_...) or a Service Account
Token (sat_...). Issued via the Spec0 dashboard or /me/personal-access-tokens.
In: header
Path Parameters
publicApiId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://app.spec0.io/api/v1/public/apis/497f6eca-6276-4993-bfeb-53cbbbba6f08/visibility" \ -H "Content-Type: application/json" \ -d '{ "visibility": "DRAFT" }'{
"publicApiId": "6cdb160e-37b9-4802-86c1-ee5fed60dba5",
"orgSlug": "string",
"apiSlug": "string",
"title": "string",
"description": "string",
"visibility": "DRAFT",
"latestVersion": "string",
"publishedAt": "string",
"updatedAt": "string"
}{
"error": "string",
"message": "string"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}Was this helpful?