Introduction

The Management API let’s you read and write all the data you have access to from Storyblok. It can be used to extend the functionality of Storyblok - For example to import data from other sources.

Rate limits

The management api is rate limited to 3 requests per second for users on the free plan and 6 requests per second for other users.

Authentication

The easiest way to get started is to create an OAuth2 token using the Storyblok app. Go to the My Account at app.storyblok.com and click on “Generate new token”.

Using an OAuth2 token, a username and password doesn’t need to be permanently stored and you can revoke access at any time.

Examples

// 1. Require the Storyblok client
const StoryblokClient = require('storyblok-js-client')
const spaceId = 12345

// 2. Initialize the client with the oauth token
// from the my account area at https://app.storyblok.com
let Storyblok = new StoryblokClient({
  oauthToken: 'YOUR_OAUTH_TOKEN'
})

Storyblok.get('spaces')
Storyblok.post(`spaces/${spaceId}/stories`, {story: {name: 'xy', slug: 'xy'}})
Storyblok.put(`spaces/${spaceId}/stories/1`, {story: {name: 'xy', slug: 'xy'}})
Storyblok.delete(`spaces/${spaceId}/stories/1`, null)
gem 'redis'

RestClient.get 'https://api.storyblok.com/v1/spaces',
    {:Authorization => 'YOUR_OAUTH_TOKEN'}
$request = new HttpRequest();
$request->setUrl('https://api.storyblok.com/v1/spaces');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'YOUR_AUTH_TOKEN'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

Documentation