← Back to the site

API for RMM and PSA

The console has a read API so your RMM, PSA, spreadsheet or a company system can pull customers, machines, alerts and events without anyone opening the screen. This page has everything an integration needs: how to authenticate, what you can read, how to paginate, and what the API never returns. It also covers the one write the API accepts: uploading the client list, with an integration key made for that.

The key

There are two kinds of key; both start with shai_ and go in the same header.

Company integration key, for a company system (an internal system, ERP, CRM or a metrics dashboard). It belongs to the customer, not to a person: it keeps working when whoever created it changes or resets their password or leaves the company. Whoever disables or deletes that person, or resets their password or second factor, can tick the option to revoke the integration keys they created along with it; the option comes unticked.

  1. In the console, with the customer selected, open Integrations and scroll to the Integration keys card.
  2. Under What the key can do, choose Read-only or Client list upload (the one in Upload the client list through the API).
  3. Give it a name that says which system will use it, such as Internal system.
  4. Click Create key and copy the key right away. It is not shown again; if you lose it, revoke it and create another. The new key box brings a PowerShell and a curl example already filled in with the address and the customer.

Whoever administers the whole customer creates, lists and revokes these keys: a customer administrator without a group scope, or an MSP administrator on their customers. The key covers a single customer, whole, and reads what an administrator of that customer reads.

Personal API key, for the provider's RMM or PSA to query several customers.

  1. In the console, open Profile & security (in the menu under your name) and go to Personal API key.
  2. Give it a name that says where it will live, such as NinjaOne or Billing spreadsheet.
  3. Click Create key and copy the key right away.

The personal key carries the scope of whoever created it: an MSP administrator's key reads every customer of the MSP; a customer administrator's key reads only that customer; the key of a user scoped to a group reads only the machines in that group. It is revoked when the person changes or resets their password, and stops when the person is disabled; if the person is re-enabled, the old personal keys do not work again, and they create new ones. It is always read-only: the client list upload belongs to the integration key only (a personal list upload key created before this change keeps working until it is revoked, and POST /me/api-keys with escopo=lista_de_clientes answers 400 escopo_so_na_chave_de_integracao).

Both are read-only, whatever the creator's role. A leaked key cannot acknowledge an alert, change a policy or decommission a machine: any request other than GET gets 403. The one exception is the client list upload integration key, and only for uploading the list. Revoking the key (the integration key in Integrations, the personal one in Profile) stops the system on its next request. Suspending the customer or the provider stops both.

How to call it

Base address:

https://detecti.gardiensecurity.com/api/v1/console

The key goes in the X-Api-Key header. In PowerShell:

$cab = @{ "X-Api-Key" = "shai_..." }
$base = "https://detecti.gardiensecurity.com/api/v1/console"
Invoke-RestMethod "$base/overview" -Headers $cab

With curl:

curl -H "X-Api-Key: shai_..." https://detecti.gardiensecurity.com/api/v1/console/overview

Responses are UTF-8 JSON, except the ones that download a file (CSV, JSON Lines, PDF).

What you can read

RouteWhat it returns
GET /overviewThe customers in your scope, one per row: tenant_id, nome, endpoints_ativos (the billing number), coverage and trial status. This is the starting point: the other requests use the tenant_id from here.
GET /tenants/{tenant_id}/agentsThe customer's fleet, paginated: machine, agent version, last contact, status (ok, atencao, critico or iniciando), reason and tags.
GET /tenants/{tenant_id}/agents.csvThe same fleet as CSV, for a spreadsheet or a check against the RMM inventory. Up to 20,000 machines per file.
GET /tenants/{tenant_id}/alertsAlerts, paginated, with state, severity, assignee, occurrences and timestamps.
GET /tenants/{tenant_id}/alerts/{alerta_id}One alert with its timeline (notes and state changes) and the events behind it.
GET /tenants/{tenant_id}/eventsEvents, paginated: AI tool, machine, person (name or pseudonym, as the customer configured), categories found and counts.
GET /tenants/{tenant_id}/exportEvery event in a period in one file, as formato=jsonl (default) or formato=csv. The period goes in desde and ate. The key of someone who sees only one group exports only that group's machines.
GET /tenants/{tenant_id}/toolsThe AI tools seen at the customer, with each one's classification.
GET /tenants/{tenant_id}/groupsThe customer's machine groups, with the id that goes in the grupo filter.
GET /tenants/{tenant_id}/report?ano=2026&mes=9The month's PDF report, with your brand. Accepts idioma=en, and grupo={group id} for one group's report.

The audit trail (/tenants/{tenant_id}/audit and /audit) and the alert destinations (/tenants/{tenant_id}/destinations) are out of a key's reach: they answer 403. The trail stays in the console, on the Audit screen.

Filters

Dates in ISO 8601, such as 2026-10-01 or 2026-10-01T12:00:00Z.

Pagination

Lists return at most limite items (default 50, maximum 200) and a proximo_cursor. For the next page, repeat the same request with cursor=<proximo_cursor>. When proximo_cursor is null, you are done. The cursor is opaque: store it and send it back as it came.

ordenar picks the order, with a leading - for descending. Alerts: ultimo_em, criado_em, severidade, estado. Events: ocorrido_em, ferramenta, maquina, bytes, classificacao. Machines: maquina, contato, versao.

Example, in PowerShell, of every open high-severity alert of one customer:

$todos = @(); $cursor = $null
do {
  $q = "estado=aberto&severidade=alta&limite=200" + $(if ($cursor) { "&cursor=$cursor" })
  $r = Invoke-RestMethod "$base/tenants/$tid/alerts?$q" -Headers $cab
  $todos += $r.alertas; $cursor = $r.proximo_cursor
} while ($cursor)

Error responses

CodeWhen
401Key missing, invalid or revoked, or customer or provider suspended.
403A write request with a key (except the list upload, with an integration key of that scope), a route that requires a person (see below), or a filter outside the key's scope.
404A customer, machine or alert that does not exist, or that exists outside your scope. The API does not tell the two apart, on purpose.
400 and 422Invalid parameter. The body says which.

Upload the client list through the API

The client list (exact data match, in Settings, Detection tab) can come straight from a company system, without anyone exporting a spreadsheet and uploading it on the screen. The system sends the file, overnight for example, and the new list replaces the previous one.

The key for this upload

Create a company integration key as in The key, choosing Client list upload under What the key can do. On the client list screen, the Upload automatically through the API shortcut takes you to the card. Whoever can already upload the list on the screen creates it: an administrator role with access to the whole customer (no group scope).

This key reads the same as the read-only key and makes a single write: uploading the list. It cannot turn the list on or off, delete it, change the waiting period, mark "always block", or touch anything else in the console: any other write request gets 403. It also cannot create, list or revoke any key.

The key belongs to the company, not to whoever created it: that person's password change or reset, deactivation or departure does not stop the upload, unless whoever disables or deletes that person ticks the option to revoke the keys they created. It stops when someone revokes it in Integrations (the key list shows who created each key and when it was used) and when the customer or provider is suspended. If you suspect the key leaked, revoke it and create another.

The request

POST /tenants/{tenant_id}/edm?nome=clientes&principais=cpf,cnpj

In PowerShell:

$cab = @{ "X-Api-Key" = "shai_..." }
$base = "https://detecti.gardiensecurity.com/api/v1/console"
$tid = "customer-id"
Invoke-RestMethod "$base/tenants/$tid/edm?nome=clientes&principais=cpf,cnpj" -Method Post `
  -Headers $cab -InFile "C:\Export\clients.csv" -ContentType "text/csv"

With curl:

curl -X POST -H "X-Api-Key: shai_..." -H "Content-Type: text/csv"   --data-binary @clients.csv   "https://detecti.gardiensecurity.com/api/v1/console/tenants/<tenant_id>/edm?nome=clientes&principais=cpf,cnpj"

Use --data-binary, not -d: -d strips the file's line breaks.

The response is the list as the console shows it: id, nome, colunas, linhas, valores (the ones distinctive enough to recognize someone), descartados, ligado and bloquear_sempre. Errors are 400 (empty or unreadable file, no distinctive value, or a key column that does not exist; the body says which), 403 (key without this scope, or a role without permission) and 413 (over 64 MB).

What happens to the file

The text is not kept. The server digests each value into a fingerprint with a key that belongs only to that customer and discards the content in the same call, without writing it to disk even for a moment. Only the fingerprints go down to the machines, and only the category and the count of a match reach the console, never the value.

Waiting period on a new machine. The list only reaches a machine installed longer ago than the Waiting period on a new machine (24 hours, unless someone changed it). Machines that already have the list get the new version within a few minutes.

Audit trail. Each upload goes to Audit with the Integration actor and the key's name (the detail also carries the prefix, never the key). Creating and revoking each key are recorded under whoever did it. If a wrong list arrives, the trail tells you which key to revoke.

What the API never returns

To receive an alert the moment it opens, instead of polling, use the console's alert destinations (Integrations, Alert destinations): e-mail, signed webhook, or SIEM in CEF, LEEF or JSON.