{
  "openapi": "3.1.0",
  "info": {
    "title": "SystemSculpt public and account reads",
    "version": "1.0.0",
    "description": "Generated from route exports, the shared request validation schema and TypeScript JSON response expressions. Describes existing public discovery and license-authenticated account reads, not a general-purpose developer API or headless signup. Browser checkout, dashboard mutations, webhooks, internal crons and the separate vault/agent/media protocol are excluded. Server authorization and business rules remain authoritative. Unknown types are left unconstrained.",
    "license": {
      "name": "SystemSculpt terms",
      "url": "https://systemsculpt.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://systemsculpt.com"
    }
  ],
  "tags": [
    {
      "name": "Public",
      "description": "Public discovery and service information."
    },
    {
      "name": "Account",
      "description": "Read the account connected to the existing plugin credential."
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getApiHealth",
        "summary": "GET /api/health",
        "description": "Read public service or release information.",
        "tags": [
          "Public"
        ],
        "security": [],
        "parameters": [
          {
            "name": "crons",
            "in": "query",
            "required": false,
            "description": "Set to 1 to include cron observations. Omitted or other values keep ordinary health probes database-free. Unavailable observations are returned as null.",
            "schema": {
              "description": "Set to 1 to include cron observations. Omitted or other values keep ordinary health probes database-free. Unavailable observations are returned as null.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "crons": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "observedAt": {
                              "type": "string"
                            },
                            "jobs": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "job": {
                                    "type": "string"
                                  },
                                  "intervalSeconds": {
                                    "type": "number"
                                  },
                                  "lastRunAt": {
                                    "anyOf": [
                                      {
                                        "type": "null"
                                      },
                                      {
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "lastSuccessAt": {
                                    "anyOf": [
                                      {
                                        "type": "null"
                                      },
                                      {
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  "runs": {
                                    "type": "number"
                                  },
                                  "failedRuns": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "job",
                                  "intervalSeconds",
                                  "lastRunAt",
                                  "lastSuccessAt",
                                  "runs",
                                  "failedRuns"
                                ]
                              }
                            }
                          },
                          "required": [
                            "observedAt",
                            "jobs"
                          ]
                        }
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "nodeEnv": {
                      "type": "string"
                    },
                    "hasClerkKey": {
                      "type": "boolean"
                    },
                    "release": {
                      "type": "object",
                      "properties": {
                        "build": {
                          "type": "object",
                          "properties": {
                            "commitSha": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "commitRef": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "commitSha",
                            "commitRef"
                          ]
                        },
                        "worker": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "anyOf": [
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                },
                                "tag": {
                                  "anyOf": [
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                },
                                "timestamp": {
                                  "anyOf": [
                                    {
                                      "type": "null"
                                    },
                                    {
                                      "type": "string"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "tag",
                                "timestamp"
                              ]
                            }
                          ]
                        }
                      },
                      "required": [
                        "build",
                        "worker"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "timestamp",
                    "hasClerkKey",
                    "release"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/site/version": {
      "get": {
        "operationId": "getApiSiteVersion",
        "summary": "GET /api/site/version",
        "description": "Read public service or release information.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-deployment-version-v1",
                      "enum": [
                        "plugin-deployment-version-v1"
                      ]
                    },
                    "environment": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "production",
                          "enum": [
                            "production"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "development",
                          "enum": [
                            "development"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "invalid",
                          "enum": [
                            "invalid"
                          ]
                        }
                      ]
                    },
                    "git_sha": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "plugin_version": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "worker": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "tag": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "timestamp": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "tag",
                            "timestamp"
                          ]
                        }
                      ]
                    },
                    "local_build": {
                      "type": "object",
                      "properties": {
                        "base_git_sha": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "git_ref": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "base_git_sha",
                        "git_ref"
                      ]
                    }
                  },
                  "required": [
                    "contract_version",
                    "environment",
                    "git_sha",
                    "plugin_version",
                    "worker"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "HTTP 503 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-deployment-version-v1",
                      "enum": [
                        "plugin-deployment-version-v1"
                      ]
                    },
                    "environment": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "production",
                          "enum": [
                            "production"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "development",
                          "enum": [
                            "development"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "invalid",
                          "enum": [
                            "invalid"
                          ]
                        }
                      ]
                    },
                    "git_sha": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "plugin_version": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "worker": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "tag": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "timestamp": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "tag",
                            "timestamp"
                          ]
                        }
                      ]
                    },
                    "local_build": {
                      "type": "object",
                      "properties": {
                        "base_git_sha": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "git_ref": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "base_git_sha",
                        "git_ref"
                      ]
                    }
                  },
                  "required": [
                    "contract_version",
                    "environment",
                    "git_sha",
                    "plugin_version",
                    "worker"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/plugin/connectivity": {
      "get": {
        "operationId": "getApiPluginConnectivity",
        "summary": "GET /api/plugin/connectivity",
        "description": "Read public service or release information.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "204": {
            "description": "HTTP 204 response."
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/plugin/credits/balance": {
      "get": {
        "operationId": "getApiPluginCreditsBalance",
        "summary": "GET /api/plugin/credits/balance",
        "description": "Read the connected account. Requires an existing plugin connection credential; never put credentials in prompts, URLs or source.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "licenseKey": []
          },
          {
            "licenseBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "included_remaining": {
                      "type": "number"
                    },
                    "add_on_remaining": {
                      "type": "number"
                    },
                    "total_remaining": {
                      "type": "number"
                    },
                    "held_in_flight": {
                      "type": "number"
                    },
                    "available_unreserved": {
                      "type": "number"
                    },
                    "included_per_month": {
                      "type": "number"
                    },
                    "cycle_anchor_at": {
                      "type": "string"
                    },
                    "cycle_started_at": {
                      "type": "string"
                    },
                    "cycle_ends_at": {
                      "type": "string"
                    },
                    "turn_in_flight_until": {
                      "type": "null"
                    },
                    "usage_class": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "master_auth",
                          "enum": [
                            "master_auth"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "customer",
                          "enum": [
                            "customer"
                          ]
                        }
                      ]
                    },
                    "settlement_class": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "internal_provider_cost",
                          "enum": [
                            "internal_provider_cost"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "customer_credits",
                          "enum": [
                            "customer_credits"
                          ]
                        }
                      ]
                    },
                    "included_credits_entitled": {
                      "type": "boolean"
                    },
                    "purchase_url": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "ios_app_linked": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "included_remaining",
                    "add_on_remaining",
                    "total_remaining",
                    "held_in_flight",
                    "available_unreserved",
                    "included_per_month",
                    "cycle_anchor_at",
                    "cycle_started_at",
                    "cycle_ends_at",
                    "turn_in_flight_until",
                    "usage_class",
                    "settlement_class",
                    "included_credits_entitled",
                    "purchase_url",
                    "ios_app_linked"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/plugin/credits/usage": {
      "get": {
        "operationId": "getApiPluginCreditsUsage",
        "summary": "GET /api/plugin/credits/usage",
        "description": "Read the connected account. Requires an existing plugin connection credential; never put credentials in prompts, URLs or source.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "licenseKey": []
          },
          {
            "licenseBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Defaults to 20; finite positive values are floored and clamped to 100. Invalid values use the default.",
            "schema": {
              "description": "Page size. Defaults to 20; finite positive values are floored and clamped to 100. Invalid values use the default.",
              "type": "string"
            }
          },
          {
            "name": "endpoint",
            "in": "query",
            "required": false,
            "description": "Repeat to filter by endpoint. Combined with endpoints; whitespace and duplicates are removed.",
            "schema": {
              "description": "Repeat to filter by endpoint. Combined with endpoints; whitespace and duplicates are removed.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "endpoints",
            "in": "query",
            "required": false,
            "description": "Repeated or comma-separated endpoint filters. Combined with endpoint.",
            "schema": {
              "description": "Repeated or comma-separated endpoint filters. Combined with endpoint.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Existing timestamp boundary returned as next_before by the previous response. Equal-timestamp records can be skipped; this is not an exhaustive accounting export.",
            "schema": {
              "description": "Existing timestamp boundary returned as next_before by the previous response. Equal-timestamp records can be skipped; this is not an exhaustive accounting export.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "transaction_type": {
                            "type": "string",
                            "const": "agent_turn",
                            "enum": [
                              "agent_turn"
                            ]
                          },
                          "endpoint": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "usage_kind": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "document_processing",
                                "enum": [
                                  "document_processing"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "agent_turn",
                                "enum": [
                                  "agent_turn"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "audio_transcription",
                                "enum": [
                                  "audio_transcription"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "image_generation",
                                "enum": [
                                  "image_generation"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "video_generation",
                                "enum": [
                                  "video_generation"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "embeddings",
                                "enum": [
                                  "embeddings"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "youtube_transcript",
                                "enum": [
                                  "youtube_transcript"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "audio_processing",
                                "enum": [
                                  "audio_processing"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "request",
                                "enum": [
                                  "request"
                                ]
                              }
                            ]
                          },
                          "model": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "usage_class": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "master_auth",
                                "enum": [
                                  "master_auth"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "customer",
                                "enum": [
                                  "customer"
                                ]
                              }
                            ]
                          },
                          "settlement_class": {
                            "anyOf": [
                              {
                                "type": "string",
                                "const": "internal_provider_cost",
                                "enum": [
                                  "internal_provider_cost"
                                ]
                              },
                              {
                                "type": "string",
                                "const": "customer_credits",
                                "enum": [
                                  "customer_credits"
                                ]
                              }
                            ]
                          },
                          "included_credits_entitled": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "boolean",
                                "const": false,
                                "enum": [
                                  false
                                ]
                              },
                              {
                                "type": "boolean",
                                "const": true,
                                "enum": [
                                  true
                                ]
                              }
                            ]
                          },
                          "duration_seconds": {
                            "type": "number"
                          },
                          "total_tokens": {
                            "type": "number"
                          },
                          "input_tokens": {
                            "type": "number"
                          },
                          "output_tokens": {
                            "type": "number"
                          },
                          "cache_read_tokens": {
                            "type": "number"
                          },
                          "cache_write_tokens": {
                            "type": "number"
                          },
                          "page_count": {
                            "type": "number"
                          },
                          "credits_charged": {
                            "type": "number"
                          },
                          "included_delta": {
                            "type": "number"
                          },
                          "add_on_delta": {
                            "type": "number"
                          },
                          "total_delta": {
                            "type": "number"
                          },
                          "included_before": {
                            "type": "number"
                          },
                          "included_after": {
                            "type": "number"
                          },
                          "add_on_before": {
                            "type": "number"
                          },
                          "add_on_after": {
                            "type": "number"
                          },
                          "total_before": {
                            "type": "number"
                          },
                          "total_after": {
                            "type": "number"
                          },
                          "file_size_bytes": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "number"
                              }
                            ]
                          },
                          "file_format": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "string"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "created_at",
                          "transaction_type",
                          "endpoint",
                          "usage_kind",
                          "model",
                          "usage_class",
                          "settlement_class",
                          "included_credits_entitled",
                          "duration_seconds",
                          "total_tokens",
                          "input_tokens",
                          "output_tokens",
                          "cache_read_tokens",
                          "cache_write_tokens",
                          "page_count",
                          "credits_charged",
                          "included_delta",
                          "add_on_delta",
                          "total_delta",
                          "included_before",
                          "included_after",
                          "add_on_before",
                          "add_on_after",
                          "total_before",
                          "total_after",
                          "file_size_bytes",
                          "file_format"
                        ]
                      }
                    },
                    "next_before": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "next_before"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/plugin/releases/latest": {
      "get": {
        "operationId": "getApiPluginReleasesLatest",
        "summary": "GET /api/plugin/releases/latest",
        "description": "Read public service or release information.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-release-v1",
                      "enum": [
                        "plugin-release-v1"
                      ]
                    },
                    "plugin_id": {
                      "type": "string",
                      "const": "systemsculpt-ai",
                      "enum": [
                        "systemsculpt-ai"
                      ]
                    },
                    "latest_version": {
                      "type": "string"
                    },
                    "release_url": {
                      "type": "string"
                    },
                    "published_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "contract_version",
                    "plugin_id",
                    "latest_version",
                    "release_url",
                    "published_at"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "HTTP 503 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-release-v1",
                      "enum": [
                        "plugin-release-v1"
                      ]
                    },
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "contract_version",
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    },
    "/api/plugin/version": {
      "get": {
        "operationId": "getApiPluginVersion",
        "summary": "GET /api/plugin/version",
        "description": "Read public service or release information.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "HTTP 200 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-deployment-version-v1",
                      "enum": [
                        "plugin-deployment-version-v1"
                      ]
                    },
                    "environment": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "production",
                          "enum": [
                            "production"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "development",
                          "enum": [
                            "development"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "invalid",
                          "enum": [
                            "invalid"
                          ]
                        }
                      ]
                    },
                    "git_sha": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "plugin_version": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "worker": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "tag": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "timestamp": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "tag",
                            "timestamp"
                          ]
                        }
                      ]
                    },
                    "local_build": {
                      "type": "object",
                      "properties": {
                        "base_git_sha": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "git_ref": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "base_git_sha",
                        "git_ref"
                      ]
                    }
                  },
                  "required": [
                    "contract_version",
                    "environment",
                    "git_sha",
                    "plugin_version",
                    "worker"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "HTTP 503 response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract_version": {
                      "type": "string",
                      "const": "plugin-deployment-version-v1",
                      "enum": [
                        "plugin-deployment-version-v1"
                      ]
                    },
                    "environment": {
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "production",
                          "enum": [
                            "production"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "development",
                          "enum": [
                            "development"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "invalid",
                          "enum": [
                            "invalid"
                          ]
                        }
                      ]
                    },
                    "git_sha": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "plugin_version": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "worker": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "tag": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            },
                            "timestamp": {
                              "anyOf": [
                                {
                                  "type": "null"
                                },
                                {
                                  "type": "string"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "tag",
                            "timestamp"
                          ]
                        }
                      ]
                    },
                    "local_build": {
                      "type": "object",
                      "properties": {
                        "base_git_sha": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        },
                        "git_ref": {
                          "anyOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string"
                            }
                          ]
                        }
                      },
                      "required": [
                        "base_git_sha",
                        "git_ref"
                      ]
                    }
                  },
                  "required": [
                    "contract_version",
                    "environment",
                    "git_sha",
                    "plugin_version",
                    "worker"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Other responses, including authentication, rate-limit and runtime-selected errors. Envelopes vary."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "licenseKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-license-key",
        "description": "Existing plugin connection credential."
      },
      "licenseBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The same plugin credential, not a website session JWT."
      }
    }
  }
}
