Emails a link to a version, on behalf of a team member (senderEmail), the way sending it from the editor does: the email carries the member's name and replies go to them.
- The version must be published: it has a live link that hasn't expired.
- The sender must be a team member with edit access to the version. Viewer and commenter seats can't send.
- An API key created by a team member sends only as that member, unless they are an administrator. An organization-wide API token created by an administrator can send as anyone in the organization.
- Every recipient, and every reminder, counts against the sender's email allowance.
quotain the response is what is left of it after this send. - Available to every workspace.
- The API key's own limits apply first: a version the key can't open (a key limited to another story, or a version in a folder the key's creator can't open) answers 404.
Body
Required
-
The team member the email comes from. They need edit access to the version, and the send counts against their email allowance. An API key created by a team member can name only that member, unless they are an administrator.
-
Recipients: up to 50 different addresses. An address listed twice (in any case) gets one email.
At least
1element. -
A note shown in the email. The server trims it and cuts it to 1000 characters.
-
Reminder emails to each recipient every
everyDaysdays, at most 3, while the link is live. A version with an Accept button stops reminding a recipient once it is accepted. Leave out for no reminders. Not on every plan.
Responses
-
Sent
-
Invalid request, or an API key that is no longer valid
-
Authentication failed, the key can't send as this sender, the sender can't send this version, or the account can't send right now
-
Version not found, out of the API key's reach, or email sending isn't enabled for the workspace
-
The version has no live link
-
Too many requests: the API's own limit for this endpoint, or the sender's hourly email limit
-
Internal server error
-
No email could be sent; nothing counted against the allowance
curl \
--request POST 'https://api.storydoc.com/v2/versions/61b1f40a3a86b7a96d0d8ccc/send' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"senderEmail": "john.doe@company.com",
"emails": [
"jane@client.com",
"sam@client.com"
],
"message": "Here is the proposal we discussed.",
"reminder": {
"everyDays": 3
}
}'
{
"senderEmail": "john.doe@company.com",
"emails": [
"jane@client.com",
"sam@client.com"
],
"message": "Here is the proposal we discussed.",
"reminder": {
"everyDays": 3
}
}
{
"sendId": "6740c1f2a3b4c5d6e7f80912",
"sent": [
"jane@client.com",
"sam@client.com"
],
"quota": {
"per": "month",
"limit": 50,
"used": 2,
"remaining": 48
}
}
{
"error": "Missing senderEmail in request body"
}
{
"error": "senderEmail must be a valid email address"
}
{
"error": "senderEmail email@domain.com not found in this organization"
}
{
"error": "Add at least one recipient"
}
{
"error": "Invalid email address: jane@client"
}
{
"error": "You can send to up to 50 recipients at a time"
}
{
"error": "Reminders can repeat every 1 to 30 days"
}
{
"error": "Invalid tokenId."
}
{
"error": "Token has been revoked"
}
{
"error": "Token is not active"
}
{
"error": "Missing authorization token"
}
{
"error": "Access denied"
}
{
"error": "Token is outdated."
}
{
"error": "The member who created this API key is no longer in the organization."
}
{
"error": "Viewers and Commenters can't create API keys"
}
{
"error": "An API key can only send as the person who created it"
}
{
"error": "senderEmail email@domain.com doesn't have edit access to this version"
}
{
"error": "Not enough email sends remaining"
}
{
"error": "Not enough email sends remaining today"
}
{
"error": "Upgrade your plan to send automatic reminders"
}
{
"error": "Verify your email before sending"
}
{
"error": "Version not found"
}
{
"error": "Publish the version before sending it"
}
{
"error": "This version has expired"
}
{
"error": "Too many requests"
}
{
"error": "Too many emails sent. Try again later."
}
{
"error": "Error occured",
"errorId": "550e8400-e29b-41d4-a716-446655440000"
}
{
"error": "Couldn't send the email. Try again."
}