{
  "swagger": "2.0",
  "info": {
    "title": "Sigmora",
    "description": "Governed media and workflow automation. Long-running work returns a durable resource; use job events or Get Job for status.",
    "version": "1.0.0"
  },
  "host": "api.sigmora.org",
  "basePath": "/v1",
  "schemes": ["https"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "securityDefinitions": {
    "sigmoraApiKey": { "type": "apiKey", "name": "Authorization", "in": "header" }
  },
  "security": [{ "sigmoraApiKey": [] }],
  "paths": {
    "/capabilities": {
      "get": { "operationId": "ListCapabilities", "summary": "List available Sigmora capabilities", "responses": { "200": { "description": "Capabilities", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/projects": {
      "get": { "operationId": "ListProjects", "summary": "List projects", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "200": { "description": "Projects", "schema": { "$ref": "#/definitions/AnyResponse" } } } },
      "post": { "operationId": "CreateProject", "summary": "Create a project", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Project", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/projects/{projectId}": {
      "get": { "operationId": "GetProject", "summary": "Get one authorized project", "parameters": [{ "$ref": "#/parameters/projectIdPath" }], "responses": { "200": { "description": "Project", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/assets/import": {
      "post": { "operationId": "ImportMediaFromUrl", "summary": "Import media from a public URL", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Asset", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/assets/{assetId}/transcript": {
      "get": { "operationId": "ExportTranscript", "summary": "Export a paginated transcript", "parameters": [{ "$ref": "#/parameters/assetId" }, { "$ref": "#/parameters/projectId" }, { "$ref": "#/parameters/limit" }, { "name": "after", "in": "query", "type": "string", "required": false }], "responses": { "200": { "description": "Transcript", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/assets/{assetId}/ingest": {
      "get": { "operationId": "GetAssetIngestStatus", "summary": "Get asset ingest status", "parameters": [{ "$ref": "#/parameters/assetId" }, { "$ref": "#/parameters/projectId" }], "responses": { "200": { "description": "Asset ingest status", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/video/render": {
      "post": { "operationId": "StartVideoRender", "summary": "Start an asynchronous video render", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "202": { "description": "Job accepted", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/jobs/{jobId}": {
      "get": { "operationId": "GetJob", "summary": "Get job status and artifact metadata", "parameters": [{ "$ref": "#/parameters/jobId" }], "responses": { "200": { "description": "Job", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/jobs": {
      "get": { "operationId": "ListJobs", "summary": "List recent jobs", "parameters": [{ "$ref": "#/parameters/projectId" }, { "$ref": "#/parameters/limit" }, { "name": "kind", "in": "query", "type": "string", "required": false }, { "name": "status", "in": "query", "type": "string", "required": false }], "responses": { "200": { "description": "Jobs", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/jobs/{jobId}/cancel": {
      "post": { "operationId": "CancelJob", "summary": "Request job cancellation", "parameters": [{ "$ref": "#/parameters/jobId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "200": { "description": "Cancellation", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/context-snapshots": {
      "get": { "operationId": "ListContextSnapshots", "summary": "List authorized context snapshots", "parameters": [{ "$ref": "#/parameters/projectId" }, { "$ref": "#/parameters/limit" }], "responses": { "200": { "description": "Snapshots", "schema": { "$ref": "#/definitions/AnyResponse" } } } },
      "post": { "operationId": "CreateContextSnapshot", "summary": "Freeze selected authorized source references", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Snapshot", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/context-snapshots/{snapshotId}": {
      "get": { "operationId": "GetContextSnapshot", "summary": "Get one authorized immutable context snapshot", "parameters": [{ "$ref": "#/parameters/snapshotId" }], "responses": { "200": { "description": "Context snapshot", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/recipes": {
      "get": { "operationId": "ListWorkflowRecipes", "summary": "List approved workflow recipes", "parameters": [{ "$ref": "#/parameters/limit" }], "responses": { "200": { "description": "Recipes", "schema": { "$ref": "#/definitions/AnyResponse" } } } },
      "post": { "operationId": "CreateWorkflowRecipe", "summary": "Create a versioned workflow recipe", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Recipe", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/recipes/{recipeId}": {
      "get": { "operationId": "GetWorkflowRecipe", "summary": "Get a workflow recipe and selected immutable revision", "parameters": [{ "$ref": "#/parameters/recipeId" }, { "name": "version", "in": "query", "type": "integer", "minimum": 1, "required": false }], "responses": { "200": { "description": "Workflow recipe", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/recipes/{recipeId}/revisions": {
      "post": { "operationId": "CreateWorkflowRecipeRevision", "summary": "Append an immutable workflow recipe revision", "parameters": [{ "$ref": "#/parameters/recipeId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Workflow recipe revision", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/recipes/{recipeId}/promote": {
      "post": { "operationId": "PromoteWorkflowRecipe", "summary": "Promote a personal recipe into the workspace-approved set", "parameters": [{ "$ref": "#/parameters/recipeId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Promoted workflow recipe", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/proposals": {
      "get": { "operationId": "ListWorkflowProposals", "summary": "List workflow proposals", "parameters": [{ "$ref": "#/parameters/projectId" }, { "$ref": "#/parameters/limit" }], "responses": { "200": { "description": "Proposals", "schema": { "$ref": "#/definitions/AnyResponse" } } } },
      "post": { "operationId": "CreateWorkflowProposal", "summary": "Create a versioned approval proposal", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Proposal", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/proposals/{proposalId}": {
      "get": { "operationId": "GetWorkflowProposal", "summary": "Get a workflow proposal", "parameters": [{ "$ref": "#/parameters/proposalId" }], "responses": { "200": { "description": "Workflow proposal", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/proposals/{proposalId}/approve": {
      "post": { "operationId": "ApproveWorkflowProposal", "summary": "Approve and start a workflow proposal", "parameters": [{ "$ref": "#/parameters/proposalId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "200": { "description": "Workflow run", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/proposals/{proposalId}/reject": {
      "post": { "operationId": "RejectWorkflowProposal", "summary": "Reject a pending workflow proposal", "parameters": [{ "$ref": "#/parameters/proposalId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "200": { "description": "Proposal", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/proposals/{proposalId}/cancel": {
      "post": { "operationId": "CancelWorkflowProposal", "summary": "Cancel a pending workflow proposal", "parameters": [{ "$ref": "#/parameters/proposalId" }, { "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "200": { "description": "Proposal", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/runs/{runId}": {
      "get": { "operationId": "GetWorkflowRun", "summary": "Get a durable workflow run", "parameters": [{ "$ref": "#/parameters/runId" }], "responses": { "200": { "description": "Workflow run", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/workflow/provenance/{manifestId}": {
      "get": { "operationId": "GetWorkflowProvenance", "summary": "Get an immutable workflow provenance manifest", "parameters": [{ "$ref": "#/parameters/manifestId" }], "responses": { "200": { "description": "Workflow provenance", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    },
    "/publish": {
      "post": { "operationId": "PublishArtifact", "summary": "Queue a completed artifact for publishing", "parameters": [{ "$ref": "#/parameters/idempotencyKey" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/JsonObject" } }], "responses": { "201": { "description": "Queued publish", "schema": { "$ref": "#/definitions/AnyResponse" } }, "202": { "description": "Pending separate publish approval", "schema": { "$ref": "#/definitions/AnyResponse" } } } }
    }
  },
  "parameters": {
    "idempotencyKey": { "name": "Idempotency-Key", "in": "header", "required": true, "type": "string", "description": "Stable source record/version key; reuse unchanged on retry." },
    "assetId": { "name": "assetId", "in": "path", "required": true, "type": "string" },
    "jobId": { "name": "jobId", "in": "path", "required": true, "type": "string" },
    "proposalId": { "name": "proposalId", "in": "path", "required": true, "type": "string" },
    "snapshotId": { "name": "snapshotId", "in": "path", "required": true, "type": "string" },
    "recipeId": { "name": "recipeId", "in": "path", "required": true, "type": "string" },
    "runId": { "name": "runId", "in": "path", "required": true, "type": "string" },
    "manifestId": { "name": "manifestId", "in": "path", "required": true, "type": "string" },
    "projectIdPath": { "name": "projectId", "in": "path", "required": true, "type": "string" },
    "projectId": { "name": "projectId", "in": "query", "required": false, "type": "string" },
    "limit": { "name": "limit", "in": "query", "required": false, "type": "integer", "minimum": 1, "maximum": 100 }
  },
  "definitions": {
    "JsonObject": { "type": "object", "additionalProperties": true },
    "AnyResponse": { "type": "object", "additionalProperties": true }
  }
}
