Create a new story version
Creates a personalized version of an existing story template with custom data. Each version gets a unique URL and can be tracked independently.
Body
Required
-
The ID of the story template. Extract this from your Storydoc editor URL: https://editor.storydoc.com/pages/editor/{storyId}
-
Email of the sender (must exist in organization)
-
Number of days until version expires. Omit for permanent/public version
Minimum value is
1
. -
Additional properties are allowed.
POST
/v2/versions
curl \
--request POST 'https://api.storydoc.com/v2/versions' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"data":{"title":"Sales Presentation for ACME Corp","company":"ACME Corporation","last_name":"Doe","first_name":"John"},"storyId":"61b1e50223b713000a41ca74","senderEmail":"sender@company.com"}'
Request examples
1. Simple Version
Basic personalized version with just the required fields
{
"data": {
"title": "Sales Presentation for ACME Corp",
"company": "ACME Corporation",
"last_name": "Doe",
"first_name": "John"
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Automatically fetch and apply company logos based on domain
{
"data": {
"title": "Partnership Proposal",
"company": "ACME Corporation",
"last_name": "Doe",
"first_name": "John",
"partner_logo": {
"theme": "dark",
"domain": "microsoft.com"
}
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Version that automatically expires after 30 days
{
"data": {
"title": "Sales Presentation for ACME Corp",
"company": "ACME Corporation",
"last_name": "Doe",
"first_name": "John"
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com",
"daysToExpire": 30
}
Secure version requiring password access
{
"data": {
"title": "Sales Presentation for ACME Corp",
"company": "ACME Corporation",
"password": "SecurePass123",
"last_name": "Doe",
"first_name": "John"
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Collect visitor information before showing content
{
"data": {
"offer": "Free 30-day trial included",
"title": "Product Demo - Lead Generation",
"company": "ACME Corporation",
"gatedContent": {
"logo": true,
"name": true,
"title": "Get instant access to our product demo",
"logoSRC": "https://www.storydoc.com/assets/images/branding/og-storydoc.gif",
"gatedContent": true,
"nameRequired": true
}
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Version with product catalogs, pricing tables, or team rosters
{
"data": {
"title": "2025 Product Catalog",
"company": "ACME Corporation",
"products": [
{
"name": "Enterprise Suite",
"price": 15000,
"custom_field1": "24/7 Support"
},
{
"name": "Professional Plan",
"price": 3000,
"custom_field1": "Business Hours Support"
},
{
"name": "Starter Package",
"price": 500,
"custom_field1": "Email Support"
}
],
"launch_date": "January 2025",
"team_contacts": [
{
"name": "Sarah Johnson",
"role": "Sales Director",
"email": "sarah@acme.com"
},
{
"name": "Mike Chen",
"role": "Product Manager",
"email": "mike@acme.com"
}
]
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Set a custom preview thumbnail image for the version
{
"data": {
"title": "Visual Impact Report",
"company": "ACME Corporation",
"ogImage": "https://www.storydoc.com/assets/images/branding/og-storydoc.gif",
"tagline": "Results that speak for themselves",
"highlight": "300% ROI in 6 months"
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com"
}
Comprehensive example combining all features: expiration, password protection, gated content, arrays, and custom preview
{
"data": {
"date": "January 15, 2025",
"email": "john.doe@acme.com",
"logo1": {
"theme": "dark",
"domain": "acme.com"
},
"phone": "+1-555-0123",
"title": "Enterprise Sales Proposal - Q1 2025",
"company": "ACME Corporation",
"ogImage": "https://www.storydoc.com/assets/images/branding/og-storydoc.gif",
"password": "SecureProposal2025",
"products": [
{
"name": "Enterprise Suite",
"price": 15000,
"discount": "20%",
"features": "Unlimited users, 24/7 support"
},
{
"name": "Professional Plan",
"price": 3000,
"discount": "10%",
"features": "50 users, Business hours support"
},
{
"name": "Starter Package",
"price": 500,
"discount": "5%",
"features": "10 users, Email support"
}
],
"last_name": "Doe",
"first_name": "John",
"milestones": [
{
"phase": "Discovery",
"timeline": "Week 1-2",
"deliverable": "Requirements document"
},
{
"phase": "Implementation",
"timeline": "Week 3-6",
"deliverable": "System deployment"
},
{
"phase": "Training",
"timeline": "Week 7-8",
"deliverable": "User certification"
}
],
"gatedContent": {
"logo": true,
"name": true,
"title": "Get instant access to your personalized enterprise proposal",
"logoSRC": "https://www.storydoc.com/assets/images/branding/og-storydoc.gif",
"gatedContent": true,
"nameRequired": true
},
"team_contacts": [
{
"name": "Sarah Johnson",
"role": "Sales Director",
"email": "sarah@acme.com",
"phone": "+1-555-0124"
},
{
"name": "Mike Chen",
"role": "Product Manager",
"email": "mike@acme.com",
"phone": "+1-555-0125"
}
],
"custom_field_1": "Premium Support Included",
"custom_field_2": "ROI Calculator Available",
"custom_field_3": "Free 30-day Trial"
},
"storyId": "61b1e50223b713000a41ca74",
"senderEmail": "sender@company.com",
"daysToExpire": 30
}
Response examples (200)
{
"url": "https://www.storydoc.com/5d7d8922e00d9265/2e91b144-092f-456b-8f2e-0bae9f7f3355",
"shortUrl": "https://view.storydoc.com/4GdDGt",
"editorUrl": "https://app.storydoc.com/pages/editor/61b1e50223b713000a41ca74/61b1f40a3a86b7a96d0d8ccc",
"versionUrl": "https://app.storydoc.com/pages/editor/61b1e50223b713000a41ca74/versions/61b1f40a3a86b7a96d0d8ccc",
"versionId": "61b1f40a3a86b7a96d0d8ccc"
}
Response examples (400)
Missing data.title
The required title field is missing from the data object
{
"error": "Missing data.title in request body."
}
The sender email is not registered in the organization
{
"error": "senderEmail email@domain.com not found in this organization"
}
The specified story ID does not exist
{
"error": "Story 67c8451e37c1f5065165c08b3 not found."
}
The story exists but has not been published yet
{
"error": "Story status is not Live, click Share to set it to Live, https://editor.storydoc.com/pages/editor/6776560c218435d60586da69"
}
Response examples (403)
{
"error": "Access denied"
}
Response examples (429)
# Headers
x-rate-limit-counter: 42
x-rate-limit-maximum: 42
# Payload
{
"error": "Too many requests"
}
Response examples (500)
{
"error": "Error occured",
"errorId": "550e8400-e29b-41d4-a716-446655440000"
}