Developer Docs 8 min read

OpsIQ Developer Documentation

OpsIQ Developer Documentation

Start Here

OpsIQ exposes a stable namespaced action API at /api/v1.php. Send {"action":"meta.actions"} to discover the live catalog, then call actions such as crm.contacts.list, tickets.open, writing.reply, crm.deals.list, or kb.faq.save.

Machine-readable Spec

The OpenAPI contract is always available at /api/v1/openapi.php. Import it into Postman, Insomnia, Stoplight, or your code generator.

curl /api/v1/openapi.php

Base URL

Use your own OpsIQ domain as the host. The path remains the same across installations:

https://your-opsiq-domain.com/api/v1.php

Every write operation should be tied to an API key scope and should pass through OpsIQ services or the connector gateway. Do not write directly to platform tables from custom code.

Authentication

Create an API key in OpsIQ, assign only the scopes that the integration needs, and send it as a bearer token:

Authorization: Bearer opq_your_key_here
curl -X POST https://your-opsiq-domain.com/api/v1.php \
-H "Authorization: Bearer opq_your_key_here" \
-H "Content-Type: application/json" \
-d '{"action":"meta.actions"}'

Keys can be rotated at any time. Store them server-side only. Browser widgets should use the widget identity token flow, not public API keys. Every API v1 response includes a request_id. Keep it with integration logs so OpsIQ support can trace the exact authenticated request, workspace, action, outcome, and latency without storing the caller's raw IP address.

API Actions

Contacts

To list contacts, use the action crm.contacts.list.

Scope: crm.read

curl -X POST https://your-opsiq-domain.com/api/v1.php \
-H "Authorization: Bearer opq_your_key_here" \
-H "Content-Type: application/json" \
-d '{"action":"crm.contacts.list","q":"ada","limit":25}'

To create or update contacts, use crm.contacts.save or crm.contacts.upsert.

Scope: crm.write

{
  "action": "crm.contacts.upsert",
  "email": "[email protected]",
  "name": "Ada Lovelace",
  "tags": ["trial", "developer"]
}

To fetch one contact, use crm.contacts.detail, export with crm.contacts.export, or ask for the next action with crm.contacts.next_action.

Scope: crm.read

Tickets

To open support tickets, use the action tickets.open or tickets.open_guest.

Scope: admin

{
  "action": "tickets.open",
  "customer_email": "[email protected]",
  "customer_name": "Example Customer",
  "subject": "Cannot activate account",
  "body": "Activation email never arrived.",
  "priority": "high"
}

Use ticket actions for tags, saved views, assignment rules, SLA policies, and bulk queue actions.

Scope: admin

{"action":"tickets.bulk","operation":"close","ids":[123,124]}

Ticket write actions are operator-side actions and require an API key with admin scope. For platform-native ticket sync, prefer the connector action gateway.

Chats

Manage operator chat resources such as saved replies with actions like chat.saved_replies.list, chat.saved_replies.save, and chat.saved_replies.add.

Scope: admin

For visitor live chat, use the widget runtime. The public action API is for server-side integrations and operator tooling.

Analytics

Read CRM and business activity through action catalog reads such as crm.events.list, crm.conversions.list, and crm.deals.list.

Scope: crm.read

curl -X POST https://your-opsiq-domain.com/api/v1.php \
-H "Authorization: Bearer opq_your_key_here" \
-H "Content-Type: application/json" \
-d '{"action":"crm.events.list","limit":50}'

Responses are workspace-scoped. Shared site groups do not merge per-domain visitor data unless the called action explicitly supports that aggregation.

Proactive Events

Record lifecycle and conversion activity with action API calls such as crm.activities.record, crm.conversions.record, or lifecycle evaluation actions.

Scope: crm.write

{
  "action": "crm.activities.record",
  "email": "[email protected]",
  "event": "checkout.abandoned",
  "value": 129.50,
  "currency": "USD"
}

Use meta.actions to discover the currently enabled proactive and lifecycle actions on the install.

Knowledge Base

Read and manage FAQ/knowledge entries with kb.faq.list, kb.faq.save, kb.faq.delete, kb.faq.generate, and kb.faq.import.

Scope: admin/read

{
  "action": "kb.faq.save",
  "question": "How do I reset my password?",
  "answer": "Open Account Settings, choose Security, then Reset Password.",
  "status": "published"
}

The customer AI can use published knowledge-base content when answering visitors, depending on your AI instruction settings.