Skip to content
OAOpenAppPhysical Security as a Service
Login

9. Open the door with the HTTP API

Door-style hardware is opened by executing the switchable.open entity action on the entity that represents the door.

The curl example calls switchable.open on the door entity only. It does not replay the access Open gesture from Test from the dashboard and portal, which opens the door and turns on linked entry lights in one step (add a second call on the light entity if you need that from a script). Virtual Demo still honors delayed close / off the same way as other switchable entities when auto-off is in effect—empty {} uses the usual defaults unless you change policy or delays in metadata; portal-side tuning is described under Auto-close semantics.

Replace placeholders with values from your account: the API base URL (the same host your API key was issued for), your token, and the entity id from the dashboard (often visible in the address bar or entity details).

Terminal window
export OPENAPP_API_BASE='https://api.openapp.house/api/v1' # OpenAPI v1 server root; no trailing slash
export API_KEY='your_token_here'
export ENTITY_ID='your_entity_ulid'
curl -sS -X POST \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{}' \
"${OPENAPP_API_BASE}/entities/${ENTITY_ID}/actions/switchable.open"

For whether to use X-API-Key or Authorization: Bearer, follow API Keys.

The interactive API reference lists every path, including POST /entities/{id}/actions/{action_id}.

One curl proves your base URL, token, and entity id match what OpenApp expects. That JSON-over-HTTP shape is what every client must implement; the next step runs the same action through the typed SDK so you do not assemble URLs and headers by hand.


← Test from the dashboard and portal · The same call from the SDK →