Trigger / Mode
POST
/v1/{alarmId}/trigger/{mode}
const url = 'https://api.openalarm.io/v1/k7m3x9q2f8d4w1b5/trigger/home';const options = {method: 'POST', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.openalarm.io/v1/k7m3x9q2f8d4w1b5/trigger/home \ --header 'X-API-Key: <X-API-Key>'Fire the alarm using a specific mode’s policy, regardless of the stored mode. Self-contained - ideal for stateless sources (UniFi Protect) that express the mode by choosing the endpoint.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”alarmId
required
string
The alarm’s identifier. The API key gates the call; this names which alarm it acts on.
Example
k7m3x9q2f8d4w1b5mode
required
string
The alarm mode.
Responses
Section titled “Responses”The API key is missing or invalid.
Unauthorized.
Alarm ID not found.
The event was accepted. Pre-release: the exact success status code and response body are being finalized and are not documented yet.