Created
October 8, 2018 08:10
-
-
Save DominikAngerer/7e9abaf5d0017af69bb408a6bfcd7dbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require("request"); | |
| var options = { method: 'POST', | |
| url: 'https://api.storyblok.com/v1/spaces/YOUR_SPACE_ID/stories', | |
| headers: | |
| { Authorization: 'YOUR_AUTH_TOKEN', | |
| 'Content-Type': 'application/json', | |
| Accept: 'application/json' }, | |
| body: { story: | |
| { name: 'Story 1', | |
| content: { | |
| //... your content json | |
| }, | |
| slug: 'demo' } | |
| }, | |
| json: true }; | |
| request(options, function (error, response, body) { | |
| if (error) throw new Error(error); | |
| console.log(body); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment