---
agentTools:
  projectIndex: https://docs.storyly.io/llms.txt
---

# Create story

Create a new story.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Storyly External API",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.storyly.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token for API authentication"
      }
    }
  },
  "paths": {
    "/external/story": {
      "post": {
        "tags": [
          "story"
        ],
        "summary": "Create story",
        "description": "Create a new story.",
        "operationId": "createStory",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "deep_link": {
                    "description": "Optional - Deep link URL",
                    "type": "string",
                    "example": "storyly://story/123"
                  },
                  "file": {
                    "description": "Optional - Story media file",
                    "type": "string",
                    "format": "binary"
                  },
                  "media_url": {
                    "description": "Optional - Media URL",
                    "type": "string",
                    "example": "https://example.com/story-media.mp4"
                  },
                  "name": {
                    "description": "Optional - Story name (max 255 chars)",
                    "type": "string",
                    "example": "story-name"
                  },
                  "sort_order": {
                    "description": "Optional - Sort order (integer)",
                    "type": "string",
                    "example": "1"
                  },
                  "status": {
                    "description": "Required - Story status (integer)",
                    "type": "string",
                    "example": "1"
                  },
                  "story_group_id": {
                    "description": "Required - Story group ID (integer)",
                    "type": "string",
                    "example": "204206"
                  },
                  "title": {
                    "description": "Required - Story title (max 255 chars)",
                    "type": "string",
                    "example": "My Story"
                  },
                  "ts_end": {
                    "description": "Optional - End timestamp",
                    "type": "string",
                    "example": "2024-04-20T00:00:00Z"
                  },
                  "ts_start": {
                    "description": "Optional - Start timestamp",
                    "type": "string",
                    "example": "2024-03-20T00:00:00Z"
                  },
                  "type": {
                    "description": "Required - Story type (integer)",
                    "type": "string",
                    "example": "1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Story successfully created"
                    },
                    "status": {
                      "type": "string",
                      "example": "ok"
                    }
                  }
                },
                "examples": {
                  "200": {
                    "value": {
                      "message": "Story successfully created",
                      "status": "ok"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "story",
      "description": "Story management endpoints"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 249,
      "2": 255,
      "3": 26,
      "4": 178,
      "5": 168,
      "6": 65,
      "7": 240,
      "8": 58,
      "9": 114,
      "10": 176,
      "11": 107
    }
  }
}
```