Skip to content

Commit a769222

Browse files
robertheesselsCompuIves
authored andcommitted
Added ?json=1 to the define doc. (codesandbox#550)
1 parent bbf5f45 commit a769222

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/homepage/content/docs/2-importing.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,11 @@ You can do the exact same steps for a POST request, but instead of a URL you'd s
112112
#### Example Sandbox
113113

114114
<iframe src="https://codesandbox.io/embed/qzlp7nw34q?editorsize=70&fontsize=14&hidenavigation=1&runonclick=1" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
115+
116+
### Define without render
117+
118+
If you want to define a new sandbox without getting it rendered, you can add `?json=1` to the request. For instance `https://codesandbox.io/api/v1/sandboxes/define?json=1`. Instead of the render, the result will be json data providing you with the `id` of the new sandbox.
119+
120+
This is useful, for instance, if you need to create a new sandbox programatically, so you can then embed it on your site (See Embed documentation).
121+
122+
Both `get` and `post` requests are supported.

0 commit comments

Comments
 (0)