Publish or update a team-scoped private API
Publishes a design-time OpenAPI spec to a team-scoped private API. Distinct from
POST /api/v1/public/apis, which writes to the org-level customer-facing public
registry. This endpoint is what the spec0 push CLI command targets.
- If
apiIdis provided: update that API's metadata/spec and publish a new version. - If
apiIdis omitted: upsert by (org,name); create a new API when none exists. teamaccepts a UUID or slug; when omitted the API lands in the org's "Unassigned APIs" team.
Authorization
BearerAuth 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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.spec0.io/api/v1/public/apis/team" \ -H "Content-Type: application/json" \ -d '{ "openapiSpec": "string" }'{
"apiId": "2500ac85-f71b-4d01-b32c-62f3af3fe2c5",
"specRecordId": "f0de8374-0665-454e-81ee-9d4898be7f8b",
"version": "string",
"created": true,
"versionCreated": true,
"noChanges": true,
"versionUnchanged": true,
"versionUnchangedHint": "string",
"apiName": "string",
"teamName": "string",
"orgSlug": "string",
"registryUrl": "string",
"governanceWarnings": [
{
"section": "string",
"message": "string"
}
]
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "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"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}{
"status": 0,
"title": "string",
"detail": "string",
"type": "string",
"instance": "string"
}