apidata.one docs Get a key

POST /v1/saved-shapes

Save a shape a consumer drew.

Access
Keys publishable or secret
Plan Premium
Environment live and sandbox
Acts for one consumer
While the account is suspended refused
During a data stop works

Headers

Name Description
X-Client-Token With a publishable key: required. A token your server minted for the consumer with POST /v1/client-tokens.
X-Client-Id With a secret key: required. Your own opaque ID for the consumer.
Idempotency-Key A new random value for this action, such as a UUID. A repeat with the same value and the same request gets the first answer again, and nothing is saved twice (idempotency).

Body

Field Type Description
name string (optional) A name for the shape, 1 to 100 characters.
geometry DrawnShape
{
  "name": "Near the station",
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          -75.301,
          40.009
        ],
        [
          -75.299,
          40.009
        ],
        [
          -75.299,
          40.011
        ],
        [
          -75.301,
          40.011
        ],
        [
          -75.301,
          40.009
        ]
      ]
    ]
  }
}

Answers

201: Saved

The answer is { data, meta }; meta holds requestId and environment.

data is a SavedShape.

Errors

Every error has the same body, and says how to fix it (responses and errors).

More

Request:

{
  "name": "Near the station",
  "geometry": {
    "type": "Polygon",
    "coordinates": [[[-75.301, 40.009], [-75.299, 40.009], [-75.299, 40.011], [-75.301, 40.011], [-75.301, 40.009]]]
  }
}

name is optional, 1 to 100 characters. Response 201:

{
  "data": {
    "id": "shp_…",
    "name": "Near the station",
    "geometry": { "type": "Polygon", "coordinates": [[[-75.301, 40.009], [-75.299, 40.009], [-75.299, 40.011], [-75.301, 40.011], [-75.301, 40.009]]] },
    "vertices": 4,
    "areaSqKm": 0.037872,
    "createdAt": "2026-11-11T15:00:00.000Z"
  },
  "meta": { "requestId": "req_…", "environment": "test" }
}

This page is made from the route's own declaration by npm run openapi. To change it, change the declaration or its explanation, never this file.

This page as Markdown