curl --request POST \
--url https://melso.ai/api/tasks/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "For reference: the budget is approved."
}
'import requests
url = "https://melso.ai/api/tasks/{id}/messages"
payload = { "content": "For reference: the budget is approved." }
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({content: 'For reference: the budget is approved.'})
};
fetch('https://melso.ai/api/tasks/{id}/messages', 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://melso.ai/api/tasks/{id}/messages",
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([
'content' => 'For reference: the budget is approved.'
]),
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://melso.ai/api/tasks/{id}/messages"
payload := strings.NewReader("{\n \"content\": \"For reference: the budget is approved.\"\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://melso.ai/api/tasks/{id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"For reference: the budget is approved.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/tasks/{id}/messages")
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 \"content\": \"For reference: the budget is approved.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"task_id": "<string>",
"author_type": "<string>",
"author_id": "<string>",
"content": "<string>",
"role": "<string>",
"kind": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"reactions": [
{
"id": "<string>",
"message_id": "<string>",
"actor_type": "<string>",
"actor_id": "<string>",
"emoji": "<string>",
"created_at": "<string>"
}
],
"attachments": [
{
"id": "<string>",
"workspace_id": "<string>",
"task_id": "<string>",
"message_id": "<string>",
"run_id": "<string>",
"uploader_type": "<string>",
"uploader_id": "<string>",
"filename": "<string>",
"url": "<string>",
"download_url": "<string>",
"markdown_url": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"created_at": "<string>",
"attachment_download_url": "<string>"
}
],
"run_id": "<string>",
"failure_reason": "<string>",
"elapsed_ms": 123,
"final": true
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Create task message
Workspace member with access to this resource.
Request: content:string, attachment_ids?:UUID[].
Response: TaskMessageResponse. A member’s message reopens a completed Task but never starts a Run.
Status: 201; 400 empty content/invalid attachments; 409 cancelled Task. Authentication and resource-access errors follow Overview.
curl --request POST \
--url https://melso.ai/api/tasks/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "For reference: the budget is approved."
}
'import requests
url = "https://melso.ai/api/tasks/{id}/messages"
payload = { "content": "For reference: the budget is approved." }
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({content: 'For reference: the budget is approved.'})
};
fetch('https://melso.ai/api/tasks/{id}/messages', 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://melso.ai/api/tasks/{id}/messages",
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([
'content' => 'For reference: the budget is approved.'
]),
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://melso.ai/api/tasks/{id}/messages"
payload := strings.NewReader("{\n \"content\": \"For reference: the budget is approved.\"\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://melso.ai/api/tasks/{id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"For reference: the budget is approved.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/tasks/{id}/messages")
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 \"content\": \"For reference: the budget is approved.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"task_id": "<string>",
"author_type": "<string>",
"author_id": "<string>",
"content": "<string>",
"role": "<string>",
"kind": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"reactions": [
{
"id": "<string>",
"message_id": "<string>",
"actor_type": "<string>",
"actor_id": "<string>",
"emoji": "<string>",
"created_at": "<string>"
}
],
"attachments": [
{
"id": "<string>",
"workspace_id": "<string>",
"task_id": "<string>",
"message_id": "<string>",
"run_id": "<string>",
"uploader_type": "<string>",
"uploader_id": "<string>",
"filename": "<string>",
"url": "<string>",
"download_url": "<string>",
"markdown_url": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"created_at": "<string>",
"attachment_download_url": "<string>"
}
],
"run_id": "<string>",
"failure_reason": "<string>",
"elapsed_ms": 123,
"final": true
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Company API key (mwk_) or personal access token (mel_). A PAT requires X-Workspace-ID on company-scoped routes. An API key implies its own company.
Headers
Company UUID for a personal token on company-scoped operations. A company API key already binds its company.
Path Parameters
id from the corresponding authorized response.
Response
TaskMessageResponse. A member’s message reopens a completed Task but never starts a Run.
Show child attributes
Show child attributes
Show child attributes
Show child attributes