Every call to our public API has to be authenticated with a personal API key, generated in your settings.
Open the menu of your organization, located at the top left of the app
Click on Settings
In the left panel of the settings, click on API
Once you are on the dedicated API page, you click on "Create a new key" and follow the instructions
Note: 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.
Create a new public API key
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.
Create a doc and get its id
Copy a block id
1. Copy the doc id
2. Click on the left of any block to copy its id
Push data via the Update Tile route to update the block