Shorthand provides developers access to Shorthand stories through the use of the Shorthand API. The Shorthand API is an easy way to access and download stories into an external CMS. This API is the same API which powers our Wordpress and Drupal plugins.

To discuss setting up this option for your Shorthand workspace, please contact us for details.

Some technical detail:


The Shorthand API requires TLS1.2 support, please ensure that your client code supports this protocol.

Authentication is done at a team level, stories are gathered across the entire team. Authentication is token based, requiring a TOKEN in the Authorization: Token HTTP header. Only stories that are marked 'ready for publishing' or ’published’ will be available.
To generate an API token, click on the small cog icon next to your workspace name on the Shorthand dashboard:

A panel titled "workspace settings" will open on the right side of the dashboard.  

At the bottom of the panel is a section labelled API Tokens. You may need to first generate a workspace token by clicking 'GENERATE' on the right hand side.  Then click "ADD A NEW TEAM API TOKEN", choose a team from the drop-down menu if your workspace has more than one team, and click "ADD TOKEN".

API Signature:
Authorization: Token [TOKEN][ENDPOINT]


GET v2/token-info/

Returns an object of the teams profile.
GET v2/stories/

Returns a list of stories that exist for the current user.
GET v2/stories/[STORY_ID]/

Returns a ZIP archive of the story.
GET v2/stories/[STORY_ID]/settings

Returns settings for that story
POST v2/stories/[STORY_ID]/settings

Send an updated JSON nested dict of the 
GET response to update settings.  
Note that you can send just the keys
you wish to update.  

{ "meta" : { "title" : "My new title" }}

Protocol must be https
content-type header must be application/json

ZIP file:
The ZIP file contains all information related to the story, including all assets, CSS and JS files. For more information about the ZIP file see here.

Note that when the API is used to publish a story, the user who created the token will be registered as the user who last published the story.  Take this into account when creating API tokens - it may be worthwhile creating an API user account to ensure valid reporting.