curl --request POST \
--url https://melso.ai/api/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "Compare the build options.",
"execution": {
"harness": "codex"
}
}
'import requests
url = "https://melso.ai/api/tasks"
payload = {
"input": "Compare the build options.",
"execution": { "harness": "codex" }
}
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({input: 'Compare the build options.', execution: {harness: 'codex'}})
};
fetch('https://melso.ai/api/tasks', 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",
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([
'input' => 'Compare the build options.',
'execution' => [
'harness' => 'codex'
]
]),
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"
payload := strings.NewReader("{\n \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/tasks")
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 \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\n}"
response = http.request(request)
puts response.read_body{
"execution": {
"version": "<string>",
"harness": "<string>",
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"worker_id": "<string>"
},
"id": "<string>",
"workspace_id": "<string>",
"number": 123,
"identifier": "<string>",
"title": "<string>",
"description": "<string>",
"status": "cancelled",
"delivered_at": "<string>",
"completed_at": "<string>",
"cancelled_at": "<string>",
"creator_type": "<string>",
"creator_id": "<string>",
"parent_task_id": "<string>",
"area_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"origin_type": "<string>",
"metadata": {},
"isolated": true,
"execution_identity_id": "<string>",
"participant_member_ids": [
"<string>"
],
"participant_harnesses": [
"<string>"
],
"has_pending_interaction": true,
"has_active_run": true,
"has_paused_run": true,
"attention_reason": "<string>",
"failure_reason": "<string>",
"failure_class": "<string>",
"unread": true,
"viewer_participated": true,
"pull_request": {
"number": 123,
"state": "<string>",
"html_url": "<string>",
"additions": 123,
"deletions": 123,
"changed_files": 123,
"checks_rollup": "<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>"
}{
"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>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Create task
Workspace member with access to this resource.
Request: title?: string (derived from nonempty input when omitted), input?: string, description?: string|null, area_id?: UUID|null, parent_task_id?: UUID|null, attachment_ids?: UUID[], client_request_id?: UUID, allow_duplicate?: boolean, callback_url?: HTTPS URL, execution?: {harness:string,model?:string,thinking_level?:string,service_tier?:string,max_attempts?:1}, start?: boolean (false saves the Task and its input without running it; an autónomo’s or an empresa’s company otherwise runs input alone on its default execution, and refuses area_id or an execution other than that default with 400 agents_only), isolated?: boolean (default false, immutable; see Isolated Tasks), mcp_servers?: McpServerInput[] (at most 10, stored before the first Run starts; workspace owners, admins and API keys only; see Task MCP servers). Execution requires nonempty input. Text fields must not contain NUL characters, and the JSON body is limited to 1 MiB. origin_type/origin_id are restricted to the authenticated source Run.
Response: TaskResponse with the same derived fields as GET /api/tasks/{id}, plus the initial run_id when a Run was created. A client_request_id replay returns the original Task in its current state and the same run_id; see Idempotency. The response never includes mcp_servers; read them with GET /api/tasks/{id}/mcp-servers.
Status: 201; 400 invalid input (code: "task_mcp_servers_invalid" for mcp_servers); 403 code: "task_mcp_servers_forbidden" when mcp_servers come from anyone but a workspace owner, admin or API key, Run tokens included; 413 body over 1 MiB or mcp_servers over 64 KiB sealed; 409 duplicate/idempotency/company/callback-secret conflict; 503 webhook signing or, with mcp_servers, the Secrets unavailable. Authentication and resource-access errors follow Overview.
Creation also accepts metadata, instructions, repositories, and execution_identity_id. The execution object accepts funding_source and provider_account_id; see the request schema and Task context. Requested execution funding that is unavailable returns 409 with error: requested execution funding is unavailable.
curl --request POST \
--url https://melso.ai/api/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "Compare the build options.",
"execution": {
"harness": "codex"
}
}
'import requests
url = "https://melso.ai/api/tasks"
payload = {
"input": "Compare the build options.",
"execution": { "harness": "codex" }
}
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({input: 'Compare the build options.', execution: {harness: 'codex'}})
};
fetch('https://melso.ai/api/tasks', 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",
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([
'input' => 'Compare the build options.',
'execution' => [
'harness' => 'codex'
]
]),
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"
payload := strings.NewReader("{\n \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/tasks")
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 \"input\": \"Compare the build options.\",\n \"execution\": {\n \"harness\": \"codex\"\n }\n}"
response = http.request(request)
puts response.read_body{
"execution": {
"version": "<string>",
"harness": "<string>",
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"worker_id": "<string>"
},
"id": "<string>",
"workspace_id": "<string>",
"number": 123,
"identifier": "<string>",
"title": "<string>",
"description": "<string>",
"status": "cancelled",
"delivered_at": "<string>",
"completed_at": "<string>",
"cancelled_at": "<string>",
"creator_type": "<string>",
"creator_id": "<string>",
"parent_task_id": "<string>",
"area_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"origin_type": "<string>",
"metadata": {},
"isolated": true,
"execution_identity_id": "<string>",
"participant_member_ids": [
"<string>"
],
"participant_harnesses": [
"<string>"
],
"has_pending_interaction": true,
"has_active_run": true,
"has_paused_run": true,
"attention_reason": "<string>",
"failure_reason": "<string>",
"failure_class": "<string>",
"unread": true,
"viewer_participated": true,
"pull_request": {
"number": 123,
"state": "<string>",
"html_url": "<string>",
"additions": 123,
"deletions": 123,
"changed_files": 123,
"checks_rollup": "<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>"
}{
"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>"
}{
"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.
Body
At most 20 repository grants, fixed at Task creation. Requires an admin company key and an enabled integration broker. Each grant names a canonical GitHub HTTPS URL, read or write permission and a credential_reference identifying an authorization grant, never a token. The broker response must contain token, expires_at and permission matching the request. expires_at must be more than 30 seconds and at most 70 minutes after the exchange validation time. This expiry rule applies to the broker response, not to a Task creation field.
20Show child attributes
Show child attributes
A flat map of strings, numbers and booleans with at most 50 keys. Keys match ^[a-zA-Z_][a-zA-Z0-9_.-]{0,63}$. The encoded create value and stored JSONB each have an 8 KiB limit; storage size is checked by the server, not by a JSON Schema character limit. Null values, arrays and nested objects are rejected.
Show child attributes
Show child attributes
Immutable guidance for every Run on the Task. At most 32768 UTF-8 bytes and no NUL characters. The server checks bytes, not Unicode character count. Run credentials cannot configure this field.
^[^ ]*$Show child attributes
Show child attributes
At most 10 servers with unique, non-reserved names. Each server uses exactly one of a remote HTTPS url or a stdio command. headers belong to remote servers; args and env belong to stdio servers. The encrypted set is limited to 64 KiB; the server rejects a larger sealed set with HTTP 413. This encrypted-size limit cannot be measured as JSON character count. Header and environment values are write-only; GET returns McpServerSummary objects.
10Show child attributes
Show child attributes
Response
TaskResponse with the same derived fields as GET /api/tasks/{id}, plus the initial run_id when a Run was created. A client_request_id replay returns the original Task in its current state and the same run_id; see Idempotency. The response never includes mcp_servers; read them with GET /api/tasks/{id}/mcp-servers.
Show child attributes
Show child attributes
cancelled, done, working, paused, needs_you, to_review, idle Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes