> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Playlist

Create a new Playlist

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Platform",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "query"
      }
    }
  },
  "paths": {
    "/playlists": {
      "post": {
        "summary": "Create Playlist",
        "description": "Create a new Playlist",
        "operationId": "createPlaylist",
        "tags": [
          "Playlists"
        ],
        "parameters": [],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "PlaylistRequest",
                "type": "object",
                "required": [
                  "playlist"
                ],
                "properties": {
                  "playlist": {
                    "title": "PlaylistProperties",
                    "type": "object",
                    "properties": {
                      "active": {
                        "type": "boolean",
                        "description": "Indicates if the playlist is active"
                      },
                      "auto_remove_video_entitlements": {
                        "type": "boolean",
                        "description": "Automatically remove a customer's entitlement to view a video if it is removed from the playlist"
                      },
                      "auto_update_video_entitlements": {
                        "type": "boolean",
                        "description": "Automatically update a customer's entitlement to view a video if it is added to the playlist"
                      },
                      "categories": {
                        "type": "array",
                        "items": {
                          "title": "PlaylistCategoryProperties",
                          "type": "object",
                          "properties": {
                            "category_id": {
                              "description": "ID of the main Category you wish to add to the video",
                              "example": "5955293d805cd90024000000",
                              "type": "string"
                            },
                            "value": {
                              "description": "List of values you wish to add to the category. Must exist in the main Category first",
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "exclude_values": {
                              "description": "List of values you wish to exclude from the playlist. Must exist in the main Category first",
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "_destroy": {
                              "description": "True if you want to remove it from the object",
                              "type": "boolean"
                            }
                          }
                        },
                        "description": ""
                      },
                      "content_rule_profile_id": {
                        "type": "string",
                        "description": "ID of the content rule profile assigned to the playlist."
                      },
                      "custom_thumbnail_url": {
                        "type": "string",
                        "description": "URL where your custom thumbnail is stored. Thumbnail will be processed asynchronously, and available in API response upon completion."
                      },
                      "description": {
                        "type": "string"
                      },
                      "friendly_title": {
                        "type": "string",
                        "description": "The URL friendly title of the playlist"
                      },
                      "images_attributes": {
                        "type": "array",
                        "items": {
                          "title": "Image",
                          "type": "object",
                          "properties": {
                            "_id": {
                              "description": "ID of the image. Used to update an existing image. When it's not specified, a new image will be created.",
                              "example": "59921049ce593000ef000002",
                              "type": "string"
                            },
                            "caption": {
                              "description": "Caption of the image",
                              "example": "Image Caption",
                              "type": "string"
                            },
                            "title": {
                              "description": "Title of the image",
                              "example": "Image Title",
                              "type": "string"
                            },
                            "updated_at": {
                              "description": "Timestamp the image was updated",
                              "example": "8/14/2017 9:04:11 PM",
                              "type": "string"
                            },
                            "attachment": {
                              "description": "URL where the image is hosted",
                              "example": "https://image-host.com",
                              "type": "string"
                            },
                            "_destroy": {
                              "description": "True if you want to remove the image",
                              "type": "boolean"
                            }
                          }
                        },
                        "description": ""
                      },
                      "internal_title": {
                        "type": "string",
                        "description": "The internal title of the playlist"
                      },
                      "keywords": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Keywords for the playlist"
                      },
                      "match_type": {
                        "type": "string",
                        "enum": [
                          "any",
                          "all"
                        ],
                        "description": "Used to specify matching categories to a playlist by ALL category values or ANY category values"
                      },
                      "parent_id": {
                        "type": "string",
                        "description": "The parent playlist ID. If this value is null, the playlist is a root playlist and can be used as the primary playlist within an app where all your other playlists and videos are nested under"
                      },
                      "playlist_type": {
                        "type": "string",
                        "enum": [
                          "manual",
                          "category"
                        ],
                        "description": "Determine if videos will automatically be added to this playlist based off the category values assigned to them. If you would like this feature, set to 'category', otherwise, set to 'manual' to disable. If enabled, you may not manually add videos to this playlist"
                      },
                      "priority": {
                        "type": "number",
                        "description": "The priority of the playlist related with its siblings. Playlists are ordered ascending by priority value"
                      },
                      "purchase_price": {
                        "type": "number",
                        "description": "Amount to purchase the playlist bundle"
                      },
                      "purchase_required": {
                        "type": "boolean",
                        "description": "Indicates if playlist must be purchased"
                      },
                      "rental_duration": {
                        "type": "number",
                        "description": "Number of days a playlist bundle can be rented"
                      },
                      "rental_price": {
                        "type": "number",
                        "description": "Price to rent the playlist bundle"
                      },
                      "rental_required": {
                        "type": "boolean",
                        "description": "Indicates if the playlist bundle must be rented"
                      },
                      "sort_options": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "title": "SortOption",
                          "properties": {
                            "sort_by": {
                              "description": "What value to sort the associated playlist by\nMust be one of: + created_at + published_at + title",
                              "type": "string"
                            },
                            "direction": {
                              "description": "Which direction to sort the associated playlist by",
                              "example": "desc",
                              "type": "string",
                              "enum": [
                                "asc",
                                "desc"
                              ]
                            },
                            "sort_by_type": {
                              "description": "What datatype to sort the associated playlist by\nMust be one of: + date + datetime + string + integer + array + boolean",
                              "example": "string",
                              "type": "string"
                            }
                          }
                        },
                        "description": "Playlist smart ordering allows you to change the order of its videos by sort options. The videos added or updated into a playlist with sort options are sorted automatically following that sort option"
                      },
                      "thumbnail_layout": {
                        "type": "string",
                        "enum": [
                          "landscape",
                          "poster",
                          "square"
                        ],
                        "description": "Orientation of the playlist thumbnail"
                      },
                      "title": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "title": "PlaylistResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "title": "Playlist",
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "auto_remove_video_entitlements": {
                          "type": "boolean"
                        },
                        "auto_update_video_entitlements": {
                          "type": "boolean"
                        },
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": ""
                        },
                        "content_rule_profile_id": {
                          "type": "string",
                          "description": "ID of the content rule profile assigned to the playlist."
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "deleted_at": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "discovery_url": {
                          "type": "string",
                          "description": "URL where your playlist can be discovered"
                        },
                        "friendly_title": {
                          "type": "string"
                        },
                        "images": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": ""
                        },
                        "internal_title": {
                          "type": "string"
                        },
                        "keywords": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": ""
                        },
                        "match_type": {
                          "type": "string"
                        },
                        "parent_id": {
                          "type": "string"
                        },
                        "playlist_item_count": {
                          "type": "number",
                          "description": "Number of videos in a playlist"
                        },
                        "playlist_type": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "number"
                        },
                        "purchase_price": {
                          "type": "number"
                        },
                        "purchase_required": {
                          "type": "boolean"
                        },
                        "rental_duration": {
                          "type": "number"
                        },
                        "rental_price": {
                          "type": "number"
                        },
                        "rental_required": {
                          "type": "boolean"
                        },
                        "site_id": {
                          "type": "string"
                        },
                        "sort_options": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": ""
                        },
                        "thumbnail_layout": {
                          "type": "string"
                        },
                        "thumbnails": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": ""
                        },
                        "title": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1videos/get/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    }
  }
}
```