Skip to content

API

The same personal token as for the AI assistant also serves the API. You call the same data you see in the portal, with your permissions. It suits Postman, PHP, your own script or another system.

The API is part of the Business and Enterprise plans. You create the token in your own profile, in AI assistants (MCP). For a write (POST, PUT, DELETE) choose read and write. A read-only token allows only GET.

The base address is https://api.innovanet.com. The paths below follow it, for example https://api.innovanet.com/api/attendance/records. The exact address of your instance is in the profile.

Headers

Header Value
Authorization Bearer inv_mcp_…
Accept application/json
Content-Type application/json when the request has a body

Postman

  1. A new request, method GET or POST according to the call.
  2. URL, for example https://api.innovanet.com/api/attendance/presence.
  3. Tab Authorization → type Bearer Token → paste the token.
  4. For a write, tab Body → raw → JSON and paste the body from the example.
  5. Send. The response has a status (200, 201, 401, 422…) and JSON.

cURL

curl -sS -X POST "https://api.innovanet.com/api/attendance/records" \
  -H "Authorization: Bearer inv_mcp_…" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{\"checkin_time\":\"now\",\"notes\":\"práca na projekte\"}"

PHP (cURL)

The function only needs to exist once. The later examples call it.

function innovanet(string $method, string $path, ?array $body = null): array
{
    $ch = curl_init('https://api.innovanet.com' . $path);
    $headers = [
        'Authorization: Bearer inv_mcp_…',
        'Accept: application/json',
    ];
    if ($body !== null) {
        $headers[] = 'Content-Type: application/json';
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body, JSON_UNESCAPED_UNICODE));
    }
    curl_setopt_array($ch, [
        CURLOPT_CUSTOMREQUEST => $method,
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_RETURNTRANSFER => true,
    ]);
    $raw = curl_exec($ch);
    $status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

    return ['status' => $status, 'json' => json_decode($raw, true)];
}

$res = innovanet('POST', '/api/attendance/records', [
    'checkin_time' => 'now',
    'notes' => 'práca na projekte',
]);
// $res['status'] === 201, $res['json']['data']['id'] je číslo záznamu

Response

Success (200, often 201 when creating):

{
  "success": true,
  "data": {},
  "message": "Saved"
}

The message field is only on some writes. data is an object, a list or null.

Error:

{
  "success": false,
  "error": "text hlásenia",
  "errors": {
    "date_from": ["The date from field is required."]
  }
}

errors is only on a field error (422).

Status When
200 A read or an update completed
201 The record was created
401 The token is missing, invalid or revoked
403 You do not have permission for this action, or the token is read-only
404 The record does not exist or you cannot see it
422 A field is missing or has the wrong shape
429 More than 120 calls a minute on one token

A file for download (Excel, an attachment) is not JSON. The response is the file itself.

Chapters

Sign-in and the settings screens are not part of this guide. Deleting a record follows the same permission you have in the portal.


Want to try this feature? Start your innovanet trial →