Generate offer link
curl --request POST \
--url https://app.zenedu.io/api/v1/bot/{bot}/links/offer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_id": 123,
"usage_limit": 1,
"expire_date": "2026-12-31 23:59:59",
"create_order": true
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/links/offer"
payload = {
"offer_id": 123,
"usage_limit": 1,
"expire_date": "2026-12-31 23:59:59",
"create_order": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer_id: 123,
usage_limit: 1,
expire_date: '2026-12-31 23:59:59',
create_order: true
})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/links/offer', 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}/links/offer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'offer_id' => 123,
'usage_limit' => 1,
'expire_date' => '2026-12-31 23:59:59',
'create_order' => true
]),
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}/links/offer"
payload := strings.NewReader("{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.zenedu.io/api/v1/bot/{bot}/links/offer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/links/offer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"link": "<string>",
"landing_link": "<string>"
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Links
Generate offer link
Generates a payment link for an offer (Pro)
POST
/
api
/
v1
/
bot
/
{bot}
/
links
/
offer
Generate offer link
curl --request POST \
--url https://app.zenedu.io/api/v1/bot/{bot}/links/offer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_id": 123,
"usage_limit": 1,
"expire_date": "2026-12-31 23:59:59",
"create_order": true
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/links/offer"
payload = {
"offer_id": 123,
"usage_limit": 1,
"expire_date": "2026-12-31 23:59:59",
"create_order": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer_id: 123,
usage_limit: 1,
expire_date: '2026-12-31 23:59:59',
create_order: true
})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/links/offer', 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}/links/offer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'offer_id' => 123,
'usage_limit' => 1,
'expire_date' => '2026-12-31 23:59:59',
'create_order' => true
]),
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}/links/offer"
payload := strings.NewReader("{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.zenedu.io/api/v1/bot/{bot}/links/offer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/links/offer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_id\": 123,\n \"usage_limit\": 1,\n \"expire_date\": \"2026-12-31 23:59:59\",\n \"create_order\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"link": "<string>",
"landing_link": "<string>"
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Authorizations
API token from the Zenedu dashboard
Path Parameters
Bot ID
Body
application/json
ID of the offer
Maximum number of times the link can be used
Required range:
1 <= x <= 999999Expiration date in Y-m-d H:i:s format (must be in the future)
Example:
"2026-12-31 23:59:59"
Whether to create an order when the link is used