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

# Archive or restore a path

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

Archives or restores a path.

Archiving a path doesn't delete its contents or statistics. It simply prevents the path from being added to new ones or creating new sessions. The archived path will still be accessible in existing paths, but it will be hidden from search results.

> ⚠️
>
> Before archiving a path, make sure all its sessions are ended.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/api/v2/paths/{pathId}/archive": {
      "put": {
        "description": "> 🔑\n>\n> Required OAuth scope: `paths:write`.\n\nArchives or restores a path.",
        "operationId": "v2.paths.ArchiveOrUnarchivePathController_archiveOrUnarchivePath",
        "parameters": [
          {
            "name": "360-api-version",
            "in": "header",
            "description": "The version of the API.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v2.0"
              ]
            }
          },
          {
            "name": "pathId",
            "required": true,
            "in": "path",
            "description": "The unique ID of the path.",
            "schema": {
              "format": "ObjectId",
              "pattern": "^[a-fA-F0-9]{24}$",
              "example": "507f1f77bcf86cd799439011",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchivePathBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the updated path."
          },
          "400": {
            "description": "The given path has running sessions.",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Path Has Running Sessions",
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "pathHasRunningSessions"
                          ]
                        },
                        "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 given `pathId` does not correspond to any existing path.",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Path Not Found",
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "pathNotFound"
                          ]
                        },
                        "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": "Archive or restore a path",
        "tags": [
          "Paths"
        ]
      }
    }
  },
  "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": {
      "ArchivePathBody": {
        "title": "Archive Path Body",
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean",
            "description": "If true, archives the path. If false, restores the path."
          }
        },
        "required": [
          "archived"
        ]
      }
    }
  },
  "x-readme": {
    "apply-tag-changes": true
  }
}
```