Piloterr
API-ReferenzTemplates

Create a project from a template

POST
/v1/templates/{id}/projects

Upload the input first (POST /v1/inputs, with the example file's columns), or give a URL or search input, then create the project: the template gives the endpoint, mapping, schedule, rate, output formats and tracked fields; max_cost_per_run (default none) and api_key_id (default the managed Dataflow key) can be set here as on POST /v1/projects. Same checks as POST /v1/projects; the alert channels are checked first. A schedule set here starts the first run on its own.

Autorisierung

ApiKeyAuth
headerX-Api-Key<token>

Pfadparameter

id*string

The template's id, such as amazon-price-tracking

Length1 <= length

Header-Parameter

Idempotency-Key?string

Any unique string of yours (a UUID), so that sending the request again does not create it twice: for 24 hours, the same request with the same key answers the first answer again, with the header Idempotent-Replayed: true. The key is the workspace's, per route and path; sent with another body or query, it is refused (422 idempotency_key_reused); while the first request still runs, 409 idempotency_key_in_progress. Answers 5xx, 409 and 429 are not kept: the same key can be sent again.

Match^[\x20-\x7e]{1,255}$

Anfragetext

application/json
  1. body
input*||

As a project's input: an uploaded file or list (input_id, with the example file's columns), a URL (UrlInput) or a search (SearchInput)

name?string

Default: the template's name

Length1 <= length <= 120
mapping?

Default: the template's, which reads the example file's columns

schedule?

Default: the template's suggestion; manual for none

alert_channel_ids?array<>

Alert channels (GET /v1/alert-channels) subscribed to the template's alert_events, each once; an id that is not one of the workspace's channels is refused (422) before anything is created

Itemsitems <= 20
max_cost_per_run?|

Credits one run may spend, counted per run: a retry counts on its own run's total, a resumed run on its run's, and a search input's searches at launch count first (search_credits). Calls stop once those under way could reach it (a run ends less than one row's cost over), and the run fails with reason max_cost when rows were left uncalled. A launch only checks the workspace can afford what the cap lets the run spend. For endpoints billed per row or per GB a row's cost is only known from its answer: the cap is then an estimate, and a run can end more over it. Null: no cap

Range0 < value
Defaultnull
api_key_id?|

The workspace API key its calls go out with, from GET /v1/api-keys: they count on that key, its limits and its logs. Null or left out: the managed Dataflow key (sending the managed key's own id is the same: it is stored as null). A project whose key is later deactivated, expired or deleted is disabled (api_key_invalid) until another key is set: it never falls back to the managed key.

Length1 <= length

Antworttext

Created

application/json
  1. response
id*string
name*string
endpoint_id*string
input*||
mapping*

Per endpoint parameter, the input column it takes ({"column": …}) or a fixed value ({"value": …})

max_cost_per_run*integer|null
rate_percent*integer
output_formats*array<>
export_link_ttl_hours*integer

Hours its download links work (24 by default)

archived_at*string|null
disabled_at*|

Set while the project cannot run (POST /v1/projects/{id}/runs answers 409)

disabled_reason*|

auto_failures: 5 scheduled runs failed in a row (sending a schedule re-arms it); api_key_invalid: its api_key_id was deactivated, expired or deleted (setting another key re-arms it); admin: switched off by Piloterr

Value in"auto_failures""api_key_invalid""admin"null
schedule*|null
tracked_fields*array<string>
template_id*|

The template it was created from

api_key_id*|

The workspace API key it runs with; null: the managed Dataflow key (also when the managed key's own id was sent)

created_at*string
updated_at*string
Example Request
curl -X POST 'https://dataflow.piloterr.com/v1/templates/string/projects' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "type": "file",
    "input_id": "3f6b1c9e-5d0a-4c7e-9a51-2b8e0f4d7a13"
  },
  "name": "Amazon price tracking",
  "alert_channel_ids": [
    "cm4kq2d5e000cl208m7va4jzh"
  ],
  "max_cost_per_run": 500
}'
Example Response
{
  "id": "cm4hz9r2k0003l208f1qd7vtx",
  "name": "Amazon price tracking",
  "endpoint_id": "cm0p7x3da000a08l4gs5e2n1c",
  "input": {
    "type": "file",
    "input_id": "3f6b1c9e-5d0a-4c7e-9a51-2b8e0f4d7a13"
  },
  "mapping": {
    "query": {
      "column": "asin"
    },
    "domain": {
      "column": "marketplace"
    }
  },
  "max_cost_per_run": 500,
  "rate_percent": 30,
  "output_formats": [
    "csv",
    "json"
  ],
  "export_link_ttl_hours": 24,
  "archived_at": null,
  "disabled_at": null,
  "disabled_reason": null,
  "schedule": {
    "interval": "daily",
    "cron": null,
    "timezone": "UTC",
    "enabled": true,
    "next_run_at": "2026-11-11T07:00:00.000Z",
    "consecutive_failures": 0,
    "upcoming": [
      "2026-11-11T07:00:00.000Z",
      "2026-11-12T07:00:00.000Z",
      "2026-11-13T07:00:00.000Z",
      "2026-11-14T07:00:00.000Z",
      "2026-11-15T07:00:00.000Z"
    ]
  },
  "tracked_fields": [
    "price",
    "stock",
    "coupon"
  ],
  "template_id": "amazon-price-tracking",
  "api_key_id": null,
  "created_at": "2026-11-09T08:00:00.000Z",
  "updated_at": "2026-11-09T08:00:00.000Z"
}