--- title: "Returns information about a class. If the class doesn’t exist, it is created" slug: "returns-information-about-a-class-if-the-class-doesnt-exist-it-is-created-1" updated: 2025-08-07T14:39:28Z published: 2025-08-07T14:41:42Z canonical: "docs.skillable.com/returns-information-about-a-class-if-the-class-doesnt-exist-it-is-created-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.skillable.com/llms.txt > Use this file to discover all available pages before exploring further. # Returns information about a class. If the class doesn’t exist, it is created Get/GetOrCreateClass The **GetOrCreateClass** command returns information about a class. If the class doesn’t exist, it is created. SecurityAPI Key: api_keyHeader parameter nameapi_key All methods require an API key, which must be obtained from Skillable. This key is used by Skillable to validate your account. The key can be passed as an HTTP request header with the header name "api_key". Query parametersidstringRequired The unique identifier of the class, as represented in your organization. Example1223334444 namestringRequired The name of the class. ExampleSample+Class startinteger (int64) Required When the class starts (in Unix epoch time). Example1333267200 endinteger (int64) Required When the class ends (in Unix epoch time). Example1333299600 expiresinteger (int64) Required When labs can no longer be associated with the class (in Unix epoch time). Example1335978000 instructorIdstring The ID you use to identify the class instructor in your external system. Example65214 instructorFirstNamestring The first name of the class instructor. ExampleDemo instructorLastNamestring The last name of the class instructor. ExampleInstructor maxActiveLabInstancesinteger (int32) The maximum number of active lab instances than can exist concurrently within this class context. This is optional in most situations. However, it is required for classes that host shared environments. If a shared lab is launched against a class that doesn't have this value set, the launch will fail. Example20 AvailableLabsarray of integer An optional array of lab profile IDs. When provided, Skillable will know that these labs are available within the class. You do not need to set this value in order to launch labs against the class. This is useful when using Skillable to display a class attendance page, or when consuming shared class environments and you want the shared environment launch link to appear on the class monitor page. Example[ 17390, 17432 ] Responses200 OK Response. Example of creating a class ```json { "Id": "4449999", "Name": "Sample Class", "Start": 1333267200, "StartTime": "/Date(1333267200000)/", "End": 1333299600, "EndTime": "/Date(1333299600000)/", "Expires": 1335978000, "ExpiresTime": "/Date(1335978000000)/", "Instructor": null, "Url": null, "MaxActiveLabInstances": null, "AvailableLabs": [ 17390, 17432 ], "Status": 1, "Error": null } ``` Example of retrieving information on an existing class ```json { "Id": "4449999", "Name": "Sample Class", "Start": 1333267200, "StartTime": "/Date(1333267200000)/", "End": 1333299600, "EndTime": "/Date(1333299600000)/", "Expires": 1335978000, "ExpiresTime": "/Date(1335978000000)/", "Instructor": { "Id": "65214", "FirstName": "Demo", "LastName": "Instructor" }, "Url": null, "MaxActiveLabInstances": null, "AvailableLabs": [ 17390, 17432 ], "Status": 1, "Error": null } ``` Expand Allobject Idstring The unique identifier of the class, as represented in your organization. Namestring The name of the class. Startinteger (int64) When the class starts (in Unix epoch time). StartTimestring When the class starts (in Unix epoch time). Endinteger (int64) When the class ends (in Unix epoch time). EndTimestring When the class ends (in Unix epoch time). Expiresinteger (int64) When labs can no longer be associated with the class (in Unix epoch time). ExpiresTimestring When labs can no longer be associated with the class (in Unix epoch time). Instructorobject | null Idstring The ID of the class instructor in your external system. FirstNamestring The first name of the class instructor. LastNamestring The last name of the class instructor. Urlstring | null This response property is deprecated. Unless explicitly allowed by Skillable, this field will always be null. To obtain a class URL, use the **ClassAccessUrl** API command. MaxActiveLabInstancesinteger (int32) | null The maximum number of active lab instances than can exist concurrently within this class context. AvailableLabs Array of integer The IDs of labs available for launch within the class when using the class attendance UI directly in Skillable (generally not used for class deliveries managed outside of Skillable). integer Statusinteger (int32) Indicates the status of the API request. 0 = Error 1 = Success Errorstring | null In the event of an error, this will contain a detailed error message.