Classes API Reference

Using the Quizlet API you are able to add, edit, view, delete, join and leave classes. You can also add or remove sets to classes. Some class details are private and will not be returned unless the user is authenticated and a member of the class being accessed.

You can retrieve the classes that a user is a member of by viewing their classes (i.e. https://api.quizlet.com/2.0/users/USERNAME/classes).

You can view the full details of all the sets in the class by using the endpoint https://api.quizlet.com/2.0/classes/CLASS_ID/sets.

This page only lists successful responses. For information about possible error responses, read the API Introduction.

Viewing Classes

MethodURIDescription
GEThttps://api.quizlet.com/2.0/classes/CLASS_IDReturns the class details. The amount of detail returns depends on the authenticated user's permissions.
GEThttps://api.quizlet.com/2.0/classes/CLASS_ID/setsReturns the full details of all the sets in a class.

Permissions

  • Some basic details of all classes can be accessed using any private or public access.
  • Classes require a read-scoped access token authorized by a user that is a member of the class to full its full details.

Expand request fields

The modified_since parameter is only used for the https://api.quizlet.com/2.0/classes/CLASS_ID/sets endpoint.

Optional Parameters

ParameterTypeDescriptionDefault
modified_sincetimestampLimits results to sets that have been modified since the specified Unix timestamp.-

Expand response fields

Fields marked with are only displayed if the class is public or the authenticated user is a member of the class.

Class object

FieldTypeDescription
id integer Quizlet's unique ID for a class.
name string The name of the class, as supplied by the class's creator.
set_count integer The number of sets in this class (includes the number of non-public sets).
user_count integer The number of members in this class.
created_date timestamp The date/time at which the class was created. Dates are UNIX timestamps.
has_discussion boolean true or false depending on whether discussion is enabled for this class.
admin_only boolean true or false depending on whether non-admins are allows to invite other members and post sets to this class.
has_access boolean true or false depending on whether the currently logged in user has access.
access_level string uninvolved,removed,rejected,applicant,member, or admin depending on how much access the currently logged in user has to this class.
description string The creator's description of the class.
sets array All the set objects in the class, including who added the set to the class.
Requires full permissions.
members array All the member objects who are members of the class.
Requires full permissions.
has_password boolean Deprecated. Always false. All classes no longer have passwords.
is_public boolean Deprecated. Always false. All classes are now private.
member_add_sets boolean Deprecated. Always true. Any member of a class can add sets.

Set object

For full details of the set object, see the Sets API page. The set object returned by this response also adds an additional field, added_by, containing a user object for the user that added this set to this class.

The description and terms in each set are only displayed from the https://api.quizlet.com/2.0/classes/CLASS_ID/sets endpoint.

Member object

FieldTypeDescription
username string The user's unique username.
role string The member's role in this class, one of member, manager or creator.
email_notification boolean true or false depending on whether the member has enabled email notifications for the class.

Example output for a class

Output for https://api.quizlet.com/2.0/classes/103561:

Header
HTTP/1.1 200 OK
Content-Type: application/javascript
Body
{
  "id": 103561,
  "name": "¡Old School learns español!",
  "set_count": 17,
  "user_count": 10,
  "created_date": 1314037887,
  "is_public": false,
  "admin_only": true,
  "description": "¡Vamos a estudiar español! Starting with the basics. SPANISH!!"
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Viewing sets in a class

Output for https://api.quizlet.com/2.0/classes/103561/sets (note only the first two terms of the first set are shown here for brevity):

Header
HTTP/1.1 200 OK
Content-Type: application/javascript
Body
[
    {
        "id": 25954510,
        "url": "http://api.quizlet.com/25954510/kitkat-flash-cards/",
        "title": "KitKat",
        "created_by": "sophiabk",
        "term_count": 4,
        "created_date": 1378853418,
        "modified_date": 1381798690,
        "has_images": true,
        "subjects": [

        ],
        "visibility": "public",
        "editable": "only_me",
        "has_access": true,
        "description": "Android 4.4 :)",
        "has_discussion": true,
        "lang_terms": "en",
        "lang_definitions": "en",
        "creator": {
            "username": "sophiabk",
            "account_type": "plus",
            "profile_image": "https://fbquizlet-quizletllc.netdna-ssl.com/hprofile-ak-prn2/203022_2900976_1217779431_n.jpg",
            "id": 2890983
        },
        "class_ids": [
            103561
        ],
        "terms": [
            {
                "id": 901761014,
                "term": "...",
                "definition": "",
                "image": {
                    "url": "https://d42f9g3milbb1.cloudfront.net/5OAQ9xw3lUITwxQZh6uQTQ_m.jpg",
                    "width": 240,
                    "height": 240
                }
            },
            {
                "id": 901761015,
                "term": "KitKat",
                "definition": "...",
                "image": {
                    "url": "https://d42f9g3milbb1.cloudfront.net/UnOf61Il.sKNN5FKE4cubA_m.jpg",
                    "width": 240,
                    "height": 159
                }
            },
            ...
        ]
    },
    ...
]

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Joining Classes

MethodURIDescription
PUThttps://api.quizlet.com/2.0/classes/CLASS_ID/members/USERNAMEJoin (or apply to join) a class

Permissions

  • Requires a write_group-scoped access token authorized by a user.

Expand request fields

Classes can be joined through an application.

Be aware that non-plus members have a limit of 8 classes they are allowed to join.

Optional Parameters

ParameterTypeDescriptionDefault
applicationstringA brief message to send to managers of the class when requesting access. Optional.
passwordstringDeprecated.

Expand response fields

You will apply for membership as an "applicant", pending approval by an administrator of the class.

Membership object

FieldTypeDescription
username string The username that is now an a member/applicant.
role "member" or "applicant" Whether the user is now a "member" or "applicant" (ie: applied to join, pending approval)
email_notification boolean Whether email notifications for this class are on. The default is always true. No emails are sent to users that are just applicants (as opposed to members) of a class.

Successful Responses

When you successfully join/apply to a class, you will get a successful response.

Example Successful Applicant Response

This is what a response looks like when you have successfully applied for membership.

Header
HTTP/1.1 200 OK
Body
{
	"username": "catchdave",
	"role": "applicant",
	"email_notification": true
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Leaving Classes

MethodURIDescription
DELETEhttps://api.quizlet.com/2.0/classes/CLASS_ID/members/USERNAMELeave a class

Permissions

  • Requires a write_group-scoped access token authorized by a user.

Successful Response

Header
HTTP/1.1 204 No Content

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Adding Classes

MethodURIDescription
POSThttps://api.quizlet.com/2.0/classesAdd a new class.

Permissions

  • Creating a class requires a write_group-scoped access token authorized by a user.

Normal users have a limit of 8 classes they are allowed to join/create.

Plus users can create/join as many classes as they want.

Expand request fields

Required Parameters

ParameterTypeDescription
namestringThe name of the class
descriptionstringA description of what the class is about and who it's for.
school_idintegerThe id of the school to which this class belongs. Either this must be specified, or new_school_name, city, state, and country must be specified in the case of a new school
new_school_namestringThe name of the school to which this class belongs. Either this must be specified, or school_id must be specified if the school already exists
citystringThe city of the school to which this class belongs. Either this must be specified, or school_id must be specified if the school already exists
statestringThe 2 digit state code of the school to which this class belongs. This is only required for US schools
countrystringThe country of the school to which this class belongs. Either this must be specified, or school_id must be specified if the school already exists

Optional Parameters

ParameterTypeDescriptionDefault
allow_discussionboolean0 or 1. Flag of whether users are allowed to use the discussion box on this class.1
allow_member_add_setsbooleanDeprecated
is_publicbooleanDeprecated
passwordbooleanDeprecated

Successful Response

Header
HTTP/1.1 201 Created
Location: https://api.quizlet.com/2.0/classes/NEW_CLASS_ID
Body
{
	"url": "https://quizlet.com/class/NEW_CLASS_ID/",
	"class_id": NEW_CLASS_ID
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Add/Remove Sets in a Class

MethodURIDescription
PUThttps://api.quizlet.com/2.0/classes/CLASS_ID/sets/SET_IDAdd a set to a class
DELETEhttps://api.quizlet.com/2.0/classes/CLASS_ID/sets/SET_IDRemove a set from a class

Permissions

  • Requires a write_group-scoped access token authorized by a user.
  • To add a set to a class, the user needs to be a member of the class
  • To remove a set from a class, the user needs to be a manager/creator of the class, or the class needs to have the allow_member_add_sets field set to true

Successful Response

Header
HTTP/1.1 204 No Content

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Editing Classes

MethodURIDescription
PUThttps://api.quizlet.com/2.0/classes/CLASS_IDEdits an existing class

Permissions

  • Requires a write_group-scoped access token authorized by a user who is the creator or a manager of the class.

Expand request fields

Required Parameters

There are no specific required parameters - but if you do not send any parameters at all, the response will be 400-level error (as there is nothing to update).

Optional Parameters

ParameterTypeDescription
namestringThe name of the class.
descriptionstringBlock of text describing the class.
allow_discussionboolean0 or 1. Flag of whether users are allowed to use the discussion box on this class.
admin_onlyboolean0 or 1. Flag of whether non-admin users are allowed to invite other members and add sets to this class.
allow_member_add_setsbooleanDeprecated
is_publicbooleanDeprecated
passwordbooleanDeprecated

Successful Response

Header
HTTP/1.1 200 OK
Body
{
	"url": "https://quizlet.com/class/CLASS_ID/"
}

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.

Deleting Classes

MethodURIDescription
DELETEhttps://api.quizlet.com/2.0/classes/CLASS_IDDeletes a class

Permissions

  • Requires a write_group-scoped access token authorized by the creator of the class.

No parameters are required.

Successful Response

Header
HTTP/1.1 204 No Content

No Body Content

Try it out now!

In order to test out the API you must have an API developer key.
First log in or sign up.