Skip to content

/clear

GET
/v1/panic/{panicId}/clear
Code sample: cURL
curl --request GET \
--url https://api.openalarm.io/v1/panic/71hfe865v215de1ctewh0avnh9dn65r6/clear \
--header 'X-API-Key: oa_m9s346q3d25vt4f5v37e3s3e28jt97kb6cq643dzvmxxqkfbf5kznwj47tan9zt2'

End the open incident on this panic button.

A panic button has at most one incident open at a time, on the same terms as an alarm: while one is open, further triggers fold into it rather than starting a new one.

A panic button is never armed, so it has no disarm - this is the only way a machine caller can end a panic incident. Without it, one could be ended only from the console or by the 24-hour auto-close that follows the end of escalation.

Clearing when nothing is open is still a success, and clearing twice costs nothing.

panicId
required
string

The panic button’s 32-character identifier.

Example
71hfe865v215de1ctewh0avnh9dn65r6

Accepted - the call will be applied, and nothing has been sent at the moment the response returns. Every endpoint on this API answers 202, so there is no other success code to handle.

For a trigger, contact waits out the false-alarm cancellation window (optional, set per mode) - a disarm inside it cancels the trigger before any incident opens. A repeat trigger while an incident is already open is recorded against it and still returns 202.

202 does not mean an alert went out. A trigger that folds into an open incident, is cancelled inside the false-alarm window, or lands in test mode is accepted and recorded without reaching anyone. See the Arming guide.

Check data.environment if your automation depends on being live - a test alarm looks identical from the outside otherwise.

Media typeapplication/json

The four-field envelope on every response. The 401 is the one exception - it returns only a message and no traceId.

object
error
required

The outcome. false on 202, true on 404.

boolean
message
required

Human-readable, and null on success. On 404 it is generic wording - it never indicates whether an ID exists but belongs to someone else.

string | null
traceId
required

Identifies this one call. Worth logging, and worth quoting if you report a problem. It is not a resource reference and no endpoint accepts one back.

string format: uuid
data
required

The payload. Carries environment on every 2xx, plus the location the source belongs to when it has one.

object
environment

Whether the trigger ran live or as a test. An alarm runs as a test when its own test switch is on, or when its whole location’s is - either alone is enough. On a test trigger the escalation policy still resolves and records, but nobody is alerted.

string
Allowed values: live test
location

The location this alarm or panic button belongs to. Renaming a location never changes any ID or URL.

object
id

The location’s 32-character identifier.

string
name

The location’s display name.

string
Example
{
"error": false,
"message": null,
"traceId": "8f14e45f-ea0d-4a1b-9f2c-6b3d70c5e881",
"data": {
"environment": "live",
"location": {
"id": "2c9wvhrq52k5refhtvmmr0f8yjz5j9e9",
"name": "Home"
}
}
}

The API key is missing or invalid.

This is the one response that does not use the envelope. It returns only a message - no traceId, because no call was ever traced.

Media typeapplication/json
object
message
string
Example
{
"message": "Unauthorized"
}

The alarm or panic button is not available to fire.

This covers four situations, and they are deliberately indistinguishable from one another:

  1. The ID does not exist.
  2. It belongs to another account.
  3. It is in your account, but your key is not scoped to it.
  4. Your key can reach it, but the trigger cannot currently fire - you disabled it, or a plan downgrade deactivated it.

Separating them would turn a narrowly-scoped key into a way to discover which IDs are real, so no response ever does.

A trigger that cannot fire is a 404 rather than a 202 on purpose: accepting the call and quietly doing nothing would tell you your alarm fired when it did not.

Media typeapplication/json

The four-field envelope on every response. The 401 is the one exception - it returns only a message and no traceId.

object
error
required

The outcome. false on 202, true on 404.

boolean
message
required

Human-readable, and null on success. On 404 it is generic wording - it never indicates whether an ID exists but belongs to someone else.

string | null
traceId
required

Identifies this one call. Worth logging, and worth quoting if you report a problem. It is not a resource reference and no endpoint accepts one back.

string format: uuid
data
required

The payload. Carries environment on every 2xx, plus the location the source belongs to when it has one.

object
environment

Whether the trigger ran live or as a test. An alarm runs as a test when its own test switch is on, or when its whole location’s is - either alone is enough. On a test trigger the escalation policy still resolves and records, but nobody is alerted.

string
Allowed values: live test
location

The location this alarm or panic button belongs to. Renaming a location never changes any ID or URL.

object
id

The location’s 32-character identifier.

string
name

The location’s display name.

string
Example
{
"error": true,
"message": "Alarm ID not found",
"traceId": "8f14e45f-ea0d-4a1b-9f2c-6b3d70c5e881",
"data": {}
}