{
  "components": {
    "schemas": {
      "ActivateBody": {
        "additionalProperties": false,
        "properties": {
          "content_hash": {
            "maxLength": 64,
            "minLength": 64,
            "title": "Content Hash",
            "type": "string"
          },
          "sensitivity": {
            "default": "standard",
            "title": "Sensitivity",
            "type": "string"
          }
        },
        "required": [
          "content_hash"
        ],
        "title": "ActivateBody",
        "type": "object"
      },
      "Body_upload_source_v1_knowledge_sources_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_source_v1_knowledge_sources_post",
        "type": "object"
      },
      "CatalogOverviewView": {
        "properties": {
          "categories": {
            "items": {
              "type": "object"
            },
            "title": "Categories",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "categories"
        ],
        "title": "CatalogOverviewView",
        "type": "object"
      },
      "CatalogSearchView": {
        "properties": {
          "products": {
            "items": {
              "$ref": "#/components/schemas/ProductView"
            },
            "title": "Products",
            "type": "array"
          }
        },
        "required": [
          "products"
        ],
        "title": "CatalogSearchView",
        "type": "object"
      },
      "ConversationView": {
        "properties": {
          "conversation_id": {
            "title": "Conversation Id",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "customer_ref": {
            "title": "Customer Ref",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "conversation_id",
          "customer_ref",
          "status",
          "created_at"
        ],
        "title": "ConversationView",
        "type": "object"
      },
      "CreateConversationBody": {
        "additionalProperties": false,
        "properties": {
          "customer_ref": {
            "maxLength": 56,
            "minLength": 1,
            "title": "Customer Ref",
            "type": "string"
          }
        },
        "required": [
          "customer_ref"
        ],
        "title": "CreateConversationBody",
        "type": "object"
      },
      "CreateEndpointBody": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "maxItems": 2,
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 12,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "CreateEndpointBody",
        "type": "object"
      },
      "CreateGuidanceBody": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "maxLength": 32,
            "title": "Category",
            "type": "string"
          },
          "guidance_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance Id"
          },
          "text": {
            "minLength": 1,
            "title": "Text",
            "type": "string"
          },
          "title": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "category",
          "title",
          "text"
        ],
        "title": "CreateGuidanceBody",
        "type": "object"
      },
      "CreateTextSourceBody": {
        "additionalProperties": false,
        "properties": {
          "source_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Id"
          },
          "text": {
            "minLength": 1,
            "title": "Text",
            "type": "string"
          },
          "title": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "text",
          "title"
        ],
        "title": "CreateTextSourceBody",
        "type": "object"
      },
      "EndpointView": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "consecutive_failures": {
            "title": "Consecutive Failures",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "endpoint_id": {
            "title": "Endpoint Id",
            "type": "string"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "endpoint_id",
          "url",
          "description",
          "events",
          "active",
          "disabled_reason",
          "consecutive_failures",
          "last_success_at",
          "created_at"
        ],
        "title": "EndpointView",
        "type": "object"
      },
      "GuidanceDetailView": {
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "disclaimer": {
            "default": "Guidance shapes how your assistant communicates. It does not give the assistant permission to perform actions or bypass security controls.",
            "title": "Disclaimer",
            "type": "string"
          },
          "guidance_id": {
            "title": "Guidance Id",
            "type": "string"
          },
          "raw_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Text"
          },
          "rejected_count": {
            "title": "Rejected Count",
            "type": "integer"
          },
          "rejected_instructions": {
            "items": {
              "type": "object"
            },
            "title": "Rejected Instructions",
            "type": "array"
          },
          "revision": {
            "title": "Revision",
            "type": "integer"
          },
          "sensitivity": {
            "title": "Sensitivity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "guidance_id",
          "revision",
          "category",
          "title",
          "status",
          "sensitivity",
          "rejected_count",
          "raw_text",
          "rejected_instructions"
        ],
        "title": "GuidanceDetailView",
        "type": "object"
      },
      "GuidanceSummary": {
        "properties": {
          "category": {
            "title": "Category",
            "type": "string"
          },
          "content_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Hash"
          },
          "guidance_id": {
            "title": "Guidance Id",
            "type": "string"
          },
          "rejected_count": {
            "title": "Rejected Count",
            "type": "integer"
          },
          "revision": {
            "title": "Revision",
            "type": "integer"
          },
          "sensitivity": {
            "title": "Sensitivity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "guidance_id",
          "revision",
          "category",
          "title",
          "status",
          "sensitivity",
          "rejected_count"
        ],
        "title": "GuidanceSummary",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "MeView": {
        "properties": {
          "environment": {
            "title": "Environment",
            "type": "string"
          },
          "key_id": {
            "title": "Key Id",
            "type": "string"
          },
          "production_access": {
            "title": "Production Access",
            "type": "boolean"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "workspace_name": {
            "title": "Workspace Name",
            "type": "string"
          }
        },
        "required": [
          "key_id",
          "environment",
          "scopes",
          "workspace_name",
          "production_access"
        ],
        "title": "MeView",
        "type": "object"
      },
      "MessageView": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "message_id": {
            "title": "Message Id",
            "type": "integer"
          },
          "sender": {
            "title": "Sender",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "sender",
          "text",
          "created_at"
        ],
        "title": "MessageView",
        "type": "object"
      },
      "MessagesPage": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageView"
            },
            "title": "Messages",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "messages",
          "next_cursor"
        ],
        "title": "MessagesPage",
        "type": "object"
      },
      "OrderStatusBody": {
        "additionalProperties": false,
        "properties": {
          "order_ref": {
            "maxLength": 40,
            "minLength": 2,
            "title": "Order Ref",
            "type": "string"
          },
          "verifier": {
            "maxLength": 120,
            "minLength": 3,
            "title": "Verifier",
            "type": "string"
          }
        },
        "required": [
          "order_ref",
          "verifier"
        ],
        "title": "OrderStatusBody",
        "type": "object"
      },
      "OrderStatusView": {
        "properties": {
          "order": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrderView"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "title": "Outcome",
            "type": "string"
          }
        },
        "required": [
          "outcome",
          "order"
        ],
        "title": "OrderStatusView",
        "type": "object"
      },
      "OrderView": {
        "properties": {
          "carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Carrier"
          },
          "eta": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eta"
          },
          "order_ref": {
            "title": "Order Ref",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "status_label": {
            "title": "Status Label",
            "type": "string"
          },
          "tracking_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tracking Url"
          }
        },
        "required": [
          "order_ref",
          "status",
          "status_label",
          "eta",
          "carrier",
          "tracking_url"
        ],
        "title": "OrderView",
        "type": "object"
      },
      "PatchEndpointBody": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 2,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "PatchEndpointBody",
        "type": "object"
      },
      "ProductView": {
        "properties": {
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "in_stock": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Stock"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price"
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sku"
          },
          "stock": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stock"
          }
        },
        "required": [
          "name",
          "sku",
          "category",
          "brand",
          "price",
          "currency",
          "stock",
          "in_stock"
        ],
        "title": "ProductView",
        "type": "object"
      },
      "SourceSummary": {
        "properties": {
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "source_id": {
            "title": "Source Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          },
          "valid_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid Until"
          }
        },
        "required": [
          "source_id",
          "title",
          "kind",
          "status"
        ],
        "title": "SourceSummary",
        "type": "object"
      },
      "SubmitMessageBody": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "SubmitMessageBody",
        "type": "object"
      },
      "TicketBody": {
        "additionalProperties": false,
        "properties": {
          "customer_ref": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Customer Ref",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "summary": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Summary",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "customer_ref",
          "summary"
        ],
        "title": "TicketBody",
        "type": "object"
      },
      "TicketView": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "summary": {
            "title": "Summary",
            "type": "string"
          },
          "ticket_id": {
            "title": "Ticket Id",
            "type": "integer"
          }
        },
        "required": [
          "ticket_id",
          "kind",
          "status",
          "summary"
        ],
        "title": "TicketView",
        "type": "object"
      },
      "UsageView": {
        "properties": {
          "environment": {
            "title": "Environment",
            "type": "string"
          },
          "rate_limit_per_minute": {
            "title": "Rate Limit Per Minute",
            "type": "integer"
          },
          "requests_today": {
            "title": "Requests Today",
            "type": "integer"
          },
          "sandbox_daily_quota": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sandbox Daily Quota"
          },
          "sandbox_requests_today": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sandbox Requests Today"
          }
        },
        "required": [
          "environment",
          "requests_today",
          "rate_limit_per_minute",
          "sandbox_daily_quota",
          "sandbox_requests_today"
        ],
        "title": "UsageView",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "The Tephlo Commercial API: programmatic access to your workspace's\nconversations, knowledge base, catalog, orders, tickets, and webhooks.\n\n## Authentication\n\nEvery request must carry an API key in the Authorization header:\n\n    Authorization: Bearer tphlo_sk_...\n\nKeys are shown exactly once at creation and are scoped per credential; a\nrequest outside the credential's scopes is refused.\n\n## Idempotency\n\nWrite requests (JSON POST/PATCH) require an `Idempotency-Key` header\n(1-255 printable characters). Retrying with the same key replays the\noriginal result instead of repeating the side effect; reusing a key with a\ndifferent request body is an error.\n\n## Errors\n\nErrors always return the canonical envelope, never internals:\n\n    {\"error\": {\"code\": \"...\", \"message\": \"...\"}}\n\n## Request correlation\n\nEvery response carries an `x-request-id` header. Include it when contacting\nsupport about a specific request.\n",
    "title": "Tephlo Commercial API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/catalog/overview": {
      "get": {
        "operationId": "catalog_overview_v1_catalog_overview_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogOverviewView"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Catalog Overview",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/catalog/products": {
      "get": {
        "operationId": "search_products_v1_catalog_products_get",
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Query"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category"
            }
          },
          {
            "in": "query",
            "name": "brand",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Brand"
            }
          },
          {
            "in": "query",
            "name": "in_stock",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "In Stock"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogSearchView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Products",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/conversations": {
      "post": {
        "description": "Get-or-create \u2014 naturally idempotent: one conversation per customer_ref\n(the conversations table's 4-column unique key is the arbiter).",
        "operationId": "create_conversation_v1_conversations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Conversation",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/conversations/{conversation_id}": {
      "get": {
        "operationId": "get_conversation_v1_conversations__conversation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "title": "Conversation Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Conversation",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/messages": {
      "get": {
        "operationId": "list_messages_v1_conversations__conversation_id__messages_get",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "title": "Conversation Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Messages",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "post": {
        "description": "One end-customer message into the normal pipeline. 202 = accepted (or\nalready accepted); 429 = retryable, never an ack.",
        "operationId": "submit_message_v1_conversations__conversation_id__messages_post",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "title": "Conversation Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitMessageBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Submit Message",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/guidance": {
      "get": {
        "operationId": "list_guidance_v1_guidance_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GuidanceSummary"
                  },
                  "title": "Response List Guidance V1 Guidance Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "post": {
        "operationId": "create_guidance_v1_guidance_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGuidanceBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/guidance/{guidance_id}": {
      "get": {
        "operationId": "get_guidance_v1_guidance__guidance_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "guidance_id",
            "required": true,
            "schema": {
              "title": "Guidance Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "revision",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Revision"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuidanceDetailView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/guidance/{guidance_id}/revoke": {
      "post": {
        "operationId": "revoke_guidance_v1_guidance__guidance_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "guidance_id",
            "required": true,
            "schema": {
              "title": "Guidance Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuidanceDetailView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/guidance/{guidance_id}/{revision}/activate": {
      "post": {
        "description": "Approve (hash-bound, NO second factor \u2014 elevated+ refuses) + activate\nthrough the same CAS the console uses.",
        "operationId": "activate_guidance_v1_guidance__guidance_id___revision__activate_post",
        "parameters": [
          {
            "in": "path",
            "name": "guidance_id",
            "required": true,
            "schema": {
              "title": "Guidance Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision",
            "required": true,
            "schema": {
              "title": "Revision",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Activate Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/guidance/{guidance_id}/{revision}/preview": {
      "get": {
        "description": "Assembly-level preview: what turns receive now vs. with this revision.\nPure read \u2014 grants nothing, cannot be reused as activation authority.",
        "operationId": "preview_guidance_v1_guidance__guidance_id___revision__preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "guidance_id",
            "required": true,
            "schema": {
              "title": "Guidance Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "revision",
            "required": true,
            "schema": {
              "title": "Revision",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Preview Guidance V1 Guidance  Guidance Id   Revision  Preview Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Guidance",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/knowledge/sources": {
      "get": {
        "operationId": "list_sources_v1_knowledge_sources_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SourceSummary"
                  },
                  "title": "Response List Sources V1 Knowledge Sources Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sources",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "post": {
        "operationId": "upload_source_v1_knowledge_sources_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_source_v1_knowledge_sources_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Source",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/knowledge/sources/text": {
      "post": {
        "operationId": "create_text_source_v1_knowledge_sources_text_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTextSourceBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Text Source",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/knowledge/sources/{source_id}": {
      "delete": {
        "operationId": "delete_source_v1_knowledge_sources__source_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Delete Source V1 Knowledge Sources  Source Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Source",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "get": {
        "operationId": "get_source_v1_knowledge_sources__source_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "title": "Source Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceSummary"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Source",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me_v1_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeView"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Me",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/orders/status": {
      "post": {
        "operationId": "order_status_v1_orders_status_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderStatusBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderStatusView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Order Status",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/tickets": {
      "post": {
        "operationId": "create_ticket_v1_tickets_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Ticket",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/tickets/{ticket_id}": {
      "get": {
        "operationId": "get_ticket_v1_tickets__ticket_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "ticket_id",
            "required": true,
            "schema": {
              "title": "Ticket Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Ticket",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "usage_v1_usage_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageView"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Usage",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "list_endpoints_v1_webhook_endpoints_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EndpointView"
                  },
                  "title": "Response List Endpoints V1 Webhook Endpoints Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Endpoints",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "post": {
        "operationId": "create_endpoint_v1_webhook_endpoints_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Endpoint",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}": {
      "delete": {
        "operationId": "delete_endpoint_v1_webhook_endpoints__endpoint_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "title": "Endpoint Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Delete Endpoint V1 Webhook Endpoints  Endpoint Id  Delete",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Endpoint",
        "tags": [
          "commercial-api-v1"
        ]
      },
      "patch": {
        "operationId": "patch_endpoint_v1_webhook_endpoints__endpoint_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "title": "Endpoint Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchEndpointBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointView"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Endpoint",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/rotate-secret": {
      "post": {
        "description": "New signing secret NOW; the previous one keeps verifying for a bounded\noverlap so receivers can roll without dropping deliveries.",
        "operationId": "rotate_secret_v1_webhook_endpoints__endpoint_id__rotate_secret_post",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "title": "Endpoint Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Rotate Secret V1 Webhook Endpoints  Endpoint Id  Rotate Secret Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Secret",
        "tags": [
          "commercial-api-v1"
        ]
      }
    },
    "/v1/webhook-endpoints/{endpoint_id}/test": {
      "post": {
        "description": "Queue one signed tephlo.v1.ping delivery to THIS endpoint.",
        "operationId": "test_endpoint_v1_webhook_endpoints__endpoint_id__test_post",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "title": "Endpoint Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Test Endpoint V1 Webhook Endpoints  Endpoint Id  Test Post",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Test Endpoint",
        "tags": [
          "commercial-api-v1"
        ]
      }
    }
  }
}
