> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Geofences

> Create or update up to 1,000 geofences at once

Creates or updates geofences in bulk, matched by `externalId`. Every row needs one, so sending the same rows again updates them instead of creating copies. Requires the `geofences:write` scope.

Rows are checked one by one. Invalid rows are skipped and listed in `errors`; the valid rows are saved together. On update, fields a row leaves out keep their stored value. New rows need the fields [Create Geofence](https://docs.sequenzy.com/api-reference/geofences/create.md) requires. Rows past the 10,000 per workspace limit are skipped with an error.

## Request

**geofences** `object[]` *required*

Up to 1,000 rows with the [create](https://docs.sequenzy.com/api-reference/geofences/create.md) fields, each with an `externalId`.

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/geofences/import" \
  -H "Authorization: Bearer $SEQUENZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "geofences": [
      { "externalId": "store-0042", "name": "Soho store", "latitude": 51.5136, "longitude": -0.1365, "radiusMeters": 200, "group": "stores" },
      { "externalId": "store-0043", "radiusMeters": 350 }
    ]
  }'
```

## Response

**created** `integer`

Geofences created.

**updated** `integer`

Geofences updated.

**errors** `object[]`

Skipped rows, each with `index` (position in `geofences`), `externalId` and `error`.

## Errors

A row with an invalid field does not fail the request: the response is `200` with the row in `errors`, and the other rows are saved. Check `errors` even when the request succeeds.

| Status | When |
| - | - |
| 400 | The body has no `geofences` array, or more than 1,000 rows. |
| 401 | The API key is missing or invalid. |
| 403 | The key lacks the required scope or has no company selected. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.