Slite API

Our public API is available on all plans.


Introduction

With the Slite API, developers can connect other software to Slite docs and automate actions within your workspace.

Some examples of things that can be done with the API include:
  • List and search Slite docs and sub-docs
  • Create new docs
  • Replace doc content
  • Update existing doc content
  • Create, update, and replace docs in a collection

Slite also provides  dedicated integrations  including Slack, Linear and Jira, as well as a  Zapier  connector —all without the need for coding.



Technical Documentation

The full documentation is available  on this page , or on any open API viewer.

We are using the Open API v3.0 standard to facilitate usage of our api.
If you fancy a different viewer, find the json spec here:  https://api.slite.com/openapi.json .


Endpoint

Slite endpoint is:
https://api.slite.com/v1/{path}


Authentication - Get your API key

Every call to our public API has to be authenticated with a personal API key, generated in your settings.

    .1Open the menu of your organization, located at the top left of the app
    .2Click on Settings
    .3In the left panel of the settings, click on API
    .4Once you are on the dedicated API page, you click on "Create a new key" and follow the instructions
    .5Note: The API key will only be displayed once, so make sure to save it. You can request multiple API keys and revoke any that are not being used.


To authenticate your requests, you need to pass the newly created key as an  x-slite-api-key  header:
curl --location 'https://api.slite.com/v1/notes' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-slite-api-key: <API Key>' \
--data '{
"title": "<string>",
"parentNoteId": "<string>",
"templateId": "<string>",
"markdown": "<string>",
"attributes": [
"<string>",
"<string>"
]
}'


Update a block with external data

We'll showcase here how to sync a block in a doc with external information. The example block will display revenue of the last month and latest customers.

    .1Create a doc and get its id
    .2Copy a block id
    .3Push data via the Update Tile route to update the block
curl --request PUT \
--url https://api.slite.com/v1/notes/<Doc id>/tiles/<Block id> \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-slite-api-key: <API key>' \
--data '
{
"status": {
"label": "104%",
"colorHex": "#7FFF00"
},
"title": "Revenue for September 2023 - 340k
quot;
,
"content": "- Latest customers: Acme (3k$ MRR), Fijo (5k$ MRR) - Goal for the month was: 332k$ - Growth: 8% MoM",
"url": "https://dashboard.revenu"
}
'
    .4Check your new enriched block with external data