Documentation · API reference
PUT
/api/v1/sites/{site}/funnels/{id}Change a funnel
This page as Markdown, or in an AI chatMore ways to read this page
Change a funnel.
# Change a funnel
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/put-sites-site-funnels-id
`PUT /api/v1/sites/{site}/funnels/{id}`
Change a funnel.
## Parameters
- `site` (in path, needed): A site's id or name
- `id` (in path, needed): The funnel
## What to send
`FunnelCreate`
- `name` (string, needed)
- `spec` (object, needed)
## The answer
200, `FunnelView`
- `id` (string, needed)
- `name` (string, needed)
- `spec` (object, needed)
- `steps` (list of string, needed): Each step in words.
## Asking
```sh
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/funnels/{id} \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "…", "spec": {}}'
```
Parameters
- sitein the address
- neededA site's id or name
- idin the address
- neededThe funnel
What to send
FunnelCreate
- name
- stringneeded
- spec
- objectneeded
The answer
Status 200
FunnelView
- id
- stringneeded
- name
- stringneeded
- spec
- objectneeded
- steps
- list of stringneededEach step in words.
Asking
curl -X PUT https://tidekeeper.eu/api/v1/sites/example.org/funnels/{id} \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "…", "spec": {}}'
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/funnels/{id}", { method: "PUT", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"name": "…", "spec": {}}), }).then((r) => r.json());