Update a thread
curl --request PUT \
--url https://api.dualmindlab.tech/api/admin/threads/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Pizza networking",
"mode": "battle",
"visibility": "private"
}
'import requests
url = "https://api.dualmindlab.tech/api/admin/threads/{id}"
payload = {
"title": "Pizza networking",
"mode": "battle",
"visibility": "private"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Pizza networking', mode: 'battle', visibility: 'private'})
};
fetch('https://api.dualmindlab.tech/api/admin/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Pizza networking', mode: 'battle', visibility: 'private'})
};
fetch('https://api.dualmindlab.tech/api/admin/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualmindlab.tech/api/admin/threads/{id}"
payload := strings.NewReader("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}")
req, _ := http.NewRequest("PUT", 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))
}using RestSharp;
var options = new RestClientOptions("https://api.dualmindlab.tech/api/admin/threads/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.dualmindlab.tech/api/admin/threads/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}")
.asString();{
"success": true,
"data": {
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "Pizza networking",
"mode": "battle",
"visibility": "private",
"message_count": 3,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "Role must be one of: admin, user"
}{
"success": false,
"error": "Role must be one of: admin, user"
}Update a thread
Writes title, mode and visibility and stamps updated_at.
Send the full record. This handler writes every field of the request DTO, so a field you leave out is saved as null. Read the record first and send all fields back with your changes.
PUT
/
api
/
admin
/
threads
/
{id}
Update a thread
curl --request PUT \
--url https://api.dualmindlab.tech/api/admin/threads/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Pizza networking",
"mode": "battle",
"visibility": "private"
}
'import requests
url = "https://api.dualmindlab.tech/api/admin/threads/{id}"
payload = {
"title": "Pizza networking",
"mode": "battle",
"visibility": "private"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Pizza networking', mode: 'battle', visibility: 'private'})
};
fetch('https://api.dualmindlab.tech/api/admin/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Pizza networking', mode: 'battle', visibility: 'private'})
};
fetch('https://api.dualmindlab.tech/api/admin/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualmindlab.tech/api/admin/threads/{id}"
payload := strings.NewReader("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}")
req, _ := http.NewRequest("PUT", 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))
}using RestSharp;
var options = new RestClientOptions("https://api.dualmindlab.tech/api/admin/threads/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.dualmindlab.tech/api/admin/threads/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Pizza networking\",\n \"mode\": \"battle\",\n \"visibility\": \"private\"\n}")
.asString();{
"success": true,
"data": {
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "Pizza networking",
"mode": "battle",
"visibility": "private",
"message_count": 3,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "Role must be one of: admin, user"
}{
"success": false,
"error": "Role must be one of: admin, user"
}AdminOnly
Bearer token, role admin
Authorizations
Supabase access token of an account with role = 'admin' in public.users.
Path Parameters
Thread ID.
Body
application/json
Last modified on October 18, 2026
Was this page helpful?
⌘I