Staff workspace · Customer portal

API reference

Help center / API reference

Use /api/v1 on your workspace’s HTTPS hostname to connect another app, migrate records, or export data.

Get started

  1. Sign in and open Administration → API integrations.
  2. Create a credential for the integration. Choose a read or write scope for each resource it needs.
  3. Copy the secret when it appears. Send it as Authorization: Bearer <token>.

For OAuth, choose OAuth 2.0 client credentials when creating the credential. Exchange the client ID and secret at POST /api/v1/oauth/token using HTTP Basic and a form body with grant_type=client_credentials. An optional space-separated scope requests a subset of your scopes. Use the returned access token as a bearer token for 15 minutes.

API credentials apply to one workspace. Revoke a credential in Administration to stop its use and invalidate any access tokens it issued.

Test a read request

Requests use this workspace and return live data allowed by your token.

Endpoints

Expand a request to see its scope, parameters, and example payload. Paths below are relative to /api/v1.

API access

GET /api/v1 Check credential access

List the API version, available resources, and this credential’s scopes.

Success 200 Available API access

POST /oauth/token Request an OAuth token

Authenticate with the client ID and client secret using HTTP Basic. The access token is valid for 15 minutes.

Example request body

{
  "grant_type": "client_credentials",
  "scope": "customers:read"
}

Success 200 Access token

Customers

GET /customers List records

List records by ascending ID. Reuse the returned cursor to load the next page.

Scope customers:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • format Output format.

Success 200 Page of records

POST /customers Create a record

Use the same idempotency key and payload for retries. Invoice creation produces a draft.

Scope customers:write

Parameters

  • Idempotency-Key (required) A unique key for this create operation.

Example request body

{
  "name": "Example Company",
  "email": "it@example.com"
}

Success 200 Record · 201 Record

GET /customers/{id} Get a record

Read the record and its current ETag.

Scope customers:read

Parameters

  • id (required) OpsGeneral record ID.

Success 200 Record

PATCH /customers/{id} Update a record

Update the supplied fields using the current ETag.

Scope customers:write

Parameters

  • id (required) OpsGeneral record ID.
  • If-Match (required) Current ETag, including quotes.

Example request body

{
  "name": "Example Company"
}

Success 200 Record

POST /customers/import Import records

Import up to 100 records as one transaction. Provide an external_id for each source record and use dry_run to preview.

Scope customers:write

Parameters

  • dry_run Preview a native CSV request.
  • on_conflict Conflict policy for a native CSV request.

Example request body

{
  "dry_run": true,
  "records": [
    {
      "external_id": "source-123",
      "name": "Example Company",
      "email": "it@example.com"
    }
  ]
}

Success 200 Import results

GET /customers/export Export records

Export one page as CSV or JSON. JSON preserves the original cell text and nested data.

Scope customers:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • format Output format.

Success 200 Page of records

Assets

GET /assets List records

List records by ascending ID. Reuse the returned cursor to load the next page.

Scope assets:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

POST /assets Create a record

Use the same idempotency key and payload for retries. Invoice creation produces a draft.

Scope assets:write

Parameters

  • Idempotency-Key (required) A unique key for this create operation.

Example request body

{
  "client_id": 1,
  "name": "Office workstation",
  "platform": "Windows"
}

Success 200 Record · 201 Record

GET /assets/{id} Get a record

Read the record and its current ETag.

Scope assets:read

Parameters

  • id (required) OpsGeneral record ID.

Success 200 Record

PATCH /assets/{id} Update a record

Update the supplied fields using the current ETag.

Scope assets:write

Parameters

  • id (required) OpsGeneral record ID.
  • If-Match (required) Current ETag, including quotes.

Example request body

{
  "name": "Office workstation"
}

Success 200 Record

POST /assets/import Import records

Import up to 100 records as one transaction. Provide an external_id for each source record and use dry_run to preview.

Scope assets:write

Parameters

  • dry_run Preview a native CSV request.
  • on_conflict Conflict policy for a native CSV request.

Example request body

{
  "dry_run": true,
  "records": [
    {
      "external_id": "source-123",
      "client_id": 1,
      "name": "Office workstation",
      "platform": "Windows"
    }
  ]
}

Success 200 Import results

GET /assets/export Export records

Export one page as CSV or JSON. JSON preserves the original cell text and nested data.

Scope assets:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

Tickets

GET /tickets List records

List records by ascending ID. Reuse the returned cursor to load the next page.

Scope tickets:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

POST /tickets Create a record

Use the same idempotency key and payload for retries. Invoice creation produces a draft.

Scope tickets:write

Parameters

  • Idempotency-Key (required) A unique key for this create operation.

Example request body

{
  "client_id": 1,
  "title": "Printer offline",
  "description": "Reception printer is offline.",
  "priority": "Normal"
}

Success 200 Record · 201 Record

GET /tickets/{id} Get a record

Read the record and its current ETag.

Scope tickets:read

Parameters

  • id (required) OpsGeneral record ID.

Success 200 Record

PATCH /tickets/{id} Update a record

Update the supplied fields using the current ETag.

Scope tickets:write

Parameters

  • id (required) OpsGeneral record ID.
  • If-Match (required) Current ETag, including quotes.

Example request body

{
  "title": "Printer offline"
}

Success 200 Record

POST /tickets/import Import records

Import up to 100 records as one transaction. Provide an external_id for each source record and use dry_run to preview.

Scope tickets:write

Parameters

  • dry_run Preview a native CSV request.
  • on_conflict Conflict policy for a native CSV request.

Example request body

{
  "dry_run": true,
  "records": [
    {
      "external_id": "source-123",
      "client_id": 1,
      "title": "Printer offline",
      "description": "Reception printer is offline.",
      "priority": "Normal"
    }
  ]
}

Success 200 Import results

GET /tickets/export Export records

Export one page as CSV or JSON. JSON preserves the original cell text and nested data.

Scope tickets:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

Invoices

GET /invoices List records

List records by ascending ID. Reuse the returned cursor to load the next page.

Scope invoices:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

POST /invoices Create a record

Use the same idempotency key and payload for retries. Invoice creation produces a draft.

Scope invoices:write

Parameters

  • Idempotency-Key (required) A unique key for this create operation.

Example request body

{
  "client_id": 1,
  "name": "On-site support",
  "lines": [
    {
      "kind": "Service",
      "description": "Labor",
      "quantity": 2,
      "unit_cents": 7500
    }
  ]
}

Success 200 Record · 201 Record

GET /invoices/{id} Get a record

Read the record and its current ETag.

Scope invoices:read

Parameters

  • id (required) OpsGeneral record ID.

Success 200 Record

PATCH /invoices/{id} Update a record

Edit the name, due date, or reference on a draft invoice.

Scope invoices:write

Parameters

  • id (required) OpsGeneral record ID.
  • If-Match (required) Current ETag, including quotes.

Example request body

{
  "name": "On-site support"
}

Success 200 Record

POST /invoices/import Import records

Import up to 100 records as one transaction. Provide an external_id for each source record and use dry_run to preview.

Scope invoices:write

Parameters

  • dry_run Preview a native CSV request.
  • on_conflict Conflict policy for a native CSV request.

Example request body

{
  "dry_run": true,
  "records": [
    {
      "external_id": "source-123",
      "client_id": 1,
      "name": "On-site support",
      "lines": [
        {
          "kind": "Service",
          "description": "Labor",
          "quantity": 2,
          "unit_cents": 7500
        }
      ]
    }
  ]
}

Success 200 Import results

GET /invoices/export Export records

Export one page as CSV or JSON. JSON preserves the original cell text and nested data.

Scope invoices:read

Parameters

  • limit Records per page.
  • after Cursor from the previous response.
  • client_id Filter by customer ID.
  • format Output format.

Success 200 Page of records

Synchronization

GET /changes Read the change feed

Read workspace changes in event order. Events are filtered by the read scopes on the credential.

Parameters

  • limit Records per page.
  • after Cursor from the previous response.

Success 200 Change events

Import and export

Import customers first. On assets, tickets, and invoices, use the OpsGeneral client_id or the source customer’s customer_external_id. Each imported record gets an external_id unique to its resource and integration name. Reuse the integration name after revocation to keep its mappings.

Preview a mapped CSV import

{
  "dry_run": true,
  "csv": "Customer ID,Company,Email\n42,Example Company,it@example.com",
  "mapping": {
    "external_id": "Customer ID",
    "name": "Company",
    "email": "Email"
  }
}

Send this body to POST /api/v1/customers/import. Use JSON for exact text fidelity. CSV exports prefix spreadsheet formulas with an apostrophe.

Invoice imports create drafts and use integer USD cents. Service and sales tax lines take a description and unit price. Catalog lines use an existing item ID. Issue invoices and record payments in the billing workflow. Asset imports create device records. Monitoring enrollment is handled by the agent.

Synchronization

For scheduled sync, take an initial export, then poll GET /api/v1/changes?after=0. Save the cursor after downstream writes succeed. Changes include the event ID, resource, record ID, operation, and timestamp. Fetch the latest record for create and update events.

For push delivery, configure a trusted HTTPS receiver with MSP_INTEGRATION_WEBHOOK_URL and a signing secret of at least 32 bytes with MSP_INTEGRATION_WEBHOOK_SECRET on the workspace server. The receiver should check timestamp freshness and verify the HMAC-SHA256 of the timestamp, a period, and the raw body against X-OpsGeneral-Signature. Read the timestamp from X-OpsGeneral-Timestamp and use X-OpsGeneral-Event-ID to deduplicate per workspace.

Acknowledge accepted events with a 2xx response. Delivery failures appear under API integrations after retries are exhausted. Use the change feed to recover missed events.

Troubleshoot requests