AppsMax Funnels API

Сценарии и воронки ботов.

OpenAPI Specification

appsmax-rest-api-v1-funnels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AppsMax REST Funnels API
  version: 1.1.1
  description: Публичный server-to-server контракт REST API AppsMax v1. Это API платформы AppsMax, а не официальный API MAX или Telegram. Все ответы API имеют JSON-формат, X-Request-Id и запрет кеширования. Проверено по production-маршрутам, валидации и synthetic acceptance 2026-08-09.
  contact:
    name: AppsMax
    url: https://appsmax.ru/contacts/
    email: info@appsmax.ru
  license:
    name: AppsMax API Terms
    url: https://appsmax.ru/documents/
servers:
- url: https://telegram.appsmax.ru/api/v1
  description: Production API v1
security:
- bearerAuth: []
- apiTokenHeader: []
tags:
- name: Funnels
  description: Сценарии и воронки ботов.
paths:
  /funnels:
    get:
      operationId: listFunnels
      tags:
      - Funnels
      summary: Получить сценарии
      x-required-scope: funnels:read
      parameters:
      - $ref: '#/components/parameters/BotIdQuery'
      - $ref: '#/components/parameters/Active'
      - $ref: '#/components/parameters/PerPage100'
      - $ref: '#/components/parameters/Page'
      responses:
        '200':
          $ref: '#/components/responses/Funnels'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    PerPage100:
      name: per_page
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
    Active:
      name: active
      in: query
      schema:
        type: boolean
    BotIdQuery:
      name: bot_id
      in: query
      schema:
        type: integer
        minimum: 1
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
  responses:
    ServerError:
      description: Непредвиденная ошибка. Передайте X-Request-Id в поддержку AppsMax.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Токен отсутствует, недействителен или отозван.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Funnels:
      description: Пагинируемая коллекция сценариев.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FunnelCollection'
    ValidationFailed:
      description: Поля запроса не прошли валидацию.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Нет нужного scope или доступа к организации.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Превышен rate limit токена или операции.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Ресурс не найден в доступном контуре.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-Api-Version:
          $ref: '#/components/headers/ApiVersion'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  headers:
    RequestId:
      description: Идентификатор запроса. При корректном входящем X-Request-Id AppsMax возвращает его без изменения.
      schema:
        type: string
    RateLimitRemaining:
      description: Оставшееся число запросов в текущем окне.
      schema:
        type: integer
    RetryAfter:
      description: Число секунд до повторной попытки.
      schema:
        type: integer
    ApiVersion:
      description: Фактическая версия API.
      schema:
        type: string
        example: v1
    RateLimitLimit:
      description: Лимит запросов в текущем окне.
      schema:
        type: integer
    CacheControl:
      description: Ответы API не должны кешироваться.
      schema:
        type: string
        example: no-store, private
  schemas:
    ApiError:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - meta
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
            meta:
              type: object
              required:
              - request_id
              properties:
                request_id:
                  type: string
                  description: Идентификатор запроса для обращения в поддержку.
              additionalProperties: true
    CollectionEnvelope:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
        links:
          type: object
          additionalProperties: true
        meta:
          type: object
          additionalProperties: true
    Funnel:
      type: object
      required:
      - id
      - bot_id
      - title
      - is_active
      properties:
        id:
          type: integer
        bot_id:
          type: integer
        title:
          type: string
        description:
          type:
          - string
          - 'null'
        is_active:
          type: boolean
        restart_mode:
          type:
          - string
          - 'null'
        start_block_id:
          type:
          - integer
          - 'null'
        version:
          type:
          - integer
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
    FunnelCollection:
      allOf:
      - $ref: '#/components/schemas/CollectionEnvelope'
      - type: object
        properties:
          data:
            type: array
            items:
              $ref: '#/components/schemas/Funnel'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: AppsMax API token
      description: 'Рекомендуемый вариант: Authorization: Bearer YOUR_API_TOKEN'
    apiTokenHeader:
      type: apiKey
      in: header
      name: X-Api-Token
      description: Fallback для клиентов без Bearer auth. Не передавайте токен в URL.
externalDocs:
  description: Документация и ограничения
  url: https://appsmax.ru/developers/
x-appsmax-verified-at: '2026-08-09'
x-appsmax-default-rate-limit-per-minute: 60
x-appsmax-public-sdk: false
x-appsmax-webhooks-covered: false