Create Layer Endpoint
const url = 'https://example.com/layers/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"columns":[{"name":"example","type":"example"}],"geometry_type":"Point","summary":"example","title":"Survey Points"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/layers/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "columns": [ { "name": "example", "type": "example" } ], "geometry_type": "Point", "summary": "example", "title": "Survey Points" }'Create a new empty spatial layer.
Creates a PostGIS table with a typed geometry column, runs the full post-processing pipeline (geom_4326, spatial index, reader grants), and registers the layer as a catalog dataset.
Requires editor or admin role.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
object
OGC geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, or MultiPolygon
Example
PointDisplay name for the new layer
Example
Survey PointsResponses
Section titled “ Responses ”Successful Response
object
Creation timestamp
Number of features (0 for new layers)
OGC geometry type
Dataset ID of the created layer
PostGIS table name in the data schema
Display name
Visibility level: private, internal, or public
Example generated
{ "created_at": "2026-04-15T12:00:00Z", "feature_count": 1, "geometry_type": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "table_name": "example", "title": "example", "visibility": "example"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request