Skip to main content

Zenedu API & Webhooks

Updated this week

Introduction

In this documentation, you will learn how to use Zenedu's REST API to integrate our platform with other services

The API is based on the HTTP protocol and all responses are returned in JSON format. All requests must have Accept: application/json key-value in headers.

Base URL

The base URL for all API endpoints is: https://app.zenedu.io/api/v1/

All requests must have Accept: application/json key-value in headers.

Authentication

The Zenedu API uses Bearer token authentication to ensure secure access to protected endpoints. To interact with the API, you must include an authorization header with each request.

Obtaining an API Token

To obtain your API token, navigate to the API section in your account page. The token is generated during registration and remains valid indefinitely.

It is of utmost importance not to expose your API token in publicly accessible code or repositories. If you suspect any compromise of your API token, reset it immediately and acquire a new one through the same page.

Making Authenticated Requests

Once you have obtained your API token, include it in your requests using the Authorization header. Set the value of the header to Bearer YOUR_API_TOKEN.

Example request:

curl -X GET "https://app.zenedu.io/api/v1/endpoint" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"


Endpoints

Bots

Description

Retrieve a list of all your bots using this endpoint.

  • URL: https://app.zenedu.io/api/v1/bots

  • Method: GET

  • Authentication: Bearer token in headers

  • Parameters: None

  • Results: The list of bots is sorted in descending order by creation date.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bots" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

 {
"data": [
{
"id": 2,
"name": "Test Bot 2",
"username": "test_bot_2",
"is_active": true,
"created_at": "2023-07-24T07:58:52.000000Z"
},
{
"id": 1,
"name": "Test Bot",
"username": "test_bot",
"is_active": true,
"created_at": "2023-06-23T09:41:34.000000Z"
}
]
}

Subscribers

Description

Get a list of all your subscribers for given bot using this endpoint. The results are paginated with 30 items per page.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscibers

  • Method: GET

  • Authentication: Bearer token in headers

  • Parameters: Use the per_page and page parameters to control the number of results per page.

  • Results: The list of subscribers is sorted in descending order by creation date.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bot/1/subscribers?per_page=30&page=1" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

{
"data": [
{
"id": 3,
"user_id": 1002,
"first_name": "Sarah",
"last_name": "Connor",
"username": "sarah_connor",
"phone": null,
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2023-07-24T14:43:12.000000Z",
"created_at": "2023-07-24T14:43:10.000000Z",
"utm_tags": {
"utm_source": "source",
"utm_medium": "medium",
"utm_campaign": "campaign",
"utm_term": "term",
"utm_content": "content"
},
"custom_fields": {
"Address": "Address",
"Website": "https://zenedu.io"
}
},
{
"id": 2,
"user_id": 1001,
"first_name": "Foo",
"last_name": "Bar",
"username": "foo_bar",
"phone": null,
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2023-07-24T14:43:12.000000Z",
"created_at": "2023-07-24T14:41:44.000000Z",
"utm_tags": [],
"custom_fields": []
},
{
"id": 1,
"user_id": 1000,
"first_name": "John",
"last_name": null,
"username": "john",
"phone": null,
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2023-07-24T14:43:12.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z",
"utm_tags": [],
"custom_fields": []
}
],
"links": {
"first": "https://app.zenedu.io/api/v1/bot/1/subscribers?page=1",
"last": "https://app.zenedu.io/api/v1/bot/1/subscribers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://app.zenedu.io/api/v1/bot/1/subscribers?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://app.zenedu.io/api/v1/bot/1/subscribers",
"per_page": 30,
"to": 3,
"total": 3
}
}

Orders

Description

Obtain a list of all your orders for given bot using this endpoint. The results are paginated with 30 items per page.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/orders

  • Method: GET

  • Authentication: Bearer token in headers

  • Results: The list of orders is sorted in descending order by creation date.

  • Parameters: Use the per_page and page parameters to control the number of results per page.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bot/1/orders?per_page=30&page=1" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

{
"data": [
{
"id": 2,
"uuid": "9d76cf9c-fdb4-4f7b-98e4-76b96159df93",
"number": 2,
"offer_id": 2,
"offer_name": "Offer 2",
"price": 1,
"currency": "USD",
"type": "one-time",
"payment_system_type": "fondy",
"payment_system_name": "Fondy",
"status_changed_at": "2023-07-24T14:43:52.000000Z",
"created_at": "2023-07-24T14:43:24.000000Z",
"subscriber": {
"id": 1,
"user_id": 1000,
"first_name": "John",
"last_name": null,
"username": "john",
"phone": null,
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2023-07-27T08:39:03.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}
},
{
"id": 1,
"uuid": "a9e58c73-f6a8-413e-b6c5-7af312bf315b",
"number": 1,
"offer_id": 1,
"offer_name": "Offer 1",
"price": 1,
"currency": "USD",
"subscriber_id": 1,
"type": "subscription",
"payment_system_type": "stripe",
"payment_system_name": "Stripe",
"status_changed_at": "2023-07-24T14:42:12.000000Z",
"created_at": "2023-07-24T14:41:52.000000Z",
"subscriber": {
"id": 2,
"user_id": 1001,
"first_name": "Foo",
"last_name": "Bar",
"username": "foo_bar",
"phone": null,
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2023-07-27T08:39:03.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}
}
],
"links": {
"first": "https://app.zenedu.io/api/v1/bot/1/orders?page=1",
"last": "https://app.zenedu.io/api/v1/bot/1/orders?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "<< Previous",
"active": false
},
{
"url": "https://app.zenedu.io/api/v1/bot/1/orders?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next >>",
"active": false
}
],
"path": "https://app.zenedu.io/api/v1/bot/1/orders",
"per_page": 30,
"to": 2,
"total": 2
}
}

Offers

Description

Obtain a list of all your offers for a given bot using this endpoint. The results are paginated with 30 items per page.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/offers

  • Method: GET

  • Authentication: Bearer token in headers

  • Results: The list of offers is sorted in descending order by creation date.

  • Parameters: Use the per_page and page parameters to control the number of results per page.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bot/1/offers?per_page=30&page=1" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

{
"data": [
{
"id": 177,
"name": "Intensiv Leonardo",
"price": 10,
"currency": "USD",
"is_active": true,
"is_subscription": false,
"accesses_count": 1,
"description": null,
"landing_name": "Intensiv Leonardo",
"landing_description": "",
"cover_url": null,
"request_contacts": false,
"time_limit_enabled": false,
"usage_limit_enabled": false,
"access_limit_enabled": false,
"created_at": "2024-08-15T10:07:01.000000Z"
},
{
"id": 172,
"name": "Coupon with sub",
"price": 100,
"currency": "USD",
"is_active": true,
"is_subscription": true,
"accesses_count": 1,
"description": "<b>Offer:</b> {{offer}} <br><b>Accesses:</b> {{accesses}} <br><b>Price:</b> {{price}}",
"landing_name": "Coupon with sub",
"landing_description": "<b>Accesses:</b> OneTime product",
"cover_url": null,
"request_contacts": false,
"time_limit_enabled": true,
"usage_limit_enabled": true,
"access_limit_enabled": false,
"created_at": "2024-07-24T18:59:46.000000Z"
}
],
"links": {
"first": "https://app.zenedu.io/api/v1/bot/1/offers?page=1",
"last": "https://app.zenedu.io/api/v1/bot/1/offers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "&laquo; Previous",
"active": false
},
{
"url": "https://app.zenedu.io/api/v1/bot/1/offers?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next &raquo;",
"active": false
}
],
"path": "https://app.zenedu.io/api/v1/bot/1/offers",
"per_page": 30,
"to": 14,
"total": 14
}
}

Funnels

Description

Obtain a list of all your funnels for a given bot using this endpoint. The results are paginated with 30 items per page.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/funnels

  • Method: GET

  • Authentication: Bearer token in headers

  • Results: The list of funnels is sorted in descending order by creation date.

  • Parameters: Use the per_page and page parameters to control the number of results per page.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bot/1/funnels?per_page=30&page=1" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

{
"data": [
{
"id": 263,
"name": "Intensiv Leonardo",
"is_active": true,
"subscribers_count": 1,
"steps_count": 1,
"sections_count": 0,
"cover_url": "https://app.zenedu.io/assets/img/product_blank/3.jpg",
"description": null,
"restart_enabled": true,
"autodelete_steps_enabled": true,
"template_url": "https://app.zenedu.io/bots?template=oMzBCK7MZqEwzrTbczlb9YjEIPUS9cK4",
"template_url_enabled": true,
"created_at": "2024-08-15T10:05:58.000000Z",
"direct_subscription_access": false
}
],
"links": {
"first": "https://app.zenedu.io/api/v1/bot/1/funnels?page=1",
"last": "https://app.zenedu.io/api/v1/bot/1/funnels?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "&laquo; Previous",
"active": false
},
{
"url": "https://app.zenedu.io/api/v1/bot/1/funnels?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next &raquo;",
"active": false
}
],
"path": "https://app.zenedu.io/api/v1/bot/1/funnels",
"per_page": 30,
"to": 16,
"total": 16
}
}

Products

Description

Obtain a list of all your products for a given bot using this endpoint. The results are paginated with 30 items per page.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/products

  • Method: GET

  • Authentication: Bearer token in headers

  • Results: The list of products is sorted in descending order by creation date.

  • Parameters: Use the per_page and page parameters to control the number of results per page.

Example request

curl -X GET "https://app.zenedu.io/api/v1/bot/1/products?per_page=30&page=1" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN"

Example response

{
"data": [
{
"id": 253,
"name": "Assessments Test",
"is_active": true,
"subscribers_count": 1,
"steps_count": 8,
"sections_count": 0,
"cover_url": "https://app.zenedu.io/assets/img/product_blank/3.jpg",
"description": null,
"restart_enabled": false,
"autodelete_steps_enabled": true,
"template_url": "https://app.zenedu.io/bots?template=Bmsyk0unsFmyXcGxDovtJrDgOAMjOapI",
"template_url_enabled": true,
"created_at": "2024-06-19T07:20:02.000000Z"
}
],
"links": {
"first": "https://app.zenedu.io/api/v1/bot/1/products?page=1",
"last": "https://app.zenedu.io/api/v1/bot/1/products?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "&laquo; Previous",
"active": false
},
{
"url": "https://app.zenedu.io/api/v1/bot/1/products?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next &raquo;",
"active": false
}
],
"path": "https://app.zenedu.io/api/v1/bot/1/products",
"per_page": 30,
"to": 12,
"total": 12
}
}

Add Subscriber To Funnel

Description

You can add a subscriber to a specific funnel using this method.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/funnels

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: funnel_id in form data.

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/subscribers/1/funnels" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" –form “funnel_id=1”

Example response

{
"id": 1,
"user_id": 111222,
"first_name": "Student",
"last_name": null,
"username": null,
"phone": "+111222333444",
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2024-08-19T09:20:38.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}

Add Subscriber To Offer

Description

You can add a subscriber to a specific offer using this method.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/offers

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: offer_id in form data.

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/subscribers/1/offers" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" –form “offer_id=1”

Example response

{
"id": 1,
"user_id": 111222,
"first_name": "Student",
"last_name": null,
"username": null,
"phone": "+111222333444",
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2024-08-19T09:20:38.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}

Revoke Subscriber Offer Access

Description

You can revoke a subscriber’s access to a specific offer using this method

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/offers/revoke

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: offer_id in form data.

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/offers/revoke" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--form "offer_id=1"

Example response

{
"id": 1,
"user_id": 111222,
"first_name": "Student",
"last_name": null,
"username": null,
"phone": "+111222333444",
"email": null,
"notes": null,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2024-08-19T09:20:38.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}

Add Tags To Subscriber

Description

You can add tags to a subscriber using this method.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/tags

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: tags[] in form data.

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/subscribers/1/tags" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" –form “tags[]=’tag1’” –form “tags[]=’tag2’”

Example response

{
"id": 1,
"user_id": 111222,
"first_name": "Student",
"last_name": null,
"username": null,
"phone": "+111222333444",
"email": null,
"notes": null,
"tags": ”tag1,tag2”,
"is_active": true,
"is_blocked": false,
"last_active_at": "2024-08-19T09:20:38.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}

Add Notes To Subscriber

Description

You can add notes to subscriber using this method.

Example request

curl -X POST "http://zenedu.test/api/v1/bot/{botId}/subscribers/{subscriberId}/notes" -H "Authorization: Bearer YOUR_API_TOKEN" -H "Accept: application/json" --form "notes=Any notes that you need"

Example response

{
"id": 1,
"user_id": 111222,
"first_name": "Student",
"last_name": null,
"username": null,
"phone": "+111222333444",
"email": null,
"notes": ”Any notes that you need”,
"tags": null,
"is_active": true,
"is_blocked": false,
"last_active_at": "2025-12-19T09:20:38.000000Z",
"created_at": "2023-06-23T09:51:07.000000Z"
}

Create Offer Link

Description

Create offer links for subscribers to get the offer without payment.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/links/offer

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: in form data:

    • offer_id - required

    • usage_limit

    • expire_date

    • create_order

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/links/offer" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" –form “offer_id=1”

Example response

{
"status": "success",
"data": {
"link": "https://t.me/bot_username?start=LINK",
"landing_link": "https://app.zenedu.io/l/LINK"
}
}

Create Funnel Link

Description

Create funnel links for subscribers.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/links/funnel

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters: in form data:

    • funnel_id - required

    • name - required

    • expire_date

    • request_email

    • request_phone

    • tags

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/links/funnel" -H "Accept: application/json" -H "Authorization: Bearer YOUR_API_TOKEN" –form “funnel_id=1”

Example response

{
"status": "success",
"data": {
"link": "https://t.me/bot_username?start=LINK",
"landing_link": "https://app.zenedu.io/l/LINK"
}

Send Message To Subscriber

Description

This method can be used to send a text message to a subscriber.

  • URL: https://app.zenedu.io/api/v1/bot/{botId}/subscribers/{subscriberId}/messages

  • Method: POST

  • Authentication: Bearer token in headers

  • Parameters:

    - text (required, string, max 4096)

    - reply_to_message_id (optional, integer) — Telegram ID of the message to which the reply is made

Example request

curl -X POST "https://app.zenedu.io/api/v1/bot/1/subscribers/1/messages" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"text":"Hello from API"}'

Example response

{
"data": {
"id": 218,
"telegram_message_id": 5722,
"text": "Hello from API",
"created_at": "2026-03-04T10:30:12+00:00"
}
}

Possible errors

  • 403 — Not authorized

  • 404 — Bot or Subscriber not found

  • 422 — Subscriber blocked/inactive or incorrect `reply_to_message_id`

  • 502 — Failed to send message

Get Message File

Description

This method allows you to retrieve a file (attachment) from a subscriber's message.

Important:

- The link to the file in the webhook (`file.url`) is not public.

- Always pass `Authorization: Bearer YOUR_API_TOKEN` to download the file.

URL: https://app.zenedu.io/api/v1/bot/{botId}/file/{messageId}

Method: GET

Authentication: Bearer token in headers

Example request

curl -L "https://app.zenedu.io/api/v1/bot/13/file/217" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
--output file.bin

Possible errors

  • 403 — no access to the bot

  • 404 — message not found / file missing

  • 413 — file too large

  • 502 — authorization error with file provider


Webhooks

A webhook is a mechanism where Zenedu sends an HTTP request to an external URL when a specific event occurs (for example, a new order or a subscription) to notify another service.

You can add webhooks in Workspace Settings → API & Webhooks.
There, you select the event that will trigger the webhook.

Events that can be tracked:

  • order created (order.created)

  • order status updated (order.status.changed)

  • new subscriber (subscriber.added)

  • new subscriber contact created (subscriber.contact.created)

  • new tag created (tag.added)

  • subscriber added to product (product.subscriber.added)

  • subscriber added to funnel (funnel.subscriber.added)

  • subscription cancelled (subscription.cancelled)

  • message received from subscriber (message.received)

  • message sent to subscriber (message.sent)


Payload Sample:

{
"_id": "01JNV....",
"event": "message.received",
"description": "My webhook",
"timestamp": "2026-03-04T10:42:00+00:00",
"data": {
"botId": 1,
"id": 2,
"telegram_message_id": 123,
"subscriber": {
"id": 44,
"user_id": 123456789,
"first_name": "John",
"last_name": null,
"username": "john",
"phone": null,
"email": null,
"notes": null
},
"text": "Hi",
"outgoing": false,
"file": {
"type": "photo",
"url": "https://app.zenedu.io/api/v1/bot/1/file/50",
"title": null,
"size": null,
"duration": null
},
"reply_to_message_id": null,
"created_at": "2026-03-04T10:41:55+00:00"
}
}
Did this answer your question?