> ## 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 Segment

Create Segment

# 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": {
    "/videos/{video_id}/segments": {
      "post": {
        "tags": [
          "Segments"
        ],
        "summary": "Create Segment",
        "description": "Create Segment",
        "operationId": "createSegment",
        "parameters": [
          {
            "name": "video_id",
            "in": "path",
            "description": "",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "SegmentRequest",
                "type": "object",
                "required": [
                  "segment"
                ],
                "properties": {
                  "segment": {
                    "title": "SegmentProperties",
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "description": "Description of the segment, required on creation"
                      },
                      "start": {
                        "type": "integer",
                        "description": "When the segment starts in milliseconds, required on creation",
                        "format": "int32"
                      },
                      "end": {
                        "type": "integer",
                        "description": "When the segment ends in milliseconds",
                        "format": "int32"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "SegmentResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "title": "Segment",
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "video_id": {
                          "type": "string"
                        },
                        "start": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "end": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "description": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1videos/get/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  }
}
```