Upsert a table
curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"table_id": "<string>",
"description": "<string>",
"timestamp": 123,
"tags": [
"<string>"
],
"mime_type": "<string>"
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables"
payload = {
"name": "<string>",
"title": "<string>",
"table_id": "<string>",
"description": "<string>",
"timestamp": 123,
"tags": ["<string>"],
"mime_type": "<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({
name: '<string>',
title: '<string>',
table_id: '<string>',
description: '<string>',
timestamp: 123,
tags: ['<string>'],
mime_type: '<string>'
})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables",
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([
'name' => '<string>',
'title' => '<string>',
'table_id' => '<string>',
'description' => '<string>',
'timestamp' => 123,
'tags' => [
'<string>'
],
'mime_type' => '<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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables")
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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"table": {
"name": "Roi data",
"title": "ROI Data",
"table_id": "1234f4567c",
"description": "roi data for Q1",
"mime_type": "text/csv",
"schema": [
{
"name": "roi",
"value_type": "int",
"possible_values": [
"1",
"2",
"3"
]
}
],
"timestamp": 1732810375150,
"tags": [
"<string>"
],
"parent_id": "1234f4567c",
"parents": [
"1234f4567c"
]
}
}Datasources
Upsert a table
Upsert a table in the data source identified by in the workspace identified by .
POST
/
api
/
v1
/
w
/
{wId}
/
spaces
/
{spaceId}
/
data_sources
/
{dsId}
/
tables
Upsert a table
curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"title": "<string>",
"table_id": "<string>",
"description": "<string>",
"timestamp": 123,
"tags": [
"<string>"
],
"mime_type": "<string>"
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables"
payload = {
"name": "<string>",
"title": "<string>",
"table_id": "<string>",
"description": "<string>",
"timestamp": 123,
"tags": ["<string>"],
"mime_type": "<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({
name: '<string>',
title: '<string>',
table_id: '<string>',
description: '<string>',
timestamp: 123,
tags: ['<string>'],
mime_type: '<string>'
})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables",
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([
'name' => '<string>',
'title' => '<string>',
'table_id' => '<string>',
'description' => '<string>',
'timestamp' => 123,
'tags' => [
'<string>'
],
'mime_type' => '<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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/tables")
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 \"name\": \"<string>\",\n \"title\": \"<string>\",\n \"table_id\": \"<string>\",\n \"description\": \"<string>\",\n \"timestamp\": 123,\n \"tags\": [\n \"<string>\"\n ],\n \"mime_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"table": {
"name": "Roi data",
"title": "ROI Data",
"table_id": "1234f4567c",
"description": "roi data for Q1",
"mime_type": "text/csv",
"schema": [
{
"name": "roi",
"value_type": "int",
"possible_values": [
"1",
"2",
"3"
]
}
],
"timestamp": 1732810375150,
"tags": [
"<string>"
],
"parent_id": "1234f4567c",
"parents": [
"1234f4567c"
]
}
}Authorizations
Your DUST API key is a Bearer token.
Path Parameters
Unique string identifier for the workspace
ID of the space
ID of the data source
Body
application/json
Name of the table
Title of the table
Unique identifier for the table
Description of the table
Unix timestamp (in milliseconds) for the table (e.g. 1736365559000).
Tags associated with the table
Reserved for internal use, should not be set. Mime type of the table
Response
The table
Show child attributes
Show child attributes