Skip to main content

How to send versions with the Storydoc API

Written by Storydoc Team

You can email a version to recipients from your own systems, such as a CRM workflow, with one API call. The email is the same as when you click Send in Storydoc: your message, a preview of the document and a personal link for each recipient.

Before you start

  • An API key. Create one on the Automations page (see How to Create and Manage API Keys). Keep it secret: anyone with the key can send as you.

  • A live version. Create the version first, in Storydoc or with the API (POST /v2/versions), and make sure it's published.

  • Edit access. The person you send as needs Editor access to the version.

Send a version

POST https://api.storydoc.com/v2/versions/{versionId}/send

Send your API key in the Authorization header.

curl -X POST "https://api.storydoc.com/v2/versions/VERSION_ID/send" \   -H "Authorization: Bearer YOUR_API_KEY" \   -H "Content-Type: application/json" \   -d '{     "senderEmail": "[email protected]",     "emails": ["[email protected]"],     "message": "Hi Sarah, here is the proposal we discussed.",     "reminder": { "everyDays": 3 }   }'

Field

Required

What it does

senderEmail

Yes

Who the email comes from. Must be a member of your workspace with Editor access to the version

emails

Yes

1 to 50 recipient addresses. Duplicates are removed

message

No

Your personal message, up to 1,000 characters

reminder.everyDays

No

Send automatic reminders every 1 to 30 days (Pro and Team plans). Each recipient gets up to 3

A successful call returns the addresses that were sent to and how many email sends you have left:

{   "sendId": "…",   "sent": ["[email protected]"],   "quota": { "per": "month", "limit": 50, "used": 13, "remaining": 37 } }

Who you can send as

  • A personal API key can send only as the person who created it. Admins' keys can send as anyone in the workspace.

  • An organization-wide key can send as any member.

Otherwise you'll get An API key can only send as the person who created it.

Limits

  • Email sends. API sends use the sender's email sends, exactly like Send in Storydoc (see How to send a version by email). They don't use automation credits.

  • Requests. Up to 50 requests a minute for your workspace.

Errors

Status

Message

What to do

400

Missing senderEmail in request body / senderEmail [x] not found in this organization

Send as a member of your workspace

400

Add at least one recipient / Invalid email address: [x] / You can send to up to 50 recipients at a time

Check emails

400

Reminders can repeat every 1 to 30 days

Check reminder.everyDays

403

senderEmail [x] doesn't have edit access to this version

Give the sender Editor access, or send as someone else

403

Not enough email sends remaining

Wait for your sends to renew, or upgrade

403

Upgrade your plan to send automatic reminders

Remove reminder, or upgrade to Pro

403

Verify your email before sending

The sender needs to verify their email address

404

Version not found

Check the version ID, and that your key can see it

409

Publish the version before sending it / This version has expired

Publish the version, or extend its expire date

429

Too many emails sent. Try again later. / Too many requests

Slow down and try again later

Did this answer your question?