Update funnel link
curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 50000,
"request_contacts": {
"fields": [],
"email_text": "<string>",
"email_confirm_text": "<string>",
"phone_text": "<string>",
"phone_confirm_text": "<string>"
},
"tags": [
"<string>"
],
"command": 123
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}"
payload = {
"name": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 50000,
"request_contacts": {
"fields": [],
"email_text": "<string>",
"email_confirm_text": "<string>",
"phone_text": "<string>",
"phone_confirm_text": "<string>"
},
"tags": ["<string>"],
"command": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
expire_date: '2023-11-07T05:31:56Z',
usage_limit: 50000,
request_contacts: {
fields: [],
email_text: '<string>',
email_confirm_text: '<string>',
phone_text: '<string>',
phone_confirm_text: '<string>'
},
tags: ['<string>'],
command: 123
})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expire_date' => '2023-11-07T05:31:56Z',
'usage_limit' => 50000,
'request_contacts' => [
'fields' => [
],
'email_text' => '<string>',
'email_confirm_text' => '<string>',
'phone_text' => '<string>',
'phone_confirm_text' => '<string>'
],
'tags' => [
'<string>'
],
'command' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"funnel_id": 123,
"name": "<string>",
"bot_slug": "<string>",
"landing_slug": "<string>",
"link": "<string>",
"landing_link": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 123,
"access": {},
"request_contacts": {},
"tags": [
"<string>"
],
"command": 123,
"subscribers_count": 123,
"created_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Посилання воронки
Оновити посилання воронки
Оновлює посилання воронки. Поля посилання замінюються так само, як під час створення, тому name обов’язковий.
PATCH
/
api
/
v1
/
bot
/
{bot}
/
funnels
/
{funnel}
/
links
/
{link}
Update funnel link
curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 50000,
"request_contacts": {
"fields": [],
"email_text": "<string>",
"email_confirm_text": "<string>",
"phone_text": "<string>",
"phone_confirm_text": "<string>"
},
"tags": [
"<string>"
],
"command": 123
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}"
payload = {
"name": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 50000,
"request_contacts": {
"fields": [],
"email_text": "<string>",
"email_confirm_text": "<string>",
"phone_text": "<string>",
"phone_confirm_text": "<string>"
},
"tags": ["<string>"],
"command": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
expire_date: '2023-11-07T05:31:56Z',
usage_limit: 50000,
request_contacts: {
fields: [],
email_text: '<string>',
email_confirm_text: '<string>',
phone_text: '<string>',
phone_confirm_text: '<string>'
},
tags: ['<string>'],
command: 123
})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expire_date' => '2023-11-07T05:31:56Z',
'usage_limit' => 50000,
'request_contacts' => [
'fields' => [
],
'email_text' => '<string>',
'email_confirm_text' => '<string>',
'phone_text' => '<string>',
'phone_confirm_text' => '<string>'
],
'tags' => [
'<string>'
],
'command' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/funnels/{funnel}/links/{link}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expire_date\": \"2023-11-07T05:31:56Z\",\n \"usage_limit\": 50000,\n \"request_contacts\": {\n \"fields\": [],\n \"email_text\": \"<string>\",\n \"email_confirm_text\": \"<string>\",\n \"phone_text\": \"<string>\",\n \"phone_confirm_text\": \"<string>\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"command\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"funnel_id": 123,
"name": "<string>",
"bot_slug": "<string>",
"landing_slug": "<string>",
"link": "<string>",
"landing_link": "<string>",
"expire_date": "2023-11-07T05:31:56Z",
"usage_limit": 123,
"access": {},
"request_contacts": {},
"tags": [
"<string>"
],
"command": 123,
"subscribers_count": 123,
"created_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Авторизації
API token from the Zenedu dashboard
Параметри шляху
Bot ID
Funnel ID
Funnel link ID
Тіло
application/json
Link name
Maximum string length:
255Expiry in UTC; null means no expiry
Maximum number of additions; null means unlimited
Необхідний діапазон:
1 <= x <= 99999Access given by the link; defaults to unlimited
Show child attributes
Show child attributes
Contact request settings
Show child attributes
Show child attributes
Tags assigned to subscribers who join via the link
Command ID
Відповідь
Funnel link updated
Show child attributes
Show child attributes