Quickstart
This takes about five minutes. You need an OpexAIO account in a workspace with an Enterprise plan on at least one product (the API is an Enterprise feature), and a terminal with curl (and jq to read the answers more easily).
1. Create an API key
- Sign in at app.aio.opexcg.com.
- In the sidebar, open MCP.
- Choose Create API key, give it a label such as
Reporting script, and choose Create. - Copy the key. It starts with
pk_live_and is shown only once.
The key acts as you, in the workspace you were in when you created it. Treat it like a password: keep it out of source code and revoke it on the same page if it leaks.
2. Set two variables
export OPEX=https://app.aio.opexcg.comexport OPEX_API_KEY=pk_live_your_key_hereEvery example in these docs uses them. To try things on staging first, use https://staging.app.aio.opexcg.com with a key created there.
3. Check who you are
curl -s "$OPEX/api/me" -H "X-API-Key: $OPEX_API_KEY" \ | jq '{userId, role, tenantName, email, entitlements, permissions: (.permissions | length)}'{ "userId": "usr-dewi-lestari", "role": "admin", "tenantName": "Nusantara Digital", "entitlements": ["timesheets", "helpdesk", "pmo", "crm", "expenses", "leave"], "permissions": 118}entitlements are the products your workspace can use, and permissions the actions your roles allow. Authentication and permissions explains both.
4. Read some data
curl -s "$OPEX/api/projects?pageSize=2" -H "X-API-Key: $OPEX_API_KEY" \ | jq '{total, page, pageSize, items: [.items[] | {id, name, status}]}'{ "total": 21, "page": 1, "pageSize": 2, "items": [ { "id": "prj-epicor", "name": "ABC Epicor ERP", "status": "active" }, { "id": "prj-opexmx", "name": "ABC OPEXmx Portal", "status": "active" } ]}5. See what an error looks like
Without a key:
curl -s -w ' %{http_code}\n' "$OPEX/api/me"{"error":"unauthorized"} 401Errors always carry a machine-readable code. Conventions lists how to handle them.
Next
- Pick a product guide for a ready-made recipe.
- Browse the API reference, or load
/openapi.jsoninto Postman or Insomnia. - Connect an AI assistant through MCP.