Skip to content

API: overview

A guide for whoever connects a program to AppToMe: a management system, a script, a spreadsheet with Power Query. Day-to-day use of the app is covered by the volunteer and staff guides.

Info

Available only if the API and AI assistants module is active. Not part of the Lite plan.

Two entry points

REST API MCP server
What for integrations: management systems, scripts, Power Query a person's AI assistant (Claude, ChatGPT…)
Address …/api/v1/ …/api/v1/mcp
Credential an atm_… API key, created by an administrator OAuth: the person signs in and allows it, no key
Acts for whoever created the key, within the key's permissions whoever connected the assistant, with their permissions

The two never cross: an API key does not open the MCP endpoint and an OAuth token does not open the REST API. This page and the following ones are about the REST API; the MCP server has its own page, MCP server.

The address

Every organization has its own address:

https://1<id>.backends.apptome.it/api/v1/

You do not need to build it: the app shows it, ready to copy, in the window that opens when you create a key (API address). In the examples of this guide the address is in APPTOME_API and the key in APPTOME_KEY:

export APPTOME_API='https://1XXXX.backends.apptome.it/api/v1'
export APPTOME_KEY='atm_XXXXXXXX…'   # the key copied from the app

Creating a key

Keys are created only by the organization's administrators (superusers), in the app: Organization Settings → API keys → New key. You choose a name, the expiry date (at most one year from today) and at least one permission. The steps, for non-developers, are in API keys.

  • The key is atm_ followed by 43 characters. It is shown only once, right after it is created; afterwards the app shows only its first characters (atm_ and 8 more), to recognise it.
  • Each administrator can have at most 5 active keys.
  • AppToMe keeps only a fingerprint of the key: a lost key cannot be recovered. Revoke it and create another.

Authentication

The key travels with every request, in the Authorization header:

curl -s "$APPTOME_API/me/" -H "Authorization: Bearer $APPTOME_KEY"

/me/ needs no permission: it tells whom the key acts for, which permissions it has and which modules are active. It is the quickest way to test a key.

{
  "user": {
    "id": 12,
    "email": "office@example.org",
    "person": {"id": 340, "first_name": "Anna", "last_name": "Ferri", "role": "volunteer"}
  },
  "key": {
    "name": "Membership software",
    "prefix": "atm_XXXXXXXX",
    "scopes": ["calendar:read", "statistics:read"],
    "expires_at": "2027-11-22T23:59:59+01:00"
  },
  "active_modules": ["get_api", "get_presences"]
}

user.person is null when the author has no record in the registry, or their record was removed from it.

Without the header, or with a wrong key, the answer is 401. Requests without a valid credential are limited to 20 per minute per IP address: beyond that, 429. A valid key is not held back by this limit, even from the same address.

Permissions

A key has one or more permissions (scopes), chosen per area when it is created: a key without permissions cannot be created. write includes read.

Scope In the app What it opens
calendar:read Calendar · Read only GET /organization/, /shifts/, /shifts/<id>/, /shifts/deleted/, /availabilities/, /availabilities/deleted/
calendar:write Calendar · Read and write all of calendar:read, plus the writes: shifts, sign-ups, assignments
statistics:read Statistics · Read only GET /availabilities/summary/, /availabilities/xlsx/
people:read People · Read only GET /people/, /people/deleted/

GET /me/ answers any valid key, whatever its permissions. A request outside the key's permissions gets 403 missing_scope.

Whom the key acts for

A key acts on behalf of whoever created it. Every write is recorded as done by that person, in the activity log and in the notifications, as if they had done it in the app.

  • If the author is no longer an administrator, the key answers 403 not_superuser. It works again when the role comes back; in the app it is shown as Suspended.
  • If the author's account is deactivated or deleted, or the author leaves or is removed from the organization, AppToMe revokes the keys they created in that organization and disconnects their AI assistants. The keys answer 401 invalid_key and show as Revoked in the app: they do not work again if the author comes back.

An integration meant to last should not depend on a person's account: create a dedicated user, make it an administrator and create the key with it.

Expiry and rotation

A key works until the end of the chosen day (23:59:59, in the organization's time zone), at most one year after it was created. After that it answers 401 expired_key; it stays in the app's list as Expired.

Thirty and seven days before the expiry the author gets an email, and the API keys page shows a notice. To change key without stopping the integration:

  1. create a new key with the same permissions;
  2. put it in the program instead of the old one;
  3. check under Last used that the new one works;
  4. revoke the old one.

Revocation

From the API keys page any administrator can revoke any key of the organization, including those created by others. Revocation is immediate: the next request gets 401 invalid_key. Revoke all stops every key still valid at once.

Keys stay valid if their author changes password or signs out of all devices: they are separate credentials. AppToMe does revoke them when the author loses access to the organization (see Whom the key acts for). If a key ends up where it should not (a public repository, an email), revoke it.

When the module is off

Situation Answer
organization on the Lite plan 402 plan_required, with "feature": "module:get_api"
API and AI assistants module not active 403 module_not_active
the organization's settings cannot be read right now 503 service_unavailable: retry after a minute

Keys are not deleted when the module goes off: they work again when it comes back.

Format

  • JSON only, in UTF-8, in and out. The one exception is the Excel file of /availabilities/xlsx/.
  • Dates YYYY-MM-DD; dates and times ISO 8601. Out, they carry the offset of the organization's time zone (2026-12-14T08:00:00+01:00). In, a value with an offset is converted to that time zone, one without is read in it. The time zone is in /organization/.
  • Error messages are in the language asked with Accept-Language (it, en, es, de, sq); without it, in Italian. A message with no translation in the language asked comes in English.
  • No CORS headers: the API is called from a server or a script, not from a web page in the browser.

The other pages

  • Limits and usage: how many requests, the headers, the 429.
  • Errors: the format and every code.
  • Reading: pagination, each endpoint, syncing, the Excel file.
  • Writing: shifts and availabilities, dry_run, Idempotency-Key.
  • Reference: generated from the OpenAPI schema, with the schema to download.
  • MCP server: connecting an AI assistant.