Skip to content
TarekyDocs
Console

Create a geofence (a polygon, or a circle); an existing externalId is replaced

POST
/v1/geofences
curl --request POST \
--url https://api.tareky.com/v1/geofences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "externalId": "example", "name": "example", "metadata": { "additionalProperty": "example" }, "geometry": { "type": "Polygon", "coordinates": [ "example" ] }, "circle": { "center": [ "example" ], "radiusM": 1 } }'
x-access-key-id
string

Legacy key id (until its sunset)

Media typeapplication/json
object
externalId
string
nullable /^[A-Za-z0-9_.:-]{1,128}$/
name
string
nullable <= 200 characters
metadata
object
key
additional properties
geometry
object
type
required
string
Allowed values: Polygon MultiPolygon
coordinates
required
Array
circle
object
center
required
array
>= 2 items <= 2 items
radiusM
required
number

Rate limit or monthly quota exceeded; see Retry-After

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}

Any other error, in the /v1 error envelope

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable code, e.g. quota_exceeded, no_route

string
message
required
string
status
required
integer
>= -9007199254740991 <= 9007199254740991
details

For invalid_request: the validation issues

docsUrl
required
string
requestId
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"status": 1,
"details": "example",
"docsUrl": "example"
},
"requestId": "example"
}