API Reference

v1 · REST · GeoJSON

WKT Studio REST API

Programmatically read and write geographic features from your projects. Available on Pro and Business plans. All responses are GeoJSON or JSON. All requests must include an Authorization: Bearer <api-key> header.

Manage your API keys from Settings → API Keys.

Authentication

bash
curl -H "Authorization: Bearer wkt_live_xxxxxxxx" \
     "https://wktstudio.com/api/v1/projects/{projectId}/features"

Rate Limits

PlanCalls / monthMax features / call
Pro1,0001,000
Business10,00010,000

The X-Rate-Limit-Remaining header is included on every GET response.

Endpoints

Layers

POST/api/v1/projects/{projectId}/layers

Create a new layer in a project. Optionally include features to populate it immediately.

Request body

json
{
  "name": "My layer",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Polygon", "coordinates": [[...]] },
      "properties": { "name": "Zone A" }
    }
  ]
}

features is optional — omit it to create an empty layer.

curl
curl -X POST "https://wktstudio.com/api/v1/projects/abc123/layers" \
     -H "Authorization: Bearer wkt_live_xxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "Lima polygons",
       "features": [
         {
           "type": "Feature",
           "geometry": {
             "type": "Polygon",
             "coordinates": [[[-77.0428,-12.0464],[-77.0328,-12.0464],[-77.0328,-12.0364],[-77.0428,-12.0364],[-77.0428,-12.0464]]]
           },
           "properties": { "name": "Plaza Mayor" }
         }
       ]
     }'
response
{ "layerId": "layer_1748000000000", "name": "Lima polygons", "featuresAdded": 1 }

Features

GET/api/v1/projects/{projectId}/features

Returns all features in a project as a GeoJSON FeatureCollection.

Query parameters

ParamTypeDescription
layerstringFilter by layer ID
namestringFilter features by name (contains)
bboxstringBounding box: minLng,minLat,maxLng,maxLat
limitnumberMax results (default 100, max 1,000)
offsetnumberPagination offset (default 0)
curl
curl "https://wktstudio.com/api/v1/projects/abc123/features?bbox=-77.1,-12.1,-76.9,-11.9&limit=50" \
     -H "Authorization: Bearer wkt_live_xxxxxxxx"
response
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Polygon", "coordinates": [[...]] },
      "properties": {
        "name": "Zona 1",
        "_layerId": "layer_1234",
        "_layerName": "Lima polygons",
        "_wkt": "POLYGON((-77.03 -12.04, ...))"
      }
    }
  ],
  "meta": { "total": 42, "limit": 50, "offset": 0, "hasMore": false }
}
POST/api/v1/projects/{projectId}/features

Append features to an existing layer. Does not replace existing features.

Request body

json
{
  "layerId": "layer_1234",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-77.03, -12.04] },
      "properties": { "name": "Lima Centro" }
    }
  ]
}
curl
curl -X POST "https://wktstudio.com/api/v1/projects/abc123/features" \
     -H "Authorization: Bearer wkt_live_xxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{"layerId":"layer_1234","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-77.03,-12.04]},"properties":{"name":"Lima Centro"}}]}'
response
{ "added": 1, "total": 43 }
DELETE/api/v1/projects/{projectId}/features

Delete a single feature by index. Only the project owner can delete.

Request body

json
{
  "layerId": "layer_1234",
  "featureIndex": 0
}

featureIndex is zero-based. Use GET first to identify the index of the feature you want to remove.

curl
curl -X DELETE "https://wktstudio.com/api/v1/projects/abc123/features" \
     -H "Authorization: Bearer wkt_live_xxxxxxxx" \
     -H "Content-Type: application/json" \
     -d '{"layerId":"layer_1234","featureIndex":0}'
response
{ "deleted": true, "remaining": 42 }

Error codes

StatusMeaning
401Missing or malformed Authorization header
403Invalid API key, wrong plan, or no access to project
404Project or layer not found
422Feature limit exceeded or invalid featureIndex
429Monthly API call limit reached

Need higher limits? Upgrade to Business →