curl --request POST \
--url https://melso.ai/api/runs/{runId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/runs/{runId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/runs/{runId}/pause', 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/runs/{runId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://melso.ai/api/runs/{runId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/runs/{runId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/runs/{runId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"execution_owner_id": "<string>",
"worker_id": "<string>",
"task_id": "<string>",
"workspace_id": "<string>",
"status": "queued",
"dispatched_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"result": "<unknown>",
"error": "<string>",
"attempt": 123,
"max_attempts": 123,
"created_at": "<string>",
"delivered_message_ids": [
"<string>"
],
"kind": "<string>",
"access": {
"method": "<string>",
"reason": "<string>",
"account_id": "<string>",
"provider": "<string>",
"label": "<string>",
"email": "<string>"
},
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"execution_receipt": {
"harness": "<string>",
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"worker_id": "<string>"
},
"failure_reason": "<string>",
"parent_run_id": "<string>",
"work_dir": "<string>",
"relative_work_dir": "<string>",
"branch_name": "<string>",
"trigger_message_id": "<string>",
"coalesced_message_ids": [
"<string>"
],
"trigger_summary": "<string>",
"automation_invocation_id": "<string>",
"interaction_continuation": {
"type": "<string>",
"request_id": "<string>",
"kind": "<string>",
"status": "<string>",
"source_run_id": "<string>",
"title": "<string>",
"message": "<string>",
"payload": "<unknown>",
"response": "<unknown>",
"audit_text": "<string>",
"response_actor_type": "<string>",
"response_actor_id": "<string>",
"resolved_at": "<string>",
"resume_provider": "<string>",
"resume_session_id": "<string>",
"tool_call_id": "<string>",
"tool_name": "<string>",
"tool_result": "<unknown>"
},
"attribution": {
"source": "<string>",
"precise": true,
"initiator": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"originator": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"evidence": {
"kind": "<string>",
"ref_id": "<string>"
},
"automation_version_id": "<string>",
"delegated_from_run_id": "<string>",
"retry_of_run_id": "<string>",
"rerun_of_run_id": "<string>"
},
"usage": [
{
"model": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"provider": "<string>",
"cost_usd_ticks": 123
}
],
"billed": {
"model_usd_ticks": "<string>",
"estimated": 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>"
}Pause run
Workspace member with access to this resource.
Request: Path: Run UUID.
Response: RunResponse for the Run it acted on. A live Cloud Run drains first and keeps its status until the worker saves; it then ends cancelled with user_paused and a paused successor appears in the Task’s Runs. A queued or deferred Run is cancelled with user_paused; an already paused Run is returned unchanged.
Status: 200; 409 incompatible Run state. Authentication and resource-access errors follow Overview.
curl --request POST \
--url https://melso.ai/api/runs/{runId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://melso.ai/api/runs/{runId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://melso.ai/api/runs/{runId}/pause', 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/runs/{runId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://melso.ai/api/runs/{runId}/pause"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/runs/{runId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://melso.ai/api/runs/{runId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"execution_owner_id": "<string>",
"worker_id": "<string>",
"task_id": "<string>",
"workspace_id": "<string>",
"status": "queued",
"dispatched_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"result": "<unknown>",
"error": "<string>",
"attempt": 123,
"max_attempts": 123,
"created_at": "<string>",
"delivered_message_ids": [
"<string>"
],
"kind": "<string>",
"access": {
"method": "<string>",
"reason": "<string>",
"account_id": "<string>",
"provider": "<string>",
"label": "<string>",
"email": "<string>"
},
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"execution_receipt": {
"harness": "<string>",
"model": "<string>",
"thinking_level": "<string>",
"service_tier": "<string>",
"worker_id": "<string>"
},
"failure_reason": "<string>",
"parent_run_id": "<string>",
"work_dir": "<string>",
"relative_work_dir": "<string>",
"branch_name": "<string>",
"trigger_message_id": "<string>",
"coalesced_message_ids": [
"<string>"
],
"trigger_summary": "<string>",
"automation_invocation_id": "<string>",
"interaction_continuation": {
"type": "<string>",
"request_id": "<string>",
"kind": "<string>",
"status": "<string>",
"source_run_id": "<string>",
"title": "<string>",
"message": "<string>",
"payload": "<unknown>",
"response": "<unknown>",
"audit_text": "<string>",
"response_actor_type": "<string>",
"response_actor_id": "<string>",
"resolved_at": "<string>",
"resume_provider": "<string>",
"resume_session_id": "<string>",
"tool_call_id": "<string>",
"tool_name": "<string>",
"tool_result": "<unknown>"
},
"attribution": {
"source": "<string>",
"precise": true,
"initiator": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"originator": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"evidence": {
"kind": "<string>",
"ref_id": "<string>"
},
"automation_version_id": "<string>",
"delegated_from_run_id": "<string>",
"retry_of_run_id": "<string>",
"rerun_of_run_id": "<string>"
},
"usage": [
{
"model": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"provider": "<string>",
"cost_usd_ticks": 123
}
],
"billed": {
"model_usd_ticks": "<string>",
"estimated": 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
runId from the corresponding authorized response.
Response
RunResponse for the Run it acted on. A live Cloud Run drains first and keeps its status until the worker saves; it then ends cancelled with user_paused and a paused successor appears in the Task’s Runs. A queued or deferred Run is cancelled with user_paused; an already paused Run is returned unchanged.
queued, deferred, dispatched, running, paused, completed, failed, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes