Space

Creating a space

Endpoint

POST /v1/spaces

Parameters

Name Description
space[name] required Name of space
space[domain] Domain
space[parent_id] Parent id = Space id of master space
space[dup_id] Space id for duplication

Request

cURL

curl "https://api.storyblok.com/v1/spaces" -d '{"space":{"name":"Space B","domain":"http://example.storyblok.com"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyNzUsInRpbWVzdGFtcCI6MTUyMzk2MzQ0MX0.WJ3YfXg9JeoBO_odhRrIrEQl7HiTrhlrNFCY8ZTeYuk" \

Response

Body

{
  "space": {
    "name": "Space B",
    "domain": "http://example.storyblok.com",
    "uniq_domain": null,
    "plan": "starter",
    "plan_level": 0,
    "limits": {
    },
    "created_at": "2018-04-10T11:10:41.907Z",
    "id": 194,
    "role": "admin",
    "owner_id": 275,
    "story_published_hook": null,
    "environments": null,
    "stories_count": 1,
    "parent_id": null,
    "assets_count": 0,
    "searchblok_id": null,
    "duplicatable": null,
    "request_count_today": 0,
    "api_requests": 1000,
    "exceeded_requests": 0,
    "billing_address": {
    },
    "routes": [

    ],
    "euid": null,
    "trial": true,
    "default_root": "page",
    "has_slack_webhook": false,
    "api_logs_per_month": [

    ],
    "first_token": "41XKVeDiqnAUbwLKGhw0ngtt",
    "collaborators": [

    ],
    "settings": [

    ],
    "owner": {
      "email": "westley_kemmer@friesenhuel.org",
      "alt_email": null,
      "firstname": null,
      "lastname": null,
      "phone": null,
      "id": 275,
      "login_strategy": "password",
      "created_at": "2018-04-10T11:10:41.890Z"
    }
  }
}

Updating a space

Endpoint

PUT /v1/spaces/:id

Parameters

Name Description
space[name] required Name of space
space[uniq_domain] Domain of space
space[owner_id] Owner of the space

Request

cURL

curl "https://api.storyblok.com/v1/spaces/195" -d '{"space":{"name":"Space C","uniq_domain":"www.storywwwa30e976c.com"}}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyNzcsInRpbWVzdGFtcCI6MTUyMzk2MzQ0Mn0.UW_XNBt5vak4IX3xs2fst1xk-yV9VMrMwjdcBU4ocCM" \

Response

Body

{
  "space": {
    "name": "Space C",
    "domain": "http://xxx.me.storyblok.com",
    "uniq_domain": "www.storywwwa30e976c.com",
    "plan": "starter",
    "plan_level": 999,
    "limits": {
      "plan_level": 999,
      "max_collaborators": 999
    },
    "created_at": "2018-04-10T11:10:42.016Z",
    "id": 195,
    "role": "admin",
    "owner_id": 277,
    "story_published_hook": null,
    "environments": null,
    "stories_count": 0,
    "parent_id": null,
    "assets_count": 0,
    "searchblok_id": null,
    "duplicatable": null,
    "request_count_today": 0,
    "api_requests": 1000,
    "exceeded_requests": 0,
    "billing_address": {
    },
    "routes": [

    ],
    "euid": null,
    "trial": true,
    "default_root": "root",
    "has_slack_webhook": false,
    "api_logs_per_month": [

    ],
    "first_token": "",
    "collaborators": [

    ],
    "settings": [

    ],
    "owner": {
      "email": "jeffry@skileszulauf.org",
      "alt_email": null,
      "firstname": null,
      "lastname": null,
      "phone": null,
      "id": 277,
      "login_strategy": "password",
      "created_at": "2018-04-10T11:10:42.006Z"
    }
  }
}

Documentation