Editor Session
Create a shareable link for editing template without logging in.
Create a new session
POST
https://api.usestencil.com/v1/editor/sessions
Request Body
name
Required
string
Name of the session
expires
Required
integer
Time till expire. In seconds.
template_id
Required
uuid
The template to give access to
permissions
Optional
object
Permission object
layers
Required
object
layer
object
Layer object
actions
Optional
array of string
Set the default actions for all layers. Value can be combination of "create"
, "edit"
, and "delete"
fields
Optional
array of field
object
Override default action for specific layer. See field
object.
Field object
name
Required
string
Name of the layer
actions
Required
array of string
Value can be combination of "create"
, "edit"
, and "delete"
Permission actions
Action can be combination of "create"
, "edit"
, and "delete"
.
create
When specified, user can create a new layer or duplicate an existing layer.
edit
When specified, user is allowed to make changes to the layer.
delete
When specified, user is allowed to delete the layer.
When you override the field, the permission set by the default permission is ignored.
Request body examples
Get a session
GET
https://api.usestencil.com/v1/editor/sessions/:session_id
Response body
Last updated
Was this helpful?