Authentication
Every request to the OpenAlarm Core API (api.openalarm.io) is authenticated with an account-level
API key.
Generating an API Key
Section titled “Generating an API Key”In the OpenAlarm app, go to Your Name > Account > API Keys and generate a new key.
The key is send-only - it authorizes the ingest actions (arm, disarm, trigger, panic) and nothing else. It cannot read data, change configuration, or access your account.
Sending the API Key
Section titled “Sending the API Key”Send the key on every request, one of two equivalent ways. X-API-Key is the canonical form; an
Authorization: Bearer token is also accepted.
Using X-API-Key
Section titled “Using X-API-Key”X-API-Key: YOUR_API_KEYcurl -X POST \ -H "X-API-Key: YOUR_API_KEY" \ https://api.openalarm.io/v1/k7m3x9q2f8d4w1b5/triggerUsing a Bearer Token
Section titled “Using a Bearer Token”Send the key in the Authorization header as a bearer token - the word Bearer, a single space,
then your key:
Authorization: Bearer YOUR_API_KEYcurl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ https://api.openalarm.io/v1/k7m3x9q2f8d4w1b5/triggerEvery endpoint accepts GET or POST (the two are equivalent), and requests are bodyless -
the URL is the whole call. The key gates the request; the alarm ID in the path names which alarm it
acts on. The examples above use POST; a webhook source that can only issue a GET works the same
way.
What Comes Back
Section titled “What Comes Back”| Status | Meaning |
|---|---|
2XX |
Accepted. The exact success code and body are being finalized (pre-release). |
401 |
The API key is missing or invalid. |
403 |
Unauthorized. |
404 |
Alarm ID not found. |
See the API Reference for the full endpoint contract.