Skip to main content

CreateGeofenceRequest

Schema for creating a new geofence.

Supports three geometry types (PRD §3.1):

  • Polygon: Standard GeoJSON Polygon
  • MultiPolygon: Collection of polygons
  • Circle: Point with radius_meters

v1.27 ADDR-04/05: also accepts source='address' + address instead of geometry.

nameName (string)required

Possible values: non-empty and <= 100 characters

description object
anyOf
string

Possible values: <= 500 characters

geometry object

GeoJSON geometry (Polygon, MultiPolygon, or Circle). Required when source='draw'.

anyOf
typeType (string)required

Possible values: Value must match regular expression ^Polygon$

coordinatesarray[]required
webhook_url object
anyOf
string

Possible values: <= 2048 characters

webhook_events object
anyOf
  • Array [
  • string
  • ]
  • metadata object
    anyOf
    object
    group_name object
    anyOf
    string

    Possible values: <= 255 characters

    source object

    How this geofence was created.

    anyOf
    string

    Possible values: [draw, address]

    address object

    Required when source='address'.

    anyOf
    string

    Possible values: <= 1000 characters

    buffer_meters object

    Buffer radius in meters (address-source).

    anyOf
    integer

    Possible values: >= 1 and <= 10000

    confirm_duplicateConfirm Duplicate (boolean)

    Override dedup conflicts.

    Default value: false
    tags object

    Optional list of tag names to attach. Names are case-insensitive; new tags are created lazily.

    anyOf
  • Array [
  • string
  • ]
  • CreateGeofenceRequest
    {
    "description": "Primary loading dock perimeter",
    "geometry": {
    "coordinates": [
    [
    [
    -74.006,
    40.7128
    ],
    [
    -74.006,
    40.7138
    ],
    [
    -74.005,
    40.7138
    ],
    [
    -74.005,
    40.7128
    ],
    [
    -74.006,
    40.7128
    ]
    ]
    ],
    "type": "Polygon"
    },
    "group_name": "NYC Warehouses",
    "metadata": {
    "priority": "high",
    "zone_type": "loading_dock"
    },
    "name": "Warehouse Zone A",
    "webhook_events": [
    "enter",
    "exit"
    ],
    "webhook_url": "https://example.com/webhooks/geofence-events"
    }