Actions

Send to an API

Send to an API posts what a run found to your own system: a map database, a data platform, an internal tool. Choose POST or PUT, one call per run, batches of 500 or one call per item, and plain JSON or GeoJSON for mapping tools. A sign-in from the Connections page goes in the headers, kept encrypted and never shown in the flow. It sends only on real runs, and says plainly when your system answers with an error.

In the editor: Sends the results to your own system as JSON, for example your map database or data platform.

Settings

Endpoint URL

Text

The address that receives the data. It must start with https:// and be on the public internet; a user and password in the address are refused (use a sign-in instead).

Needed before the flow can run.

Sign-in (optional)

An account you connect

An API sign-in from the Connections page: a token, an API key header or a user and password. Leave it empty if your endpoint needs none.

Method

Pick one

POST to add new data, PUT if your system expects to replace it.

  • POST
  • PUT

Send

Pick one

How many calls a run makes.

  • One call per run Everything in one call (up to 5,000 items).
  • Batches of 500 One call for every 500 items. The usual choice for big runs.
  • One call per item A call for each item, for systems that take one record at a time. The first 100 items of a run.

Format

Pick one

The shape of the body. GeoJSON suits map databases and GIS tools.

  • JSON The items with all their fields, plus the flow’s name, the time and the count.
  • GeoJSON A FeatureCollection: each item with a position becomes a Point, its fields as properties.

What comes out

Each item that leaves the block carries these fields, to use in the blocks after it as {{field}}.

Format: JSON

The body of each call (One call per run, or a batch).

  • flow: The flow’s name.
  • sent_at: When the call was made, in UTC.
  • sample: true while the places are example data, false for live data.
  • count: How many items are in this call.
  • items: The items, each with every field it carries.

One call per item

With JSON, each call carries one item.

  • flow, sample: As above.
  • item: The one item, with every field.

Format: GeoJSON

Items without a latitude and longitude are left out. The items pass on unchanged to blocks after this one.

  • properties.flow, properties.sample: The flow’s name, and whether the data is example data.
  • features: One Point per item, coordinates [longitude, latitude], every other field as a property.

How to use it

Logistics

New warehouses into the company’s map database

A logistics company keeps its own map of warehouses and depots, and wants new ones added every week without anyone typing them in.

Before: A coordinator copied new sites from map searches into the GIS by hand.

With the flow: Each Monday the new warehouses arrive as GeoJSON points, already in the map database.

Banking and payments

Scored merchants into the data platform, nightly

Batches of 500 keep each call a sensible size; the dashboards read the scores from the data platform in the morning.

Real estate

Each plot’s surroundings back into the land system

A developer’s land system sends each new plot to a flow and wants the count of shops around it written back.

One call per item sends each plot back with places_nearby and the nearest shop, ready for the land system to store.

Delivery apps

New restaurants to the sales tool

Match with my table drops current partners first, so the sales tool only gets real prospects.

Government and cities

Road closures to the city’s open data portal

A city publishes closures for app developers and wants the portal fed automatically.

Before: Closures went out as a PDF once a day.

With the flow: The portal gets a fresh GeoJSON of closures every 15 minutes.

Telecom

Footprint checks into a planning tool

The planning tool receives every site with its week of weather in one call, for crews to plan installs.

Good to know

  • Only real runs send: Run once, a schedule, a webhook, new rows or the API with sending on. Test runs show what would be sent.
  • Each call has 15 seconds to answer, and redirects are not followed. An answer other than 2xx fails the step with your system’s status ("Your API answered 503...").
  • Up to 5,000 items a run; One call per item sends the first 100. Calls go out three at a time.
  • Sign-ins (a bearer token, an API key header, or a user and password) are saved on the Connections page, sealed, and added to the headers. They never appear in the flow.
  • The address must be a public https address; private networks and local addresses are refused, and the address is checked again at the moment each call connects.
  • To send to one of the 35 apps, use its app block; to call any address with the answer kept on each item, use the HTTP app block.
  • Credits: 12 for each call made.

Works well with

  • Map business scan: Finds businesses on online maps live: name, category, rating, address, phone, website and whether it is open.
  • Only new: Lets through only the items this flow has not found before, so a daily flow sends only what is new.
  • xMap LLM: Tell the AI what to do in plain words.
  • Match with my table: Looks each incoming item up in one of your tables or saved lists (My data), for example your customers.
  • Webhook / API: Starts the flow when another system sends a POST request with a JSON body to this flow’s webhook URL.
  • Traffic incidents: Road closures, roadworks and other incidents on online maps right now, with where they are.
  • HTTP: Calls any web address (an API, a webhook, your own system) with GET, POST, PUT, PATCH or DELETE, once per item or once per run, and adds the answer to each item: http_status, http_response and, for a JSON answer, each of its values as a field of its own (http_score, for example).
  • Email: Sends one email per run with all the items, or one email per item.

Help articles

Try it

Build a flow with Send to an API on the home page, no account needed, or book a call. Try it live