---
title: "POST /v2/floorplans/{plan_id}/thresholds/calculate/"
method: POST
path: "/v2/floorplans/{plan_id}/thresholds/calculate/"
tags: ["Floorplans"]
---

# POST /v2/floorplans/{plan_id}/thresholds/calculate/

`POST /v2/floorplans/{plan_id}/thresholds/calculate/`

Validate the arguments and hand off to 'open_entry_auto_calibration' library
    maintained by Algorithm folks to calculate the trigger region.

    See TriggerRegionSerializer for more detailed information; at a glance, though:

        This endpoint required a single argument to run: 'doorway_id'.
        If 'doorway_id' is provided, the tied PlanSensors are automatically looked up,
        and so are WallSegments on this Plan.

    If "push_to_doorway": True is provided, this calculated trigger region will automatically be
    saved to api.Doorway.trigger_region AND pushed to the sensor's config if a sensor is attached to
    the plan sensor.

## Request body

- TriggerRegion
  - `doorway_id` string, nullable
  - `push_to_doorway` boolean, nullable

## Response `201`

Created

- OptionalTriggerRegionSerializer
  - `doorway_id` string, nullable
  - `push_to_doorway` boolean, nullable

## Other responses

- `400` — Bad Request
- `403` — Forbidden

---

[API](https://skmtc.dev/density/apis/your-project-api.md) · [All operations](https://skmtc.dev/density/apis/your-project-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/density/your-project-api/revisions/eab10fe035e6/schema)
