Skip to main content

Getting Started

Conjure's GraphQL API is available to all users. It already has several apps and hacks built off it, using both OAuth applications and personal access tokens.

Proper documentation is coming, but here is a guide to get you up and running with personal access tokens.

As Conjure's has a GraphQL API, you can view the generated documentation using an appropriate client, such as Insomnia. Go ahead and download it from that link and open it up.

Start off a new blank workspace and click the "New Request" button.

Select the "POST" method and select "GraphQL Query" for body, then smash that "Create" button.

Set the URL to "", then click the "Schema" button, then on the dropdown press "Refresh Schema".

Once the schema is finished refreshing, the "Show Documentation" button will become enabled, go ahead and click it.

Now on the right side bar, you will see the GraphQL API documentation. You can click the orange link text to drill down into the different queries (reading data), mutations (writing data) and various data types.

We'll list your habits now, first off we need a Personal Access Token in order to authenticate the requests, to do this in Conjure go to "Settings" and then "API" (link). Create a Personal Access Token and copy the resulting access token (it'll only be shown that one time, so note it properly).

Go back to Insomnia, click the "Header" tab and add a new header "Authorization" with a value of "Bearer YOUR_ACCESS_TOKEN"

Now, click on the "GraphQL" tab. We can click on the documentation on right side bar to see what fields a Habit query returns, and compose our query.

You can see the name of the query 'habits' and the various fields it returns. Paste the below snipper into the body area of the request and click "Send"

query {
habits {
streak {

Great! We now have our habits!

Now lets say we want to create a measurement for a Timestamp Measure.

Go to the Measure in Conjure and click it, you can find it's ID in the URL (eg in "" the ID is "21"). To a create a measurement, paste the following snippet in the body area and click "Send". The time value is in ISO8601 format and you can see the fields we want returned (success, errors, the created timestamp measurement).

mutation { 
measurementTimestampCreate(input: {
measureId: "21",
attributes: {
value: "2021-04-15T11:20:52.000+01:00",
comment: "Hello API! From Insomnia!"
errors {
measurementTimestamp {

Here is a video demoing the request and showing you how to find the input attributes and the available fields for return, along with the auto complete that makes life so much easier.

{% embed url="" %}

An alternative approach, is just to copy a request the web app makes and tweak it.

Go to a measure in the web app, click "New Timestamp" to show the form dialog, then right click the page and click "Inspect" to show the Chrome Web Inspector. Click the "Network" tab in order to be able to see the request when the web app makes it.

Click the "Create" button and you will see a new request, click it to open the request information in a right side bar and scroll down to "Request Payload" to see what was sent.

Click "view source" to see the request body as JSON.

Highlight and copy the JSON request payload (you can format it nicely with JSONLint to make it more readable). Go back to Insomnia, click the "GraphQL" tab and select "JSON" from the dropdown, now paste the copied JSON request payload into the body area and edit the values accordingly.

"operationName": "measurementTimestampCreate",
"variables": {
"input": {
"measureId": "21",
"attributes": {
"value": "2021-04-15T11:20:52.000+01:00",
"comment": "Hello API! From Insomnia!"
"query": "mutation measurementTimestampCreate($input: MeasurementTimestampCreateMutationInput!) {\n measurementTimestampCreate(input: $input) {\n success\n errors {\n ...ValidationErrorsFields\n __typename\n }\n measurementTimestamp {\n ...MeasurementTimestampFields\n __typename\n }\n __typename\n }\n}\n\nfragment ValidationErrorsFields on ValidationErrors {\n messages {\n attribute\n messages\n __typename\n }\n fullMessages\n __typename\n}\n\nfragment MeasurementTimestampFields on MeasurementTimestamp {\n id\n comment\n value\n __typename\n}\n"

This approach can be copied for any action in the Conjure web app (eg creating a new time entry from the Time view).

Here is a Javascript snippet to create a measurement, that uses code obtained in the above fashion:

var accessToken = "YOUR_ACCESS_TOKEN";
var measureId = "228";
var value = new Date().toISOString();
var comment = "JS Snippet";

fetch("", {
"headers": {
"authorization": "Bearer "+accessToken,
"content-type": "application/json",
"body": "{\"operationName\":\"measurementTimestampCreate\",\"variables\":{\"input\":{\"measureId\":\""+measureId+"\",\"attributes\":{\"value\":\""+value+"\",\"comment\":\""+comment+"\"}}},\"query\":\"mutation measurementTimestampCreate($input: MeasurementTimestampCreateMutationInput!) {\\n measurementTimestampCreate(input: $input) {\\n success\\n errors {\\n ...ValidationErrorsFields\\n __typename\\n }\\n measurementTimestamp {\\n ...MeasurementTimestampFields\\n __typename\\n }\\n __typename\\n }\\n}\\n\\nfragment ValidationErrorsFields on ValidationErrors {\\n messages {\\n attribute\\n messages\\n __typename\\n }\\n fullMessages\\n __typename\\n}\\n\\nfragment MeasurementTimestampFields on MeasurementTimestamp {\\n id\\n comment\\n value\\n __typename\\n}\\n\"}",
"method": "POST"
}).then(response => {
}).catch(error => {

With the Chrome Web Inspector, you can right click the request also and copy it for JS (fetch), cURL or others, to get generated code, which you can then tweak.

This has been a brief guide, potentially introducing several new concepts, if you get stuck, feel free to reach out over the "Feedback" button in Conjure! Happy hacking 🎉