Validate Canvas Edit
curl --request POST \
--url https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"op": "insert_clip",
"track_id": "<string>",
"clip": {
"id": "<string>",
"source": {
"kind": "composition",
"composition_id": "<string>"
},
"start": {
"value": "<string>",
"timescale": 1073741824
},
"duration": {
"value": "<string>",
"timescale": 1073741824
},
"source_start": {
"value": "<string>",
"timescale": 1073741824
},
"rate": {
"numerator": 2,
"denominator": 2
},
"enabled": true,
"name": "<string>",
"audio": {
"gain_db": 123,
"preserve_pitch": true
},
"preserve_pitch": true,
"gain_db": 123,
"pan": 0,
"fade_in": {
"duration": {
"value": "<string>",
"timescale": 1073741824
}
},
"fade_out": {
"duration": {
"value": "<string>",
"timescale": 1073741824
}
}
}
}
]
}
'import requests
url = "https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate"
payload = { "operations": [
{
"op": "insert_clip",
"track_id": "<string>",
"clip": {
"id": "<string>",
"source": {
"kind": "composition",
"composition_id": "<string>"
},
"start": {
"value": "<string>",
"timescale": 1073741824
},
"duration": {
"value": "<string>",
"timescale": 1073741824
},
"source_start": {
"value": "<string>",
"timescale": 1073741824
},
"rate": {
"numerator": 2,
"denominator": 2
},
"enabled": True,
"name": "<string>",
"audio": {
"gain_db": 123,
"preserve_pitch": True
},
"preserve_pitch": True,
"gain_db": 123,
"pan": 0,
"fade_in": { "duration": {
"value": "<string>",
"timescale": 1073741824
} },
"fade_out": { "duration": {
"value": "<string>",
"timescale": 1073741824
} }
}
}
] }
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({
operations: [
{
op: 'insert_clip',
track_id: '<string>',
clip: {
id: '<string>',
source: {kind: 'composition', composition_id: '<string>'},
start: {value: '<string>', timescale: 1073741824},
duration: {value: '<string>', timescale: 1073741824},
source_start: {value: '<string>', timescale: 1073741824},
rate: {numerator: 2, denominator: 2},
enabled: true,
name: '<string>',
audio: {gain_db: 123, preserve_pitch: true},
preserve_pitch: true,
gain_db: 123,
pan: 0,
fade_in: {duration: {value: '<string>', timescale: 1073741824}},
fade_out: {duration: {value: '<string>', timescale: 1073741824}}
}
}
]
})
};
fetch('https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate', 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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate",
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([
'operations' => [
[
'op' => 'insert_clip',
'track_id' => '<string>',
'clip' => [
'id' => '<string>',
'source' => [
'kind' => 'composition',
'composition_id' => '<string>'
],
'start' => [
'value' => '<string>',
'timescale' => 1073741824
],
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
],
'source_start' => [
'value' => '<string>',
'timescale' => 1073741824
],
'rate' => [
'numerator' => 2,
'denominator' => 2
],
'enabled' => true,
'name' => '<string>',
'audio' => [
'gain_db' => 123,
'preserve_pitch' => true
],
'preserve_pitch' => true,
'gain_db' => 123,
'pan' => 0,
'fade_in' => [
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
]
],
'fade_out' => [
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
]
]
]
]
]
]),
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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate")
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 \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}canvas-actions
Validate Canvas Edit
Validate the current Main Edit or a proposed operation batch without writing.
POST
/
canvases
/
{canvas_ref}
/
edit
/
validate
Validate Canvas Edit
curl --request POST \
--url https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
{
"op": "insert_clip",
"track_id": "<string>",
"clip": {
"id": "<string>",
"source": {
"kind": "composition",
"composition_id": "<string>"
},
"start": {
"value": "<string>",
"timescale": 1073741824
},
"duration": {
"value": "<string>",
"timescale": 1073741824
},
"source_start": {
"value": "<string>",
"timescale": 1073741824
},
"rate": {
"numerator": 2,
"denominator": 2
},
"enabled": true,
"name": "<string>",
"audio": {
"gain_db": 123,
"preserve_pitch": true
},
"preserve_pitch": true,
"gain_db": 123,
"pan": 0,
"fade_in": {
"duration": {
"value": "<string>",
"timescale": 1073741824
}
},
"fade_out": {
"duration": {
"value": "<string>",
"timescale": 1073741824
}
}
}
}
]
}
'import requests
url = "https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate"
payload = { "operations": [
{
"op": "insert_clip",
"track_id": "<string>",
"clip": {
"id": "<string>",
"source": {
"kind": "composition",
"composition_id": "<string>"
},
"start": {
"value": "<string>",
"timescale": 1073741824
},
"duration": {
"value": "<string>",
"timescale": 1073741824
},
"source_start": {
"value": "<string>",
"timescale": 1073741824
},
"rate": {
"numerator": 2,
"denominator": 2
},
"enabled": True,
"name": "<string>",
"audio": {
"gain_db": 123,
"preserve_pitch": True
},
"preserve_pitch": True,
"gain_db": 123,
"pan": 0,
"fade_in": { "duration": {
"value": "<string>",
"timescale": 1073741824
} },
"fade_out": { "duration": {
"value": "<string>",
"timescale": 1073741824
} }
}
}
] }
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({
operations: [
{
op: 'insert_clip',
track_id: '<string>',
clip: {
id: '<string>',
source: {kind: 'composition', composition_id: '<string>'},
start: {value: '<string>', timescale: 1073741824},
duration: {value: '<string>', timescale: 1073741824},
source_start: {value: '<string>', timescale: 1073741824},
rate: {numerator: 2, denominator: 2},
enabled: true,
name: '<string>',
audio: {gain_db: 123, preserve_pitch: true},
preserve_pitch: true,
gain_db: 123,
pan: 0,
fade_in: {duration: {value: '<string>', timescale: 1073741824}},
fade_out: {duration: {value: '<string>', timescale: 1073741824}}
}
}
]
})
};
fetch('https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate', 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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate",
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([
'operations' => [
[
'op' => 'insert_clip',
'track_id' => '<string>',
'clip' => [
'id' => '<string>',
'source' => [
'kind' => 'composition',
'composition_id' => '<string>'
],
'start' => [
'value' => '<string>',
'timescale' => 1073741824
],
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
],
'source_start' => [
'value' => '<string>',
'timescale' => 1073741824
],
'rate' => [
'numerator' => 2,
'denominator' => 2
],
'enabled' => true,
'name' => '<string>',
'audio' => [
'gain_db' => 123,
'preserve_pitch' => true
],
'preserve_pitch' => true,
'gain_db' => 123,
'pan' => 0,
'fade_in' => [
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
]
],
'fade_out' => [
'duration' => [
'value' => '<string>',
'timescale' => 1073741824
]
]
]
]
]
]),
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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate"
payload := strings.NewReader("{\n \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\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://api.moda.app/v1/canvases/{canvas_ref}/edit/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moda.app/v1/canvases/{canvas_ref}/edit/validate")
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 \"operations\": [\n {\n \"op\": \"insert_clip\",\n \"track_id\": \"<string>\",\n \"clip\": {\n \"id\": \"<string>\",\n \"source\": {\n \"kind\": \"composition\",\n \"composition_id\": \"<string>\"\n },\n \"start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"source_start\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n },\n \"rate\": {\n \"numerator\": 2,\n \"denominator\": 2\n },\n \"enabled\": true,\n \"name\": \"<string>\",\n \"audio\": {\n \"gain_db\": 123,\n \"preserve_pitch\": true\n },\n \"preserve_pitch\": true,\n \"gain_db\": 123,\n \"pan\": 0,\n \"fade_in\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n },\n \"fade_out\": {\n \"duration\": {\n \"value\": \"<string>\",\n \"timescale\": 1073741824\n }\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}{
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"request_id": "<string>",
"causes": [
"<unknown>"
],
"details": {},
"retry_after_ms": 123,
"retryable": true
}Authorizations
API key from Settings > Developer > REST API
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
Available options:
2026-04-12, 2026-05-01 Example:
"2026-05-01"
Path Parameters
Body
application/json
operations
(EditInsertClipRequest · object | EditMoveClipRequest · object | EditTrimClipRequest · object | EditRemoveClipRequest · object | EditReorderClipRequest · object)[] | null
Required array length:
1 - 100 elements- EditInsertClipRequest
- EditMoveClipRequest
- EditTrimClipRequest
- EditRemoveClipRequest
- EditReorderClipRequest
Show child attributes
Show child attributes
Response
Successful Response
The response is of type Response Editvalidate · object.
⌘I