Skip to main content
Qwilr API

Quick start

To get started, you'll need to have an Enterprise Qwilr account, with the API enabled. Talk to us if you'd like us to set you up.

Creating a page from a template with the Qwilr API

The access token modal in the Qwilr API settings page

Create your Auth token

From https://app.qwilr.com/#/settings/api you can see an Auth Token generator.

Create your token, copy it, and paste it somewhere safe. You can only view the created token once, and never again.

Create a Template in Qwilr

Using Qwilr's standard editor, create a page with some content, and convert it into a template.

Create and insert a Custom Token

Using the Token menu in the editor app bar, you can create a new token called HelloWorld.

Use the token you've created by typing '{{' in most text areas, and selecting the token from the dropdown.

Grab your Template ID

Go to the Qwilr app and when editing your template, copy the ID that appears in the URL https://app.qwilr.com/#/page/template-id-here

JSON for your page

{
"templateId": "your-template-id",
"name": "This is the title of your first document",
"published": true,
"substitutions": {
"hello_world": "Hello World Text"
},
"metadata": {},
"tags": [
"qwilr-API-quick-start"
]
}

You're creating a page using the Template ID you grabbed from the URL, and you're replacing the HelloWorld token with the string "Hello World Text".

POST the JSON to Qwilr, using your Auth Token

Post the JSON to https://api-production.qwilr.com/v1/projects/

The response will have all the info you need to work with the page. See the docs for details.

Creating a page using a saved block

Create your token

If you haven't done the first Quick Start guide, from app.qwilr.com/#/settings/api you can mange your Access Tokens.

Create your token, copy it, and paste it somewhere safe. You can only view the created token once, and never again.

Create a Template in Qwilr

Using Qwilr's standard editor, create a page with some content, and convert it into a template.

Create and insert a Custom Token

Using the Token menu in the editor app bar, you can create a new token called HelloWorld.

Use the token you've created by typing '{{' in most text areas, and selecting the token from the dropdown.

Save your block

Save your block while editing your template, to save it with the inserted tokens.

Grab your saved block's ID

Under the Blocks primary nav item, find your saved block. Preview it, and click the three dots next to the save button.

Under here, click the "Copy Block ID" button to copy your saved block's ID.

(Note that there's an API to grab all the ID's of your saved blocks when it comes to completing your integration)

JSON for saved block

{
"blocks": [
{
"id": "your-saved-block-id",
"foldable": {
"enabled": false,
"isFolded": false,
"label": "string"
}
}
],
"name": "This is the title of your first document",
"published": true,
"substitutions": {
"hello_world": "Hello World Text"
},
"metadata": {},
"tags": [
"qwilr-API-quick-start"
]
}

Here you're creating a page using the saved block ID you grabbed from Qwilr, and you're replacing the HelloWorld token with the string "Hello World Text".

POST the JSON to Qwilr, using your Auth Token

POST the JSON to https://api-production.qwilr.com/v1/projects/

The response will have all the info you need to work with the page. See the Create Page API docs for additional details.