SendPulse Education API

Online course platform — schools, courses, students, groups, pricing plans, enrolments and certificates.

OpenAPI Specification

sendpulse-edu-openapi.yml Raw ↑
components:
  schemas:
    CourseListItem:
      type: object
      properties:
        id:
          type: integer
          description: Course identifier
        name:
          type: string
          description: Course name
        isPaid:
          type: boolean
          description: Whether the course is paid
        totalDuration:
          type: integer
          description: Total course duration in minutes
        hasCertificate:
          type: boolean
          description: Whether a certificate is issued upon completion
        previewImageUrl:
          type: string
          description: Course preview image URL
        courseUrl:
          type: string
          description: Link to the course page
        status:
          type: string
          description: Course availability status
          enum:
            - inProgress
            - inactive
            - planned
    Course:
      type: object
      properties:
        id:
          type: integer
          description: Course identifier
        schoolId:
          type: integer
          description: School identifier
        userId:
          type: integer
          description: Owner user identifier
        status:
          type: string
          description: Current course status
          enum:
            - inProgress
            - inactive
            - planned
        domainId:
          type: integer
          description: Domain identifier
        landingId:
          type: integer
          description: Landing identifier
        pageId:
          type: integer
          description: Page identifier
        name:
          type: string
          description: Course name
        slug:
          type: string
          description: URL-friendly course identifier (slug)
        landingImage:
          type:
            - string
            - 'null'
          description: Main course image URL
        coverImage:
          type:
            - string
            - 'null'
          description: Cover image URL
        startDate:
          type:
            - string
            - 'null'
          description: Course start date in ISO 8601 format
        endDate:
          type:
            - string
            - 'null'
          description: Course end date in ISO 8601 format
        timezone:
          type:
            - string
            - 'null'
          description: Timezone identifier
        passingScore:
          type:
            - integer
            - 'null'
          description: Minimum score to pass
        isLinear:
          type: boolean
          description: Indicates whether course is linear
        completionCriterion:
          type: string
          description: Completion criterion
        createdAt:
          type: string
          description: Creation timestamp in ISO 8601 format
        wasStarted:
          type: boolean
          description: Indicates whether the user started the course
        needRegeneration:
          type: boolean
          description: Flag that course page needs regeneration
        redirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after success
        failedRedirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after failure
        studentCount:
          type: integer
          description: Number of students enrolled
        courseSettings:
          type: array
          description: Course settings
          items:
            type: object
        isCourseHasCertifiedStudents:
          type: boolean
          description: Indicates whether there are certified students for the course
        sectionsWithLessons:
          type: array
          description: Sections with lessons
          items:
            type: object
        userTariffStatus:
          type:
            - string
            - 'null'
          description: Current user tariff status
        categoriesIds:
          type: array
          description: IDs of attached categories
          items:
            type: integer
        promoCodeExists:
          type: boolean
          description: Whether a promo code is available
        isCertificate:
          type: boolean
          description: Whether the course issues a certificate
        hasPaidTariffs:
          type: boolean
          description: Indicates whether the course has paid tariffs
        groupId:
          type:
            - integer
            - 'null'
          description: Group identifier
    Section:
      type: object
      properties:
        id:
          type: integer
          description: Section identifier
        name:
          type: string
          description: Section name
        description:
          type: string
          description: Section description
        order:
          type: integer
          description: Section order within the course
        status:
          type: string
          description: Section status
          enum:
            - closed
            - opened
            - deleted
            - planned
        duration:
          type: integer
          description: Total section duration in minutes
        startDate:
          type: string
          description: Section availability start date (ISO 8601)
        intervalDate:
          type: integer
          description: Number of days offset from course start to open
        lessons:
          type: array
          description: Section lessons
          items:
            $ref: '#/components/schemas/Lesson'
        tests:
          type: array
          description: Section tests
          items:
            $ref: '#/components/schemas/Test'
    Lesson:
      type: object
      properties:
        id:
          type: integer
          description: Lesson identifier
        name:
          type: string
          description: Lesson name
        order:
          type: integer
          description: Lesson order within the section
        sectionId:
          type: integer
          description: Identifier of the section this lesson belongs to
        status:
          type: string
          description: Lesson status
          enum:
            - closed
            - opened
            - deleted
            - planned
        content:
          type: string
          description: Lesson content (HTML/Markdown or other format)
        startDate:
          type: string
          description: Lesson open date (ISO 8601)
        intervalDate:
          type: integer
          description: Number of days offset relative to course start
    Test:
      type: object
      properties:
        id:
          type: integer
          description: Test identifier
        name:
          type: string
          description: Test name
        description:
          type: string
          description: Test description
        status:
          type: string
          description: Test status
          enum:
            - active
            - inactive
            - planned
        order:
          type: integer
          description: Test order
        minimumScore:
          type: integer
          description: Minimum passing score
        score:
          type: integer
          description: User's obtained score (if available)
        tries:
          type: integer
          description: Number of allowed attempts
        showAnswers:
          type: boolean
          description: Whether to show correct answers after completion
        showExplanations:
          type: boolean
          description: Whether to show explanations for answers
        randomDirection:
          type: boolean
          description: Whether to randomize the order of questions/answers
        startDate:
          type: string
          description: Test open date (ISO 8601)
        intervalDate:
          type: integer
          description: Number of days offset relative to course start
    CourseTariffResource:
      type: object
      properties:
        id:
          type: integer
          description: Unique tariff identifier
        status:
          type: string
          description: Tariff status
          enum:
            - active
            - inactive
        name:
          type: string
          description: Tariff name
        wasStarted:
          type: boolean
          description: Whether learning under this tariff has already started
        succeedRedirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after successful payment
        failedRedirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after failed payment
        order:
          type:
            - integer
            - 'null'
          description: Display order of the tariff
        courseAccessRestrictionSettings:
          $ref: '#/components/schemas/CourseAccessRestrictionSettingsResource'
        paymentMethods:
          type: array
          description: Available payment methods
          items:
            $ref: '#/components/schemas/PaymentMethodResource'
        studentBaseStateSetting:
          $ref: '#/components/schemas/StudentBaseStateSettingResource'
        contentAccesses:
          type: array
          description: Content access settings
          items:
            $ref: '#/components/schemas/ContentAccessesResource'
        functionalityAccesses:
          type: array
          description: Available functionalities under the tariff
          items:
            $ref: '#/components/schemas/FunctionalityResource'
        courseTariffSetting:
          $ref: '#/components/schemas/CourseTariffSettingResource'
    ShortCourseTariffResource:
      type: object
      properties:
        id:
          type: integer
          description: Unique tariff identifier
        courseId:
          type: integer
          description: Course identifier
        name:
          type: string
          description: Tariff name
        isMain:
          type: boolean
          description: Whether this is the main tariff for the course
        isPaid:
          type: boolean
          description: Whether the tariff is paid
        succeedRedirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after successful payment
        failedRedirectUrl:
          type:
            - string
            - 'null'
          description: Redirect URL after failed payment
        status:
          type: string
          description: Tariff status
          enum:
            - active
            - inactive
        order:
          type:
            - integer
            - 'null'
          description: Display order of the tariff
        countOfStudents:
          type: integer
          description: Number of students enrolled under this tariff
        accessRestrictionSettingsVO:
          $ref: '#/components/schemas/CourseAccessRestrictionSettingsResource'
        paymentMethodsCollection:
          type: array
          description: Available payment methods
          items:
            $ref: '#/components/schemas/PaymentMethodResource'
        studentBaseStateSettingDTO:
          $ref: '#/components/schemas/StudentBaseStateSettingResource'
        contentAccesses:
          type: array
          description: Content access settings
          items:
            $ref: '#/components/schemas/ContentAccessesResource'
        functionalityAccesses:
          type: array
          description: Available functionalities under the tariff
          items:
            $ref: '#/components/schemas/FunctionalityResource'
        courseTariffSettingDTO:
          $ref: '#/components/schemas/CourseTariffSettingResource'
        wasStarted:
          type: boolean
          description: Whether learning under this tariff has already started
    CourseTariffSettingResource:
      type: object
      properties:
        startDate:
          type:
            - string
            - 'null'
          format: date-time
          description: Tariff start date
        endDate:
          type:
            - string
            - 'null'
          format: date-time
          description: Tariff end date
        timezone:
          type:
            - string
            - 'null'
          description: Time zone used for tariff dates
    StudentBaseStateSettingResource:
      type: object
      properties:
        group:
          type: integer
          description: Default student group ID
        responsible:
          type: integer
          description: Responsible manager ID
        tags:
          type: array
          description: List of tag IDs to assign to the student
          items:
            type: integer
        dealCreation:
          type: object
          description: Settings for creating a CRM deal upon payment
          properties:
            createDealOnPayment:
              type: boolean
              description: Create a deal after successful payment
            pipelineId:
              type: integer
              description: CRM sales pipeline ID
            stepId:
              type: integer
              description: Sales pipeline stage ID
            dealName:
              type: string
              description: Deal name template
    ContentAccessesResource:
      type: object
      properties:
        contentType:
          type: string
          description: Type of content being granted access to
          enum:
            - lesson
            - test
            - certificate
        entityId:
          type: integer
          description: Entity ID (lesson/test/certificate)
    FunctionalityResource:
      type: object
      properties:
        type:
          type: string
          description: Type of available functionality
          enum:
            - chat
    PaymentMethodResource:
      type: object
      properties:
        id:
          type: integer
          description: Unique payment method identifier
        name:
          type: string
          description: Payment method name
        price:
          type: integer
          description: Price in the smallest currency units (e.g., cents)
        currency:
          type: string
          description: Payment currency (ISO 4217)
        paymentId:
          type: string
          format: uuid
          description: Payment identifier in the payment system
        paymentType:
          type: string
          description: Payment system type/provider
          enum:
            - YooKassa
            - Fondy
            - PayPal
            - YooMoney
            - ROBOKASSA
            - Stripe
            - MERCADOPAGO
            - LiqPay
            - Wayforpay
            - Flutterwave
    CourseAccessRestrictionSettingsResource:
      type: object
      properties:
        courseId:
          type: integer
          description: Course ID to which the restriction applies
        restrictedDays:
          type: integer
          description: Number of restricted access days
        restrictedToDate:
          type: string
          description: Date until which the restriction applies (ISO 8601)
        timezone:
          type: string
          description: Time zone for calculating restriction dates
        typeUpdate:
          type: string
          description: Type of restriction settings update
    School:
      type: object
      properties:
        id:
          type: integer
          description: School identifier
        userId:
          type: integer
          description: School owner (user) ID
        domainId:
          type: integer
          description: Domain ID associated with the school
        landingId:
          type: integer
          description: Landing page ID
        pageId:
          type: integer
          description: School page ID
        name:
          type: string
          description: School name
        studentsName:
          type: string
          description: Custom name for students (e.g., pupils/audience)
        isLms:
          type: boolean
          description: Indicates that this is an LMS school
        status:
          type: string
          description: School status
          enum:
            - active
            - inactive
            - deleted
        coursesCount:
          type: integer
          description: Number of courses in the school
        order:
          type:
            - integer
            - 'null'
          description: Display order in lists
        iconUrl:
          type: string
          description: School icon URL
        groups:
          type:
            - array
            - 'null'
          description: List of groups in the school
          items:
            type: array
            items:
              type: object
              properties:
                id:
                  type: integer
                  description: Group ID
                name:
                  type: string
                  description: Group name
                schoolId:
                  type: integer
                  description: School ID
    StudentGroup:
      type: object
      properties:
        id:
          type: integer
          description: Group identifier
        userId:
          type: integer
          description: Group owner (user) ID
        responsibleId:
          type:
            - integer
            - 'null'
          description: Responsible ID for the group (may be absent)
        courseId:
          type: integer
          description: Course ID the group belongs to
        name:
          type: string
          description: Group name
        color:
          type: string
          description: Group color (hex or other format)
    Tag:
      type: object
      properties:
        id:
          type: integer
          description: Unique tag identifier
        name:
          type: string
          description: Tag name
        colorBackground:
          type: string
          description: Tag color (hex or other format)
        colorText:
          type: string
          description: Tag color (hex or other format)
        contactCount:
          type: integer
          description: Number of contacts/students with this tag
        taskCount:
          type: integer
          description: Number of tasks associated with this tag
    Student:
      type: object
      properties:
        id:
          type: integer
          description: Unique student identifier
        uuid:
          type: string
          description: Universally unique identifier for the student
        firstName:
          type: string
          description: Student's first name
        lastName:
          type: string
          description: Student's last name
        status:
          type: string
          description: Current status of the student
        responsibleId:
          type: integer
          description: User ID of the person responsible for the student
        email:
          type: string
          description: Student's email address
        domainId:
          type: integer
          description: Domain identifier the student belongs to
        language:
          type: string
          description: Preferred language/locale code (e.g., uk_UA)
        phone:
          type:
            - string
            - 'null'
          description: Student's phone number (nullable)
        avatar:
          type:
            - string
            - 'null'
          description: URL to the student's avatar image (nullable)
        schoolId:
          type: integer
          description: School identifier the student is enrolled in
        timezone:
          type:
            - string
            - 'null'
          description: Student's timezone (nullable)
        dateFormat:
          type:
            - string
            - 'null'
          description: Preferred date format for the student (nullable)
        timeFormat:
          type:
            - string
            - 'null'
          description: Preferred time format for the student (nullable)
        recommendedLangs:
          type:
            - string
            - 'null'
          description: Recommended languages for the student (nullable)
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Static API Key authentication.  A long-lived token generated manually in
        the SendPulse account settings.
      x-ai-description: >
        Permanent authentication token. Ideal for simple integrations without
        token refresh logic.
    outh2:
      type: oauth2
      description: OAuth 2.0 Client Credentials flow for temporary access tokens.
      flows:
        clientCredentials:
          tokenUrl: https://api.sendpulse.com/oauth/access_token
          scopes: {}
      x-ai-description: >
        Standard OAuth 2.0 flow using Client ID and Client Secret.  Provides
        temporary tokens (valid for 1 hour) for enhanced security.
info:
  description: This is the REST API endpoints definition for Education SendPulse project
  title: Education SendPulse Project API Definition
  version: 1.0.0
openapi: 3.1.2
paths:
  /courses:
    get:
      tags:
        - Courses
      summary: Get all courses for user
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Course'
      operationId: getCourses
      x-ai-role: elearning_platform_manager
      x-ai-description: >-
        Retrieves the full catalog of courses associated with the authenticated
        user's account. This is the primary discovery endpoint for the LMS
        module — use it to map available course IDs before enrolling students,
        querying progress, or building course-selection flows.
      x-ai-reasoning-instructions:
        - >-
          Use this endpoint at the start of any LMS workflow to discover
          available course IDs before referencing them in downstream operations.
        - >-
          If the response list is empty, advise the user to create a course
          first before attempting enrollment or content operations.
        - >-
          Consider caching the result if building a UI or sequential automation
          — course lists change infrequently.
      x-ai-responding-instructions:
        - >-
          Present the returned courses as a structured list with their IDs and
          titles for easy selection.
        - If the list is empty, suggest creating a new course as the next step.
        - >-
          If the user is looking for a specific course, suggest filtering by
          name client-side or checking if a search/filter endpoint exists.
      x-ai-suggestions:
        - Use returned course IDs with enrollment or lesson endpoints.
        - >-
          Combine with student progress endpoints to build a course completion
          dashboard.
      x-ai-capabilities:
        confirmation:
          type: None
        security_info:
          data_handling:
            - ReadOnly
  /courses/{courseId}/tariffs:
    get:
      tags:
        - Course tariffs
      summary: Get course tariffs
      parameters:
        - name: CourseId
          in: path
          required: true
          description: Course identifier.
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: array
                    description: List of tariffs available for the specified course.
                    items:
                      $ref: '#/components/schemas/ShortCourseTariffResource'
      operationId: getCourseTariffs
      x-ai-role: e_learning_platform_specialist
      x-ai-description: >-
        Retrieves all pricing plans (tariffs) available for a specific course.
        Tariffs define access tiers, pricing, and content scope — they are the
        commercial gateway between a learner and course content. Use this before
        presenting purchase options or building checkout flows.
      x-ai-reasoning-instructions:
        - >-
          Verify the courseId is valid and the course exists before requesting
          its tariffs.
        - >-
          If the tariff list is empty, the course may not be published or may
          not have pricing configured yet.
        - >-
          Use this endpoint to populate payment/enrollment UI — do not hardcode
          tariff data.
        - >-
          Consider caching results briefly if building a storefront, as tariffs
          change infrequently.
      x-ai-responding-instructions:
        - >-
          Present tariffs as a list of available purchase options with names,
          prices, and access scope if available.
        - >-
          If no tariffs are returned, inform the user that the course may not be
          available for purchase yet.
        - >-
          Suggest using the enrollment or checkout endpoint as the logical next
          step after the user selects a tariff.
      x-ai-suggestions:
        - >-
          Use the returned tariff IDs when calling the course enrollment or
          order creation endpoint.
        - >-
          Display tariffs grouped by access type (e.g., lifetime, subscription)
          if such a distinction exists in the schema.
      x-ai-capabilities:
        confirmation:
          type: None
        security_info:
          data_handling:
            - ReadOnly
  /schools:
    get:
      tags:
        - Schools
      summary: Get list of schools
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School'
      operationId: getSchools
      x-ai-role: education_platform_administrator
      x-ai-description: >-
        Retrieves the full list of schools registered in the system. Schools are
        top-level organizational entities in the SendPulse EDU platform — each
        school is an independent learning environment with its own courses,
        students, and instructors. Use this endpoint to enumerate available
        schools before performing school-scoped operations.
      x-ai-reasoning-instructions:
        - >-
          Use this endpoint to discover available school IDs before making
          school-specific requests.
        - >-
          If the user asks about a specific school, fetch the list first and
          match by name or ID.
        - >-
          Consider pagination or filtering if the response contains a large
          number of schools.
      x-ai-responding-instructions:
        - >-
          Present the list of schools with their names and IDs in a readable
          format.
        - >-
          If only one school is returned, highlight that this is likely a
          single-tenant setup.
        - >-
          Suggest using a specific school ID in follow-up operations such as
          fetching courses or students.
      x-ai-suggestions:
        - >-
          Use a returned school ID with endpoints like GET /schools/{id}/courses
          to explore school content.
        - >-
          If managing multiple schools, note each school's ID for subsequent
          scoped API calls.
      x-ai-capabilities:
        confirmation:
          type: None
        security_info:
          data_handling:
            - ReadOnly
  /students:
    post:
      tags:
        - Students
      summary: Create student
      requestBody:
        description: Payload to create a new student and enroll to a course/tariff.
        content:
          application/json:
            schema:
              properties:
                courseId:
                  type: integer
                  description: ID of the course to enroll the student in.
                email:
                  type: string
                  description: Student email address.
                firstName:
                  type: string
                  description: Student first name.
                lastName:
                  type: string
                  description: Student last name.
                tagIds:
                  type: array
                  description: List of tag IDs to assign to the student.
                  items:
                    type: integer
                language:
                  type: string
                  example: uk_UA
                  description: Preferred language/locale code (e.g., uk_UA).
                courseTariffId:
                  type: integer
                  description: ID of the course tariff to enroll the student on.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Student'
      operationId: createStudent
      x-ai-role: online_education_enrollment_specialist
      x-ai-description: >-
        Initializes a student account and simultaneously enrolls them into a
        specific course or tariff tier. This is the primary onboarding entry
        point in SendPulse Edu — it creates the learner identity and binds it to
        a course in a single atomic operation. The tariff determines access
        scope, content availability, and billing logic for the student.
      x-ai-reasoning-instructions:
        - >-
          Verify that the courseId exists and is active before attempting
          enrollment.
        - >-
          If courseTariffId is provided, confirm it belongs to the specified
          courseId — mismatched tariff/course pairs will fail silently or cause
          inconsistent enrollment state.
        - >-
          Check whether a student with the same email is already enrolled in the
          course to avoid duplicate records.
        - >-
          tagIds are optional but recommended for segmentation — suggest
          relevant tags if the caller has context about the student's origin or
          segment.
        - >-
          Language/locale (e.g., uk_UA) affects notification templates sent to
          the student — confirm the locale is supported if the user specifies
          one.
      x-ai-responding-instructions:
        - >-
          Confirm successful creation by surfacing the new student ID from the
          response.
        - Mention which course and tariff the student was enrolled into.
        - >-
          If enrollment fails due to duplicate email, suggest using an update or
          re-enrollment endpoint instead.
        - >-
          Suggest next steps such as sending a welcome email or assigning
          additional courses.
      x-ai-suggestions:
        - >-
          Use courseId + courseTariffId together for paid or tiered course
          access.
        - >-
          After creation, trigger a welcome notification via the SendPulse
          Automation or Email API.
        - >-
          Assign tagIds at creation time to enable targeted communication
          segments from the start.
      x-ai-capabilities:
        confirmation:
          type: None
        security_info:
          data_handling:
            - PersonalDataWrite
            - ResourceStateUpdate
  /students/auditory:
    post:
      tags:
        - Students
      summary: Get auditory
      requestBody:
        description: Filters to search and paginate the auditory list.
        content:
          application/json:
            schema:
              properties:
                offset:
                  type: integer
                  description: Pagination offset (number of records to skip).
                limit:
                  type: integer
                  description: Pagination limit (maximum number of records to return).
                tags:
                  type: array
                  description: Filter by tag IDs assigned to students.
                  items:
                    type: integer
                firstName:
                  type: string
                  description: Filter by student first name (substring match).
                lastName:
                  type: string
                  description: Filter by student last name (substring match).
                email:
                  type: string
                  description: Filter by email address (substring match).
                courseStat

# --- truncated at 32 KB (103 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sendpulse/refs/heads/main/openapi/sendpulse-edu-openapi.yml