{
  "openapi": "3.0.1",
  "info": {
    "title": "EPiServer Content Management API",
    "version": "v3"
  },
  "paths": {
    "/api/episerver/v3.0/contentmanagement/{contentIdentifier}": {
      "delete": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Delete a content by content reference or unique identifier.",
        "operationId": "ContentManagement_Delete",
        "parameters": [
          {
            "name": "contentIdentifier",
            "in": "path",
            "description": "The content reference or unique identifier of the content item that should be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-epi-permanent-delete",
            "in": "header",
            "description": "Set to true in order to permanently delete the content. Otherwise it will be moved to the wastebasket. Read from the 'x-epi-permanent-delete' header.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Get the content draft by given content reference or unique identifier and language.",
        "operationId": "ContentManagement_Get",
        "parameters": [
          {
            "name": "contentIdentifier",
            "in": "path",
            "description": "The content reference or unique identifier of the content item that should be retrieved.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "description": "Determines in which language the content should be retrieved. Example: 'en' or 'sv'. Does not support fallback.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Update the specified content item by given content reference or unique identifier.",
        "operationId": "ContentManagement_Patch",
        "parameters": [
          {
            "name": "contentIdentifier",
            "in": "path",
            "description": "The content reference or unique identifier of the content item that should be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-epi-validation-mode",
            "in": "header",
            "description": "The validation mode used when saving. Optional, defaults to EPiServer.ContentManagementApi.Internal.ContentValidationMode.Complete.",
            "schema": {
              "$ref": "#/components/schemas/contentValidationMode"
            }
          }
        ],
        "requestBody": {
          "description": "The patch information describing how the content item should be updated.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/patchContent"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchContent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/episerver/v3.0/contentmanagement/{contentIdentifier}/move": {
      "post": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Move a content from its current location to another location.",
        "operationId": "ContentManagement_Move",
        "parameters": [
          {
            "name": "contentIdentifier",
            "in": "path",
            "description": "The content reference or unique identifier of the content item that should be moved.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Options describing where the content item should be moved to.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/moveOptions"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/episerver/v3.0/contentmanagement": {
      "post": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Create a new content item.",
        "operationId": "ContentManagement_Create",
        "parameters": [
          {
            "name": "x-epi-validation-mode",
            "in": "header",
            "description": "The validation mode used when saving content.",
            "schema": {
              "$ref": "#/components/schemas/contentValidationMode"
            }
          }
        ],
        "requestBody": {
          "description": "Contains information of the new content to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/episerver/v3.0/contentmanagement/{contentGuid}": {
      "put": {
        "tags": [
          "ContentManagement"
        ],
        "summary": "Updates the content item at the current location or create a new one if it doesn't exist.",
        "operationId": "ContentManagement_CreateOrUpdate",
        "parameters": [
          {
            "name": "contentGuid",
            "in": "path",
            "description": "Guid of the content that should be created/updated.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "x-epi-validation-mode",
            "in": "header",
            "description": "The validation mode used when saving content.",
            "schema": {
              "$ref": "#/components/schemas/contentValidationMode"
            }
          }
        ],
        "requestBody": {
          "description": "The content that should be created or updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/problemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "content": {
        "required": [
          "name",
          "contentType",
          "parentLink"
        ],
        "type": "object",
        "properties": {
          "contentLink": {
            "$ref": "#/components/schemas/contentReference"
          },
          "name": {
            "type": "string",
            "description": "Name of the content.",
            "nullable": true
          },
          "language": {
            "$ref": "#/components/schemas/language"
          },
          "existingLanguages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/language"
            },
            "description": "The existing languages of the content.",
            "nullable": true,
            "readOnly": true
          },
          "masterLanguage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              }
            ],
            "readOnly": true
          },
          "contentType": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content type of the content.",
            "nullable": true
          },
          "parentLink": {
            "$ref": "#/components/schemas/contentReference"
          },
          "routeSegment": {
            "type": "string",
            "description": "Route segment of the content.",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "Url of the content.",
            "nullable": true,
            "readOnly": true
          },
          "changed": {
            "type": "string",
            "description": "The date when the content was last marked as changed.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "created": {
            "type": "string",
            "description": "The datetime when the content was created.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "startPublish": {
            "type": "string",
            "description": "The start publish date of the content.",
            "format": "date-time",
            "nullable": true
          },
          "stopPublish": {
            "type": "string",
            "description": "The stop publish date of the content.",
            "format": "date-time",
            "nullable": true
          },
          "saved": {
            "type": "string",
            "description": "The datetime when the content was last saved.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "status": {
            "enum": [
              "Rejected",
              "CheckedIn",
              "CheckedOut",
              "Published",
              "DelayedPublish",
              "AwaitingApproval"
            ],
            "type": "string",
            "description": "Status of the content.",
            "nullable": true
          }
        },
        "additionalProperties": { },
        "description": "Serializable model class for IContent exposed in the Content API."
      },
      "contentReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id number of the content.",
            "format": "int32",
            "nullable": true
          },
          "workId": {
            "type": "integer",
            "description": "The version id of the content.",
            "format": "int32",
            "nullable": true
          },
          "guidValue": {
            "type": "string",
            "description": "The unique identifier of the content.",
            "format": "uuid",
            "nullable": true
          },
          "providerName": {
            "type": "string",
            "description": "The provider name that serves the content.",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "Url of the content.",
            "nullable": true,
            "readOnly": true
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/language"
              }
            ],
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Serializable model class for ContentReference."
      },
      "contentValidationMode": {
        "enum": [
          "complete",
          "minimal"
        ],
        "type": "string",
        "description": "The validation mode used when saving content."
      },
      "language": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Display name of language. Ex: English, Svenska",
            "nullable": true,
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Name of language. Ex: en, sv",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Serializable model class for store language information"
      },
      "moveOptions": {
        "required": [
          "parentLink"
        ],
        "type": "object",
        "properties": {
          "parentLink": {
            "$ref": "#/components/schemas/contentReference"
          }
        },
        "additionalProperties": false,
        "description": "Contains options describing how content should be moved."
      },
      "patchContent": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 255,
            "type": "string",
            "description": "The name of the content.",
            "nullable": true
          },
          "language": {
            "$ref": "#/components/schemas/language"
          },
          "routeSegment": {
            "type": "string",
            "description": "The route segment of the content.",
            "nullable": true
          },
          "startPublish": {
            "type": "string",
            "description": "The start publish date for the content.",
            "format": "date-time",
            "nullable": true
          },
          "stopPublish": {
            "type": "string",
            "description": "The stop publish date of the content.",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/versionStatus"
          }
        },
        "additionalProperties": { },
        "description": "Contains information for patching an existing content item."
      },
      "problemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "versionStatus": {
        "enum": [
          "notCreated",
          "rejected",
          "checkedOut",
          "checkedIn",
          "published",
          "previouslyPublished",
          "delayedPublish",
          "awaitingApproval"
        ],
        "type": "string"
      }
    }
  }
}