Get an API key

POST /v1/field-requests

Ask, in plain language, for data the catalog does not have yet. A person builds it and you are told when it ships.

POST/v1/field-requests

When GET /v1/meta/fields has nothing for what you need, file a field request. Describe the data and the decision it feeds, give one to ten example locations, and keep the request_id. A person finds a source and builds the field, usually in hours to a day. Poll GET /v1/field-requests/{request_id}, or name a webhook or email to be told.

curl -s https://api.invariant-ai.com/v1/field-requests \
  -H "X-API-Key: $INVARIANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "Distance to the nearest natural gas compressor station, in meters",
  "example_locations": [{"lat": 31.9686, "lng": -99.9018}],
  "use_case": "Screening sites for behind-the-meter gas generation",
  "idempotency_key": "gas-compressor-distance-0001"
}'
{
  "request_id": "fr_226f454ca75abe5eca5c3215f1911cb1",
  "status": "queued",
  "waiting_on": "operator",
  "phase": null,
  "queue_position": 1,
  "estimated_ready_at": "2026-11-26T02:24:23.004889+00:00",
  "resolved_locations": [
    {"index": 0, "resolved_location": {"lat": 31.9686, "lng": -99.9018, "source": "coordinate"}}
  ],
  "disposition": [
    {
      "ask": "Distance to the nearest natural gas compressor station, in meters",
      "disposition": "accepted_new",
      "field_id": null,
      "feasibility_class": "source_uncertain",
      "estimated_ready_at": "2026-11-26T02:24:23.004889+00:00",
      "reason": "Not in the catalog yet. Filed for a person to find a source and build it; poll this request for progress.",
      "resume": null
    }
  ],
  "resume": null,
  "context_blob": null,
  "created_at": "2026-11-25T02:24:23.004889+00:00",
  "updated_at": "2026-11-25T02:24:23.004889+00:00"
}

A new request answers 201. The same idempotency_key with the same body answers 200 with the request already filed, so an agent can retry safely.

Body

application/json

Unknown keys are refused with 422 invalid_payload. Free text is never trusted: who is asking comes only from the API key.

Key Type Notes
description string, required 1 to 8,000 characters. What the data is, what decision it feeds, what a good answer looks like.
example_locations object[], required 1 to 10. Each gives exactly one of address (a US street address), lat and lng, or polygon (GeoJSON Polygon or MultiPolygon). Optional claimed_value (what you believe the answer is there) and note.
requested_fields {ask}[] Up to 20 separate asks when the description holds several. Each gets its own disposition entry.
use_case, decision_threshold, deadline string Context for the person building it.
area_of_interest object level (city, county, state, region, national) and names.
expected_volume object locations, geography, cadence (one_off or recurring).
freshness object max_staleness (ISO 8601 duration) and changes_how_often.
constraints object must_not_be, already_have, acceptable_substitutes.
known_sources object suggested and excluded, each {name, url, note, why}.
output_preference object value_kind (boolean, category, number, distance, geometry), units, buckets_ok.
idempotency_key string Up to 255 characters. Send one from agents. The same key and body replay the request; the same key with a different body is 409 idempotency_key_reused.
callback object webhook_url and/or email. A replay with callback replaces the stored one; {"webhook_url": null, "email": null} stops notifications.
context_blob string Up to 8 KB of UTF-8, yours to use. Echoed in every status and webhook. The first value is kept across replays.

Lifecycle

status Meaning
queued Filed; a person will look. queue_position and estimated_ready_at are set.
claimed, building, in_review, approved, publishing Being built. Every new field is reviewed before it ships.
live Shipped. resume is the /v1/fetch call that returns it. Set only after /v1/fetch returned a real value at your first example location.
matched The catalog already answers it; disposition names the field.
blocked It cannot be built (licensing, no source, coverage). The reason arrives by callback.
rejected, expired Refused, or a confirmation window lapsed.

waiting_on is operator while a person has to act, requester while we need something from you, and null otherwise. estimated_ready_at is the window promised at intake (one day) and is not recomputed.

Callbacks

Polling stays the source of truth; callbacks are a convenience, delivered at least once with retries.

Event When
screening_completed The request was filed and screened. Body: request_id, status, disposition, context_blob.
request_live It shipped. Body: field_id, fetch (the call that returns it), value, unit, citation, confidence, caveat (null), context_blob.
request_live_low_confidence It shipped with a caveat. Repeat the caveat wherever you cite the value.
request_blocked It cannot be built. Body adds blocked_reason (code, explanation, counter_offer).

A webhook gets a JSON POST with X-Invariant-Event (the event) and X-Invariant-Delivery (<request_id>:<event>, your dedup key). It must be an http or https URL whose host resolves only to public addresses; private, loopback and link-local addresses are refused, and redirects are not followed. Webhooks are not signed yet.

An email callback is plain text ending in the same JSON, without context_blob, and is limited to 20 per key per day.

Errors

HTTP error When
422 invalid_payload Schema failure, a limit exceeded, an unknown key, or an unusable callback. detail.errors names each problem.
422 invalid_locator An example location gives none, or more than one, of address, lat+lng, polygon.
422 location_out_of_bounds Outside the US. A swapped lat and lng is named.
422 invalid_geometry The polygon is not a closed GeoJSON Polygon or MultiPolygon.
422 location_unresolved The address was not found.
422 address_form_unsupported A PO box or similar.
404 address_too_coarse The address names an area, not a property.
422 context_blob_too_large Over 8 KB of UTF-8.
409 idempotency_key_reused The key was used with a different body.
409 idempotency_conflict Two first requests with one key raced. Retry once.
429 rate_limited Over 20 requests per key per hour. Honour Retry-After.
503 field_requests_unavailable Storage is briefly unavailable. Retry with backoff.

From an agent, use the MCP tools invariant_request_field and invariant_field_request_status.