Clever Data API

RESTful API providing access to district, school, student, teacher, section, and course data synchronized from Student Information Systems. Supports delta sync via Events API and requires a district-app token for authentication. Current version is v3.1.

OpenAPI Specification

clever-data-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Serves the Clever Data API
  title: Data API
  version: 3.1.0
paths:
  /courses:
    get:
      description: Returns a list of courses
      operationId: getCourses
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CoursesResponse"
      tags:
        - Courses
  "/courses/{id}":
    get:
      description: Returns a specific course
      operationId: getCourse
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CourseResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Courses
  "/courses/{id}/district":
    get:
      description: Returns the district for a course
      operationId: getDistrictForCourse
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Courses
  "/courses/{id}/resources":
    get:
      description: Returns the resources for a course
      operationId: getResourcesForCourse
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourcesResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Courses
  "/courses/{id}/schools":
    get:
      description: Returns the schools for a course
      operationId: getSchoolsForCourse
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Courses
  "/courses/{id}/sections":
    get:
      description: Returns the sections for a course
      operationId: getSectionsForCourse
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Courses
  /districts:
    get:
      description: Returns a list of districts. In practice this will only return the
        one district associated with the bearer token
      operationId: getDistricts
      parameters:
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictsResponse"
      tags:
        - Districts
  "/districts/{id}":
    get:
      description: Returns a specific district
      operationId: getDistrict
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Districts
  /resources:
    get:
      description: Returns a list of resources
      operationId: getResources
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourcesResponse"
      tags:
        - Resources
  "/resources/{id}":
    get:
      description: Returns a specific resource
      operationId: getResource
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourceResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Resources
  "/resources/{id}/courses":
    get:
      description: Returns the courses for a resource
      operationId: getCoursesForResource
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CoursesResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Resources
  "/resources/{id}/sections":
    get:
      description: Returns the sections for a resource
      operationId: getSectionsForResource
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Resources
  "/resources/{id}/users":
    get:
      description: Returns the student and/or teacher users for a resource
      operationId: getUsersForResource
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: role
          schema:
            type: string
            enum:
              - student
              - teacher
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Resources
  /schools:
    get:
      description: Returns a list of schools
      operationId: getSchools
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolsResponse"
      tags:
        - Schools
  "/schools/{id}":
    get:
      description: Returns a specific school
      operationId: getSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  "/schools/{id}/courses":
    get:
      description: Returns the courses for a school
      operationId: getCoursesForSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CoursesResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  "/schools/{id}/district":
    get:
      description: Returns the district for a school
      operationId: getDistrictForSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  "/schools/{id}/sections":
    get:
      description: Returns the sections for a school
      operationId: getSectionsForSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  "/schools/{id}/terms":
    get:
      description: Returns the terms for a school
      operationId: getTermsForSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TermsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  "/schools/{id}/users":
    get:
      description: Returns the staff, student, and/or teacher users for a school
      operationId: getUsersForSchool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: role
          schema:
            type: string
            enum:
              - staff
              - student
              - teacher
        - in: query
          name: primary
          schema:
            type: string
            enum:
              - ""
              - "true"
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Schools
  /sections:
    get:
      description: Returns a list of sections
      operationId: getSections
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
      tags:
        - Sections
  "/sections/{id}":
    get:
      description: Returns a specific section
      operationId: getSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/course":
    get:
      description: Returns the course for a section
      operationId: getCourseForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CourseResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/district":
    get:
      description: Returns the district for a section
      operationId: getDistrictForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/resources":
    get:
      description: Returns the resources for a section
      operationId: getResourcesForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourcesResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/school":
    get:
      description: Returns the school for a section
      operationId: getSchoolForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/term":
    get:
      description: Returns the term for a section
      operationId: getTermForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TermResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  "/sections/{id}/users":
    get:
      description: Returns the student and/or teacher users for a section
      operationId: getUsersForSection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: role
          schema:
            type: string
            enum:
              - student
              - teacher
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Sections
  /terms:
    get:
      description: Returns a list of terms
      operationId: getTerms
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TermsResponse"
      tags:
        - Terms
  "/terms/{id}":
    get:
      description: Returns a specific term
      operationId: getTerm
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TermResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Terms
  "/terms/{id}/district":
    get:
      description: Returns the district for a term
      operationId: getDistrictForTerm
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Terms
  "/terms/{id}/schools":
    get:
      description: Returns the schools for a term
      operationId: getSchoolsForTerm
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Terms
  "/terms/{id}/sections":
    get:
      description: Returns the sections for a term
      operationId: getSectionsForTerm
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Terms
  /users:
    get:
      description: Returns a list of contact, district admin, staff, student, and/or
        teacher users
      operationId: getUsers
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: role
          schema:
            type: string
            enum:
              - contact
              - district_admin
              - staff
              - student
              - teacher
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
        - in: query
          name: count
          schema:
            type: string
            enum:
              - ""
              - "true"
              - "false"
              - undefined
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
      tags:
        - Users
  "/users/{id}":
    get:
      description: Returns a specific user
      operationId: getUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/district":
    get:
      description: Returns the district for a user
      operationId: getDistrictForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DistrictResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/mycontacts":
    get:
      description: Returns the contact users for a student user
      operationId: getContactsForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/mystudents":
    get:
      description: Returns the student users for a teacher or contact user
      operationId: getStudentsForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/myteachers":
    get:
      description: Returns the teacher users for a student user
      operationId: getTeachersForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsersResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/resources":
    get:
      description: Returns the resources for a user
      operationId: getResourcesForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourcesResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/schools":
    get:
      description: Returns the schools for a user
      operationId: getSchoolsForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: primary
          schema:
            type: string
            enum:
              - ""
              - "true"
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SchoolsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
  "/users/{id}/sections":
    get:
      description: Returns the sections for a user
      operationId: getSectionsForUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: limit
          schema:
            type: integer
        - in: query
          name: starting_after
          schema:
            type: string
        - in: query
          name: ending_before
          schema:
            type: string
      responses:
        "200":
          description: OK Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SectionsResponse"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Users
security:
  - oauth: []
x-samples-languages:
  - curl
  - node
  - ruby
  - python
  - php
  - java
  - go
servers:
  - url: https://api.clever.com/v3.1
components:
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/BadRequest"
    InternalError:
      description: Internal Error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/InternalError"
    NotFound:
      description: Entity Not Found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/NotFound"
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://clever.com/oauth/authorize
          tokenUrl: https://clever.com/oauth/tokens
          scopes: {}
  schemas:
    BadRequest:
      properties:
        message:
          type: string
      type: object
    Contact:
      properties:
        legacy_id:
          type: string
          x-validation: true
        phone:
          type: string
          nullable: true
        phone_type:
          enum:
            - Cell
            - Home
            - Work
            - Other
            - ""
          type: string
          x-validation: true
          nullable: true
        sis_id:
          type: string
          nullable: true
        student_relationships:
          items:
            $ref: "#/components/schemas/StudentRelationship"
          type: array
          x-validation: true
      type: object
    Course:
      properties:
        district:
          type: string
          x-validation: true
        id:
          type: string
          x-validation: true
        name:
          type: string
          nullable

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