Nolt provides public endpoints to access your board and board data in real-time. In this help article, we will describe how to use these APIs from a developer's perspective.
If you are looking for webhook integrations, please refer to our webhooks help article.
Every single board on Nolt has a way to access its data using a public API. This API can both be used to read and write data.
Our public API endpoints are available for both Pro and Enterprise plans.
To get started, you need to go to the board settings and generate an API key.
Our public API endpoints are available at:
https://api.nolt.io/api/v1/graphql
Nolt supports an interactive playground to test your queries and mutations. It can be accessed at:
https://api.nolt.io/api/v1/playground
By default, the playground will load with docs and schema for the API.
To use the API, you first need the API key, which can be generated from the board settings as described above.
Once you have the API key, you need to pass it as an HTTP header in your requests. You will also need to pass the external user ID (SSO User Id) and SSO type in the HTTP headers. The request should look like this:
curl -X POST -H "Content-Type: application/json" -H "apikey: YOUR_API_KEY" -H "ssotype: SSO_TYPE" -H "userid: USER_ID" -d "query" https://api.nolt.io/api/v1/graphql
If you are using the playground, you can pass the API key in the HTTP Headers section. The playground will automatically add the API key to all your requests.
{
"apikey": "YOUR_API_KEY",
"ssotype": "SSO_TYPE",
"userid": "USER_ID"
}
ssotype
and userid
in headers. But you will have to pass ssotype
and userId
in the mutation createUser
and use that ssotype
and userid
in the headers for future mutations and queries for that user. This should be the first step for accessing Nolt using APIs.The schema for the API is also available in the playground by clicking on the Schema tab. Following are the main types that are available in the data types:
The API supports GraphQL queries to fetch data from the board. You can refer to the GraphQL docs in the playground by clicking on the Docs tab. Schema for the API is also available in the playground by clicking on the Schema tab.
For querying, you need to use the query
keyword. For example, to fetch the board details, you can use the following query:
query {
board {
id
pid
description
name
}
}
The above query will return the following data:
{
"data": {
"board": {
"id": "1",
"pid": "YOUR_BOARD_PID",
"description": "YOUR_BOARD_DESCRIPTION",
"name": "YOUR_BOARD_NAME"
}
}
}
Note that the fields that are being passed can be found in the schema/docs
The API supports GraphQL mutations to write data to the board. You can refer to the GraphQL docs in the playground by clicking on the Docs tab. Schema for the API is also available in the playground by clicking on the Schema tab.
For mutations, you need to use the mutation
keyword. For example, to create a new post, you can use the following mutation:
mutation {
createPost(
title: "{{YOUR POST TITLE}}",
comment: "{{YOUR POST COMMENT}}",
) {
id
title
}
}
The above mutation will return the following data:
{
"data": {
"createPost": {
"id": "1",
"title": "{{YOUR POST TITLE}}"
}
}
}
Below is an example of using the API to fetch data from the board.
query {
post(
id: "1"
) {
id
title
upvoteCount
}
}
The above query will return the following data:
{
"data": {
"post": {
"id": "1",
"title": "{{YOUR POST TITLE}}",
"upvoteCount": 1
}
}
}
Setting up Webhooks
Learn how to use webhooks to integrate Nolt with your favorite tools.
Export APIs
Learn how to export your board data using APIs.