Browse the docs ▾

REST API

REST API

The same abilities as the MCP server, as plain JSON over HTTPS, for your own scripts and servers.

Base address

https://api.opmiz.com/v1

Description

https://api.opmiz.com/v1/openapi.json (OpenAPI 3.1), public

Auth

Authorization: Bearer opk_… on every call

Format

JSON in and out. GET takes options in the query string; POST and PATCH in the body.

Get a key

1

In the Opmiz dashboard, open Settings › AI apps and go to API keys.

2

Name the key and choose what it may do. Copy it now: it is shown only once.

3

Keep it on your server. Never put it in a website or a public repository.
A key works on one business, acts as the person who made it, and lasts 90 days. It can read and write the site and content, add images and read the catalogue. Orders, adding products and changing content fields are only for apps a person connects.

Versions

Within /v1 we only add things: new routes, new optional fields, new error codes. Anything that would break your code goes to /v2, and /v1 keeps working for at least six months after that. Every response carries an Opmiz-Api-Version header.
The API has no browser (CORS) access, so call it from a server or a script, not from a web page.

‹ Previous

Orders

Next ›

Endpoints

Your first request

curl https://api.opmiz.com/v1/orgs \
  -H "Authorization: Bearer opk_••••"

Response

{
  "orgs": [
    {
      "org_id": 121,
      "name": "Kaveri Handlooms",
      "role": "Account Owner"
    }
  ]
}

Node.js

const res = await fetch(
  "https://api.opmiz.com/v1/orgs/121/pages",
  { headers: {
    Authorization:
      `Bearer ${process.env.OPMIZ_KEY}`
  } }
);
const { pages } = await res.json();

‹ Previous

Orders

Next ›

Endpoints