Company API v1 · executable examples

Make your first company-scoped API call in five minutes.

Create one least-privilege key, verify the company selected by that credential, then connect employee, attendance and timesheet data to payroll, ERP or HR software.

Before you run the examples

1

Create the company workspace

Sign in or register, then open API and integrations as an owner or administrator.

2

Choose only the scopes you need

Start with organization:read and add the smallest set listed in the recipes below.

3

Copy the secret once

Save the tc_live_… value in a secret manager or environment variable. Never put it in a URL, browser bundle or source repository.

Run a first request

Set the secret in your shell, then call the organization endpoint. A 200 response confirms both authentication and the company context.

cURL

export TOTEMCLOCK_API_KEY='tc_live_replace_me'

curl --fail-with-body https://totemclock.com/api/v1/organization \
  -H "Accept: application/json" \
  -H "X-API-Key: $TOTEMCLOCK_API_KEY"

Node.js 18+

const response = await fetch(
  'https://totemclock.com/api/v1/organization',
  { headers: {
    Accept: 'application/json',
    'X-API-Key': process.env.TOTEMCLOCK_API_KEY
  }}
);
if (!response.ok) throw new Error(`TotemClock ${response.status}`);
console.log(await response.json());

Python 3

import json, os, urllib.request

request = urllib.request.Request(
    "https://totemclock.com/api/v1/organization",
    headers={
        "Accept": "application/json",
        "X-API-Key": os.environ["TOTEMCLOCK_API_KEY"],
    },
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))

Choose the smallest integration recipe

WorkflowEndpoint sequenceRequired scopes
Payroll exportGET /organization → GET /employees → GET /exports/timecards.csv or /exports/timesheets.csvorganization:read · employees:read · exports:read
ERP attendance importGET /employees → POST /punches with a stable externalId → GET /employees/{employeeId}/days/{date}employees:read · punches:write · timecards:read
HR operations dashboardGET /employees → GET /sites → GET /schedules → GET /timecardsemployees:read · sites:read · schedules:read · timecards:read

For ERP retries, keep the same externalId for the same punch. TotemClock treats an identical retry as the same company-scoped event instead of creating a duplicate.

Continue with the complete contract

Use Swagger to inspect schemas and send authorized requests, or import the Postman collection with secret variables.