Skip to main content

REST API

Empora exposes two REST surfaces: the backend account/billing API (Laravel) and the plugin's internal REST namespace (WordPress).

Audience

These are reference notes for developers and integrators. Day-to-day store management does not require calling these directly — the admin UI and dashboard do it for you.

Backend account API (Laravel)

Base URL: https://empora-api.aoneahsan.com/api. Authentication uses Laravel Sanctum bearer tokens. All routes are versioned under v1.

Auth (public)

MethodPathPurpose
POST/v1/auth/registerCreate an account.
POST/v1/auth/loginObtain a token.
POST/v1/auth/forgot-passwordStart password reset.
POST/v1/auth/reset-passwordComplete password reset.
POST/v1/auth/googleSign in with Google.

Auth (token required)

MethodPathPurpose
POST/v1/auth/logoutRevoke the current token.
GET/v1/auth/userCurrent user profile.
PATCH/v1/auth/userUpdate profile.
POST/v1/auth/change-passwordChange password.

Licenses (account-scoped, token required)

MethodPathPurpose
GET/v1/user/licensesList your licenses.
GET/v1/user/licenses/{id}One license + connected sites.
POST/v1/user/licenses/{id}/deactivate-siteRelease a connected site.

Billing (token required)

MethodPathPurpose
POST/v1/checkoutCreate a Stripe checkout session.
GET/v1/user/subscriptionCurrent subscription state.
POST/v1/webhooks/stripeStripe webhook (server-to-server; signature-verified).

Updates & health

MethodPathPurpose
GET/v1/updates/checkPremium plugin update check.
GET/healthLiveness.
GET/health/detailedDetailed health (rate-limited).

The plugin-facing license endpoints (/v1/licenses/activate, /validate, /deactivate) are documented separately in the License API reference.

Plugin internal REST (WordPress)

Inside WordPress the plugin registers routes under the aiowc/v1 namespace. Each enabled module contributes its own endpoints, consumed by the React admin. For example, the Email Automation module exposes routes such as:

GET /wp-json/aiowc/v1/email-automation/overview
GET /wp-json/aiowc/v1/email-automation/templates
POST /wp-json/aiowc/v1/email-automation/templates
GET /wp-json/aiowc/v1/email-automation/workflows
POST /wp-json/aiowc/v1/email-automation/workflows/{id}/toggle
POST /wp-json/aiowc/v1/email-automation/send-test
GET /wp-json/aiowc/v1/email-automation/diagnostics

These internal routes use WordPress nonce/cookie authentication and manage_woocommerce capability checks. They exist to serve the admin UI; the exact set depends on which modules are enabled.