API Reference
v1.0.0Introduction
Welcome to the Qwilr Public API documentation. With our API you'll be able to generate Qwilr Pages programmatically. This means you can generate custom quotes, create pages when someone fills out a form, or anything else. The sky is the limit.
Our API is organized around REST. All calls made are live. If you need to test outside of your live account, get in touch with our team for options around that.
If you're looking for help with the Qwilr app you can find that in our help documentation.
If you have any questions about our API, please get in touch at help@qwilr.com.
Getting started?Check out our to walk through the process of getting set up
https://api.qwilr.com/v1
Authentication
bearerAuth
All requests to API need to be authenticated with your account's access token. You can find your access token in the Qwilr API Settings:
Your access token allows anyone to access your Qwilr Pages and account. Be sure to keep it secret! Do not share your secret access tokens in any public spaces such as your source repository, client-side code, and so forth.
When making a request:
- Use your access token with bearer authentication in the headers.
For example:
Authorization: Bearer fakeaccesstoken
- Send all requests over HTTPS
Security Scheme Type | http |
HTTP Authorization Scheme | bearer |
Bearer format | JWT |

Pages
Page objects correspond to pages in the Qwilr UI, allowing for the creation of a public-facing Qwilr Page. The Qwilr API allows you to create, delete and replace your Pages by sending through JSON objects.
Create a page
Creates a page from saved blocks or template.
Authorizations
bearerAuthAttributes
- blocksRequiredarray of objects
- namestring
Title of the page, visible as the browser title.
- publishedboolean
Whether the page is publically available;
false
means the page will be in Draft status. Default isfalse
. - substitutionsobject
Mapping of token API reference keys to substitution values used throughout the page. The values can be overwritten if the same keys are defined in the block-level substitutions.
- metadataobject
Data you provide, that will be returned as part of all Webhooks.
- tagsarray of strings
These tags to be applied to your page. Tags are case-sensitive.
Responses
{ "blocks": [ { "id": "uCHq6B6_S1EqZ2pyam8YVfUldvoF-Q", "foldable": { "enabled": true, "isFolded": true, "label": "string" }, "quoteSettings": { "selectionType": "single", "selectionRequired": true, "currency": "USD", "showTotalDiscount": true, "showTaxTotals": true, "showTotalExcludingTax": true, "quoteDiscount": { "type": "fixed", "amount": 0 } }, "acceptSettings": { "postAcceptance": { "enabled": true, "url": "string", "continueLabel": "string" } }, "quoteSections": [ { "description": "string", "lineItems": [ { "type": "fixedCost", "description": "string", "unitPrice": 0, "unitLabel": "string", "quantity": 0, "quantityRange": { "min": 0, "max": 0 }, "taxExempt": true, "optional": true, "selected": true, "lineItemDiscount": { "type": "fixed", "amount": 0 }, "metadata": {} } ], "settings": { "showSubtotal": true, "showUnitPrice": true, "showQuantity": true, "showCost": true, "selected": true, "selectionRequired": true, "sectionDiscount": { "type": "fixed", "amount": 0 } }, "metadata": {} } ], "substitutions": { "block_token_key": "Example value", "repeating_token_key": [ { "item_property": "value1" }, { "item_property": "value2" } ] } } ], "name": "string", "published": true, "substitutions": { "page_token_key": "Example value", "repeating_token_key": [ { "item_property": "value1" }, { "item_property": "value2" } ] }, "metadata": {}, "tags": [ "string" ]}
Get a page
Returns a page
Path parameters
- pageIdRequiredstring(Id) ^[a-z0-9]{24}$
- expandarray of enums
"metadata"
"acceptance"
"previewAcceptance"
Responses
Update page
Allows you to update the published
property.
Authorizations
bearerAuthPath parameters
- pageIdRequiredstring(Id) ^[a-z0-9]{24}$
Attributes
- publishedboolean
Responses
{ "published": true}
Blocks
Block objects correspond to blocks in the Qwilr UI. Pages and templates are composed of a series of blocks. The Qwilr API allows you to get saved blocks from your account.
Get saved blocks
Allows you to retrieve a list of saved blocks from your account, with block names. Useful in developer workflow for mapping block names to saved block IDs.
Responses
Subscriptions
Webhooks allow you to subscribe and unsubscribe from events on your Qwilr account.
Get a list of all webhook subscriptions
Allows you to retrieve a list of all the webhook subscriptions that you have created using the create webhook subscription endpoint.
Responses
Create a webhook event subscription
Creates a new webhook subscription to an event type. New events will be sent to the defined targetUrl
. You should store the id
field returned in case you want to cancel the subscription later on.
Authorizations
bearerAuthAttributes
- eventRequiredenum
"pageAccepted"
"pagePreviewAccepted"
"pageViewed"
"pageFirstViewed"
- targetUrlRequiredstring
Responses
Callbacks
{ "event": "pageAccepted", "targetUrl": "string"}
Cancel a webhook event subscription
Cancels a webhook event subscription using the id
field that was returned when the webhook subscription was created.
Path parameters
- subscriptionIdRequiredstring
The id returned when your subscription was created
Responses
Unsubscribed