Ask a question
curl --request POST \
--url https://api.super.work/v1/super \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "What are the onboarding steps?",
"parentId": "<string>",
"assistantId": "<string>",
"callbackUrl": "<string>"
}
'import requests
url = "https://api.super.work/v1/super"
payload = {
"question": "What are the onboarding steps?",
"parentId": "<string>",
"assistantId": "<string>",
"callbackUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
question: 'What are the onboarding steps?',
parentId: '<string>',
assistantId: '<string>',
callbackUrl: '<string>'
})
};
fetch('https://api.super.work/v1/super', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.super.work/v1/super",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'question' => 'What are the onboarding steps?',
'parentId' => '<string>',
'assistantId' => '<string>',
'callbackUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.super.work/v1/super"
payload := strings.NewReader("{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.super.work/v1/super")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.super.work/v1/super")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"answer": "The onboarding steps are...",
"sources": [
{
"title": "Onboarding",
"url": "https://slite.slite.page/p/S1TSuHnZf/Security-at-Slite",
"id": "S1TSuHnZf",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
]
}{
"message": "Invalid apiKey",
"id": "auth/unauthorized"
}{
"name": "<string>",
"message": "<string>",
"id": "<string>",
"status": 123,
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"id": "<string>",
"status": 123,
"stack": "<string>"
}{
"message": "<string>",
"id": "<string>"
}Ask a question
Ask a question to your super assistant The scope of the data used to answer the question is restricted to the authenticated user. Various optional filters are available to restrict the scope of the data even more.
POST
/
super
Ask a question
curl --request POST \
--url https://api.super.work/v1/super \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "What are the onboarding steps?",
"parentId": "<string>",
"assistantId": "<string>",
"callbackUrl": "<string>"
}
'import requests
url = "https://api.super.work/v1/super"
payload = {
"question": "What are the onboarding steps?",
"parentId": "<string>",
"assistantId": "<string>",
"callbackUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
question: 'What are the onboarding steps?',
parentId: '<string>',
assistantId: '<string>',
callbackUrl: '<string>'
})
};
fetch('https://api.super.work/v1/super', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.super.work/v1/super",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'question' => 'What are the onboarding steps?',
'parentId' => '<string>',
'assistantId' => '<string>',
'callbackUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.super.work/v1/super"
payload := strings.NewReader("{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.super.work/v1/super")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.super.work/v1/super")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question\": \"What are the onboarding steps?\",\n \"parentId\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"answer": "The onboarding steps are...",
"sources": [
{
"title": "Onboarding",
"url": "https://slite.slite.page/p/S1TSuHnZf/Security-at-Slite",
"id": "S1TSuHnZf",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
]
}{
"message": "Invalid apiKey",
"id": "auth/unauthorized"
}{
"name": "<string>",
"message": "<string>",
"id": "<string>",
"status": 123,
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"id": "<string>",
"status": 123,
"stack": "<string>"
}{
"message": "<string>",
"id": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Question to ask on super
Example:
"What are the onboarding steps?"
Optional filter to only return data under this parent note id
Optional filter to use a specific assistant for super only
Optional callback URL to send the answer to.
⌘I

