Browse the docs ▾

REST API

Endpoints

Every route maps to one MCP tool and runs the same checks. Paths below are under https://api.opmiz.com/v1.

Site

ROUTE

WHAT IT DOES

GET /orgs

The businesses this key can use.
Tool: list_orgs

GET /orgs/{org_id}/site

Pages, sections and the revision.
Tool: get_site

GET /orgs/{org_id}/site/search

Find nodes by their words.
Tool: search_site

GET /orgs/{org_id}/site/pages/{page}/outline

A page's nodes with refs.
Tool: get_page_outline

GET /orgs/{org_id}/site/node

One node (ref in the query).
Tool: get_node

GET /orgs/{org_id}/site/catalogue

Ops, style properties and tokens.
Tool: get_element_catalogue

POST /orgs/{org_id}/site/ops/preview

Check ops without saving.
Tool: preview_site_ops

POST /orgs/{org_id}/site/ops

Apply ops to the draft.
Tool: apply_site_ops

POST /orgs/{org_id}/site/changes/{action_id}/undo

Undo one batch.
Tool: undo_site_change

POST /orgs/{org_id}/site/publish/preview

What would go live, and a token.
Tool: preview_site_publish

POST /orgs/{org_id}/site/publish

Publish with the token.
Tool: publish_site

POST /orgs/{org_id}/site/logo

Set the logo.
Tool: set_brand_logo

Pages, business and policies

ROUTE

WHAT IT DOES

GET /orgs/{org_id}/pages

Pages with addresses and search text.
Tool: list_pages

POST /orgs/{org_id}/pages/{page_id}/settings/preview

A page setting change, and a token.
Tool: preview_page_settings

POST /orgs/{org_id}/pages/{page_id}/settings

Save it (live at once).
Tool: save_page_settings

GET · POST /orgs/{org_id}/business

Read, or save previewed business details.
Tool: get / save_business_details

POST /orgs/{org_id}/business/preview

Business details before and after.
Tool: preview_business_details

GET · POST /orgs/{org_id}/policies

Read, or save Terms and Privacy.
Tool: get / save_policies

POST /orgs/{org_id}/policies/preview

Terms and Privacy before saving.
Tool: preview_policies

GET · POST /orgs/{org_id}/store-lists

Read, or save the shop's lists.
Tool: get / save_store_lists

POST /orgs/{org_id}/store-lists/preview

The lists before and after.
Tool: preview_store_lists

Content

ROUTE

WHAT IT DOES

GET /orgs/{org_id}/content-types

Content types.
Tool: list_content_types

GET /orgs/{org_id}/content-types/{id}

One type's fields.
Tool: get_content_type

GET · POST /orgs/{org_id}/content-types/{id}/items

List items, or create a draft.
Tool: list_items / create_item

GET · PATCH /orgs/{org_id}/items/{item_id}

Read or change an item.
Tool: get_item / update_item

POST /orgs/{org_id}/items/{item_id}/publish/preview

A token to publish or take down.
Tool: preview_item_publish

POST /orgs/{org_id}/items/publish · /unpublish

Publish or take down with the token.
Tool: publish_item / unpublish_item

POST /orgs/{org_id}/content-types/{id}/imports

Start an import; answers with an upload link.
Tool: import_items

GET /orgs/{org_id}/imports/{import_id}

Progress and each item's result.
Tool: get_import

POST /orgs/{org_id}/imports/{import_id}/publish/preview

One token for the whole import.
Tool: preview_item_publish

GET /orgs/{org_id}/custom-types · /tags

Custom types and tags.
Tool: list_custom_types / list_tags

GET /orgs/{org_id}/library · /library/{id}

Library items.
Tool: list / get_library_item

POST /orgs/{org_id}/library/{id}/preview · /library/{id}

Preview and save a Library change.
Tool: preview / save_library_change

POST /orgs/{org_id}/media

Add images.
Tool: upload_image

Catalogue (read only)

ROUTE

WHAT IT DOES

GET /orgs/{org_id}/products · /products/{id}

Products and one product.
Tool: list_products / get_product

GET /orgs/{org_id}/stock

Stock by variant.
Tool: list_stock

GET /orgs/{org_id}/collections · /collections/{id}/order

Collections and their order.
Tool: list_collections / get_collection_order

GET /orgs/{org_id}/categories · /categories/{id}/fields

Categories and their fields.
Tool: list_categories / get_category_fields
The exact fields of every route are in /v1/openapi.json.

‹ Previous

API overview

Change a headline and publish

GET  /v1/orgs/121/site
  → "revision": "7d95…"

POST /v1/orgs/121/site/ops
{
  "base_revision": "7d95…",
  "ops": [{
    "op": "set_text",
    "ref": "home/home-hero/headline",
    "value": "Cakes for your day"
  }]
}

POST /v1/orgs/121/site/publish/preview
  → "publish_token": "pub_…"

POST /v1/orgs/121/site/publish
{ "publish_token": "pub_…" }

‹ Previous

API overview