---
updatedAt: 2026-05-27T00:16:27.000Z
agentTools:
  projectIndex: https://360learning.readme.io/llms.txt
---

# Create a classroom

> 🔑
>
> Required OAuth scope: `classrooms:write`.

Creates a classroom.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/api/v2/classrooms": {
      "post": {
        "description": "> 🔑\n>\n> Required OAuth scope: `classrooms:write`.\n\nCreates a classroom.",
        "operationId": "v2.classrooms.CreateClassroomController_createClassroom",
        "parameters": [
          {
            "name": "360-api-version",
            "in": "header",
            "description": "The version of the API.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v2.0"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InputClassroomDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Returns the created classroom.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassroomDTO"
                }
              }
            }
          },
          "400": {
            "description": "Some of the given medias are not allowed in a classroom. Allowed types are: attachment, excel, flash, image, pdf, slideshow, video, word",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Bad Media Type",
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "badMediaType"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "example": "A human-readable message to help with debugging."
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The given access token is either missing, invalid, has expired, or has been revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "invalid_token"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The given access token does not have the required OAuth scope to execute the request.",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Invalid Scope",
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid_scope"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "example": "A human-readable message to help with debugging."
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The server cannot find the requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "description": "The given `groupId` does not correspond to any existing group.",
                      "title": "Group Not Found",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "groupNotFound"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "example": "A human-readable message to help with debugging."
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ]
                        }
                      },
                      "required": [
                        "error"
                      ]
                    },
                    {
                      "description": "Some of the given media IDs do not correspond to any existing media.",
                      "title": "Media Not Found",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "enum": [
                                "mediaNotFound"
                              ]
                            },
                            "message": {
                              "type": "string",
                              "example": "A human-readable message to help with debugging."
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ]
                        }
                      },
                      "required": [
                        "error"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "The client has sent too many requests in a short amount of time. ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "tooManyRequests"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": []
          }
        ],
        "summary": "Create a classroom",
        "tags": [
          "Classrooms"
        ]
      }
    }
  },
  "info": {
    "title": "Core API",
    "description": "",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://app.360learning.com",
      "description": "Production EU"
    },
    {
      "url": "https://app.us.360learning.com",
      "description": "Production US"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/api/v2/oauth2/token",
            "scopes": {}
          }
        },
        "description": "Use the token from the authentication endpoint in the Authorization header.\n\nExample: `Authorization: Bearer <token>`"
      }
    },
    "schemas": {
      "InputClassroomDTO": {
        "title": "Input Classroom",
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "The unique ID of the creation group of the classroom.",
            "format": "ObjectId",
            "example": "507f1f77bcf86cd799439011",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "name": {
            "type": "string",
            "description": "The title of the classroom.",
            "example": "Security Conference",
            "minLength": 1
          },
          "mediaIds": {
            "maxItems": 20,
            "description": "The list of unique IDs of the medias assigned to this classroom. These attachments will be sent by email to registered learners.",
            "example": [
              "507f1f77bcf86cd799439011"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "format": "ObjectId",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          "message": {
            "type": "string",
            "description": "Complementary information about the classroom. This information will be sent by email to registered learners.",
            "example": "Be sure to have read all the attachments before the conference.",
            "minLength": 1
          },
          "trainingObjective": {
            "type": "string",
            "description": "The training objective of the classroom.",
            "example": "Learn the security rules of the company.",
            "minLength": 1
          }
        },
        "required": [
          "groupId",
          "name"
        ]
      },
      "ClassroomDTO": {
        "title": "Classroom",
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "The unique ID of the creation group of the classroom.",
            "format": "ObjectId",
            "example": "507f1f77bcf86cd799439011",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "_id": {
            "type": "string",
            "description": "The unique ID of the classroom.",
            "format": "ObjectId",
            "example": "507f1f77bcf86cd799439011",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "description": "The date at which the classroom was created, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC))."
          },
          "name": {
            "type": "string",
            "description": "The title of the classroom.",
            "example": "Security Conference"
          },
          "mediaIds": {
            "maxItems": 20,
            "description": "The list of unique IDs of the medias assigned to this classroom. These attachments will be sent by email to registered learners.",
            "example": [
              "507f1f77bcf86cd799439011"
            ],
            "type": "array",
            "items": {
              "type": "string",
              "format": "ObjectId",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          "message": {
            "type": "string",
            "description": "Complementary information about the classroom. This information will be sent by email to registered learners.",
            "example": "Be sure to have read all the attachments before the conference."
          },
          "modifiedAt": {
            "format": "date-time",
            "type": "string",
            "description": "The date at which the classroom was last modified, in the `YYYY-MM-DDThh:mm:ss.sssZ` format (ISO 8601 in Coordinated Universal Time (UTC))."
          },
          "trainingObjective": {
            "type": "string",
            "description": "The training objective of the classroom.",
            "example": "Learn the security rules of the company."
          }
        },
        "required": [
          "groupId",
          "_id",
          "name",
          "mediaIds"
        ]
      }
    }
  },
  "x-readme": {
    "apply-tag-changes": true
  }
}
```