post
/api/v2/zones/customPython SDK method:
client.custom_zones.create(params)Create custom zone
Creates a new custom zone in the authenticated user's database. Returns the created zone as a GeoJSON Feature with ZoneMetadata properties. The zone's geometry is defined in the request body.
Altitude Help Center — createCustomZoneRequest Body
Custom zone definition.
application/json: object
| Name | Type | Input Shape | Values | Description | Value Required |
|---|---|---|---|---|---|
comments | string | - | - | Optional notes about the purpose or content of the zone. | N |
customZoneTypeIds | array<string> | - | - | Sub-type IDs to assign to the new custom zone. At least one is required. | Y |
customerZoneId | string | - | - | Customer-defined external identifier for the zone. Used to correlate with external systems. | Y |
geography | string | - | - | GeoJSON geometry string (Polygon or MultiPolygon) defining the zone boundary. | Y |
name | string | - | - | Display name for the new custom zone. | Y |
Examples
Create custom zone request
Translated from the v1 createCustomZone sample with a v2 GeoJSON geometry string.
{
"comments": "Example custom zone",
"customZoneTypeIds": [
"fuel-stop"
],
"customerZoneId": "customer-zone-001",
"geography": "{\"type\":\"Polygon\",\"coordinates\":[[[-115.3,36.1],[-115.2,36.1],[-115.2,36.2],[-115.3,36.2],[-115.3,36.1]]]}",
"name": "Example Fuel Stop"
}Success Responses
201 response: object
Resource created.
| Name | Type | Description |
|---|---|---|
bbox | array<number (double)> | Bounding box [west, south, east, north]. |
geometry | object | GeoJSON geometry object representing the zone boundary. |
properties | object | Zone metadata object containing the zone's identity, type, display name, and type-specific details. |
type | string | Always "Feature". |
Response Errors
| HTTP Status Code | Reason |
|---|---|
| 400 | The request body or parameters are invalid. |
| 401 | Authentication is required or the provided credentials are invalid. |
| 403 | The authenticated user lacks permission to perform this operation. |
| 422 | The request is syntactically valid but semantically cannot be processed. |
| 429 | The request rate limit has been exceeded. |
| 500 | An unexpected server error occurred. |