Skip to main content
Two endpoints, both behind X-Admin-Key (set via ORCH_ADMIN_KEY). These are the only endpoints that don’t use a product key — they create products.

POST /products/register

Register a new product. Returns the platform API key — save it.

Request

Response (200)

The plaintext key is returned once. The orchestrator stores only the SHA-256 hash. If you lose it, you have to re-register the product.

Errors

  • 401 INVALID_ADMIN_KEY — wrong or missing X-Admin-Key.
  • 409 PRODUCT_SLUG_EXISTS — slug already in use.

PUT /products//policy

Update a product’s policy. Used to raise/lower limits without re-registering.

Request

Response (200)

The change takes effect immediately on the next request. Existing engines exceeding a tightened max_engines are NOT destroyed retroactively.

Errors

  • 401 INVALID_ADMIN_KEY — wrong or missing X-Admin-Key.
  • 404 PRODUCT_NOT_FOUND — product_id doesn’t exist.

What admin endpoints can’t do

  • Destroy a product. No DELETE today. To remove a product: destroy all its engines, then delete the row directly: DELETE FROM products WHERE id = '...';. Cascades clean up engines.
  • Rotate a platform key. No endpoint today. Re-register the product or update products.api_key_hash directly.
  • Upgrade engine version per product. Engines run on ORCH_ENGINE_IMAGE globally. To run different versions per product, you need separate orchestrator deployments.

Security

The admin key is a single secret per orchestrator deployment. Treat it like a database master password:
  • Keep it in your secret manager.
  • Audit access to it.
  • Rotate quarterly.
  • Don’t share with products’ application code.
For day-to-day product operations, the platform key is enough — admin endpoints are deliberately rare.

See also

  • AuthX-Admin-Key mechanics.
  • Policy — what the policy fields mean.
  • Security — admin key rotation playbook.